diff --git a/babel.config.cjs b/babel.config.cjs index f243a1f0ee..d7c97f55c3 100644 --- a/babel.config.cjs +++ b/babel.config.cjs @@ -1,9 +1,12 @@ module.exports = { - "presets": [ - ["@babel/preset-env", { - "targets": { - "node": "current" - } - }] - ] + presets: [ + [ + '@babel/preset-env', + { + targets: { + node: 'current', + }, + }, + ], + ], }; diff --git a/jest.config.cjs b/jest.config.cjs index 58d8d37935..9615cf12d5 100644 --- a/jest.config.cjs +++ b/jest.config.cjs @@ -2,186 +2,182 @@ // https://jestjs.io/docs/en/configuration.html module.exports = { - // All imported modules in your tests should be mocked automatically - // automock: false, + // All imported modules in your tests should be mocked automatically + // automock: false, - // Stop running tests after `n` failures - // bail: 0, + // Stop running tests after `n` failures + // bail: 0, - // Respect "browser" field in package.json when resolving modules - // browser: false, + // Respect "browser" field in package.json when resolving modules + // browser: false, - // The directory where Jest should store its cached dependency information - // cacheDirectory: "/private/var/folders/93/0vvb2l_121s9z4369x9mrt340000gn/T/jest_dx", + // The directory where Jest should store its cached dependency information + // cacheDirectory: "/private/var/folders/93/0vvb2l_121s9z4369x9mrt340000gn/T/jest_dx", - // Automatically clear mock calls and instances between every test - clearMocks: true, + // Automatically clear mock calls and instances between every test + clearMocks: true, - // Indicates whether the coverage information should be collected while executing the test - // collectCoverage: false, + // Indicates whether the coverage information should be collected while executing the test + // collectCoverage: false, - // An array of glob patterns indicating a set of files for which coverage information should be collected - // collectCoverageFrom: null, + // An array of glob patterns indicating a set of files for which coverage information should be collected + // collectCoverageFrom: null, - // The directory where Jest should output its coverage files - // coverageDirectory: null, + // The directory where Jest should output its coverage files + // coverageDirectory: null, - // An array of regexp pattern strings used to skip coverage collection - // coveragePathIgnorePatterns: [ - // "/node_modules/" - // ], + // An array of regexp pattern strings used to skip coverage collection + // coveragePathIgnorePatterns: [ + // "/node_modules/" + // ], - // A list of reporter names that Jest uses when writing coverage reports - // coverageReporters: [ - // "json", - // "text", - // "lcov", - // "clover" - // ], + // A list of reporter names that Jest uses when writing coverage reports + // coverageReporters: [ + // "json", + // "text", + // "lcov", + // "clover" + // ], - // An object that configures minimum threshold enforcement for coverage results - // coverageThreshold: null, + // An object that configures minimum threshold enforcement for coverage results + // coverageThreshold: null, - // A path to a custom dependency extractor - // dependencyExtractor: null, + // A path to a custom dependency extractor + // dependencyExtractor: null, - // Make calling deprecated APIs throw helpful error messages - // errorOnDeprecated: false, + // Make calling deprecated APIs throw helpful error messages + // errorOnDeprecated: false, - // Force coverage collection from ignored files usin a array of glob patterns - // forceCoverageMatch: [], + // Force coverage collection from ignored files usin a array of glob patterns + // forceCoverageMatch: [], - // A path to a module which exports an async function that is triggered once before all test suites - // globalSetup: null, + // A path to a module which exports an async function that is triggered once before all test suites + // globalSetup: null, - // A path to a module which exports an async function that is triggered once after all test suites - // globalTeardown: null, + // A path to a module which exports an async function that is triggered once after all test suites + // globalTeardown: null, - // A set of global variables that need to be available in all test environments - // globals: {}, + // A set of global variables that need to be available in all test environments + // globals: {}, - // An array of directory names to be searched recursively up from the requiring module's location - // moduleDirectories: [ - // "node_modules" - // ], + // An array of directory names to be searched recursively up from the requiring module's location + // moduleDirectories: [ + // "node_modules" + // ], - // An array of file extensions your modules use - // moduleFileExtensions: [ - // "js", - // "json", - // "jsx", - // "ts", - // "tsx", - // "node" - // ], + // An array of file extensions your modules use + // moduleFileExtensions: [ + // "js", + // "json", + // "jsx", + // "ts", + // "tsx", + // "node" + // ], - // A map from regular expressions to module names that allow to stub out resources with a single module - moduleNameMapper: { - "^@vue/test-utils": "/node_modules/@vue/test-utils/dist/vue-test-utils.cjs.js" - }, + // A map from regular expressions to module names that allow to stub out resources with a single module + moduleNameMapper: { + '^@vue/test-utils': '/node_modules/@vue/test-utils/dist/vue-test-utils.cjs.js', + }, - // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader - // modulePathIgnorePatterns: [], + // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader + // modulePathIgnorePatterns: [], - // Activates notifications for test results - // notify: false, + // Activates notifications for test results + // notify: false, - // An enum that specifies notification mode. Requires { notify: true } - // notifyMode: "failure-change", + // An enum that specifies notification mode. Requires { notify: true } + // notifyMode: "failure-change", - // A preset that is used as a base for Jest's configuration - // preset: null, + // A preset that is used as a base for Jest's configuration + // preset: null, - // Run tests from one or more projects - // projects: null, + // Run tests from one or more projects + // projects: null, - // Use this configuration option to add custom reporters to Jest - // reporters: undefined, + // Use this configuration option to add custom reporters to Jest + // reporters: undefined, - // Automatically reset mock state between every test - // resetMocks: false, + // Automatically reset mock state between every test + // resetMocks: false, - // Reset the module registry before running each individual test - // resetModules: false, + // Reset the module registry before running each individual test + // resetModules: false, - // A path to a custom resolver - // resolver: null, + // A path to a custom resolver + // resolver: null, - // Automatically restore mock state between every test - // restoreMocks: false, + // Automatically restore mock state between every test + // restoreMocks: false, - // The root directory that Jest should scan for tests and modules within - // rootDir: null, + // The root directory that Jest should scan for tests and modules within + // rootDir: null, - // A list of paths to directories that Jest should use to search for files in - roots: [ - "/resources/js" - ], + // A list of paths to directories that Jest should use to search for files in + roots: ['/resources/js'], - // Allows you to use a custom runner instead of Jest's default test runner - // runner: "jest-runner", + // Allows you to use a custom runner instead of Jest's default test runner + // runner: "jest-runner", - // The paths to modules that run some code to configure or set up the testing environment before each test - // setupFiles: [], + // The paths to modules that run some code to configure or set up the testing environment before each test + // setupFiles: [], - // A list of paths to modules that run some code to configure or set up the testing framework before each test - // setupFilesAfterEnv: [], + // A list of paths to modules that run some code to configure or set up the testing framework before each test + // setupFilesAfterEnv: [], - // A list of paths to snapshot serializer modules Jest should use for snapshot testing - // snapshotSerializers: [], + // A list of paths to snapshot serializer modules Jest should use for snapshot testing + // snapshotSerializers: [], - // The test environment that will be used for testing - testEnvironment: "jsdom", + // The test environment that will be used for testing + testEnvironment: 'jsdom', - // Options that will be passed to the testEnvironment - // testEnvironmentOptions: {}, + // Options that will be passed to the testEnvironment + // testEnvironmentOptions: {}, - // Adds a location field to test results - // testLocationInResults: false, + // Adds a location field to test results + // testLocationInResults: false, - // The glob patterns Jest uses to detect test files - // testMatch: [ - // "**/__tests__/**/*.[jt]s?(x)", - // "**/?(*.)+(spec|test).[tj]s?(x)" - // ], + // The glob patterns Jest uses to detect test files + // testMatch: [ + // "**/__tests__/**/*.[jt]s?(x)", + // "**/?(*.)+(spec|test).[tj]s?(x)" + // ], - // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped - // testPathIgnorePatterns: [ - // "/node_modules/" - // ], + // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped + // testPathIgnorePatterns: [ + // "/node_modules/" + // ], - // The regexp pattern or array of patterns that Jest uses to detect test files - // testRegex: [], + // The regexp pattern or array of patterns that Jest uses to detect test files + // testRegex: [], - // This option allows the use of a custom results processor - // testResultsProcessor: null, + // This option allows the use of a custom results processor + // testResultsProcessor: null, - // This option allows use of a custom test runner - // testRunner: "jasmine2", + // This option allows use of a custom test runner + // testRunner: "jasmine2", - // This option sets the URL for the jsdom environment. It is reflected in properties such as location.href - // testURL: "http://localhost", + // This option sets the URL for the jsdom environment. It is reflected in properties such as location.href + // testURL: "http://localhost", - // Setting this value to "fake" allows the use of fake timers for functions such as "setTimeout" - // timers: "real", + // Setting this value to "fake" allows the use of fake timers for functions such as "setTimeout" + // timers: "real", - // A map from regular expressions to paths to transformers - // transform: null, + // A map from regular expressions to paths to transformers + // transform: null, - // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation - transformIgnorePatterns: [ - 'node_modules/(?!(underscore)/)' - ], + // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation + transformIgnorePatterns: ['node_modules/(?!(underscore)/)'], - // An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them - // unmockedModulePathPatterns: undefined, + // An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them + // unmockedModulePathPatterns: undefined, - // Indicates whether each individual test should be reported during the run - // verbose: null, + // Indicates whether each individual test should be reported during the run + // verbose: null, - // An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode - // watchPathIgnorePatterns: [], + // An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode + // watchPathIgnorePatterns: [], - // Whether to use watchman for file crawling - // watchman: true, + // Whether to use watchman for file crawling + // watchman: true, }; diff --git a/resources/css/components/array.css b/resources/css/components/array.css index aa91417a83..780f35e3a8 100644 --- a/resources/css/components/array.css +++ b/resources/css/components/array.css @@ -3,50 +3,50 @@ ========================================================================== */ .array-fieldtype { - } .array-table-wrapper { - @apply border dark:border-dark-900 rounded overflow-hidden; + @apply overflow-hidden rounded border dark:border-dark-900; &:focus-within { @apply ring-2 ring-blue-300 dark:ring-dark-blue-100; } } .array-table { - @apply rounded text-sm rtl:text-right ltr:text-left w-full; + @apply w-full rounded text-sm ltr:text-left rtl:text-right; &:focus { @apply outline-none; } tr:not(:last-child) { - th, td { + th, + td { @apply border-b dark:border-dark-900; } } th { - @apply rtl:border-l ltr:border-r dark:border-dark-900 p-2 bg-gray-300 dark:bg-dark-500; + @apply bg-gray-300 p-2 dark:border-dark-900 dark:bg-dark-500 ltr:border-r rtl:border-l; } td { - @apply p-0 m-0; + @apply m-0 p-0; } tr:first-child th { - @apply rtl:rounded-tr ltr:rounded-tl; + @apply ltr:rounded-tl rtl:rounded-tr; } tr:first-child td, tr:first-child .input-text-minimal { - @apply rtl:rounded-tl ltr:rounded-tr; + @apply ltr:rounded-tr rtl:rounded-tl; } tr:last-child th { - @apply rtl:rounded-br ltr:rounded-bl; + @apply ltr:rounded-bl rtl:rounded-br; } tr:last-child td:last-child, tr:last-child .input-text-minimal { - @apply rtl:rounded-bl ltr:rounded-br; + @apply ltr:rounded-br rtl:rounded-bl; } &:focus-within { @@ -59,7 +59,11 @@ /* Read Only */ .read-only-field & { - th { @apply text-gray-500 dark:text-dark-150; } - tr td { @apply bg-gray-200 dark:bg-dark-600; } + th { + @apply text-gray-500 dark:text-dark-150; + } + tr td { + @apply bg-gray-200 dark:bg-dark-600; + } } } diff --git a/resources/css/components/assets.css b/resources/css/components/assets.css index 458de9a9bf..f54661b081 100644 --- a/resources/css/components/assets.css +++ b/resources/css/components/assets.css @@ -3,30 +3,34 @@ ========================================================================== */ .asset-modal { - .saving { + .saving { @apply absolute inset-0 flex items-center rounded-sm bg-white/90; - z-index: 200; - - .inner { - text-align: center; - padding: 50px; - margin: 0 auto; - } - - i { - position: relative; - top: -1px; - margin-right: 10px ; [dir="rtl"] & { margin-left: 10px ; margin-right: 0 ; } - } - } + z-index: 200; + + .inner { + text-align: center; + padding: 50px; + margin: 0 auto; + } + + i { + position: relative; + top: -1px; + margin-right: 10px; + [dir='rtl'] & { + margin-left: 10px; + margin-right: 0; + } + } + } } .drag-notification { - @apply text-xs @sm:text-lg absolute leading-tight p-1 inset-0 text-center rounded flex items-center justify-center; + @apply absolute inset-0 flex items-center justify-center rounded p-1 text-center text-xs leading-tight @sm:text-lg; border: 1px dashed theme('colors.gray.600'); pointer-events: none; z-index: 1049; - background: rgba(255, 255, 255, .9); + background: rgba(255, 255, 255, 0.9); .dark & { @apply bg-dark-900/90; @@ -34,16 +38,14 @@ } } - - /* Table Listing +/* Table Listing ========================================================================== */ .asset-table-listing { - @apply border dark:border-dark-900 rounded relative overflow-hidden; - + @apply relative overflow-hidden rounded border dark:border-dark-900; table { - @apply select-none border-none w-full rounded-b m-0; + @apply m-0 w-full select-none rounded-b border-none; } tbody tr { @apply outline-none; @@ -56,7 +58,6 @@ tbody tr td { @apply p-2; } - } .assets-fieldtype-picker + .asset-table-listing { @@ -69,50 +70,62 @@ .search { flex: 1; - margin-right: 15px ; [dir="rtl"] & { margin-left: 15px ; margin-right: 0 ; } - margin-left: 0 ; [dir="rtl"] & { margin-right: 0 ; margin-left: 0 ; } + margin-right: 15px; + [dir='rtl'] & { + margin-left: 15px; + margin-right: 0; + } + margin-left: 0; + [dir='rtl'] & { + margin-right: 0; + margin-left: 0; + } } > .btn { - margin-right: 15px ; [dir="rtl"] & { margin-left: 15px ; margin-right: 0 ; } + margin-right: 15px; + [dir='rtl'] & { + margin-left: 15px; + margin-right: 0; + } } } - - - - /* Fieldtype ========================================================================== */ -.asset-tile.draggable-source--is-dragging { @apply opacity-50; } -.asset-tile.draggable-mirror { @apply shadow-lg; } - +.asset-tile.draggable-source--is-dragging { + @apply opacity-50; +} +.asset-tile.draggable-mirror { + @apply shadow-lg; +} - /* Grid Listing +/* Grid Listing ========================================================================== */ .asset-grid-listing { - @apply bg-white dark:bg-dark-800 grid relative p-4 gap-4; + @apply relative grid gap-4 bg-white p-4 dark:bg-dark-800; grid-template-columns: repeat(auto-fill, minmax(125px, 1fr)); } - - /* Asset Tile +/* Asset Tile ========================================================================== */ .asset-tile { - @apply bg-white dark:bg-dark-600 relative min-w-0 flex items-center flex-col justify-between cursor-pointer border rounded dark:border-dark-300; + @apply relative flex min-w-0 cursor-pointer flex-col items-center justify-between rounded border bg-white dark:border-dark-300 dark:bg-dark-600; .asset-thumb { - @apply flex justify-center items-center w-full h-full rounded; - > img, > svg, > .svg-img { - @apply max-h-full max-w-full absolute; + @apply flex h-full w-full items-center justify-center rounded; + > img, + > svg, + > .svg-img { + @apply absolute max-h-full max-w-full; } } .asset-thumb-container { - @apply flex items-center flex-1 w-full justify-center relative; + @apply relative flex w-full flex-1 items-center justify-center; aspect-ratio: 1 / 1; } @@ -121,11 +134,11 @@ } .asset-meta { - @apply border-t dark:border-dark-200 w-full text-2xs text-gray-700 dark:text-dark-100; + @apply w-full border-t text-2xs text-gray-700 dark:border-dark-200 dark:text-dark-100; } .asset-meta-btn { - @apply text-blue rtl:border-r ltr:border-l px-2 py-1 hover:bg-gray-200 dark:hover:bg-dark-800 dark:border-dark-300; + @apply px-2 py-1 text-blue hover:bg-gray-200 dark:border-dark-300 dark:hover:bg-dark-800 ltr:border-l rtl:border-r; } .asset-filename { @@ -152,7 +165,7 @@ .asset-editor { .editor-preview { .editor-preview-image { - @apply flex flex-col flex-1 p-8; + @apply flex flex-1 flex-col p-8; } .image-wrapper { @@ -160,17 +173,24 @@ position: relative; > * { - @apply absolute w-auto h-auto max-w-full max-h-full; - left: 50% ; [dir="rtl"] & { left: auto ; right: 50% ; } + @apply absolute h-auto max-h-full w-auto max-w-full; + left: 50%; + [dir='rtl'] & { + left: auto; + right: 50%; + } top: 50%; - transform: translate(-50%, -50%) ; [dir="rtl"] & { transform: translate(50%, -50%); } - box-shadow: 0 0 32px rgba(0, 0, 0, .35); + transform: translate(-50%, -50%); + [dir='rtl'] & { + transform: translate(50%, -50%); + } + box-shadow: 0 0 32px rgba(0, 0, 0, 0.35); } } } .loading { - @apply absolute inset-0 z-10 bg-white/70 flex items-center justify-center rounded; + @apply absolute inset-0 z-10 flex items-center justify-center rounded bg-white/70; } } @@ -179,10 +199,9 @@ .lazyload, .lazyloading { - opacity: 0; - + opacity: 0; } .lazyloaded { - opacity: 1; - transition: opacity 180ms; + opacity: 1; + transition: opacity 180ms; } diff --git a/resources/css/components/blueprints.css b/resources/css/components/blueprints.css index 71d6683062..520285cda4 100644 --- a/resources/css/components/blueprints.css +++ b/resources/css/components/blueprints.css @@ -3,7 +3,7 @@ ========================================================================== */ .blueprint-section { - @apply p-2 min-h-40 outline-none w-full; + @apply min-h-40 w-full p-2 outline-none; &.draggable-source--is-dragging { opacity: 0.5; @@ -15,17 +15,17 @@ } .blueprint-drag-handle { - @apply flex-none w-4 ltr:border-r rtl:border-l dark:border-dark-500 cursor-move; + @apply w-4 flex-none cursor-move dark:border-dark-500 ltr:border-r rtl:border-l; background: rgba(0, 0, 0, 0.01) url('../../svg/icons/light/drag-dots.svg') 50% 50% no-repeat; background-size: 7px 17px; } .blueprint-section-field { - @apply relative mb-2 px-1 z-10 outline-none text-sm; + @apply relative z-10 mb-2 px-1 text-sm outline-none; .blueprint-section-field-inner { - @apply relative border rounded bg-gray-200 shadow-sm flex outline-none z-10; - @apply dark:border-none dark:shadow-dark dark:bg-dark-600 + @apply relative z-10 flex rounded border bg-gray-200 shadow-sm outline-none; + @apply dark:border-none dark:bg-dark-600 dark:shadow-dark; } &.draggable-source--is-dragging { @@ -40,10 +40,17 @@ .blueprint-section-import { &:before { content: ''; - @apply border rounded absolute bg-gray-200 shadow-sm; - top: -3px; left: 6px ; right: 0 ; bottom: 3px; z-index: 1; - - [dir="rtl"] & { left: 0 ; right: 6px ; } + @apply absolute rounded border bg-gray-200 shadow-sm; + top: -3px; + left: 6px; + right: 0; + bottom: 3px; + z-index: 1; + + [dir='rtl'] & { + left: 0; + right: 6px; + } .dark & { @apply border-dark-300 bg-dark-550; @@ -53,15 +60,27 @@ /* These are applied here rather than the utility classes so they don't override */ /* the inline widths defined by the draggable library. */ -.blueprint-section-field-w-1\/4 { @apply w-1/4 }; -.blueprint-section-field-w-1\/3 { @apply w-1/3 }; -.blueprint-section-field-w-1\/2 { @apply w-1/2 }; -.blueprint-section-field-w-2\/3 { @apply w-2/3 }; -.blueprint-section-field-w-3\/4 { @apply w-3/4 }; -.blueprint-section-field-w-full { @apply w-full }; +.blueprint-section-field-w-1\/4 { + @apply w-1/4; +} +.blueprint-section-field-w-1\/3 { + @apply w-1/3; +} +.blueprint-section-field-w-1\/2 { + @apply w-1/2; +} +.blueprint-section-field-w-2\/3 { + @apply w-2/3; +} +.blueprint-section-field-w-3\/4 { + @apply w-3/4; +} +.blueprint-section-field-w-full { + @apply w-full; +} .blueprint-add-section-container { - @apply p-2 flex min-h-40; + @apply flex min-h-40 p-2; .draggable-container--is-dragging & { display: none; @@ -69,10 +88,10 @@ } .blueprint-add-section-button { - @apply relative w-full border border-gray-500 dark:border-dark-200 border-dashed rounded-lg flex justify-center items-center text-gray-700 dark:text-dark-150; + @apply relative flex w-full items-center justify-center rounded-lg border border-dashed border-gray-500 text-gray-700 dark:border-dark-200 dark:text-dark-150; &:hover { - @apply border-gray dark:border-dark-175 text-gray-950 dark:text-dark-100; + @apply border-gray text-gray-950 dark:border-dark-175 dark:text-dark-100; } .blueprint-section-draggable-zone { diff --git a/resources/css/components/cards.css b/resources/css/components/cards.css index a0ae2873b2..d78d564fe1 100644 --- a/resources/css/components/cards.css +++ b/resources/css/components/cards.css @@ -3,12 +3,14 @@ ========================================================================== */ .card { - @apply shadow bg-white rounded-md p-2; + @apply rounded-md bg-white p-2 shadow; @apply dark:bg-dark-600 dark:shadow-dark; } @screen md { - .card { @apply p-4; } + .card { + @apply p-4; + } } .card-lg { @@ -16,5 +18,5 @@ } .card-lg header { - @apply py-6 px-8 border-b dark:bg-dark-650 rounded-t-lg dark:border-dark-800; + @apply rounded-t-lg border-b px-8 py-6 dark:border-dark-800 dark:bg-dark-650; } diff --git a/resources/css/components/column-picker.css b/resources/css/components/column-picker.css index 44d535d462..3c8b300c1b 100644 --- a/resources/css/components/column-picker.css +++ b/resources/css/components/column-picker.css @@ -1,9 +1,9 @@ .column-picker-item { - @apply text-sm outline-none flex items-center select-none; + @apply flex select-none items-center text-sm outline-none; &.sortable { - @apply rounded bg-white border; - &:hover { + @apply rounded border bg-white; + &:hover { @apply bg-gray-200; } diff --git a/resources/css/components/configure.css b/resources/css/components/configure.css index a338b4a92e..1a4cffa6ec 100644 --- a/resources/css/components/configure.css +++ b/resources/css/components/configure.css @@ -2,15 +2,20 @@ CONFIGURE COMPONENT: A variation of the publish component ========================================================================== */ - .configure-tab { - .publish-fields .form-group:not(:last-child) { - @apply border-b; - } +.configure-tab { + .publish-fields .form-group:not(:last-child) { + @apply border-b; + } - /* Push toggle off to the right */ - > .publish-fields > .toggle-fieldtype { - @apply flex justify-between items-center flex-wrap; - .help-block, .help-block p { @apply mb-0; } - .field-inner { @apply rtl:pl-8 ltr:pr-8; } - } - } + /* Push toggle off to the right */ + > .publish-fields > .toggle-fieldtype { + @apply flex flex-wrap items-center justify-between; + .help-block, + .help-block p { + @apply mb-0; + } + .field-inner { + @apply ltr:pr-8 rtl:pl-8; + } + } +} diff --git a/resources/css/components/dashboard.css b/resources/css/components/dashboard.css index d4ded0f1ab..029c0d429b 100644 --- a/resources/css/components/dashboard.css +++ b/resources/css/components/dashboard.css @@ -3,7 +3,6 @@ ========================================================================== */ .widgets { - } /* Responsive Wangjangling diff --git a/resources/css/components/fieldtypes/array.css b/resources/css/components/fieldtypes/array.css index 603a2cbf37..f0b836487e 100644 --- a/resources/css/components/fieldtypes/array.css +++ b/resources/css/components/fieldtypes/array.css @@ -10,32 +10,50 @@ margin-bottom: 0; } - /* Inside a Grid field ========================================================================== */ .grid-table .array-fieldtype { - .grid-table { margin-bottom: 0; tr:first-child { - td, th { border-top: 0; } + td, + th { + border-top: 0; + } } tr:last-child { - td, th { border-radius: 0; } + td, + th { + border-radius: 0; + } + } + tr > :first-child { + border-left: 0; + [dir='rtl'] & { + border-left: 0; + border-right: 0; + } + } + tr > :last-child { + border-right: 0; + [dir='rtl'] & { + border-right: 0; + border-left: 0; + } } - tr > :first-child { border-left: 0 ; [dir="rtl"] & { border-left: 0 ; border-right: 0 ; } } - tr > :last-child { border-right: 0 ; [dir="rtl"] & { border-right: 0 ; border-left: 0 ; } } } /* Dynamic Mode */ .array-dynamic .btn { - @apply text-blue block w-full h-auto border-0 rtl:text-right ltr:text-left shadow-none; + @apply block h-auto w-full border-0 text-blue shadow-none ltr:text-left rtl:text-right; background: #f4f4f4; padding: 10px 10px 11px; margin: 15px 0 0; - &:hover, &:active, &:focus { + &:hover, + &:active, + &:focus { top: 0; } } diff --git a/resources/css/components/fieldtypes/assets.css b/resources/css/components/fieldtypes/assets.css index 3ba77ac311..cb60c1aad2 100644 --- a/resources/css/components/fieldtypes/assets.css +++ b/resources/css/components/fieldtypes/assets.css @@ -7,18 +7,18 @@ } .assets-fieldtype .assets-fieldtype-picker { - @apply flex items-center px-4 py-2 bg-gray-200 dark:bg-dark-650 border dark:border-dark-900 rounded; + @apply flex items-center rounded border bg-gray-200 px-4 py-2 dark:border-dark-900 dark:bg-dark-650; &.is-expanded { - @apply border-b-0 rounded-b-none; + @apply rounded-b-none border-b-0; } .asset-upload-control { - @apply mt-2 @sm:rtl:mr-4 @sm:ltr:ml-4 @sm:mt-0 text-xs text-gray-600 leading-tight; + @apply mt-2 text-xs leading-tight text-gray-600 @sm:mt-0 @sm:ltr:ml-4 @sm:rtl:mr-4; } .upload-text-button { - @apply text-blue underline whitespace-nowrap; + @apply whitespace-nowrap text-blue underline; &:hover { @apply text-blue-800; } @@ -26,23 +26,20 @@ } .assets-fieldtype .drag-drop-text { - @apply rtl:mr-1 ltr:ml-1 text-gray-700 dark:text-dark-175; + @apply text-gray-700 dark:text-dark-175 ltr:ml-1 rtl:mr-1; } .assets-fieldtype .asset-upload-control { @apply hidden @xs:inline-block; } - /* Inside a Grid ========================================================================== */ .grid-fieldtype .assets-fieldtype-picker { - @apply border-none rounded-none bg-transparent p-0; + @apply rounded-none border-none bg-transparent p-0; } - - /* In a Grid fieldtype ========================================================================== */ @@ -52,8 +49,6 @@ } } - - /* In a Bard fieldtype ========================================================================== */ @@ -70,5 +65,7 @@ /* Probably better as a template condition but difficult at the moment. */ .assets-fieldtype .delete-bard-set { display: none; - .bard-set-solo & { display: block; } + .bard-set-solo & { + display: block; + } } diff --git a/resources/css/components/fieldtypes/bard.css b/resources/css/components/fieldtypes/bard.css index be75f358eb..179015c148 100644 --- a/resources/css/components/fieldtypes/bard.css +++ b/resources/css/components/fieldtypes/bard.css @@ -1,16 +1,18 @@ .bard-fieldtype-wrapper { - @apply border dark:border-dark-900 rounded relative outline-none; + @apply relative rounded border outline-none dark:border-dark-900; - * { outline: none; } + * { + outline: none; + } } .bard-editor { - @apply text-gray-800 dark:text-dark-150 bg-gray-100 dark:bg-dark-650 shadow-inner p-0 relative rounded; + @apply relative rounded bg-gray-100 p-0 text-gray-800 shadow-inner dark:bg-dark-650 dark:text-dark-150; } .bard-editor .ProseMirror { - @apply p-2 min-h-40 text-sm leading-tight; - @apply @md/bard:p-2 text-md leading-normal; + @apply min-h-40 p-2 text-sm leading-tight; + @apply text-md leading-normal @md/bard:p-2; @apply @lg/bard:p-4; &:focus { @apply ring-2 ring-inset ring-blue-200 dark:ring-blue-600; @@ -18,12 +20,12 @@ } .bard-editor .bard-error { - @apply p-2 @lg:px-4 bg-red-100 text-red-500 text-xs whitespace-nowrap; + @apply whitespace-nowrap bg-red-100 p-2 text-xs text-red-500 @lg:px-4; } /* Modes */ .bard-editor.mode\:read-only .ProseMirror { - @apply bg-gray-300 dark:bg-dark-600 text-gray-700 dark:text-dark-175; + @apply bg-gray-300 text-gray-700 dark:bg-dark-600 dark:text-dark-175; } .bard-editor.mode\:minimal .ProseMirror { @@ -34,17 +36,17 @@ @apply p-2; min-height: 38px; p { - @apply leading-normal mb-0; + @apply mb-0 leading-normal; } } .bard-fixed-toolbar { - @apply bg-white dark:bg-dark-800 shadow-none rounded-t border-b dark:border-dark-900 text-sm flex items-start justify-between p-1 z-5 top-0; + @apply top-0 z-5 flex items-start justify-between rounded-t border-b bg-white p-1 text-sm shadow-none dark:border-dark-900 dark:bg-dark-800; .bard-toolbar-button { - @apply text-gray-800 dark:text-dark-150 rounded px-1 flex text-center justify-center items-center text-base h-8 w-8 m-0; + @apply m-0 flex h-8 w-8 items-center justify-center rounded px-1 text-center text-base text-gray-800 dark:text-dark-150; svg { - @apply w-auto h-4; + @apply h-4 w-auto; } } @@ -53,7 +55,7 @@ } .bard-toolbar-button.active { - @apply bg-gray-300 dark:bg-dark-800 text-black dark:text-dark-100; + @apply bg-gray-300 text-black dark:bg-dark-800 dark:text-dark-100; } .bard-toolbar-button:focus { @@ -79,12 +81,12 @@ } .bard-fixed-toolbar.dark { - @apply bg-black rounded-full shadow-lg px-4; + @apply rounded-full bg-black px-4 shadow-lg; button { - @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; + @apply mx-0.5 my-0 flex h-8 w-8 items-center justify-center rounded bg-transparent px-1 text-center text-base text-gray-700 outline-none; svg { - @apply w-auto h-4; + @apply h-4 w-auto; } } @@ -100,23 +102,33 @@ } /* Fixed toolbar inside a stack */ -.stack-content .bard-fixed-toolbar { top: -24px; } +.stack-content .bard-fixed-toolbar { + top: -24px; +} /* Responive Wangjangling */ @screen md { /* Fixed toolbar below fixed global header */ - .bard-fixed-toolbar { top: 52px; } - .bard-fieldtype .bard-fieldtype .bard-fixed-toolbar { top: 92px; } + .bard-fixed-toolbar { + top: 52px; + } + .bard-fieldtype .bard-fieldtype .bard-fixed-toolbar { + top: 92px; + } /* Fixed toolbar inside a stack */ - .stack-content .bard-fieldtype .bard-fieldtype .bard-fixed-toolbar { top: 16px; } + .stack-content .bard-fieldtype .bard-fieldtype .bard-fixed-toolbar { + top: 16px; + } /* We don't need the `top` when in Live Preview */ - .live-preview .bard-fixed-toolbar { top: 0; } + .live-preview .bard-fixed-toolbar { + top: 0; + } } .bard-floating-toolbar { - @apply flex bg-black rounded-full shadow-lg px-0; + @apply flex rounded-full bg-black px-0 shadow-lg; white-space: nowrap; &:before { @@ -125,16 +137,20 @@ border-top-color: black; position: absolute; top: 100%; - left: 50% ; [dir="rtl"] & { left: auto ; right: 50% ; } - margin-left: -3px + left: 50%; + [dir='rtl'] & { + left: auto; + right: 50%; + } + margin-left: -3px; } .bard-toolbar-button { - @apply text-gray-200 h-10 w-10 text-center bg-black rounded-lg flex items-center justify-center; + @apply flex h-10 w-10 items-center justify-center rounded-lg bg-black text-center text-gray-200; font-size: 16px; - transition: all .1s ease-in-out; + transition: all 0.1s ease-in-out; svg { - @apply w-4 h-4; + @apply h-4 w-4; } } @@ -163,11 +179,11 @@ } .bard-add-set-button { - @apply flex items-center justify-center absolute rtl:-right-4 ltr:-left-4 top-[-6px] z-1; + @apply absolute top-[-6px] z-1 flex items-center justify-center ltr:-left-4 rtl:-right-4; } .bard-footer-toolbar { - @apply bg-white dark:bg-dark-550 shadow-none text-gray-700 dark:text-dark-175 rounded-b border-t dark:border-dark-300 text-xs p-2 flex items-center justify-between; + @apply flex items-center justify-between rounded-b border-t bg-white p-2 text-xs text-gray-700 shadow-none dark:border-dark-300 dark:bg-dark-550 dark:text-dark-175; padding: 8px 12px; .bard-fullscreen & { @@ -192,8 +208,16 @@ /* transition: all .15s ease-in-out; */ .dropdown-menu { - left: -5px ; [dir="rtl"] & { left: auto ; right: -5px ; } - right: auto ; [dir="rtl"] & { right: auto ; left: auto ; } + left: -5px; + [dir='rtl'] & { + left: auto; + right: -5px; + } + right: auto; + [dir='rtl'] & { + right: auto; + left: auto; + } } } @@ -201,19 +225,18 @@ min-width: 320px !important; } - /* Fullscreen mode ========================================================================== */ .bard-fullscreen { - @apply fixed bg-gray-200 dark:bg-dark-700 inset-0 min-h-screen overflow-scroll rounded-none pt-14; + @apply fixed inset-0 min-h-screen overflow-scroll rounded-none bg-gray-200 pt-14 dark:bg-dark-700; & > .bard-editor { - @apply bg-white dark:bg-dark-800 shadow dark:shadow-dark max-w-xl mx-auto rounded relative my-6 px-8; + @apply relative mx-auto my-6 max-w-xl rounded bg-white px-8 shadow dark:bg-dark-800 dark:shadow-dark; } & > .bard-fixed-toolbar { - @apply shadow dark:shadow-dark h-12 fixed w-full bg-gradient-to-b from-white to-gray-100 dark:from-dark-400 dark:to-dark-500; + @apply fixed h-12 w-full bg-gradient-to-b from-white to-gray-100 shadow dark:from-dark-400 dark:to-dark-500 dark:shadow-dark; padding: 7px 8px; top: 0; z-index: 999; @@ -240,20 +263,29 @@ } .bard-set-selector { - @apply rtl:mr-6 ltr:ml-6; + @apply ltr:ml-6 rtl:mr-6; } .bard-field-options { - @apply fixed top-0 inset-x-0 bg-gray-700 p-4 w-full; + @apply fixed inset-x-0 top-0 w-full bg-gray-700 p-4; @apply ltr:text-right rtl:text-left; z-index: 1; /* to appear over the top of .bard-editor */ - .icon { font-size: 24px; } - a { margin-left: 16px ; [dir="rtl"] & { margin-right: 16px ; margin-left: 0 ; } color: #fff; opacity: 1; } + .icon { + font-size: 24px; + } + a { + margin-left: 16px; + [dir='rtl'] & { + margin-right: 16px; + margin-left: 0; + } + color: #fff; + opacity: 1; + } } } - /* Typography - Selectors are specific so they don't cascade into the sets, which @@ -272,21 +304,25 @@ text-size-adjust: 100%; } - blockquote, ol, p, ul { margin-top: 0; - margin-bottom: .85em; + margin-bottom: 0.85em; b, - strong { font-weight: 700; } + strong { + font-weight: 700; + } - em, i { font-style: italic } + em, + i { + font-style: italic; + } a { - @apply text-blue dark:text-dark-blue-100 underline break-words; + @apply break-words text-blue underline dark:text-dark-blue-100; } a:active, @@ -309,7 +345,7 @@ ul li { > p { margin-top: 0; - margin-bottom: .85em; + margin-bottom: 0.85em; } } @@ -325,16 +361,21 @@ hr:after, hr:before { display: table; - content: " "; + content: ' '; } hr:after { - clear: both + clear: both; } - h1, h2, h3, h4, h5, h6 { + h1, + h2, + h3, + h4, + h5, + h6 { margin-top: 1.275em; - margin-bottom: .85em; + margin-bottom: 0.85em; font-weight: 700; b, @@ -343,7 +384,7 @@ } a { - @apply text-blue dark:text-dark-blue-100 underline break-words; + @apply break-words text-blue underline dark:text-dark-blue-100; } a:active, @@ -354,15 +395,25 @@ } } - h1 { font-size: 2em } + h1 { + font-size: 2em; + } - h2 { font-size: 1.75em } + h2 { + font-size: 1.75em; + } - h3 { font-size: 1.5em } + h3 { + font-size: 1.5em; + } - h4 { font-size: 1.25em } + h4 { + font-size: 1.25em; + } - h5 { font-size: 1em } + h5 { + font-size: 1em; + } h6 { font-size: 1em; @@ -394,10 +445,13 @@ ul, blockquote ol, blockquote ul { - margin: 0 0 .85em; + margin: 0 0 0.85em; padding: 0 0 0 2em; - [dir="rtl"] & { padding-right: 2em ; padding-left: 0 ; } + [dir='rtl'] & { + padding-right: 2em; + padding-left: 0; + } } .tableWrapper table ol, @@ -405,7 +459,10 @@ margin: 0; padding: 0 0 0 2em; - [dir="rtl"] & { padding-right: 2em ; padding-left: 0 ; } + [dir='rtl'] & { + padding-right: 2em; + padding-left: 0; + } } ol ol, @@ -414,7 +471,11 @@ ul ul { margin-top: 0; margin-bottom: 0; - padding-left: 2em ; [dir="rtl"] & { padding-right: 2em ; padding-left: 0 ; } + padding-left: 2em; + [dir='rtl'] & { + padding-right: 2em; + padding-left: 0; + } } ul ul { @@ -434,8 +495,8 @@ } blockquote { - @apply text-gray-800 dark:text-dark-150 rtl:border-r-4 ltr:border-l-4 border-blue dark:border-dark-blue-100 px-4; - margin: 0 0 .85em; + @apply border-blue px-4 text-gray-800 dark:border-dark-blue-100 dark:text-dark-150 ltr:border-l-4 rtl:border-r-4; + margin: 0 0 0.85em; } blockquote:first-child { @@ -450,16 +511,17 @@ blockquote > .tableWrapper table, ol li > .tableWrapper table, ul li > .tableWrapper table { - @apply w-full overflow-hidden m-0 mb-4 bg-white dark:bg-dark-500 text-sm ; + @apply m-0 mb-4 w-full overflow-hidden bg-white text-sm dark:bg-dark-500; border-collapse: collapse; table-layout: fixed; th { - @apply font-bold rtl:text-right ltr:text-left bg-gray-200 dark:bg-dark-575; + @apply bg-gray-200 font-bold dark:bg-dark-575 ltr:text-left rtl:text-right; } - td, th { - @apply border dark:border-dark-200 align-top relative py-1 px-2; + td, + th { + @apply relative border px-2 py-1 align-top dark:border-dark-200; min-width: 1em; } @@ -467,13 +529,13 @@ @apply relative; &:after { - @apply bg-gray-400 dark:bg-dark-200 absolute inset-0 pointer-events-none opacity-25; + @apply pointer-events-none absolute inset-0 bg-gray-400 opacity-25 dark:bg-dark-200; content: ''; } } a { - @apply text-blue dark:text-dark-blue-100 underline break-words; + @apply break-words text-blue underline dark:text-dark-blue-100; } a:active, @@ -485,17 +547,17 @@ } p > code { - @apply font-mono bg-gray-400 dark:bg-dark-750 rounded-sm text-xs; + @apply rounded-sm bg-gray-400 font-mono text-xs dark:bg-dark-750; padding: 2px 4px; top: -1px; } pre { - margin-bottom: .85em; + margin-bottom: 0.85em; } pre code { - @apply font-mono bg-gray-400 dark:bg-dark-950 dark:text-dark-100 text-xs p-4 block w-full rounded; + @apply block w-full rounded bg-gray-400 p-4 font-mono text-xs dark:bg-dark-950 dark:text-dark-100; line-height: 1.8; } } @@ -506,7 +568,10 @@ .bard-fieldtype .ProseMirror > p.is-editor-empty:first-child::before { @apply text-gray-600 dark:text-dark-200; content: attr(data-placeholder); - float: left ; [dir="rtl"] & { float: right ; } + float: left; + [dir='rtl'] & { + float: right; + } height: 0; pointer-events: none; } @@ -514,10 +579,9 @@ /* Link toolbar ========================================================================== */ - .bard-link-toolbar { - +.bard-link-toolbar { .input { - @apply p-0 text-xs h-8 bg-transparent shadow-none border-none; + @apply h-8 border-none bg-transparent p-0 text-xs shadow-none; width: 240px; outline: none; } @@ -533,7 +597,7 @@ } .bard-inline-image-container { - @apply relative bg-white dark:bg-dark-600 border dark:border-dark-900 rounded whitespace-normal mb-6; + @apply relative mb-6 whitespace-normal rounded border bg-white dark:border-dark-900 dark:bg-dark-600; &:hover { cursor: grab; } @@ -552,8 +616,12 @@ } table .column-resize-handle { - @apply absolute top-0 bottom-0 pointer-events-none bg-blue-200; + @apply pointer-events-none absolute bottom-0 top-0 bg-blue-200; width: 3px; - right: -2px ; [dir="rtl"] & { right: auto ; left: -2px ; } + right: -2px; + [dir='rtl'] & { + right: auto; + left: -2px; + } } } diff --git a/resources/css/components/fieldtypes/button-group.css b/resources/css/components/fieldtypes/button-group.css index f42c767f5c..fc777dd943 100644 --- a/resources/css/components/fieldtypes/button-group.css +++ b/resources/css/components/fieldtypes/button-group.css @@ -6,26 +6,26 @@ } .btn-group.btn-vertical { - @apply flex-col items-stretch justify-start p-0 h-auto; + @apply h-auto flex-col items-stretch justify-start p-0; button { - @apply border-b border-t-0 rounded-none border-l border-r ; + @apply rounded-none border-b border-l border-r border-t-0; height: 2.375rem; /* 38px */ } :is(.btn-group button:not(:last-child):not(.active)) { - @apply border-r border-l; + @apply border-l border-r; } - button.active+button { + button.active + button { @apply border-l border-r; } button:first-child { - @apply rounded-t rounded-b-none border-t; + @apply rounded-b-none rounded-t border-t; } button:last-child { - @apply rounded-t-none rounded-b border-b; + @apply rounded-b rounded-t-none border-b; } } diff --git a/resources/css/components/fieldtypes/checkboxes.css b/resources/css/components/fieldtypes/checkboxes.css index 0dbbd38e1d..40bcf39e41 100644 --- a/resources/css/components/fieldtypes/checkboxes.css +++ b/resources/css/components/fieldtypes/checkboxes.css @@ -4,10 +4,10 @@ .checkboxes-fieldtype { .option { - @apply flex items-center mb-2; + @apply mb-2 flex items-center; } .option + label { - @apply rtl:mr-2 ltr:ml-2; + @apply ltr:ml-2 rtl:mr-2; } } diff --git a/resources/css/components/fieldtypes/code.css b/resources/css/components/fieldtypes/code.css index 63f34caf42..dad935dfda 100644 --- a/resources/css/components/fieldtypes/code.css +++ b/resources/css/components/fieldtypes/code.css @@ -1,11 +1,11 @@ .code-fieldtype-container { direction: ltr; - @apply dark:border dark:border-dark-800 rounded; + @apply rounded dark:border dark:border-dark-800; } .code-fieldtype-toolbar { - @apply bg-white shadow-none py-1 px-2 rounded-t border border-b-0 text-sm flex flex-wrap items-center justify-end gap-2; - @apply dark:bg-dark-800 dark:border-l-0 dark:border-r-0 dark:border-t-0 dark:border-b dark:border-dark-900; + @apply flex flex-wrap items-center justify-end gap-2 rounded-t border border-b-0 bg-white px-2 py-1 text-sm shadow-none; + @apply dark:border-b dark:border-l-0 dark:border-r-0 dark:border-t-0 dark:border-dark-900 dark:bg-dark-800; [dir='rtl'] & { direction: rtl; @@ -17,12 +17,11 @@ @apply h-8 text-sm leading-none; } - .code-fieldtype-container.code-fullscreen { - @apply fixed bg-gray-200 dark:bg-dark-600 inset-0 min-h-screen overflow-scroll rounded-none pt-14; + @apply fixed inset-0 min-h-screen overflow-scroll rounded-none bg-gray-200 pt-14 dark:bg-dark-600; .code-fieldtype-toolbar { - @apply fixed z-2 top-0 w-full px-6 py-2 h-12 shadow dark:shadow-dark text-base rounded-none bg-gradient-to-b from-white to-gray-100 dark:from-dark-550 dark:to-dark-600; + @apply fixed top-0 z-2 h-12 w-full rounded-none bg-gradient-to-b from-white to-gray-100 px-6 py-2 text-base shadow dark:from-dark-550 dark:to-dark-600 dark:shadow-dark; } } diff --git a/resources/css/components/fieldtypes/datetime.css b/resources/css/components/fieldtypes/datetime.css index 484d154030..9ac14fe765 100644 --- a/resources/css/components/fieldtypes/datetime.css +++ b/resources/css/components/fieldtypes/datetime.css @@ -3,29 +3,43 @@ ========================================================================== */ .daterange { - outline: none; - width: 100%; - .icon-remove { right: 32px ; [dir="rtl"] & { right: auto ; left: 32px ; } } + outline: none; + width: 100%; + .icon-remove { + right: 32px; + [dir='rtl'] & { + right: auto; + left: 32px; + } + } - .dr-calendar { max-width: 250px; } + .dr-calendar { + max-width: 250px; + } - .dr-active, .dr-input { + .dr-active, + .dr-input { z-index: 1; } } -.datetime .icon-remove, .time-fieldtype .icon-remove { - cursor: pointer; - background: rgba(0, 0, 0, 0.1); - font-size: 15px; - line-height: 1; - padding: 0 4px 2px; - border-radius: 50%; - color: #777; +.datetime .icon-remove, +.time-fieldtype .icon-remove { + cursor: pointer; + background: rgba(0, 0, 0, 0.1); + font-size: 15px; + line-height: 1; + padding: 0 4px 2px; + border-radius: 50%; + color: #777; height: 18px; width: 18px; - margin-right: 8px ; [dir="rtl"] & { margin-left: 8px ; margin-right: 0 ; } - text-shadow: 0 1px 1px #FFF; + margin-right: 8px; + [dir='rtl'] & { + margin-left: 8px; + margin-right: 0; + } + text-shadow: 0 1px 1px #fff; } .daterange--single .dr-input .dr-dates { @@ -33,50 +47,51 @@ } .date-time-container { - @apply flex; + @apply flex; } /* VCalendar dark mode background */ -.vc-container, .vc-date-picker-content { - @apply dark:bg-dark-500 dark:border-dark-700; +.vc-container, +.vc-date-picker-content { + @apply dark:border-dark-700 dark:bg-dark-500; } /* VCalendar dark mode year/month popover */ .vc-nav-popover-container { - @apply dark:bg-dark-700 dark:border-dark-900; + @apply dark:border-dark-900 dark:bg-dark-700; } /* Time Field ========================================================================== */ .time-fieldtype { - .time-fieldtype-container { - @apply flex items-center; - min-width: max-content; - } - - .input-time { - @apply inline-block text-center bg-transparent; - -moz-appearance: textfield; - width: 26px; - - &:active, &:focus { - outline: none; - } - } - - .colon { - @apply select-none; - margin: 0 -2px; - } - - input::-webkit-inner-spin-button, - input::-webkit-outer-spin-button { - -webkit-appearance: none; - margin: 0; - } -} + .time-fieldtype-container { + @apply flex items-center; + min-width: max-content; + } + .input-time { + @apply inline-block bg-transparent text-center; + -moz-appearance: textfield; + width: 26px; + + &:active, + &:focus { + outline: none; + } + } + + .colon { + @apply select-none; + margin: 0 -2px; + } + + input::-webkit-inner-spin-button, + input::-webkit-outer-spin-button { + -webkit-appearance: none; + margin: 0; + } +} /* Inside a Grid field ========================================================================== */ @@ -86,9 +101,13 @@ top: 8px; } - .btn.add-time { top: 8px; } + .btn.add-time { + top: 8px; + } - .dr-input { border: 0 !important; } + .dr-input { + border: 0 !important; + } .colon { background: #fff; diff --git a/resources/css/components/fieldtypes/dictionary-fields.css b/resources/css/components/fieldtypes/dictionary-fields.css index f910a979a1..a283f2c882 100644 --- a/resources/css/components/fieldtypes/dictionary-fields.css +++ b/resources/css/components/fieldtypes/dictionary-fields.css @@ -6,11 +6,11 @@ } .config-field { - @apply md:flex flex-wrap border-b border-gray-400 dark:border-dark-900 w-full; - @apply p-3 @sm:p-4 m-0; + @apply w-full flex-wrap border-b border-gray-400 dark:border-dark-900 md:flex; + @apply m-0 p-3 @sm:p-4; .field-inner { - @apply w-full md:w-1/2 rtl:md:pl-8 ltr:md:pr-8; + @apply w-full md:w-1/2 ltr:md:pr-8 rtl:md:pl-8; } .field-inner + div { diff --git a/resources/css/components/fieldtypes/environment.css b/resources/css/components/fieldtypes/environment.css index 12ce34710f..4443fd9eec 100644 --- a/resources/css/components/fieldtypes/environment.css +++ b/resources/css/components/fieldtypes/environment.css @@ -8,7 +8,11 @@ .icon { display: inline-block; vertical-align: middle; - margin-right: 5px ; [dir="rtl"] & { margin-left: 5px ; margin-right: 0 ; } + margin-right: 5px; + [dir='rtl'] & { + margin-left: 5px; + margin-right: 0; + } &:before { top: 1px; } diff --git a/resources/css/components/fieldtypes/grid.css b/resources/css/components/fieldtypes/grid.css index ceabd56b02..6b549b40ef 100644 --- a/resources/css/components/fieldtypes/grid.css +++ b/resources/css/components/fieldtypes/grid.css @@ -3,7 +3,7 @@ ========================================================================== */ .grid-table { - @apply w-full rtl:text-right ltr:text-left border dark:border-dark-900 text-gray dark:text-dark-150 relative mb-4 outline-none shadow-sm rounded; + @apply relative mb-4 w-full rounded border text-gray shadow-sm outline-none dark:border-dark-900 dark:text-dark-150 ltr:text-left rtl:text-right; border-collapse: separate; border-spacing: 0; table-layout: auto; @@ -11,14 +11,18 @@ .grid-table thead { th { - @apply font-medium px-2 py-2 border-b dark:border-dark-900 z-10 bg-gray-200 dark:bg-dark-650 text-gray-900 dark:text-dark-150 text-sm; + @apply z-10 border-b bg-gray-200 px-2 py-2 text-sm font-medium text-gray-900 dark:border-dark-900 dark:bg-dark-650 dark:text-dark-150; display: table-cell; position: sticky; top: -1px; z-index: auto; - &:first-child { @apply rtl:rounded-tr ltr:rounded-tl rtl:pr-3 ltr:pl-3; } - &:last-child { @apply rtl:rounded-tl ltr:rounded-tr; } + &:first-child { + @apply ltr:rounded-tl ltr:pl-3 rtl:rounded-tr rtl:pr-3; + } + &:last-child { + @apply ltr:rounded-tr rtl:rounded-tl; + } &.grid-drag-handle-header { @apply w-3; } @@ -37,19 +41,21 @@ } > tr > td { - @apply border-b dark:border-dark-900 px-2 py-3 align-top; + @apply border-b px-2 py-3 align-top dark:border-dark-900; &:first-child.grid-cell { - @apply rtl:pr-3 ltr:pl-3; + @apply ltr:pl-3 rtl:pr-3; } &.drag-handle { - @apply rtl:border-l ltr:border-r h-full p-2; + @apply h-full p-2 ltr:border-r rtl:border-l; width: 1%; cursor: grab; background: theme('colors.gray.200') url('../../../svg/icons/light/drag-dots.svg') center center no-repeat; background-size: 7px 17px; - &:hover { @apply bg-gray-300; } + &:hover { + @apply bg-gray-300; + } .dark & { background-color: theme('colors.dark.700'); @@ -59,8 +65,12 @@ tr:last-child td { @apply border-b-0; - &:first-child { @apply rtl:rounded-br ltr:rounded-bl; } - &:last-child { @apply rtl:rounded-bl ltr:rounded-br; } + &:first-child { + @apply ltr:rounded-bl rtl:rounded-br; + } + &:last-child { + @apply ltr:rounded-br rtl:rounded-bl; + } } tr.draggable-source--is-dragging td { @@ -69,17 +79,17 @@ } .grid-table tbody .grid-row-controls { - @apply rtl:pr-0 ltr:pl-0 text-center; + @apply text-center ltr:pl-0 rtl:pr-0; width: 1%; padding-top: 21px; /* pseudo-center for text/select fields */ } .grid-item-header { - @apply bg-gray-200 border-b px-4 py-2 text-sm flex items-center justify-between outline-none cursor-move; + @apply flex cursor-move items-center justify-between border-b bg-gray-200 px-4 py-2 text-sm outline-none; } .grid-fullscreen { - @apply fixed bg-gray-200 inset-0 min-h-screen overflow-scroll rounded-none; + @apply fixed inset-0 min-h-screen overflow-scroll rounded-none bg-gray-200; z-index: 998; /* to appear over the top of the rest of the stuff on the page. */ - /* too high and it'll be over the top of stacks, etc. */ + /* too high and it'll be over the top of stacks, etc. */ } diff --git a/resources/css/components/fieldtypes/markdown.css b/resources/css/components/fieldtypes/markdown.css index de611e1354..e3227f1c3f 100644 --- a/resources/css/components/fieldtypes/markdown.css +++ b/resources/css/components/fieldtypes/markdown.css @@ -3,10 +3,10 @@ ========================================================================== */ .markdown-fieldtype-wrapper { - @apply border dark:border-dark-900 rounded overflow-hidden relative; + @apply relative overflow-hidden rounded border dark:border-dark-900; .markdown-toolbar { - @apply bg-white dark:bg-dark-700 shadow-none rounded-t border-b dark:border-dark-900 text-sm flex flex-wrap items-center justify-between; + @apply flex flex-wrap items-center justify-between rounded-t border-b bg-white text-sm shadow-none dark:border-dark-900 dark:bg-dark-700; padding: 4px 8px; } @@ -15,14 +15,14 @@ } .markdown-buttons button { - @apply text-gray-800 dark:text-dark-150 rounded px-1 flex items-center justify-center text-base text-center h-8 w-8; + @apply flex h-8 w-8 items-center justify-center rounded px-1 text-center text-base text-gray-800 dark:text-dark-150; &:hover { @apply bg-gray-200 dark:bg-dark-750; } &.active { - @apply bg-gray-300 dark:bg-dark-800 text-black dark:text-dark-175; + @apply bg-gray-300 text-black dark:bg-dark-800 dark:text-dark-175; } } @@ -37,20 +37,20 @@ @apply flex items-center; button { - @apply text-gray-700 dark:text-dark-150 inline-block focus:outline-none px-2 py-1 rtl:ml-1 ltr:mr-1; + @apply inline-block px-2 py-1 text-gray-700 focus:outline-none dark:text-dark-150 ltr:mr-1 rtl:ml-1; &:hover { @apply text-blue; } &.active { - @apply bg-blue-100 dark:bg-dark-800 text-blue-800 dark:text-dark-150 rounded; + @apply rounded bg-blue-100 text-blue-800 dark:bg-dark-800 dark:text-dark-150; } } } .CodeMirror { - @apply bg-gray-100 dark:bg-dark-650 shadow-inner dark:shadow-inner-dark h-auto font-mono leading-normal px-0 py-1 @md/markdown:p-3 text-xs dark:text-dark-150; + @apply h-auto bg-gray-100 px-0 py-1 font-mono text-xs leading-normal shadow-inner @md/markdown:p-3 dark:bg-dark-650 dark:text-dark-150 dark:shadow-inner-dark; border-radius: 0 0 3px 3px; &:focus-within { @@ -58,14 +58,16 @@ } .cm-comment { - @apply font-mono text-sm + @apply font-mono text-sm; } } - .CodeMirror-code { min-height: 100px; } + .CodeMirror-code { + min-height: 100px; + } .helpers { - @apply border-t dark:border-dark-900 text-xs text-gray-800 dark:text-dark-150 flex items-center; + @apply flex items-center border-t text-xs text-gray-800 dark:border-dark-900 dark:text-dark-150; button:hover { @apply text-blue; @@ -73,24 +75,23 @@ } .markdown-cheatsheet-helper { - @apply p-2 inline-block; + @apply inline-block p-2; } .markdown-asset-helper { - @apply py-2 px-4 inline-block; + @apply inline-block px-4 py-2; } } - /* Dark Mode ========================================================================== */ .markdown-fieldtype-wrapper.markdown-fullscreen.markdown-dark-mode, .dark .markdown-fieldtype-wrapper.markdown-fullscreen { - @apply bg-gray-800 border-none; + @apply border-none bg-gray-800; .markdown-toolbar { - @apply text-white border-b border-gray-950 shadow-lg; + @apply border-b border-gray-950 text-white shadow-lg; background: linear-gradient(180deg, theme('colors.gray.900'), hsl(210, 20%, 13%)); } @@ -102,7 +103,7 @@ } .helpers { - @apply bg-gray-900 text-white border-t border-gray-950; + @apply border-t border-gray-950 bg-gray-900 text-white; } .markdown-buttons button { @@ -116,7 +117,7 @@ .markdown-modes button { @apply text-gray-700; &.active { - @apply text-white bg-black; + @apply bg-black text-white; } } @@ -124,7 +125,7 @@ @apply text-white antialiased; } - [class*="cm-"] { + [class*='cm-'] { color: white !important; } @@ -137,30 +138,29 @@ } } - /* Read Only ========================================================================== */ .markdown-fieldtype.read-only-field .CodeMirror { - @apply bg-gray-300 dark:bg-dark-600 text-gray-700 dark:text-dark-200; + @apply bg-gray-300 text-gray-700 dark:bg-dark-600 dark:text-dark-200; } - /* Inside a Grid fieldtype ========================================================================== */ .grid-fieldtype .grid-table .markdown-fieldtype { .markdown-fieldtype-wrapper { - @apply border rounded; + @apply rounded border; } .markdown-preview { - @apply border-none p-2 rtl:text-right ltr:text-left; - p { line-height: 1.2; } + @apply border-none p-2 ltr:text-left rtl:text-right; + p { + line-height: 1.2; + } } } - /* Writing Mode Typography ========================================================================== */ @@ -181,15 +181,14 @@ } .markdown-fieldtype .cm-quote { - @apply text-gray-800 dark:text-dark-150 italic text-sm; + @apply text-sm italic text-gray-800 dark:text-dark-150; } - /* Preview Mode Typography ========================================================================== */ .markdown-preview { - @apply mx-auto px-3 py-2 @md/markdown:py-4 @md/markdown:px-5; + @apply mx-auto px-3 py-2 @md/markdown:px-5 @md/markdown:py-4; min-height: 167px; @@ -207,12 +206,14 @@ background-color: #f9f2f4; direction: ltr; - code { @apply p-0 } + code { + @apply p-0; + } } } .markdown-fieldtype-wrapper.markdown-fullscreen { - @apply fixed bg-gray-200 inset-0 min-h-screen overflow-scroll rounded-none pt-14 border-0; + @apply fixed inset-0 min-h-screen overflow-scroll rounded-none border-0 bg-gray-200 pt-14; /* padding-top: 52px; offset the nav */ will-change: transform; @@ -230,7 +231,7 @@ } .editor { - @apply bg-white shadow max-w-xl mx-auto rounded relative my-6 px-2 md:px-8 md:pt-8; + @apply relative mx-auto my-6 max-w-xl rounded bg-white px-2 shadow md:px-8 md:pt-8; .CodeMirror-scroll { @apply m-0; @@ -238,17 +239,18 @@ } .CodeMirror { - @apply outline-none bg-transparent shadow-none; - &:focus, &:focus-within { + @apply bg-transparent shadow-none outline-none; + &:focus, + &:focus-within { @apply ring-0 !important; } } .markdown-preview { - @apply max-w-xl bg-transparent mx-auto relative p-8 text-lg; + @apply relative mx-auto max-w-xl bg-transparent p-8 text-lg; } .helpers { - @apply absolute bottom-0 inset-x-0 bg-white; + @apply absolute inset-x-0 bottom-0 bg-white; } } diff --git a/resources/css/components/fieldtypes/partial.css b/resources/css/components/fieldtypes/partial.css index 65422e1c42..b1386c5efa 100644 --- a/resources/css/components/fieldtypes/partial.css +++ b/resources/css/components/fieldtypes/partial.css @@ -11,7 +11,8 @@ > .field-inner { padding: 0; - > label, > .help-block { + > label, + > .help-block { display: none; } } diff --git a/resources/css/components/fieldtypes/radio.css b/resources/css/components/fieldtypes/radio.css index af075ad2bb..1c4bf7b876 100644 --- a/resources/css/components/fieldtypes/radio.css +++ b/resources/css/components/fieldtypes/radio.css @@ -2,12 +2,12 @@ @apply flex; } -.radio-fieldtype input[type="radio"] { - @apply m-0 min-w-0 absolute opacity-0 -z-1 w-1 h-px w-px overflow-hidden; +.radio-fieldtype input[type='radio'] { + @apply absolute -z-1 m-0 h-px w-1 w-px min-w-0 overflow-hidden opacity-0; } .radio-fieldtype .radio-icon { - @apply cursor-pointer h-4 w-4 ltr:mr-2 rtl:ml-2 block; + @apply block h-4 w-4 cursor-pointer ltr:mr-2 rtl:ml-2; } .radio-fieldtype .option.disabled { @@ -18,4 +18,3 @@ @apply cursor-text; } } - diff --git a/resources/css/components/fieldtypes/relationship.css b/resources/css/components/fieldtypes/relationship.css index 39cf326408..2c884e6304 100644 --- a/resources/css/components/fieldtypes/relationship.css +++ b/resources/css/components/fieldtypes/relationship.css @@ -1,4 +1,6 @@ /* Inside a Grid field ========================================================================== */ -.grid-table .relationship-input-empty .relationship-input-buttons { padding-top: 10px; } +.grid-table .relationship-input-empty .relationship-input-buttons { + padding-top: 10px; +} diff --git a/resources/css/components/fieldtypes/replicator.css b/resources/css/components/fieldtypes/replicator.css index 46c7d7dcae..11fbe3155c 100644 --- a/resources/css/components/fieldtypes/replicator.css +++ b/resources/css/components/fieldtypes/replicator.css @@ -7,22 +7,24 @@ } .replicator-set { - @apply shadow-set dark:shadow-dark-set rounded bg-white dark:bg-dark-800 outline-none relative; + @apply relative rounded bg-white shadow-set outline-none dark:bg-dark-800 dark:shadow-dark-set; } .replicator-set-header { - @apply bg-gray-300 dark:bg-dark-650 border-b dark:border-dark-900 rounded-t rtl:pl-3 ltr:pr-3 flex select-none; + @apply flex select-none rounded-t border-b bg-gray-300 dark:border-dark-900 dark:bg-dark-650 ltr:pr-3 rtl:pl-3; &.collapsed { @apply rounded border-b-0; } .sortable-handle { - @apply w-4 rtl:border-l ltr:border-r dark:border-dark-900 rtl:rounded-tr ltr:rounded-tl p-2; + @apply w-4 p-2 dark:border-dark-900 ltr:rounded-tl ltr:border-r rtl:rounded-tr rtl:border-l; cursor: grab; background: transparent url('../../../svg/icons/light/drag-dots.svg') center center no-repeat; background-size: 7px 17px; - &:hover { @apply bg-gray-200 dark:bg-dark-700; } + &:hover { + @apply bg-gray-200 dark:bg-dark-700; + } } img { @@ -58,7 +60,9 @@ .replicator-set-picker.between { @apply opacity-0 hover:opacity-100; transform: translateX(-8px); - transition: opacity 100ms ease, transform 100ms ease; + transition: + opacity 100ms ease, + transform 100ms ease; } .replicator-set-picker.between:hover { @@ -78,5 +82,5 @@ } .replicator-fullscreen { - @apply fixed bg-gray-200 inset-0 min-h-screen overflow-scroll rounded-none; + @apply fixed inset-0 min-h-screen overflow-scroll rounded-none bg-gray-200; } diff --git a/resources/css/components/fieldtypes/section.css b/resources/css/components/fieldtypes/section.css index 5339d8024b..103564b529 100644 --- a/resources/css/components/fieldtypes/section.css +++ b/resources/css/components/fieldtypes/section.css @@ -3,7 +3,7 @@ ========================================================================== */ .section-fieldtype { - @apply border-t border-b bg-gray-200; + @apply border-b border-t bg-gray-200; @apply dark:border-dark-900 dark:bg-dark-700 dark:shadow-inner-dark; @apply -mt-px; /* Avoid adjacent borders just in case they're stacked */ @@ -18,14 +18,16 @@ } .field-inner > label { - @apply uppercase text-sm font-bold; + @apply text-sm font-bold uppercase; } } .help-block { @apply mb-0; - p { margin: 0; } + p { + margin: 0; + } } .read-only-overlay { diff --git a/resources/css/components/fieldtypes/spacer.css b/resources/css/components/fieldtypes/spacer.css index fb1cf0f03a..a9a4756351 100644 --- a/resources/css/components/fieldtypes/spacer.css +++ b/resources/css/components/fieldtypes/spacer.css @@ -3,5 +3,5 @@ ========================================================================== */ .spacer-fieldtype { - @apply hidden @sm:block @sm:invisible; + @apply hidden @sm:invisible @sm:block; } diff --git a/resources/css/components/fieldtypes/table.css b/resources/css/components/fieldtypes/table.css index 4b5261e44b..d623aa54e4 100644 --- a/resources/css/components/fieldtypes/table.css +++ b/resources/css/components/fieldtypes/table.css @@ -3,7 +3,7 @@ ========================================================================== */ .table-fieldtype-table { - @apply w-full rtl:text-right ltr:text-left border dark:border-dark-900 text-gray dark:text-dark-150 relative mb-4 outline-none shadow-sm rounded; + @apply relative mb-4 w-full rounded border text-gray shadow-sm outline-none dark:border-dark-900 dark:text-dark-150 ltr:text-left rtl:text-right; border-collapse: separate; border-spacing: 0; table-layout: fixed; @@ -11,13 +11,17 @@ .table-fieldtype-table thead { th { - @apply font-medium rtl:border-l ltr:border-r p-2 border-b dark:border-dark-900 z-10 bg-gray-200 dark:bg-dark-700 text-gray-900 dark:text-dark-150 text-sm; + @apply z-10 border-b bg-gray-200 p-2 text-sm font-medium text-gray-900 dark:border-dark-900 dark:bg-dark-700 dark:text-dark-150 ltr:border-r rtl:border-l; display: table-cell; position: sticky; top: -1px; - &:first-child { @apply rtl:rounded-tr ltr:rounded-tl rtl:pr-3 ltr:pl-3; } - &:last-child { @apply rtl:rounded-tl ltr:rounded-tr rtl:border-l-0 ltr:border-r-0; } + &:first-child { + @apply ltr:rounded-tl ltr:pl-3 rtl:rounded-tr rtl:pr-3; + } + &:last-child { + @apply ltr:rounded-tr ltr:border-r-0 rtl:rounded-tl rtl:border-l-0; + } &.grid-drag-handle-header { @apply w-3; } @@ -25,10 +29,10 @@ } .table-fieldtype-table .input-text { - @apply bg-white border-none rounded-none shadow-none outline-none text-sm; + @apply rounded-none border-none bg-white text-sm shadow-none outline-none; @apply dark:bg-dark-650; &:focus { - @apply shadow-inner bg-gray-100 dark:bg-dark-700 ring-0; + @apply bg-gray-100 shadow-inner ring-0 dark:bg-dark-700; } } @@ -40,18 +44,18 @@ } td { - @apply border-b rtl:border-l ltr:border-r dark:border-dark-900 p-0; + @apply border-b p-0 dark:border-dark-900 ltr:border-r rtl:border-l; &:first-child.grid-cell { - @apply rtl:pr-3 ltr:pl-3; + @apply ltr:pl-3 rtl:pr-3; } &:last-child { - @apply rtl:border-l-0 ltr:border-r-0; + @apply ltr:border-r-0 rtl:border-l-0; } &.table-drag-handle { - @apply w-3 rtl:border-l ltr:border-r h-full p-2; + @apply h-full w-3 p-2 ltr:border-r rtl:border-l; cursor: grab; background: theme('colors.gray.200') url('../../../svg/icons/light/drag-dots.svg') center center no-repeat; background-size: 7px 17px; @@ -60,14 +64,20 @@ background-color: theme(colors.dark.600); } - &:hover { @apply bg-gray-300 dark:bg-dark-750; } + &:hover { + @apply bg-gray-300 dark:bg-dark-750; + } } } tr:last-child td { @apply border-b-0; - &:first-child { @apply rtl:rounded-br ltr:rounded-bl; } - &:last-child { @apply rtl:rounded-bl ltr:rounded-br; } + &:first-child { + @apply ltr:rounded-bl rtl:rounded-br; + } + &:last-child { + @apply ltr:rounded-br rtl:rounded-bl; + } } tr.draggable-source--is-dragging td { @@ -76,7 +86,7 @@ } .table-fieldtype-table .row-controls { - @apply w-8 rtl:pr-0 ltr:pl-0 text-center; + @apply w-8 text-center ltr:pl-0 rtl:pr-0; vertical-align: middle; &:focus-within { @apply bg-gray-200 dark:bg-dark-750; @@ -87,7 +97,7 @@ } .table-fullscreen { - @apply fixed bg-gray-200 inset-0 min-h-screen overflow-scroll rounded-none; + @apply fixed inset-0 min-h-screen overflow-scroll rounded-none bg-gray-200; z-index: 998; /* to appear over the top of the rest of the stuff on the page. */ - /* too high and it'll be over the top of stacks, etc. */ + /* too high and it'll be over the top of stacks, etc. */ } diff --git a/resources/css/components/fieldtypes/textarea.css b/resources/css/components/fieldtypes/textarea.css index 83da1d874d..ef7abd0f89 100644 --- a/resources/css/components/fieldtypes/textarea.css +++ b/resources/css/components/fieldtypes/textarea.css @@ -3,17 +3,18 @@ ========================================================================== */ .textarea-fieldtype textarea { - @apply border-gray-500 dark:border-dark-900 dark:shadow-inner-dark text-md leading-normal; + @apply border-gray-500 text-md leading-normal dark:border-dark-900 dark:shadow-inner-dark; min-height: 80px; - &:not(.focus-within-only):focus, &:not(.focus-within-only):focus-within { - @apply ring-2 ring-blue-300 dark:ring-blue-600 outline-none shadow-none; + &:not(.focus-within-only):focus, + &:not(.focus-within-only):focus-within { + @apply shadow-none outline-none ring-2 ring-blue-300 dark:ring-blue-600; } } /* Inside a Grid ========================================================================== */ - .grid-fieldtype .textarea-fieldtype textarea { - @apply bg-white dark:bg-dark-600; - } +.grid-fieldtype .textarea-fieldtype textarea { + @apply bg-white dark:bg-dark-600; +} diff --git a/resources/css/components/fieldtypes/video.css b/resources/css/components/fieldtypes/video.css index a6ad494408..757fe55bb9 100644 --- a/resources/css/components/fieldtypes/video.css +++ b/resources/css/components/fieldtypes/video.css @@ -1,5 +1,5 @@ .video-fieldtype-container { - @apply bg-gray-200 dark:bg-dark-700 p-4 border dark:border-dark-950 rounded; + @apply rounded border bg-gray-200 p-4 dark:border-dark-950 dark:bg-dark-700; } .video-fieldtype .video-preview-wrapper { @@ -10,7 +10,7 @@ } .video-fieldtype .embed-video { - @apply w-full h-0 relative; + @apply relative h-0 w-full; padding-bottom: 56.25%; } @@ -18,7 +18,11 @@ @apply rounded; position: absolute; top: 0; - left: 0 ; [dir="rtl"] & { left: auto ; right: 0 ; } + left: 0; + [dir='rtl'] & { + left: auto; + right: 0; + } width: 100%; height: 100%; } diff --git a/resources/css/components/fieldtypes/width.css b/resources/css/components/fieldtypes/width.css index 20e75ded34..f47138e33d 100644 --- a/resources/css/components/fieldtypes/width.css +++ b/resources/css/components/fieldtypes/width.css @@ -2,25 +2,25 @@ ========================================================================== */ .field-width-selector { - @apply w-12 h-5 flex relative cursor-pointer; + @apply relative flex h-5 w-12 cursor-pointer; .field-width-label { - @apply absolute text-4xs font-bold w-full text-center z-10 text-gray-700 dark:text-dark-150 inset-0 flex items-center justify-center pointer-events-none; + @apply pointer-events-none absolute inset-0 z-10 flex w-full items-center justify-center text-center text-4xs font-bold text-gray-700 dark:text-dark-150; } .field-width-notch { - @apply relative border border-gray-400 dark:border-dark-300 rtl:border-r-0 ltr:border-l-0 flex-1; + @apply relative flex-1 border border-gray-400 dark:border-dark-300 ltr:border-l-0 rtl:border-r-0; &:first-of-type { - @apply rtl:border-r ltr:border-l rtl:rounded-r-sm ltr:rounded-l-sm; + @apply ltr:rounded-l-sm ltr:border-l rtl:rounded-r-sm rtl:border-r; } &.filled { - @apply border-gray-400 dark:border-dark-400 rtl:border-l-0 ltr:border-r-0 rtl:pl-px ltr:pr-px bg-white dark:bg-dark-575 -my-px; + @apply -my-px border-gray-400 bg-white dark:border-dark-400 dark:bg-dark-575 ltr:border-r-0 ltr:pr-px rtl:border-l-0 rtl:pl-px; } &.selected { - @apply rtl:border-l ltr:border-r rtl:rounded-l-sm ltr:rounded-r-sm; + @apply ltr:rounded-r-sm ltr:border-r rtl:rounded-l-sm rtl:border-l; } } } @@ -29,16 +29,16 @@ ========================================================================== */ .width-fieldtype .field-width-selector { - @apply w-16 h-9 mt-px; + @apply mt-px h-9 w-16; .field-width-notch { - @apply bg-gray-200 dark:bg-dark-550 border-r-gray-400 dark:border-dark-700 border-y-gray-500 dark:border-y-dark-750; + @apply border-y-gray-500 border-r-gray-400 bg-gray-200 dark:border-dark-700 dark:border-y-dark-750 dark:bg-dark-550; &:last-child { - @apply border-r-gray-500 dark:border-dark-750 rtl:rounded-l-sm ltr:rounded-r-sm; + @apply border-r-gray-500 dark:border-dark-750 ltr:rounded-r-sm rtl:rounded-l-sm; } &.filled { - @apply bg-gradient-to-b from-white to-gray-100 dark:from-dark-300 dark:to-dark-400 border-gray-500 dark:border-dark-750; + @apply border-gray-500 bg-gradient-to-b from-white to-gray-100 dark:border-dark-750 dark:from-dark-300 dark:to-dark-400; } } diff --git a/resources/css/components/fieldtypes/yaml.css b/resources/css/components/fieldtypes/yaml.css index 380271ef26..ddba9092fe 100644 --- a/resources/css/components/fieldtypes/yaml.css +++ b/resources/css/components/fieldtypes/yaml.css @@ -4,27 +4,31 @@ .yaml-fieldtype { .code-mode { - @apply absolute top-2 z-10 right-3 text-gray-600 text-xs uppercase tracking-wider; + @apply absolute right-3 top-2 z-10 text-xs uppercase tracking-wider text-gray-600; } .CodeMirror-wrap { @apply rounded; } } - - /* Inside a Grid field ========================================================================== */ .grid-fieldtype .yaml-fieldtype-wrapper { > span { border-top: 0; - border-right: 0 ; [dir="rtl"] & { border-right: 0 ; border-left: 0 ; } + border-right: 0; + [dir='rtl'] & { + border-right: 0; + border-left: 0; + } } .editor { border: none; border-radius: 0; - .CodeMirror { box-shadow: none; } + .CodeMirror { + box-shadow: none; + } } } diff --git a/resources/css/components/filters.css b/resources/css/components/filters.css index c42cb95933..17888e38d7 100644 --- a/resources/css/components/filters.css +++ b/resources/css/components/filters.css @@ -3,27 +3,36 @@ ========================================================================== */ .filter { - @apply bg-gray-200 mb-6 rounded-full text-center; + @apply mb-6 rounded-full bg-gray-200 text-center; padding: 10px 8px 14px; a { - @apply text-xs text-gray-700 mx-1 p-2 relative; + @apply relative mx-1 p-2 text-xs text-gray-700; } - a.active, a:hover { + a.active, + a:hover { @apply text-gray-950; } a.active:after { - @apply bg-red-500 block; - content: ""; + @apply block bg-red-500; + content: ''; width: 4px; height: 4px; border-radius: 50%; - opacity: .9; + opacity: 0.9; position: absolute; - left: 50% ; [dir="rtl"] & { left: auto ; right: 50% ; } - margin-left: -1px ; [dir="rtl"] & { margin-right: -1px ; margin-left: 0 ; } + left: 50%; + [dir='rtl'] & { + left: auto; + right: 50%; + } + margin-left: -1px; + [dir='rtl'] & { + margin-right: -1px; + margin-left: 0; + } bottom: 1px; } @@ -47,7 +56,7 @@ } .text-fieldtype .input-text { - @apply py-2 px-3; + @apply px-3 py-2; } .no-label.form-group, diff --git a/resources/css/components/focal-point.css b/resources/css/components/focal-point.css index 33210a531b..f21688b976 100644 --- a/resources/css/components/focal-point.css +++ b/resources/css/components/focal-point.css @@ -10,7 +10,11 @@ .focal-point-toolbox { position: absolute; top: 20px; - left: 20px ; [dir="rtl"] & { left: auto ; right: 20px ; } + left: 20px; + [dir='rtl'] & { + left: auto; + right: 20px; + } z-index: 120; width: 380px; overflow-y: auto; @@ -32,31 +36,43 @@ .focal-point-reticle { border-radius: 50%; position: absolute; - transition: top 0.5s ease, left 0.5s ease; + transition: + top 0.5s ease, + left 0.5s ease; pointer-events: none; &.zoomed { border: 1px solid white; - box-shadow: 0 0 5px rgba(0,0,0,.5); + box-shadow: 0 0 5px rgba(0, 0, 0, 0.5); } &:before { - content: ""; + content: ''; width: 8px; height: 8px; position: absolute; background: white; border-radius: 50%; top: 50%; - left: 50% ; [dir="rtl"] & { left: auto ; right: 50% ; } - margin: -4px 0 0 -4px ; [dir="rtl"] & { margin: -4px -4px 0 0 ; } - box-shadow: 0 0 4px rgba(0,0,0,.75); + left: 50%; + [dir='rtl'] & { + left: auto; + right: 50%; + } + margin: -4px 0 0 -4px; + [dir='rtl'] & { + margin: -4px -4px 0 0; + } + box-shadow: 0 0 4px rgba(0, 0, 0, 0.75); } } .focal-point .frame { position: absolute; - margin: -5px 0 0 -5px ; [dir="rtl"] & { margin: -5px -5px 0 0 ; } + margin: -5px 0 0 -5px; + [dir='rtl'] & { + margin: -5px -5px 0 0; + } border: 10px solid #394045; box-sizing: content-box; overflow: hidden; @@ -70,10 +86,52 @@ } .focal-point { - .frame-1, .frame-4, .frame-7 { left: 0 ; [dir="rtl"] & { left: auto ; right: 0 ; } width: 66.6666667%; } - .frame-2, .frame-5, .frame-8 { left: 66.6666667% ; [dir="rtl"] & { left: auto ; right: 66.6666667% ; } width: 22.2222222%; } - .frame-3, .frame-6, .frame-9 { left: 88.8888889% ; [dir="rtl"] & { left: auto ; right: 88.8888889% ; } width: 11.1111111%; } - .frame-1, .frame-2, .frame-3 { top: 0; height: 66.6666667%; } - .frame-4, .frame-5, .frame-6 { top: 66.6666667%; height: 22.2222222%; } - .frame-7, .frame-8, .frame-9 { top: 88.8888889%; height: 11.1111111%; } + .frame-1, + .frame-4, + .frame-7 { + left: 0; + [dir='rtl'] & { + left: auto; + right: 0; + } + width: 66.6666667%; + } + .frame-2, + .frame-5, + .frame-8 { + left: 66.6666667%; + [dir='rtl'] & { + left: auto; + right: 66.6666667%; + } + width: 22.2222222%; + } + .frame-3, + .frame-6, + .frame-9 { + left: 88.8888889%; + [dir='rtl'] & { + left: auto; + right: 88.8888889%; + } + width: 11.1111111%; + } + .frame-1, + .frame-2, + .frame-3 { + top: 0; + height: 66.6666667%; + } + .frame-4, + .frame-5, + .frame-6 { + top: 66.6666667%; + height: 22.2222222%; + } + .frame-7, + .frame-8, + .frame-9 { + top: 88.8888889%; + height: 11.1111111%; + } } diff --git a/resources/css/components/global-header.css b/resources/css/components/global-header.css index 6e231e9467..97decfeb20 100644 --- a/resources/css/components/global-header.css +++ b/resources/css/components/global-header.css @@ -3,7 +3,7 @@ ========================================================================== */ .global-header { - @apply bg-white dark:bg-dark-600 shadow dark:shadow-dark rtl:pl-4 ltr:pr-4 h-13 items-center flex relative w-full; + @apply relative flex h-13 w-full items-center bg-white shadow dark:bg-dark-600 dark:shadow-dark ltr:pr-4 rtl:pl-4; z-index: 3; /* The search focus overlay sits underneath using z-index 2. */ .dark & { @@ -15,50 +15,63 @@ } .global-header-icon-button { - @apply h-7 w-7 block outline-none p-1 text-gray hover:text-gray-800 rounded-full hover:bg-gray-200 border border-transparent hover:border-gray-400; - @apply dark:text-dark-100 dark:hover:text-dark-100 dark:hover:bg-dark-800 dark:border-transparent dark:hover:border-dark-900; + @apply block h-7 w-7 rounded-full border border-transparent p-1 text-gray outline-none hover:border-gray-400 hover:bg-gray-200 hover:text-gray-800; + @apply dark:border-transparent dark:text-dark-100 dark:hover:border-dark-900 dark:hover:bg-dark-800 dark:hover:text-dark-100; } } - /* Responsive Wangjangling ========================================================================== */ @screen md { - .global-header { @apply px-0 fixed } + .global-header { + @apply fixed px-0; + } } /* Search ========================================================================== */ .global-search { - @apply rounded-md px-2 hidden py-0 flex items-center relative border dark:border-dark-300; - transition: .12s ease-out; + @apply relative flex hidden items-center rounded-md border px-2 py-0 dark:border-dark-300; + transition: 0.12s ease-out; .search-input { - @apply text-sm w-full max-w-full dark:bg-dark-600 dark:text-dark-150; - padding-left: 5px ; - padding-right: 20px ; [dir="rtl"] & { padding-left: 20px ; padding-right: 5px ; } + @apply w-full max-w-full text-sm dark:bg-dark-600 dark:text-dark-150; + padding-left: 5px; + padding-right: 20px; + [dir='rtl'] & { + padding-left: 20px; + padding-right: 5px; + } height: 32px; - &:focus { - outline: 0; - } + &:focus { + outline: 0; + } } .global-search-results { - @apply shadow-lg absolute p-0 w-full bg-white rounded border border-gray-500; - @apply dark:bg-dark-650 dark:border-dark-900; + @apply absolute w-full rounded border border-gray-500 bg-white p-0 shadow-lg; + @apply dark:border-dark-900 dark:bg-dark-650; top: 36px; - left: -1px ; [dir="rtl"] & { left: auto ; right: -1px ; } /* border offset */ + left: -1px; + [dir='rtl'] & { + left: auto; + right: -1px; + } /* border offset */ z-index: 999; } .global-search-loading-indicator { position: absolute; - right: 8px ; [dir="rtl"] & { right: auto ; left: 8px ; } + right: 8px; + [dir='rtl'] & { + right: auto; + left: 8px; + } } .global-search-result-item { - @apply border-t cursor-pointer dark:bg-dark-600 dark:border-dark-800 dark:text-dark-150; + @apply cursor-pointer border-t dark:border-dark-800 dark:bg-dark-600 dark:text-dark-150; &:first-child { @apply rounded-t border-none; @@ -70,8 +83,8 @@ } .global-search-result-badge { - @apply rounded px-1 text-2xs border bg-gray-200 text-gray; - @apply dark:bg-dark-600 dark:text-dark-100 dark:border-dark-700; + @apply rounded border bg-gray-200 px-1 text-2xs text-gray; + @apply dark:border-dark-700 dark:bg-dark-600 dark:text-dark-100; } .active { @@ -79,7 +92,7 @@ } .title { - @apply font-medium text-sm; + @apply text-sm font-medium; } .url { @@ -87,14 +100,17 @@ } .status { - float: right ; [dir="rtl"] & { float: left ; } + float: right; + [dir='rtl'] & { + float: left; + } background: #ddd; border-radius: 2px; padding: 2px 4px; } .icon { - @apply text-gray dark:text-dark-175 relative cursor-pointer overflow-hidden; + @apply relative cursor-pointer overflow-hidden text-gray dark:text-dark-175; font-size: 18px; top: 1px; width: 20px; @@ -104,41 +120,65 @@ .reset { font-size: 21px; - left: -3px ; [dir="rtl"] & { left: auto ; right: -3px ; } + left: -3px; + [dir='rtl'] & { + left: auto; + right: -3px; + } position: relative; } kbd { - @apply font-sans rounded px-1 pb-px text-2xs border text-gray-500; + @apply rounded border px-1 pb-px font-sans text-2xs text-gray-500; } } @screen lg { .global-search { @apply flex w-128 max-w-full; - .global-search-results { @apply w-128 } + .global-search-results { + @apply w-128; + } } } .site-selector { - - .v-select { @apply h-full } - .vs__dropdown-toggle { @apply border-none bg-none } - .vs__actions { @apply hidden } - .vs__search { @apply p-0; [dir="rtl"] & { @apply p-0; } [dir="ltr"] & { @apply p-0; } } - .vs__selected-options { @apply border-none shadow-none p-0 bg-none } - .vs__selected { @apply flex } + .v-select { + @apply h-full; + } + .vs__dropdown-toggle { + @apply border-none bg-none; + } + .vs__actions { + @apply hidden; + } + .vs__search { + @apply p-0; + [dir='rtl'] & { + @apply p-0; + } + [dir='ltr'] & { + @apply p-0; + } + } + .vs__selected-options { + @apply border-none bg-none p-0 shadow-none; + } + .vs__selected { + @apply flex; + } .vs__dropdown-toggle { @apply h-full rounded-none bg-transparent; box-shadow: none; } - .vs--single.vs--unsearchable .vs__selected-options { @apply bg-none } + .vs--single.vs--unsearchable .vs__selected-options { + @apply bg-none; + } } - .session-expiry-stripe { - @apply px-4 py-2 text-xs top-0 text-center bg-red-500 text-white cursor-pointer w-full outline-none fixed; + @apply fixed top-0 w-full cursor-pointer bg-red-500 px-4 py-2 text-center text-xs text-white outline-none; z-index: 999; height: 48px; @@ -146,7 +186,8 @@ @apply bg-red-700; } - &:active, &:focus { + &:active, + &:focus { outline: none; } @@ -161,25 +202,31 @@ } @keyframes rotate { - 100% { - transform: rotate(1turn); - } + 100% { + transform: rotate(1turn); + } } .animate-radar { @apply relative z-0; - &::after { + &::after { @apply absolute bg-transparent bg-no-repeat; - content: ''; - z-index: 2; - left: -50%; - top: -50%; - width: 200%; - height: 200%; - background-size: 50% 50%, 50% 50%; - background-position: 0 0, 100% 0, 100% 100%, 0 100%; - background-image: linear-gradient(transparent, rgba(255,255,255,.7), transparent); - animation: rotate 4s linear infinite; - } + content: ''; + z-index: 2; + left: -50%; + top: -50%; + width: 200%; + height: 200%; + background-size: + 50% 50%, + 50% 50%; + background-position: + 0 0, + 100% 0, + 100% 100%, + 0 100%; + background-image: linear-gradient(transparent, rgba(255, 255, 255, 0.7), transparent); + animation: rotate 4s linear infinite; + } } diff --git a/resources/css/components/items.css b/resources/css/components/items.css index d5edcf0fb1..effecd04b3 100644 --- a/resources/css/components/items.css +++ b/resources/css/components/items.css @@ -1,24 +1,26 @@ .item { - @apply text-sm outline-none bg-white flex w-full justify-between rounded border shadow-sm items-center; + @apply flex w-full items-center justify-between rounded border bg-white text-sm shadow-sm outline-none; @apply dark:border-dark-900 dark:bg-dark-550 dark:shadow-dark-sm; .item-move { - @apply w-4 self-stretch bg-gray-200 rtl:border-l ltr:border-r rtl:rounded-r ltr:rounded-l p-2 cursor-grab; + @apply w-4 cursor-grab self-stretch bg-gray-200 p-2 ltr:rounded-l ltr:border-r rtl:rounded-r rtl:border-l; @apply dark:border-dark-900 dark:bg-dark-550; background-image: url('../../svg/icons/light/drag-dots.svg'); background-repeat: no-repeat; background-position: center center; background-size: 7px 17px; - &:hover { @apply bg-gray-300 dark:bg-dark-650; } + &:hover { + @apply bg-gray-300 dark:bg-dark-650; + } } .item-inner { - @apply w-full flex items-center p-2; + @apply flex w-full items-center p-2; } &.invalid { .item-inner { - @apply border-red-300 dark:border-dark-red bg-red-100 dark:bg-red-400 text-red-500 dark:text-red-950; + @apply border-red-300 bg-red-100 text-red-500 dark:border-dark-red dark:bg-red-400 dark:text-red-950; } } diff --git a/resources/css/components/metrics.css b/resources/css/components/metrics.css index d71136fc85..cbf3881400 100644 --- a/resources/css/components/metrics.css +++ b/resources/css/components/metrics.css @@ -10,11 +10,10 @@ } .metric { - } .mini-chart { - @apply shadow bg-gray-800 relative rounded; + @apply relative rounded bg-gray-800 shadow; .count { overflow: hidden; color: #fff; @@ -24,10 +23,17 @@ margin: 10px 0 0; } } - &.dark { } - &.blue { @apply bg-blue; } - &.green { @apply bg-green-600; } - &.red { @apply bg-red-500; } + &.dark { + } + &.blue { + @apply bg-blue; + } + &.green { + @apply bg-green-600; + } + &.red { + @apply bg-red-500; + } } .metric.simple { diff --git a/resources/css/components/modal.css b/resources/css/components/modal.css index 2ceefab7d6..404efc0a74 100644 --- a/resources/css/components/modal.css +++ b/resources/css/components/modal.css @@ -7,7 +7,7 @@ .vfm__content { @apply rounded-lg dark:bg-dark-600 dark:shadow-dark !important; - @apply bg-white shadow-2xl overflow-clip; + @apply overflow-clip bg-white shadow-2xl; [dir='rtl'] & { direction: rtl; @@ -15,9 +15,9 @@ } .vfm__overlay { - background: hsla(210, 20%, 10%, .15) !important; + background: hsla(210, 20%, 10%, 0.15) !important; } .confirmation-modal .publish-fields .form-group { - @apply p-0 mb-6; + @apply mb-6 p-0; } diff --git a/resources/css/components/nav-main.css b/resources/css/components/nav-main.css index 66e2d63e9a..b7194969e6 100644 --- a/resources/css/components/nav-main.css +++ b/resources/css/components/nav-main.css @@ -3,15 +3,17 @@ ========================================================================== */ .nav-main { - @apply hidden select-none bg-white shadow h-screen absolute rtl:right-0 ltr:left-0 overflow-scroll w-56; + @apply absolute hidden h-screen w-56 select-none overflow-scroll bg-white shadow ltr:left-0 rtl:right-0; @apply dark:bg-dark-800 dark:shadow-dark; - transition: all .3s; + transition: all 0.3s; - h6 { @apply mt-6; } + h6 { + @apply mt-6; + } ul { - @apply list-none p-0 mt-0; + @apply mt-0 list-none p-0; } li { @@ -20,8 +22,8 @@ } li a { - @apply p-0 flex items-center text-gray-800 dark:text-dark-150; - transition: all .08s ease-in-out; + @apply flex items-center p-0 text-gray-800 dark:text-dark-150; + transition: all 0.08s ease-in-out; &:hover { @apply text-blue dark:text-blue-300; @@ -31,13 +33,13 @@ } i { - @apply block h-7 p-1 w-7 rtl:ml-2 ltr:mr-2 rounded-full; + @apply block h-7 w-7 rounded-full p-1 ltr:mr-2 rtl:ml-2; @apply dark:text-dark-150/70; } } li.current > a { - @apply text-gray-900 font-medium dark:text-white; + @apply font-medium text-gray-900 dark:text-white; i { @apply bg-white dark:bg-dark-600 dark:text-dark-100; @@ -46,11 +48,19 @@ li ul { @apply mb-2; - margin-left: 1.5rem ; [dir="rtl"] & { margin-right: 1.5rem ; margin-left: 0 ; } + margin-left: 1.5rem; + [dir='rtl'] & { + margin-right: 1.5rem; + margin-left: 0; + } li { @apply text-xs; - margin-left: 12px ; [dir="rtl"] & { margin-right: 12px ; margin-left: 0 ; } + margin-left: 12px; + [dir='rtl'] & { + margin-right: 12px; + margin-left: 0; + } } li a { @@ -59,7 +69,11 @@ } .nav-closed & { - left: -110% ; [dir="rtl"] & { left: auto ; right: -110% ; } + left: -110%; + [dir='rtl'] & { + left: auto; + right: -110%; + } } .nav-section-top-level { @@ -69,7 +83,7 @@ @screen md { .nav-main { - @apply fixed flex bg-transparent shadow-none overflow-auto rtl:border-l ltr:border-r dark:border-dark-900; + @apply fixed flex overflow-auto bg-transparent shadow-none dark:border-dark-900 ltr:border-r rtl:border-l; height: calc(100% - 52px); .showing-license-banner & { height: calc(100% - 105px); @@ -82,11 +96,11 @@ } .nav-main-inner { - @apply rtl:pr-6 ltr:pl-6 rtl:pl-4 ltr:pr-4 pt-2; + @apply pt-2 ltr:pl-6 ltr:pr-4 rtl:pl-4 rtl:pr-6; } .nav-toggle { - @apply flex items-center justify-center h-6 p-1 w-6 rtl:ml-3 ltr:mr-3 rounded; + @apply flex h-6 w-6 items-center justify-center rounded p-1 ltr:mr-3 rtl:ml-3; outline: none !important; &:hover { @@ -94,7 +108,5 @@ } } - - /* Responsive Wangjangling ========================================================================== */ diff --git a/resources/css/components/nav-mobile.css b/resources/css/components/nav-mobile.css index 122f05d5fb..0e74261944 100644 --- a/resources/css/components/nav-mobile.css +++ b/resources/css/components/nav-mobile.css @@ -3,17 +3,29 @@ ========================================================================== */ .nav-main.nav-mobile { - left: -110% ; [dir="rtl"] & { left: auto ; right: -110% ; } + left: -110%; + [dir='rtl'] & { + left: auto; + right: -110%; + } display: block; z-index: 996; .nav-main-inner { - padding-left: 12px ; [dir="rtl"] & { padding-right: 12px ; padding-left: 0 ; } + padding-left: 12px; + [dir='rtl'] & { + padding-right: 12px; + padding-left: 0; + } } } .nav-mobile-open { .nav-main.nav-mobile { - left: 0 ; [dir="rtl"] & { left: auto ; right: 0 ; } + left: 0; + [dir='rtl'] & { + left: auto; + right: 0; + } } } diff --git a/resources/css/components/notifications.css b/resources/css/components/notifications.css index 352edc9175..32874e423d 100644 --- a/resources/css/components/notifications.css +++ b/resources/css/components/notifications.css @@ -13,15 +13,15 @@ } .toasted-container .toasted.statamic { - @apply bg-white dark:bg-dark-900 text-gray-800 dark:text-dark-100 mt-4 text-base rounded shadow p-0; + @apply mt-4 rounded bg-white p-0 text-base text-gray-800 shadow dark:bg-dark-900 dark:text-dark-100; height: 48px; i { - @apply flex items-center rtl:rounded-r ltr:rounded-l rtl:ml-4 ltr:mr-4 h-full px-4 text-white; + @apply flex h-full items-center px-4 text-white ltr:mr-4 ltr:rounded-l rtl:ml-4 rtl:rounded-r; } &.success i { - @apply bg-green-400 dark:bg-green-600 text-green-700 dark:text-green-950; + @apply bg-green-400 text-green-700 dark:bg-green-600 dark:text-green-950; } &.error i { @@ -33,9 +33,9 @@ } .action { - @apply font-normal text-xl px-4 h-full text-gray-600 dark:text-dark-150 m-0 rtl:mr-2 ltr:ml-2 flex items-center; + @apply m-0 flex h-full items-center px-4 text-xl font-normal text-gray-600 dark:text-dark-150 ltr:ml-2 rtl:mr-2; &:hover { - @apply no-underline text-gray-900 dark:text-dark-100; + @apply text-gray-900 no-underline dark:text-dark-100; } } } diff --git a/resources/css/components/outside.css b/resources/css/components/outside.css index 86966d7aef..15dd80b063 100644 --- a/resources/css/components/outside.css +++ b/resources/css/components/outside.css @@ -1,18 +1,18 @@ /* Outside the Control Panel ========================================================================== */ .outside { - @apply bg-gray-300 px-2 min-h-screen; + @apply min-h-screen bg-gray-300 px-2; label { @apply text-[#596498] dark:text-dark-175; } .logo svg { - @apply h-6 block mx-auto mb-20 mb-8 w-auto text-black/25 dark:text-white/60; + @apply mx-auto mb-20 mb-8 block h-6 w-auto text-black/25 dark:text-white/60; } } - /* Alternate rad mode for a more playful vibe */ +/* Alternate rad mode for a more playful vibe */ .outside.rad-theme { background: #12c2e9; background: linear-gradient(45deg, #f64f59, #c471ed, #12c2e9); @@ -20,11 +20,21 @@ .dark .outside.rad-theme { background: #212223; - background-image: radial-gradient(at 32.6% 91.5%, #142038 0px, transparent 50%), radial-gradient(at 87.4% 39.4%, #353945 0px, transparent 50%), radial-gradient(at 84.6% 52.5%, #171717 0px, transparent 50%); + background-image: radial-gradient(at 32.6% 91.5%, #142038 0px, transparent 50%), + radial-gradient(at 87.4% 39.4%, #353945 0px, transparent 50%), + radial-gradient(at 84.6% 52.5%, #171717 0px, transparent 50%); } .dark .outside-shadow { - background: conic-gradient(from 230.29deg at 51.63% 52.16%, rgb(36, 0, 255) 0deg, rgb(0, 135, 255) 67.5deg, rgb(108, 39, 157) 198.75deg, rgb(24, 38, 163) 251.25deg, rgb(54, 103, 196) 301.88deg, rgb(105, 30, 255) 360deg); + background: conic-gradient( + from 230.29deg at 51.63% 52.16%, + rgb(36, 0, 255) 0deg, + rgb(0, 135, 255) 67.5deg, + rgb(108, 39, 157) 198.75deg, + rgb(24, 38, 163) 251.25deg, + rgb(54, 103, 196) 301.88deg, + rgb(105, 30, 255) 360deg + ); filter: blur(160px); transform: translateZ(0px); @apply absolute inset-0; @@ -35,8 +45,8 @@ ========================================================================== */ .auth-card { - @apply p-6 mx-auto relative z-10 w-full; - transition: .12s ease-out; + @apply relative z-10 mx-auto w-full p-6; + transition: 0.12s ease-out; } .outside .white-label-logo { @@ -44,8 +54,6 @@ max-width: 300px; } - - /* Rad Mode Stylez ========================================================================== */ @@ -53,38 +61,38 @@ html:not(.dark) .outside.rad-theme { .auth-card { @apply rounded-lg; box-shadow: - rgba(50, 50, 93, .4) 0 12px 34px, - rgba(0, 0, 0, .1) 0 3px 4px, - inset rgba(108, 167, 234, .2) -5px 5px 30px, - inset rgba(241, 84, 106, .2) 5px -5px 30px; - &:hover, &:focus-within { + rgba(50, 50, 93, 0.4) 0 12px 34px, + rgba(0, 0, 0, 0.1) 0 3px 4px, + inset rgba(108, 167, 234, 0.2) -5px 5px 30px, + inset rgba(241, 84, 106, 0.2) 5px -5px 30px; + &:hover, + &:focus-within { transform: translateY(-2px); box-shadow: - rgba(50, 50, 93, .5) 0 35px 78px 0, - rgba(0, 0, 0, .15) 0 4px 5px, - inset rgba(108, 167, 234, .15) -3px 3px 25px, - inset rgba(241, 84, 106, .15) 3px -3px 25px; + rgba(50, 50, 93, 0.5) 0 35px 78px 0, + rgba(0, 0, 0, 0.15) 0 4px 5px, + inset rgba(108, 167, 234, 0.15) -3px 3px 25px, + inset rgba(241, 84, 106, 0.15) 3px -3px 25px; } } - .input-text { @apply rounded-lg; } .btn-primary { - @apply text-shadow text-white border-0 rounded-md !important; + @apply text-shadow rounded-md border-0 text-white !important; background: linear-gradient(45deg, #f64f59, #c471ed) !important; box-shadow: 0 2px 5px rgba(246, 79, 89, 0.3) !important; &:hover { - background: linear-gradient(45deg, #DA464F, #AD64D1) !important; + background: linear-gradient(45deg, #da464f, #ad64d1) !important; color: #fff; box-shadow: 0 2px 5px rgba(246, 79, 89, 0.3) !important; } } .forgot-password-link { - @apply text-white text-shadow; + @apply text-shadow text-white; } } diff --git a/resources/css/components/page-tree.css b/resources/css/components/page-tree.css index 31d90b62d6..78703978f9 100644 --- a/resources/css/components/page-tree.css +++ b/resources/css/components/page-tree.css @@ -1,11 +1,10 @@ .page-tree { - .tree-node { @apply dark:mb-1; } .page-tree-branch { - @apply relative text-xs bg-white shadow rounded; + @apply relative rounded bg-white text-xs shadow; @apply dark:bg-dark-600 dark:shadow-dark; &:hover { @@ -18,14 +17,16 @@ } .page-move { - @apply w-6 rtl:border-l ltr:border-r rtl:rounded-r ltr:rounded-l dark:text-dark-175 dark:border-dark-900; + @apply w-6 dark:border-dark-900 dark:text-dark-175 ltr:rounded-l ltr:border-r rtl:rounded-r rtl:border-l; cursor: grab; - background-color: hsla(210, 30%, 95%, .5); + background-color: hsla(210, 30%, 95%, 0.5); background-image: url('../../svg/icons/light/drag-dots.svg'); background-size: 7px 17px; background-position: center center; background-repeat: no-repeat; - &:hover { @apply bg-gray-300 dark:bg-dark-700; } + &:hover { + @apply bg-gray-300 dark:bg-dark-700; + } .dark & { background-color: hsla(180, 1%, 18%, 0.5); @@ -33,7 +34,7 @@ } .page-root { - background-color: hsla(210, 30%, 95%, .5); - @apply flex w-6 rtl:rounded-r ltr:rounded-l items-center rtl:border-l ltr:border-r dark:border-dark-900; + background-color: hsla(210, 30%, 95%, 0.5); + @apply flex w-6 items-center dark:border-dark-900 ltr:rounded-l ltr:border-r rtl:rounded-r rtl:border-l; } } diff --git a/resources/css/components/pagination.css b/resources/css/components/pagination.css index 6a3846ddb0..48356dd150 100644 --- a/resources/css/components/pagination.css +++ b/resources/css/components/pagination.css @@ -3,33 +3,33 @@ ========================================================================== */ .pagination { - @apply flex justify-center shadow dark:shadow-dark items-center list-none p-0 rounded overflow-hidden; + @apply flex list-none items-center justify-center overflow-hidden rounded p-0 shadow dark:shadow-dark; - li a { - @apply h-full px-3 py-2 rtl:border-l ltr:border-r dark:border-dark-900 bg-white dark:bg-dark-600 block text-gray-800 dark:text-dark-150; + li a { + @apply block h-full bg-white px-3 py-2 text-gray-800 dark:border-dark-900 dark:bg-dark-600 dark:text-dark-150 ltr:border-r rtl:border-l; - &:hover { - @apply bg-gray-100 dark:bg-dark-700 text-gray-800 dark:text-dark-100; - } - } + &:hover { + @apply bg-gray-100 text-gray-800 dark:bg-dark-700 dark:text-dark-100; + } + } - li > .unclickable { - @apply h-full px-3 py-2 rtl:border-l ltr:border-r dark:border-dark-900 bg-white dark:bg-dark-600 block text-gray-500 dark:text-dark-200; + li > .unclickable { + @apply block h-full bg-white px-3 py-2 text-gray-500 dark:border-dark-900 dark:bg-dark-600 dark:text-dark-200 ltr:border-r rtl:border-l; - &:hover { + &:hover { cursor: text; - } - } + } + } - li:last-child a { - @apply rtl:border-l-0 ltr:border-r-0; - } + li:last-child a { + @apply ltr:border-r-0 rtl:border-l-0; + } - li.current a { - @apply bg-gray-100 dark:bg-dark-700 text-blue dark:text-dark-blue-100 shadow-inner; - } + li.current a { + @apply bg-gray-100 text-blue shadow-inner dark:bg-dark-700 dark:text-dark-blue-100; + } } .pagination.pagination-inline { - @apply shadow-none rounded-none; + @apply rounded-none shadow-none; } diff --git a/resources/css/components/popover.css b/resources/css/components/popover.css index 8698d86018..3fcb5c676d 100644 --- a/resources/css/components/popover.css +++ b/resources/css/components/popover.css @@ -20,8 +20,8 @@ transform-origin: 50% 10%; animation-fill-mode: forwards; opacity: 0; - transform: scale(.85); - transition: all .05s ease-in; + transform: scale(0.85); + transition: all 0.05s ease-in; will-change: transform, opacity; background-clip: padding-box; } @@ -51,11 +51,11 @@ /* Supporting elements */ .rotating-dots { @apply relative cursor-pointer; - transition: .12s ease-out; + transition: 0.12s ease-out; } .rotating-dots-button { - @apply text-gray-700 dark:text-dark-150 rounded-full flex items-center justify-center; + @apply flex items-center justify-center rounded-full text-gray-700 dark:text-dark-150; height: 24px; width: 24px; diff --git a/resources/css/components/preview.css b/resources/css/components/preview.css index 11b4d96d2c..59280cbb50 100644 --- a/resources/css/components/preview.css +++ b/resources/css/components/preview.css @@ -3,7 +3,7 @@ } .live-preview-header { - @apply relative rtl:pl-4 ltr:pr-4 rtl:pr-6 ltr:pl-6 py-2 h-13 shadow-md flex items-center justify-between; + @apply relative flex h-13 items-center justify-between py-2 shadow-md ltr:pl-6 ltr:pr-4 rtl:pl-4 rtl:pr-6; background: linear-gradient(180deg, #fff, #f9fafb); border-bottom: 1px solid #c4cdd6; z-index: 2; @@ -14,14 +14,13 @@ } } - .live-preview-main { @apply flex flex-1 overflow-scroll; z-index: 1; } .live-preview-editor { - @apply flex relative bg-gray-200 dark:bg-dark-800 h-full; + @apply relative flex h-full bg-gray-200 dark:bg-dark-800; z-index: 3; } @@ -35,17 +34,17 @@ } .live-preview-contents { - @apply relative bg-gray-500 flex-1 flex flex-col; + @apply relative flex flex-1 flex-col bg-gray-500; z-index: 1; } .live-preview .tabs-container { - @apply bg-gray-300 dark:bg-dark-550 mb-0; + @apply mb-0 bg-gray-300 dark:bg-dark-550; @apply @4xl/live-preview:mb-6; } .live-preview .publish-tabs { - @apply rtl:pr-4 ltr:pl-4 rtl:@4xl/live-preview:pr-6 ltr:@4xl/live-preview:pl-6; + @apply ltr:pl-4 ltr:@4xl/live-preview:pl-6 rtl:pr-4 rtl:@4xl/live-preview:pr-6; } .live-preview .publish-sections-section { @@ -66,12 +65,16 @@ .live-preview-contents iframe { @apply bg-white; - &.responsive { @apply h-full w-full; } - &.device { @apply mt-4 shadow-lg rounded; } + &.responsive { + @apply h-full w-full; + } + &.device { + @apply mt-4 rounded shadow-lg; + } } .live-preview-resizer { - @apply w-4 rtl:border-r ltr:border-l rtl:border-l ltr:border-r border-gray-400 dark:border-dark-900 shadow-sm; + @apply w-4 border-gray-400 shadow-sm dark:border-dark-900 ltr:border-l ltr:border-r rtl:border-l rtl:border-r; z-index: 1; cursor: ew-resize; background: theme('colors.gray.100') url('../../svg/icons/light/drag-dots.svg') center center no-repeat; @@ -82,7 +85,6 @@ } } - .live-preview-header-slide-enter-active, .live-preview-header-slide-leave-active { transition: all 0.3s ease; @@ -112,7 +114,6 @@ opacity: 0; } - /* We only want the animation to happen when its on the regular publish page. */ /* When portal-ed into live preview, it won't be inside .workspace */ .workspace { @@ -121,7 +122,7 @@ transition: all 0.2s; } .live-preview-tabs-drop-enter-active { - transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275) + transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275); } .live-preview-tabs-drop-leave-active { transition-timing-function: cubic-bezier(0.6, -0.28, 0.735, 0.045); diff --git a/resources/css/components/progress.css b/resources/css/components/progress.css index 21b032fb0d..269d540e3a 100644 --- a/resources/css/components/progress.css +++ b/resources/css/components/progress.css @@ -4,15 +4,17 @@ } #nprogress .bar { - @apply bg-blue fixed top-0 rtl:right-0 ltr:left-0 w-full;; + @apply fixed top-0 w-full bg-blue ltr:left-0 rtl:right-0; height: 2px; z-index: 10000; /* above global-header */ } /* Fancy blur effect */ #nprogress .peg { - @apply block absolute rtl:left-0 ltr:right-0 w-full h-full opacity-100; - box-shadow: 0 0 5px theme('colors.blue.DEFAULT'), 0 0 2px theme('colors.blue.DEFAULT'); + @apply absolute block h-full w-full opacity-100 ltr:right-0 rtl:left-0; + box-shadow: + 0 0 5px theme('colors.blue.DEFAULT'), + 0 0 2px theme('colors.blue.DEFAULT'); } .nprogress-custom-parent { diff --git a/resources/css/components/publish.css b/resources/css/components/publish.css index 9c2e52c5cf..a667f00591 100644 --- a/resources/css/components/publish.css +++ b/resources/css/components/publish.css @@ -27,7 +27,10 @@ .head .status { display: inline-block; label { - margin: 0 6px 0 0 ; [dir="rtl"] & { margin: 0 0 0 6px ; } + margin: 0 6px 0 0; + [dir='rtl'] & { + margin: 0 0 0 6px; + } position: relative; top: 3px; } @@ -36,12 +39,14 @@ position: relative; top: 8px; } - } code.parent-url { - @apply block text-3xs bg-none text-gray-700; - padding: 0 0 3px 0 ; [dir="rtl"] & { padding: 0 0 3px 0 ; } + @apply block bg-none text-3xs text-gray-700; + padding: 0 0 3px 0; + [dir='rtl'] & { + padding: 0 0 3px 0; + } } .publish-fields { @@ -50,7 +55,7 @@ code.parent-url { .form-group { > label, .field-inner > label { - @apply font-medium mb-2; + @apply mb-2 font-medium; } } @@ -76,11 +81,11 @@ code.parent-url { @apply pr-6; } .field-dropdown { - @apply block absolute bottom-[-3px] right-0; + @apply absolute bottom-[-3px] right-0 block; } &:not(.has-field-label) { .field-inner { - @apply min-h-[19.5px] mb-2; + @apply mb-2 min-h-[19.5px]; } } } @@ -99,17 +104,20 @@ code.parent-url { } .publish-section-header { - @apply border-b border-gray-400 dark:border-dark-900 bg-gray-100 dark:bg-dark-700 rounded-t-lg; + @apply rounded-t-lg border-b border-gray-400 bg-gray-100 dark:border-dark-900 dark:bg-dark-700; } .publish-section-header-inner { - @apply px-4 @lg:px-6 pt-4 pb-3; - + @apply px-4 pb-3 pt-4 @lg:px-6; } .publish-sidebar { @apply shrink-0; - margin-left: 20px ; [dir="rtl"] & { margin-right: 20px ; margin-left: 0 ; } + margin-left: 20px; + [dir='rtl'] & { + margin-right: 20px; + margin-left: 0; + } width: 300px; .publish-fields .form-group { diff --git a/resources/css/components/revisions.css b/resources/css/components/revisions.css index 17649ad950..0db4fa56f1 100644 --- a/resources/css/components/revisions.css +++ b/resources/css/components/revisions.css @@ -7,11 +7,11 @@ } .revision-date { - @apply p-4 pb-2 mt-4; + @apply mt-4 p-4 pb-2; } .revision-item { - @apply p-2 text-sm block cursor-pointer border-t dark:border-dark-900; + @apply block cursor-pointer border-t p-2 text-sm dark:border-dark-900; &:hover { @apply bg-gray-200 dark:bg-dark-400; } @@ -21,11 +21,11 @@ } .revision-item-bullet-container { - @apply w-4 relative; + @apply relative w-4; top: -2px; .revision-item-bullet { - @apply bg-gray-600 inline-block relative; + @apply relative inline-block bg-gray-600; border-radius: 7px; height: 7px; width: 7px; @@ -34,26 +34,38 @@ } .revision-item .badge { - @apply uppercase text-4xs rtl:mr-2 ltr:ml-2 text-white rounded-sm; + @apply rounded-sm text-4xs uppercase text-white ltr:ml-2 rtl:mr-2; height: 16px; - &.publish { @apply bg-green-600; } + &.publish { + @apply bg-green-600; + } &.revision, - &.restore { @apply text-gray-700 dark:text-dark-150 dark:bg-dark-300; } - &.unpublish { @apply bg-red-500; } + &.restore { + @apply text-gray-700 dark:bg-dark-300 dark:text-dark-150; + } + &.unpublish { + @apply bg-red-500; + } } .revision-item-note { - @apply text-sm text-gray-800 font-medium mb-1; + @apply mb-1 text-sm font-medium text-gray-800; width: 300px; } .revision-item.status-published { - .revision-item-bullet { @apply bg-green-600; } + .revision-item-bullet { + @apply bg-green-600; + } } .revision-item.status-working-copy { @apply text-blue; - .revision-item-bullet { @apply bg-blue dark:bg-dark-blue-100; } - .badge { @apply bg-blue dark:bg-dark-blue-100; } + .revision-item-bullet { + @apply bg-blue dark:bg-dark-blue-100; + } + .badge { + @apply bg-blue dark:bg-dark-blue-100; + } } diff --git a/resources/css/components/roles.css b/resources/css/components/roles.css index d726dbf1d5..472cb6b98d 100644 --- a/resources/css/components/roles.css +++ b/resources/css/components/roles.css @@ -4,12 +4,18 @@ .roles { li li { - margin-left: 30px ; [dir="rtl"] & { margin-right: 30px ; margin-left: 0 ; } + margin-left: 30px; + [dir='rtl'] & { + margin-right: 30px; + margin-left: 0; + } } .disabled { opacity: 0.5; - .disabled { opacity: 1; } /* prevent cascading */ + .disabled { + opacity: 1; + } /* prevent cascading */ } } diff --git a/resources/css/components/settings.css b/resources/css/components/settings.css index f411af20aa..adec248e17 100644 --- a/resources/css/components/settings.css +++ b/resources/css/components/settings.css @@ -1,9 +1,9 @@ .config-field { - @apply md:flex flex-wrap border-b border-gray-400 dark:border-dark-900 w-full; - @apply p-3 @sm:p-4 m-0; + @apply w-full flex-wrap border-b border-gray-400 dark:border-dark-900 md:flex; + @apply m-0 p-3 @sm:p-4; .field-inner { - @apply w-full md:w-1/2 rtl:md:pl-8 ltr:md:pr-8; + @apply w-full md:w-1/2 ltr:md:pr-8 rtl:md:pl-8; } .field-inner + div { diff --git a/resources/css/components/shortcuts.css b/resources/css/components/shortcuts.css index 77e833b227..627a01c173 100644 --- a/resources/css/components/shortcuts.css +++ b/resources/css/components/shortcuts.css @@ -3,7 +3,7 @@ ========================================================================== */ .shortcut-pair { - @apply pb-2 mb-2 antialiased flex items-center justify-between; + @apply mb-2 flex items-center justify-between pb-2 antialiased; &:not(:last-child) { @apply border-b dark:border-dark-800; } @@ -12,25 +12,34 @@ .shortcut { @apply flex items-center justify-center text-3xs; border-radius: 3px; - background: linear-gradient(-225deg,#d5dbe4,#f8f8f8); - box-shadow: inset 0 -2px 0 0 #cdcde6, inset 0 0 1px 1px #fff, 0 1px 2px 1px rgba(30,35,90,.4); + background: linear-gradient(-225deg, #d5dbe4, #f8f8f8); + box-shadow: + inset 0 -2px 0 0 #cdcde6, + inset 0 0 1px 1px #fff, + 0 1px 2px 1px rgba(30, 35, 90, 0.4); color: #8d949e; min-width: 18px; height: 18px; - margin: 0 .25em; - padding: 0 2px 2px 2px ; [dir="rtl"] & { padding: 0 2px 2px 2px ; } + margin: 0 0.25em; + padding: 0 2px 2px 2px; + [dir='rtl'] & { + padding: 0 2px 2px 2px; + } .dark & { @apply bg-gradient-to-br from-dark-500 to-dark-600 text-dark-150; - box-shadow: inset 0 1px 0 0 #6b6868, inset 0 0 1px 1px rgba(0,0,0,.7), 0 1px 3px 1px rgba(30,35,90,.2); + box-shadow: + inset 0 1px 0 0 #6b6868, + inset 0 0 1px 1px rgba(0, 0, 0, 0.7), + 0 1px 3px 1px rgba(30, 35, 90, 0.2); } } .shortcut-combo { - @apply flex order-2; + @apply order-2 flex; } .shortcut-joiner { - @apply text-gray text-xs mx-1; + @apply mx-1 text-xs text-gray; } .shortcut-value { diff --git a/resources/css/components/sortable.css b/resources/css/components/sortable.css index a1d82823ce..c1fc197b04 100644 --- a/resources/css/components/sortable.css +++ b/resources/css/components/sortable.css @@ -3,35 +3,38 @@ ========================================================================== */ table .ui-sortable-helper { - background: #fff; - display: table; - box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),0 3px 1px -2px rgba(0, 0, 0, 0.1),0 1px 5px 0 rgba(0, 0, 0, 0.12); + background: #fff; + display: table; + box-shadow: + 0 2px 2px 0 rgba(0, 0, 0, 0.14), + 0 3px 1px -2px rgba(0, 0, 0, 0.1), + 0 1px 5px 0 rgba(0, 0, 0, 0.12); } .placeholder { - background: #eee; - height: 37px; + background: #eee; + height: 37px; } .drag-handle { cursor: move; - &:active { - cursor: grabbing !important; - } + &:active { + cursor: grabbing !important; + } } tbody.ui-sortable { - > tr > .cell-counter > .move { - @apply hidden relative text-gray-700 text-md; - top: 2px; - } + > tr > .cell-counter > .move { + @apply relative hidden text-md text-gray-700; + top: 2px; + } - > tr:hover { - .default { - display: none; - } - .cell-counter > .move { - display: block; - } - } + > tr:hover { + .default { + display: none; + } + .cell-counter > .move { + display: block; + } + } } diff --git a/resources/css/components/stacks.css b/resources/css/components/stacks.css index c2280b86e8..4d02b8f0dc 100644 --- a/resources/css/components/stacks.css +++ b/resources/css/components/stacks.css @@ -4,7 +4,7 @@ .portal-targets { /* position on top of global header (z-index 3) but ignore clicks */ - @apply fixed inset-0 pointer-events-none; + @apply pointer-events-none fixed inset-0; z-index: 4; .vue-portal-target { @@ -16,18 +16,18 @@ .stacks-on-stacks { .stack-container { @apply absolute inset-0; - transition: left .3s ease; + transition: left 0.3s ease; [dir='rtl'] & { - transition: right .3s ease; + transition: right 0.3s ease; } } .stack-overlay { - @apply bg-black absolute inset-0; + @apply absolute inset-0 bg-black; opacity: 0.2; pointer-events: none; - transition: all .3s ease; + transition: all 0.3s ease; &.stack-overlay-fade-enter, &.stack-overlay-fade-leave-to { @@ -35,13 +35,12 @@ } } - .stack-hit-area { @apply absolute inset-0 cursor-pointer; } .stack-content { - @apply h-full relative shadow-lg; + @apply relative h-full shadow-lg; transition: all 0.2s ease; &.stack-slide-enter, @@ -55,7 +54,6 @@ } } - .hovering .stack-content { transform: translateX(-16px); diff --git a/resources/css/components/tabs.css b/resources/css/components/tabs.css index b237ca3c86..c2b3841dab 100644 --- a/resources/css/components/tabs.css +++ b/resources/css/components/tabs.css @@ -3,76 +3,79 @@ ========================================================================== */ .tabs-container { - @apply w-full border-b dark:border-dark-500 text-md relative flex mb-6; + @apply relative mb-6 flex w-full border-b text-md dark:border-dark-500; - .fade-left, .fade-right { - @apply absolute w-4 inset-y-0 from-gray-300 dark:from-dark-800 pointer-events-none z-2; + .fade-left, + .fade-right { + @apply pointer-events-none absolute inset-y-0 z-2 w-4 from-gray-300 dark:from-dark-800; } .fade-left { - @apply rtl:right-0 ltr:left-0 rtl:bg-gradient-to-l ltr:bg-gradient-to-r; + @apply ltr:left-0 ltr:bg-gradient-to-r rtl:right-0 rtl:bg-gradient-to-l; } .fade-right { - @apply rtl:left-0 ltr:right-0 rtl:bg-gradient-to-r ltr:bg-gradient-to-l; + @apply ltr:right-0 ltr:bg-gradient-to-l rtl:left-0 rtl:bg-gradient-to-r; } } -.card .tabs-container .fade-left, .card .tabs-container .fade-right { +.card .tabs-container .fade-left, +.card .tabs-container .fade-right { @apply from-white dark:from-dark-600; } .tabs { - @apply flex space-x-2 rtl:space-x-reverse overflow-hidden relative w-full max-w-full; + @apply relative flex w-full max-w-full space-x-2 overflow-hidden rtl:space-x-reverse; &-scrolled { - @apply rtl:pr-0 ltr:pl-0 rtl:mr-0 ltr:ml-0; + @apply ltr:ml-0 ltr:pl-0 rtl:mr-0 rtl:pr-0; } } .tab-button { - @apply flex items-center px-2 py-2 text-gray-700 dark:text-dark-150 select-none border-b-2 border-transparent whitespace-nowrap shrink-0; + @apply flex shrink-0 select-none items-center whitespace-nowrap border-b-2 border-transparent px-2 py-2 text-gray-700 dark:text-dark-150; &:hover { @apply text-gray-800 dark:text-dark-100; } &:focus-visible { - @apply ring-inset ring-2 ring-blue-500 dark:ring-dark-blue-100 outline-none rounded-t; + @apply rounded-t outline-none ring-2 ring-inset ring-blue-500 dark:ring-dark-blue-100; } &.active { - @apply text-blue-500 dark:text-blue-400 border-blue-500 dark:border-blue-400; + @apply border-blue-500 text-blue-500 dark:border-blue-400 dark:text-blue-400; } &.has-error { @apply text-red-500; &.active { - box-shadow: theme('colors.red.400') 0 3px inset, rgb(230, 235, 241) -1px 0 inset + box-shadow: + theme('colors.red.400') 0 3px inset, + rgb(230, 235, 241) -1px 0 inset; } } } - /* Responsive Wangjangling ========================================================================== */ .pill-tab { - @apply text-gray-700 dark:text-dark-175 flex items-center focus:outline-none px-2 py-1 rounded; + @apply flex items-center rounded px-2 py-1 text-gray-700 focus:outline-none dark:text-dark-175; &:hover { @apply text-gray-900 dark:text-dark-100; } &.active { - @apply bg-blue-100 dark:bg-dark-400 text-blue-900 dark:text-dark-150; + @apply bg-blue-100 text-blue-900 dark:bg-dark-400 dark:text-dark-150; } } .button-tab { - @apply text-gray-700 inline-block focus:outline-none px-2 py-1 rtl:ml-1 ltr:mr-1; + @apply inline-block px-2 py-1 text-gray-700 focus:outline-none ltr:mr-1 rtl:ml-1; &:hover { @apply text-blue; } &.active { - @apply bg-blue-100 text-blue-800 rounded; + @apply rounded bg-blue-100 text-blue-800; } } diff --git a/resources/css/components/toggle.css b/resources/css/components/toggle.css index 0f8f6e6f4c..2294dae974 100644 --- a/resources/css/components/toggle.css +++ b/resources/css/components/toggle.css @@ -11,9 +11,9 @@ } .inline-label { - @apply rtl:mr-2 ltr:ml-2 font-normal text-gray-700 dark:text-dark-175; + @apply font-normal text-gray-700 dark:text-dark-175 ltr:ml-2 rtl:mr-2; a { - @apply text-gray-800 dark:text-dark-150 underline; + @apply text-gray-800 underline dark:text-dark-150; &:hover { @apply text-blue; } @@ -27,14 +27,16 @@ } .toggle-container { - @apply bg-white dark:bg-dark-700 cursor-pointer relative border dark:border-dark-900 shrink-0; + @apply relative shrink-0 cursor-pointer border bg-white dark:border-dark-900 dark:bg-dark-700; height: 22px; width: 46px; border-radius: 20px; font-size: 0.1px; margin: 6px 0; transition: background-color 0.2s ease; - &:focus { outline: none; } + &:focus { + outline: none; + } } .toggle-slider { @@ -51,12 +53,18 @@ } .toggle-knob { - @apply absolute top-px outline-none bg-white rounded-full; - right: 0 ; [dir="rtl"] & { right: auto ; left: 0 ; } + @apply absolute top-px rounded-full bg-white outline-none; + right: 0; + [dir='rtl'] & { + right: auto; + left: 0; + } width: 20px; height: 20px; - box-shadow: 0 1px 3px rgba(0, 0, 0, .4); - transition: box-shadow 0.1s, background-color 0.2s ease-in-out; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); + transition: + box-shadow 0.1s, + background-color 0.2s ease-in-out; .dark & { background: theme(colors.dark.500); @@ -64,11 +72,11 @@ } .toggle-knob:hover { - box-shadow: 0 1px 3px rgba(theme('colors.blue.DEFAULT'), .9); + box-shadow: 0 1px 3px rgba(theme('colors.blue.DEFAULT'), 0.9); } .toggle-container.on { - @apply bg-green-500 border-green-600; + @apply border-green-600 bg-green-500; .toggle-slider { width: 44px; } @@ -82,7 +90,7 @@ } .toggle-container.on.read-only { - @apply bg-gray-500 border-gray-600; + @apply border-gray-600 bg-gray-500; .toggle-knob:focus { box-shadow: 0 0 10px theme(colors.gray.500/70); @@ -105,7 +113,7 @@ } .toggle-slider { - box-shadow: inset 0 1px rgba(0,0,0,.25); + box-shadow: inset 0 1px rgba(0, 0, 0, 0.25); height: 12px; width: 10px; } @@ -118,10 +126,20 @@ /* Inside the Sidebar ========================================================================== */ .publish-sidebar .toggle-fieldtype { - @apply flex items-center justify-between flex-wrap; - .field-inner > label { margin: 0; } - .toggle-fieldtype-wrapper { margin-left: 8px ; [dir="rtl"] & { margin-right: 8px ; margin-left: 0 ; } } - .help-block { margin-top: 4px !important; } + @apply flex flex-wrap items-center justify-between; + .field-inner > label { + margin: 0; + } + .toggle-fieldtype-wrapper { + margin-left: 8px; + [dir='rtl'] & { + margin-right: 8px; + margin-left: 0; + } + } + .help-block { + margin-top: 4px !important; + } } /* Inside a Grid field diff --git a/resources/css/components/updater.css b/resources/css/components/updater.css index aa9cd281ba..bdf93c717a 100644 --- a/resources/css/components/updater.css +++ b/resources/css/components/updater.css @@ -3,92 +3,121 @@ ========================================================================== */ .update { - padding: 60px; - - h2 { - font-weight: 400; - font-size: 30px; - margin: 0 0 25px 0 ; [dir="rtl"] & { margin: 0 0 25px 0 ; } - -webkit-font-smoothing: antialiased; - } - - h3, dt { + padding: 60px; + + h2 { + font-weight: 400; + font-size: 30px; + margin: 0 0 25px 0; + [dir='rtl'] & { + margin: 0 0 25px 0; + } + -webkit-font-smoothing: antialiased; + } + + h3, + dt { @apply font-normal text-gray-700 antialiased; - margin: 25px 0; - font-size: 21px; - line-height: 1.5; - } - - dl { - margin-top: 50px; - - dt { - margin: 30px 0 15px 0 ; [dir="rtl"] & { margin: 30px 0 15px 0 ; } - } - - dd { - padding-left: 30px ; [dir="rtl"] & { padding-right: 30px ; padding-left: 0 ; } - position: relative; - font-size: 16px; - margin-bottom: 15px; - - &.no-icon { - padding-left: 0 ; [dir="rtl"] & { padding-right: 0 ; padding-left: 0 ; } - } - } - - .icon { - position: absolute; - top: 0; - left: 0 ; [dir="rtl"] & { left: auto ; right: 0 ; } - } - } + margin: 25px 0; + font-size: 21px; + line-height: 1.5; + } + + dl { + margin-top: 50px; + + dt { + margin: 30px 0 15px 0; + [dir='rtl'] & { + margin: 30px 0 15px 0; + } + } + + dd { + padding-left: 30px; + [dir='rtl'] & { + padding-right: 30px; + padding-left: 0; + } + position: relative; + font-size: 16px; + margin-bottom: 15px; + + &.no-icon { + padding-left: 0; + [dir='rtl'] & { + padding-right: 0; + padding-left: 0; + } + } + } + + .icon { + position: absolute; + top: 0; + left: 0; + [dir='rtl'] & { + left: auto; + right: 0; + } + } + } } .update-release { - .date { - @apply font-normal text-gray dark:text-dark-175; - } + @apply font-normal text-gray dark:text-dark-175; + } - p { + p { @apply my-8; - } - - h2 { - @apply font-black text-xl mb-0 py-2; - } - - h3, h4, h5, h6 { - @apply font-bold; - } - - a { color: @apply text-blue; } - - ul { - @apply p-0; - - li { - @apply my-2 pb-2 relative text-base rtl:pr-6 ltr:pl-6; - } - - li:before { - @apply absolute rounded-full bg-gray-900; - height: 6px; - width: 6px; - content: ""; - top: 7px; - left: 4px ; [dir="rtl"] & { left: auto ; right: 4px ; } - - .dark & { @apply bg-dark-200; } - } - - .label { - @apply text-3xs relative inline-block rtl:ml-2 ltr:mr-2 uppercase text-center text-white rounded; - padding: 2px; - width: 54px; - top: -2px; - line-height: 1; - } - } + } + + h2 { + @apply mb-0 py-2 text-xl font-black; + } + + h3, + h4, + h5, + h6 { + @apply font-bold; + } + + a { + color: @apply text-blue; + } + + ul { + @apply p-0; + + li { + @apply relative my-2 pb-2 text-base ltr:pl-6 rtl:pr-6; + } + + li:before { + @apply absolute rounded-full bg-gray-900; + height: 6px; + width: 6px; + content: ''; + top: 7px; + left: 4px; + [dir='rtl'] & { + left: auto; + right: 4px; + } + + .dark & { + @apply bg-dark-200; + } + } + + .label { + @apply relative inline-block rounded text-center text-3xs uppercase text-white ltr:mr-2 rtl:ml-2; + padding: 2px; + width: 54px; + top: -2px; + line-height: 1; + } + } } diff --git a/resources/css/components/wizard.css b/resources/css/components/wizard.css index a9e97101c2..77dd1876c6 100644 --- a/resources/css/components/wizard.css +++ b/resources/css/components/wizard.css @@ -2,20 +2,28 @@ @apply flex justify-between; .step { - @apply text-center relative text-xs flex-1 mx-auto; + @apply relative mx-auto flex-1 text-center text-xs; } .step:not(:first-child):before { @apply absolute h-1 w-1/2 bg-gray-300; content: ''; - left: 0 ; [dir="rtl"] & { left: auto ; right: 0 ; } + left: 0; + [dir='rtl'] & { + left: auto; + right: 0; + } top: 18px; } .step:not(:last-child):after { @apply absolute h-1 w-1/2 bg-gray-300; content: ''; - left: 50% ; [dir="rtl"] & { left: auto ; right: 50% ; } + left: 50%; + [dir='rtl'] & { + left: auto; + right: 50%; + } top: 18px; } @@ -25,12 +33,12 @@ } .ball { - @apply h-10 w-10 bg-gray-300 dark:bg-dark-800 text-gray dark:text-dark-150 text-base rounded-full text-center z-10 mx-auto relative; + @apply relative z-10 mx-auto h-10 w-10 rounded-full bg-gray-300 text-center text-base text-gray dark:bg-dark-800 dark:text-dark-150; line-height: 40px; } .label { - @apply text-xs mt-1 text-gray dark:text-dark-175; + @apply mt-1 text-xs text-gray dark:text-dark-175; } .complete { diff --git a/resources/css/core/animation.css b/resources/css/core/animation.css index f083692eee..16ec28461d 100644 --- a/resources/css/core/animation.css +++ b/resources/css/core/animation.css @@ -2,12 +2,26 @@ ========================================================================== */ .animation-shake { animation-name: shake; - animation-duration: .5s; + animation-duration: 0.5s; animation-fill-mode: both; } @keyframes shake { - from, to { transform: translate3d(0, 0, 0); } - 10%, 30%, 50%, 70%, 90% { transform: translate3d(-10px, 0, 0); } - 20%, 40%, 60%, 80% { transform: translate3d(10px, 0, 0); } + from, + to { + transform: translate3d(0, 0, 0); + } + 10%, + 30%, + 50%, + 70%, + 90% { + transform: translate3d(-10px, 0, 0); + } + 20%, + 40%, + 60%, + 80% { + transform: translate3d(10px, 0, 0); + } } diff --git a/resources/css/core/fonts.css b/resources/css/core/fonts.css index 3cc48cd3e6..421f5f7c08 100644 --- a/resources/css/core/fonts.css +++ b/resources/css/core/fonts.css @@ -6,7 +6,7 @@ font-weight: 100 900; font-display: swap; font-style: normal; - src: url("../../fonts/Inter/Inter-roman.var.woff2?v=3.19") format("woff2"); + src: url('../../fonts/Inter/Inter-roman.var.woff2?v=3.19') format('woff2'); } @font-face { @@ -14,5 +14,5 @@ font-weight: 100 900; font-display: swap; font-style: italic; - src: url("../../fonts/Inter/Inter-italic.var.woff2?v=3.19") format("woff2"); + src: url('../../fonts/Inter/Inter-italic.var.woff2?v=3.19') format('woff2'); } diff --git a/resources/css/core/layout.css b/resources/css/core/layout.css index fa93124d1a..31fc13a3e9 100644 --- a/resources/css/core/layout.css +++ b/resources/css/core/layout.css @@ -3,14 +3,13 @@ ========================================================================== */ body { - @apply w-full bg-gray-300 relative dark:bg-dark-800; + @apply relative w-full bg-gray-300 dark:bg-dark-800; } #statamic { min-height: 100vh; } - #main { @apply flex; padding-bottom: 72px; @@ -19,7 +18,7 @@ body { } #main .workspace { - transition: padding .3s; + transition: padding 0.3s; @apply w-full; } @@ -34,27 +33,37 @@ a { } @screen md { - #main { padding-top: 52px; } #main .workspace { - padding-left: 14rem ; [dir="rtl"] & { padding-right: 14rem ; padding-left: 0 ; } + padding-left: 14rem; + [dir='rtl'] & { + padding-right: 14rem; + padding-left: 0; + } } #main.nav-closed { .nav-main { - left: -14rem ; [dir="rtl"] & { left: auto ; right: -14rem ; } + left: -14rem; + [dir='rtl'] & { + left: auto; + right: -14rem; + } } .workspace { - padding-left: 0 ; [dir="rtl"] & { padding-right: 0 ; padding-left: 0 ; } + padding-left: 0; + [dir='rtl'] & { + padding-right: 0; + padding-left: 0; + } } } } - /* Page Wrapper ========================================================================== */ .page-wrapper { @@ -63,7 +72,7 @@ a { @screen md { .page-wrapper { - @apply px-8 max-w-xl mx-auto; + @apply mx-auto max-w-xl px-8; } } diff --git a/resources/css/core/typography.css b/resources/css/core/typography.css index a17aed07bd..a9e9ebfe30 100644 --- a/resources/css/core/typography.css +++ b/resources/css/core/typography.css @@ -3,13 +3,20 @@ ========================================================================== */ body { - @apply font-sans text-gray-900 text-base tracking-normal dark:text-dark-100; + @apply font-sans text-base tracking-normal text-gray-900 dark:text-dark-100; font-variant: common-ligatures tabular-nums; - font-feature-settings: "zero", "ss01", "calt" off; - + font-feature-settings: + 'zero', + 'ss01', + 'calt' off; } -h1, h2, h3, h4, h5, h6 { +h1, +h2, +h3, +h4, +h5, +h6 { @apply m-0 antialiased; } @@ -41,8 +48,8 @@ h6 { @apply text-3xs font-bold uppercase tracking-widest; } -a:not([class^="btn"]) { - @apply text-gray-800 dark:text-dark-150 cursor-pointer; +a:not([class^='btn']) { + @apply cursor-pointer text-gray-800 dark:text-dark-150; &:hover { @apply text-blue dark:text-blue-300; @@ -54,12 +61,19 @@ a:not([class^="btn"]) { @apply mb-2 font-medium; } - h2, h3, h4, h5, h6 { + h2, + h3, + h4, + h5, + h6 { @apply mb-2 font-bold; } - p, ol, ul, pre { - @apply text-gray-700 text-sm leading-normal mb-2 dark:text-dark-150; + p, + ol, + ul, + pre { + @apply mb-2 text-sm leading-normal text-gray-700 dark:text-dark-150; a { @apply text-blue; @@ -100,7 +114,7 @@ a:focus { .subhead { font-size: 11px; - letter-spacing: .1em; + letter-spacing: 0.1em; text-transform: uppercase; } @@ -111,7 +125,10 @@ sup { .little-heading { font-size: 11px; font-weight: bold; - padding: 15px 0 0 20px ; [dir="rtl"] & { padding: 15px 20px 0 0 ; } + padding: 15px 0 0 20px; + [dir='rtl'] & { + padding: 15px 20px 0 0; + } letter-spacing: 1px; text-transform: uppercase; } @@ -121,7 +138,7 @@ sup { } code { - @apply font-mono rounded text-[#c7254e] dark:text-blue-400 dark:bg-dark-700; + @apply rounded font-mono text-[#c7254e] dark:bg-dark-700 dark:text-blue-400; padding: 2px 4px; font-size: 90%; background-color: #f9f2f4; @@ -129,5 +146,7 @@ code { .help-block { width: 100%; - p { @apply mb-2 } + p { + @apply mb-2; + } } diff --git a/resources/css/core/utilities.css b/resources/css/core/utilities.css index 8dca15c5c9..e84efb2d92 100644 --- a/resources/css/core/utilities.css +++ b/resources/css/core/utilities.css @@ -3,13 +3,13 @@ ========================================================================== */ .text-shadow { - text-shadow: 0 1px 2px rgba(0,0,0,.25); + text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); } .focus-outline { @apply border border-blue-300 dark:border-dark-blue-200; outline: 0; - box-shadow: 0 0 0 0.2rem rgba(0,125,255,.25); + box-shadow: 0 0 0 0.2rem rgba(0, 125, 255, 0.25); } .focus-none { @@ -39,14 +39,17 @@ .icon { display: inline-block; - margin: -2px 5px 0 0 ; [dir="rtl"] & { margin: -2px 0 0 5px ; } + margin: -2px 5px 0 0; + [dir='rtl'] & { + margin: -2px 0 0 5px; + } } } } .shadow-hover-lg { @apply shadow-lg; - transition: box-shadow .08s ease-in-out; + transition: box-shadow 0.08s ease-in-out; &:hover { @apply shadow-xl; } @@ -63,46 +66,59 @@ .saving-overlay { @apply absolute inset-0 z-200 flex items-center rounded; - background: rgba(255, 255, 255, .9); + background: rgba(255, 255, 255, 0.9); .dark & { @apply bg-dark-600/90; } .inner { - @apply p-10 text-center mx-auto; + @apply mx-auto p-10 text-center; } i { position: relative; top: -1px; - margin-right: 10px ; [dir="rtl"] & { margin-left: 10px ; margin-right: 0 ; } + margin-right: 10px; + [dir='rtl'] & { + margin-left: 10px; + margin-right: 0; + } } } .bg-checkerboard { - background-color: #FFF; - background-image: linear-gradient(45deg, #EDF2F6 25%, transparent 25%), linear-gradient(-45deg, #EDF2F6 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #EDF2F6 75%), linear-gradient(-45deg, transparent 75%, #EDF2F6 75%); + background-color: #fff; + background-image: linear-gradient(45deg, #edf2f6 25%, transparent 25%), + linear-gradient(-45deg, #edf2f6 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #edf2f6 75%), + linear-gradient(-45deg, transparent 75%, #edf2f6 75%); background-size: 16px 16px; - background-position: 0 0, 0 8px, 8px -8px, -8px 0; + background-position: + 0 0, + 0 8px, + 8px -8px, + -8px 0; .dark & { background-color: theme(colors.dark.600); - background-image: linear-gradient(45deg, theme(colors.dark.950) 25%, transparent 25%), linear-gradient(-45deg, theme(colors.dark.950) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, theme(colors.dark.950) 75%), linear-gradient(-45deg, transparent 75%, theme(colors.dark.950) 75%); + background-image: linear-gradient(45deg, theme(colors.dark.950) 25%, transparent 25%), + linear-gradient(-45deg, theme(colors.dark.950) 25%, transparent 25%), + linear-gradient(45deg, transparent 75%, theme(colors.dark.950) 75%), + linear-gradient(-45deg, transparent 75%, theme(colors.dark.950) 75%); } } .clickable { - @apply text-gray-800 dark:text-dark-175 select-none cursor-pointer border dark:border-dark-800 bg-gradient-to-b from-white to-gray-100 dark:from-dark-550 dark:to-dark-600; + @apply cursor-pointer select-none border bg-gradient-to-b from-white to-gray-100 text-gray-800 dark:border-dark-800 dark:from-dark-550 dark:to-dark-600 dark:text-dark-175; &:hover { - @apply border-gray-500 dark:border-dark-900 from-white to-gray-200 dark:from-dark-550 dark:to-dark-700; + @apply border-gray-500 from-white to-gray-200 dark:border-dark-900 dark:from-dark-550 dark:to-dark-700; } } [v-cloak], [x-cloak] { - display: none + display: none; } .-max-h-screen-px { diff --git a/resources/css/cp.css b/resources/css/cp.css index 0c9768b493..9c29bd7f30 100644 --- a/resources/css/cp.css +++ b/resources/css/cp.css @@ -1,77 +1,77 @@ -@import "vendors/codemirror"; -@import "vendors/vue-select"; +@import 'vendors/codemirror'; +@import 'vendors/vue-select'; -@import "core/animation"; -@import "core/layout"; -@import "core/fonts"; -@import "core/typography"; +@import 'core/animation'; +@import 'core/layout'; +@import 'core/fonts'; +@import 'core/typography'; /* Elements */ -@import "elements/buttons"; -@import "elements/badges"; -@import "elements/dropdowns"; -@import "elements/forms"; -@import "elements/icons"; -@import "elements/tables"; +@import 'elements/buttons'; +@import 'elements/badges'; +@import 'elements/dropdowns'; +@import 'elements/forms'; +@import 'elements/icons'; +@import 'elements/tables'; /* Components */ -@import "components/array"; -@import "components/assets"; -@import "components/blueprints"; -@import "components/cards"; -@import "components/column-picker"; -@import "components/configure"; -@import "components/dashboard"; -@import "components/filters"; -@import "components/focal-point"; -@import "components/global-header"; -@import "components/items"; -@import "components/metrics"; -@import "components/modal"; -@import "components/nav-main"; -@import "components/nav-mobile"; -@import "components/notifications"; -@import "components/outside"; -@import "components/page-tree"; -@import "components/pagination"; -@import "components/popover"; -@import "components/preview"; -@import "components/publish"; -@import "components/progress"; -@import "components/revisions"; -@import "components/roles"; -@import "components/settings"; -@import "components/shortcuts"; -@import "components/sortable"; -@import "components/stacks"; -@import "components/tabs"; -@import "components/toggle"; -@import "components/tooltips"; -@import "components/updater"; -@import "components/wizard"; +@import 'components/array'; +@import 'components/assets'; +@import 'components/blueprints'; +@import 'components/cards'; +@import 'components/column-picker'; +@import 'components/configure'; +@import 'components/dashboard'; +@import 'components/filters'; +@import 'components/focal-point'; +@import 'components/global-header'; +@import 'components/items'; +@import 'components/metrics'; +@import 'components/modal'; +@import 'components/nav-main'; +@import 'components/nav-mobile'; +@import 'components/notifications'; +@import 'components/outside'; +@import 'components/page-tree'; +@import 'components/pagination'; +@import 'components/popover'; +@import 'components/preview'; +@import 'components/publish'; +@import 'components/progress'; +@import 'components/revisions'; +@import 'components/roles'; +@import 'components/settings'; +@import 'components/shortcuts'; +@import 'components/sortable'; +@import 'components/stacks'; +@import 'components/tabs'; +@import 'components/toggle'; +@import 'components/tooltips'; +@import 'components/updater'; +@import 'components/wizard'; /* Fieldtypes */ -@import "components/fieldtypes/array"; -@import "components/fieldtypes/assets"; -@import "components/fieldtypes/bard"; -@import "components/fieldtypes/button-group"; -@import "components/fieldtypes/checkboxes"; -@import "components/fieldtypes/code"; -@import "components/fieldtypes/datetime"; -@import "components/fieldtypes/dictionary-fields"; -@import "components/fieldtypes/environment"; -@import "components/fieldtypes/grid"; -@import "components/fieldtypes/hidden"; -@import "components/fieldtypes/markdown"; -@import "components/fieldtypes/partial"; -@import "components/fieldtypes/radio"; -@import "components/fieldtypes/relationship"; -@import "components/fieldtypes/replicator"; -@import "components/fieldtypes/section"; -@import "components/fieldtypes/spacer"; -@import "components/fieldtypes/table"; -@import "components/fieldtypes/tags"; -@import "components/fieldtypes/textarea"; -@import "components/fieldtypes/width"; -@import "components/fieldtypes/video"; -@import "components/fieldtypes/yaml"; +@import 'components/fieldtypes/array'; +@import 'components/fieldtypes/assets'; +@import 'components/fieldtypes/bard'; +@import 'components/fieldtypes/button-group'; +@import 'components/fieldtypes/checkboxes'; +@import 'components/fieldtypes/code'; +@import 'components/fieldtypes/datetime'; +@import 'components/fieldtypes/dictionary-fields'; +@import 'components/fieldtypes/environment'; +@import 'components/fieldtypes/grid'; +@import 'components/fieldtypes/hidden'; +@import 'components/fieldtypes/markdown'; +@import 'components/fieldtypes/partial'; +@import 'components/fieldtypes/radio'; +@import 'components/fieldtypes/relationship'; +@import 'components/fieldtypes/replicator'; +@import 'components/fieldtypes/section'; +@import 'components/fieldtypes/spacer'; +@import 'components/fieldtypes/table'; +@import 'components/fieldtypes/tags'; +@import 'components/fieldtypes/textarea'; +@import 'components/fieldtypes/width'; +@import 'components/fieldtypes/video'; +@import 'components/fieldtypes/yaml'; diff --git a/resources/css/dark.css b/resources/css/dark.css index 3ff7632b12..dedf1e596a 100644 --- a/resources/css/dark.css +++ b/resources/css/dark.css @@ -1,14 +1,17 @@ .prose { @apply dark:text-dark-150; - :where(h2), :where(h3), :where(strong) { - &:not(:where([class~=not-prose] *)) { + :where(h2), + :where(h3), + :where(strong) { + &:not(:where([class~='not-prose'] *)) { @apply dark:text-dark-100; } } - :where(pre), :where(code) { - &:not(:where([class~=not-prose] *)) { + :where(pre), + :where(code) { + &:not(:where([class~='not-prose'] *)) { @apply dark:bg-dark-950 dark:text-dark-100; } } @@ -19,21 +22,26 @@ -webkit-box-shadow: inset 0 0 0 50px theme('colors.dark.250'); -webkit-text-fill-color: theme('colors.dark.150'); - &:focus, &:active { + &:focus, + &:active { -webkit-box-shadow: inset 0 0 0 50px theme('colors.dark.200') !important; -webkit-text-fill-color: theme('colors.dark.100'); } } .CodeMirror-selected { - background: rgba(255, 255, 255, 0.10); + background: rgba(255, 255, 255, 0.1); } - .CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { - background: rgba(255, 255, 255, 0.10); + .CodeMirror-line::selection, + .CodeMirror-line > span::selection, + .CodeMirror-line > span > span::selection { + background: rgba(255, 255, 255, 0.1); } - .CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { - background: rgba(255, 255, 255, 0.10); + .CodeMirror-line::-moz-selection, + .CodeMirror-line > span::-moz-selection, + .CodeMirror-line > span > span::-moz-selection { + background: rgba(255, 255, 255, 0.1); } } diff --git a/resources/css/elements/badges.css b/resources/css/elements/badges.css index 11bf8ea24d..ecb425900b 100644 --- a/resources/css/elements/badges.css +++ b/resources/css/elements/badges.css @@ -3,31 +3,35 @@ ========================================================================== */ .badge { - @apply text-3xs not-italic bg-gray-300 dark:bg-dark-700 text-gray-800 dark:text-dark-150 rounded-md leading-normal; + @apply rounded-md bg-gray-300 text-3xs not-italic leading-normal text-gray-800 dark:bg-dark-700 dark:text-dark-150; padding: 1px 5px 0; } .badge-pill { - @apply bg-gray-300 dark:bg-dark-700 px-2 py-1 rounded; + @apply rounded bg-gray-300 px-2 py-1 dark:bg-dark-700; } .badge-pill-sm { - @apply bg-gray-300 dark:bg-dark-700 px-1 py-px rounded; + @apply rounded bg-gray-300 px-1 py-px dark:bg-dark-700; } .badge-sm { - @apply bg-gray-300 dark:bg-dark-700 uppercase text-4xs text-white dark:text-dark-100 rounded-sm leading-normal; + @apply rounded-sm bg-gray-300 text-4xs uppercase leading-normal text-white dark:bg-dark-700 dark:text-dark-100; height: 16px; padding: 1px 5px 2px; } .filter-badge { - @apply text-2xs text-gray-800 dark:text-dark-150 bg-white dark:bg-dark-550 border border-dashed border-gray-600 dark:border-dark-900 flex items-center rounded-full; + @apply flex items-center rounded-full border border-dashed border-gray-600 bg-white text-2xs text-gray-800 dark:border-dark-900 dark:bg-dark-550 dark:text-dark-150; height: 1.625rem; - padding-left: 10px ; [dir="rtl"] & { padding-right: 10px ; padding-left: 0 ; } + padding-left: 10px; + [dir='rtl'] & { + padding-right: 10px; + padding-left: 0; + } button { - @apply px-2 text-base text-gray-600 dark:text-dark-175 flex items-center rounded; + @apply flex items-center rounded px-2 text-base text-gray-600 dark:text-dark-175; &:hover { @apply text-gray-800 dark:text-dark-100; @@ -39,6 +43,6 @@ } &.filter-badge-control { - @apply bg-gray-100 dark:bg-dark-600 border border-solid rounded-full border-gray-500 dark:border-dark-900 hover:border-gray-600 dark:hover:border-dark-800 hover:bg-gray-200 dark:hover:bg-dark-800; + @apply rounded-full border border-solid border-gray-500 bg-gray-100 hover:border-gray-600 hover:bg-gray-200 dark:border-dark-900 dark:bg-dark-600 dark:hover:border-dark-800 dark:hover:bg-dark-800; } } diff --git a/resources/css/elements/buttons.css b/resources/css/elements/buttons.css index 75006e7964..85b1e53e9c 100644 --- a/resources/css/elements/buttons.css +++ b/resources/css/elements/buttons.css @@ -7,18 +7,19 @@ button { } /* Base button styles that shouldn't need overriding */ -[class^="btn"], [class*=" btn"] { - @apply cursor-pointer select-none h-auto rounded relative; - @apply leading-none inline-flex align-middle justify-center whitespace-nowrap; - @apply text-center text-sm subpixel-antialiased items-center; +[class^='btn'], +[class*=' btn'] { + @apply relative h-auto cursor-pointer select-none rounded; + @apply inline-flex justify-center whitespace-nowrap align-middle leading-none; + @apply items-center text-center text-sm subpixel-antialiased; height: 2.375rem; /* 38px */ letter-spacing: -0.01em; - padding: .475rem 1.25rem; + padding: 0.475rem 1.25rem; &:focus { /* @apply ring-2 outline-none dark:outline-2 dark:outline-dark-blue-100; */ - @apply ring-2 outline-none; + @apply outline-none ring-2; } &:disabled { @@ -31,26 +32,36 @@ button { } /* Default, non-primary action button */ -.btn, .btn-default { - @apply text-gray-800 dark:text-dark-150 shadow-button; +.btn, +.btn-default { + @apply text-gray-800 shadow-button dark:text-dark-150; background: linear-gradient(180deg, #fff, #f9fafb); background-clip: padding-box; - border: 1px solid #D3DDE7; + 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; + box-shadow: + inset 0 1px 0 0 #fff, + 0 1px 0 0 rgba(0, 0, 0, 0.05), + 0 2px 1px 0 theme(colors.gray.600 / 0.15), + 0 0 0 0 transparent; .dark & { background: linear-gradient(180deg, theme(colors.dark.550), theme(colors.dark.600)); background-clip: padding-box; border-color: theme(colors.dark.700); - box-shadow: inset 0 1px 0 0 theme(colors.dark.300), 0 1px 0 0 rgba(200, 200, 200,.05), 0 2px 1px 0 theme(colors.dark.900 / .15), 0 0 0 0 transparent; + box-shadow: + inset 0 1px 0 0 theme(colors.dark.300), + 0 1px 0 0 rgba(200, 200, 200, 0.05), + 0 2px 1px 0 theme(colors.dark.900 / 0.15), + 0 0 0 0 transparent; } - &:hover:not(:disabled), &:active:not(:disabled) { + &:hover:not(:disabled), + &:active:not(:disabled) { @apply text-gray-800 dark:text-dark-150; background: linear-gradient(180deg, #f9fafb, #f4f6f8); background-clip: padding-box; - border-bottom: 1px solid #BFC7D0; + border-bottom: 1px solid #bfc7d0; .dark & { background: linear-gradient(180deg, theme(colors.dark.600), theme(colors.dark.700)); @@ -63,8 +74,9 @@ button { @apply ring-2 dark:ring-dark-blue-100; } - &.active, &.active:hover { - box-shadow: inset 2px 2px 3px 0 rgba(25,30,35,.1); + &.active, + &.active:hover { + box-shadow: inset 2px 2px 3px 0 rgba(25, 30, 35, 0.1); background: theme('colors.gray.400'); border-color: #aeb9c3 !important; @@ -76,32 +88,46 @@ button { } &:disabled { - @apply text-gray-700 dark:text-dark-200 opacity-75; + @apply text-gray-700 opacity-75 dark:text-dark-200; } } /* Primary action button */ .btn-primary { - @apply text-white bg-gradient-to-b from-blue-500 to-blue-600 dark:from-dark-blue-100 dark:to-dark-blue-150 bg-clip-padding border border-blue-700 dark:border-blue-900 border-b-blue-800 dark:border-b-dark-blue-200 !important; - 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) { - @apply from-blue-600 to-blue-700 dark:from-dark-blue-125 dark:to-dark-blue-175 border-blue-800 dark:border-blue-900 border-b-blue-900 dark:border-b-dark-blue-200 !important; - 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; + @apply border border-blue-700 border-b-blue-800 bg-gradient-to-b from-blue-500 to-blue-600 bg-clip-padding text-white dark:border-blue-900 dark:border-b-dark-blue-200 dark:from-dark-blue-100 dark:to-dark-blue-150 !important; + box-shadow: + inset 0 1px 0 0 theme('colors.blue.400'), + 0 1px 0 0 rgba(25, 30, 35, 0.05), + 0 3px 2px -1px theme(colors.blue.900 / 0.15), + 0 0 0 0 transparent; + + &:hover:not(:disabled), + :active:not(:disabled) { + @apply border-blue-800 border-b-blue-900 from-blue-600 to-blue-700 dark:border-blue-900 dark:border-b-dark-blue-200 dark:from-dark-blue-125 dark:to-dark-blue-175 !important; + box-shadow: + inset 0 1px 0 0 theme('colors.blue.500'), + 0 1px 0 0 rgba(25, 30, 35, 0.05), + 0 3px 2px -1px theme(colors.blue.900 / 0.15), + 0 0 0 0 transparent; } &:disabled { - @apply text-blue-200 dark:text-dark-blue-200 opacity-75 !important; + @apply text-blue-200 opacity-75 dark:text-dark-blue-200 !important; } } /* Danger/delete button */ .btn-danger { - @apply text-white bg-gradient-to-b from-red-500 to-red-600 bg-clip-padding 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; + @apply border border-red-600 border-b-red-900 bg-gradient-to-b from-red-500 to-red-600 bg-clip-padding text-white; + box-shadow: + inset 0 1px 0 0 theme('colors.red.400'), + 0 1px 0 0 rgba(0, 0, 0, 0.05), + 0 3px 2px -1px theme(colors.red.900 / 0.15), + 0 0 0 0 transparent; - &:hover:not(:disabled), &:active:not(:disabled) { - @apply bg-gradient-to-b from-red-600 to-red-700 bg-clip-padding border border-red-700 border-b-red-900; + &:hover:not(:disabled), + &:active:not(:disabled) { + @apply border border-red-700 border-b-red-900 bg-gradient-to-b from-red-600 to-red-700 bg-clip-padding; } &:disabled { @@ -109,37 +135,40 @@ button { } &:focus { - @apply ring-red-500 ring-1 ring-offset-1; + @apply ring-1 ring-red-500 ring-offset-1; /* box-shadow: 0 5px 20px theme(colors.red.400 / 0.5); */ } } /* Earth isn't flat but these buttons are */ .btn-flat { - @apply text-gray-800 dark:text-dark-150 bg-gray-300 dark:bg-dark-700 flex items-center; + @apply flex items-center bg-gray-300 text-gray-800 dark:bg-dark-700 dark:text-dark-150; position: inherit; - &:hover:not(:disabled), &:active:not(:disabled), &.active { + &:hover:not(:disabled), + &:active:not(:disabled), + &.active { @apply bg-gray-400 dark:bg-dark-750; } &:focus { - @apply ring-2 outline-none; + @apply outline-none ring-2; } - &:active, &:focus:active { + &:active, + &:focus:active { @apply bg-gray-500 dark:bg-dark-800; } &:disabled { - @apply text-gray-600 dark:text-dark-200 opacity-75; + @apply text-gray-600 opacity-75 dark:text-dark-200; } } /* Size Variations ========================================================================== */ .btn-sm { - @apply py-1 px-2 h-8; + @apply h-8 px-2 py-1; } .btn-xs { @@ -156,16 +185,15 @@ button { padding: 2px 40px; } - /* Shape Variations ========================================================================== */ .btn-round { - @apply rounded-full flex items-center text-center p-0; + @apply flex items-center rounded-full p-0 text-center; background: linear-gradient(180deg, #fff, #f9fafb); background-clip: padding-box; border: 1px solid #c4cdd6; - box-shadow: 0 1px 0 0 rgba(25,30,35,.05); + box-shadow: 0 1px 0 0 rgba(25, 30, 35, 0.05); height: 32px; width: 32px; @@ -175,7 +203,8 @@ button { border-color: theme(colors.dark.400); } - &:hover:not(:disabled), &:active:not(:disabled) { + &:hover:not(:disabled), + &:active:not(:disabled) { background: linear-gradient(180deg, #f9fafb, #f4f6f8); background-clip: padding-box; border-color: #c4cdd5; @@ -193,12 +222,11 @@ button { } } - /* Button Group ========================================================================== */ .btn-group { - @apply flex items-center justify-start p-0 cursor-auto; + @apply flex cursor-auto items-center justify-start p-0; height: 2.375rem; button { @@ -206,15 +234,15 @@ button { } button:not(:last-child):not(.active) { - @apply rtl:border-l-0 ltr:border-r-0; + @apply ltr:border-r-0 rtl:border-l-0; } button.active + button { - @apply rtl:border-r-0 ltr:border-l-0; + @apply ltr:border-l-0 rtl:border-r-0; } button:first-child { - @apply rtl:rounded-r ltr:rounded-l; + @apply ltr:rounded-l rtl:rounded-r; } button.disabled { @@ -222,16 +250,17 @@ button { } button:last-child { - @apply rtl:rounded-l ltr:rounded-r rtl:border-r ltr:border-l; - padding: .475rem .5rem; - &.btn-flat { @apply rtl:border-l-0 ltr:border-r-0; } + @apply ltr:rounded-r ltr:border-l rtl:rounded-l rtl:border-r; + padding: 0.475rem 0.5rem; + &.btn-flat { + @apply ltr:border-r-0 rtl:border-l-0; + } } .btn:focus { @apply ring-inset; } } - /* With Icons ========================================================================== */ @@ -245,7 +274,6 @@ button { color: #fff; } - .btn-icon-small, td .btn-icon { border-radius: 2px; @@ -255,7 +283,10 @@ td .btn-icon { } .btn-with-icon .icon { - margin: -5px 7px 0 -3px ; [dir="rtl"] & { margin: -5px -3px 0 7px ; } + margin: -5px 7px 0 -3px; + [dir='rtl'] & { + margin: -5px -3px 0 7px; + } position: relative; top: 1px; } @@ -264,10 +295,12 @@ td .btn-icon { @apply flex items-center; svg { - margin: 0 8px 0 -4px ; [dir="rtl"] & { margin: 0 -4px 0 8px ; } + margin: 0 8px 0 -4px; + [dir='rtl'] & { + margin: 0 -4px 0 8px; + } height: 16px; width: 16px; - } } @@ -282,39 +315,40 @@ td .btn-icon { } } - /* Close button. For closing things. ========================================================================== */ .btn-close { - @apply rtl:mr-4 ltr:ml-4 text-center p-0 text-xl text-gray-600 dark:text-dark-150 rounded-full w-8 h-8 outline-none shrink-0 leading-none inline-flex items-center justify-center; + @apply inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full p-0 text-center text-xl leading-none text-gray-600 outline-none dark:text-dark-150 ltr:ml-4 rtl:mr-4; &:hover { @apply bg-gray-400 dark:bg-dark-700; } - &:active, &:focus:hover { + &:active, + &:focus:hover { outline: none; @apply bg-gray-500 dark:bg-dark-750; } } .btn-quick-action { - @apply text-center p-0 text-xl text-gray-600 dark:text-dark-150 rounded-full w-8 h-8 outline-none shrink-0 leading-none inline-flex items-center justify-center; + @apply inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full p-0 text-center text-xl leading-none text-gray-600 outline-none dark:text-dark-150; &:hover { @apply bg-gray-400 dark:bg-dark-700; } - &:active, &:focus:hover { + &:active, + &:focus:hover { outline: none; @apply bg-gray-500 dark:bg-dark-750; } } .super-btn { - @apply p-4 flex items-start hover:bg-gray-200 border border-transparent rounded-md space-x-4 rtl:space-x-reverse; - @apply dark:hover:bg-dark-575 dark:hover:border-dark-400; + @apply flex items-start space-x-4 rounded-md border border-transparent p-4 hover:bg-gray-200 rtl:space-x-reverse; + @apply dark:hover:border-dark-400 dark:hover:bg-dark-575; svg { @apply h-8 w-8 text-gray-800 dark:text-dark-200; diff --git a/resources/css/elements/dropdowns.css b/resources/css/elements/dropdowns.css index e75a7077ed..8dd277cb98 100644 --- a/resources/css/elements/dropdowns.css +++ b/resources/css/elements/dropdowns.css @@ -5,23 +5,35 @@ .dropdown-list .popover-content { @apply p-2; - button, a { - @apply block w-full rtl:text-right ltr:text-left rounded-sm text-xs font-normal px-2 py-1 text-gray-800 dark:text-dark-100; + button, + a { + @apply block w-full rounded-sm px-2 py-1 text-xs font-normal text-gray-800 dark:text-dark-100 ltr:text-left rtl:text-right; line-height: 1.4; white-space: nowrap; &:hover { - @apply bg-blue dark:bg-dark-600 text-white; + @apply bg-blue text-white dark:bg-dark-600; } .icon { color: #d0d4d7 !important; - margin-right: 6px ; [dir="rtl"] & { margin-left: 6px ; margin-right: 0 ; } - margin-left: -4px ; [dir="rtl"] & { margin-right: -4px ; margin-left: 0 ; } + margin-right: 6px; + [dir='rtl'] & { + margin-left: 6px; + margin-right: 0; + } + margin-left: -4px; + [dir='rtl'] & { + margin-right: -4px; + margin-left: 0; + } font-size: 12px; width: 20px; display: block; - float: left ; [dir="rtl"] & { float: right ; } + float: left; + [dir='rtl'] & { + float: right; + } position: relative; top: 2px; line-height: inherit; @@ -29,7 +41,8 @@ } } - button.warning, a.warning { + button.warning, + a.warning { @apply text-red-500; &:hover { @@ -38,7 +51,7 @@ } .divider { - @apply h-px bg-gray-400 dark:bg-dark-900 overflow-hidden; + @apply h-px overflow-hidden bg-gray-400 dark:bg-dark-900; margin: 6px -8px; /* Hide dividers that come first, last or immediately after another (due to v-if) */ & + &, @@ -49,25 +62,28 @@ } .align-left & { - right: auto ; [dir="rtl"] & { right: auto ; left: auto ; } + right: auto; + [dir='rtl'] & { + right: auto; + left: auto; + } } - } .quick-list { - @apply relative; .quick-list-content { - @apply absolute top-1/2 right-full mr-[8px] -translate-y-1/2 min-w-max transition origin-right flex bg-white dark:bg-dark-550 shadow-quick rounded-full p-0.5; + @apply absolute right-full top-1/2 mr-[8px] flex min-w-max origin-right -translate-y-1/2 rounded-full bg-white p-0.5 shadow-quick transition dark:bg-dark-550; &::before { content: ''; position: absolute; inset: -8px -8px -8px -20px; z-index: -1; } - button, a { - @apply rounded-full p-1.5 text-gray-800 dark:text-dark-100 flex shrink-0; + button, + a { + @apply flex shrink-0 rounded-full p-1.5 text-gray-800 dark:text-dark-100; &:hover { @apply bg-blue text-white; } @@ -77,7 +93,8 @@ } } - button.warning, a.warning { + button.warning, + a.warning { @apply text-red-500; &:hover { @@ -87,8 +104,7 @@ &:not(:hover) { .quick-list-content { - @apply opacity-0 pointer-events-none scale-[0.85]; + @apply pointer-events-none scale-[0.85] opacity-0; } } - -} \ No newline at end of file +} diff --git a/resources/css/elements/forms.css b/resources/css/elements/forms.css index f4dcbda8c4..cacbfb3797 100644 --- a/resources/css/elements/forms.css +++ b/resources/css/elements/forms.css @@ -3,33 +3,34 @@ ========================================================================== */ label { - @apply text-gray-800 dark:text-dark-150 font-normal text-sm block leading-normal; + @apply block text-sm font-normal leading-normal text-gray-800 dark:text-dark-150; } input { @apply placeholder:text-gray-600 dark:placeholder:text-dark-175; } -input[type="checkbox"], -input[type="radio"] { +input[type='checkbox'], +input[type='radio'] { @apply text-lg; } select { - @apply text-base bg-gray-300 border-2 border-gray-300 cursor-pointer; + @apply cursor-pointer border-2 border-gray-300 bg-gray-300 text-base; } - /* Text Fields ========================================================================== */ .input-text { - @apply block appearance-none bg-gray-100 text-gray-800 border max-w-full w-full p-2 rounded shadow-inner placeholder:text-gray-600 text-md @lg:text-base; - @apply dark:bg-dark-650 dark:text-dark-150 dark:border-dark-900 dark:placeholder:text-dark-175 dark:shadow-inner-dark; - transition: border-color .15s ease-in-out, - box-shadow .15s ease-in-out; - &:focus, &:focus-within { - @apply ring-2 ring-blue-300 dark:ring-blue-600 outline-none; + @apply block w-full max-w-full appearance-none rounded border bg-gray-100 p-2 text-md text-gray-800 shadow-inner placeholder:text-gray-600 @lg:text-base; + @apply dark:border-dark-900 dark:bg-dark-650 dark:text-dark-150 dark:shadow-inner-dark dark:placeholder:text-dark-175; + transition: + border-color 0.15s ease-in-out, + box-shadow 0.15s ease-in-out; + &:focus, + &:focus-within { + @apply outline-none ring-2 ring-blue-300 dark:ring-blue-600; } &:not(textarea) { @@ -39,63 +40,68 @@ select { /* Used inside tables, grids, and so on */ .input-text-minimal { - @apply appearance-none shadow-none bg-white dark:bg-dark-550 w-full p-2; + @apply w-full appearance-none bg-white p-2 shadow-none dark:bg-dark-550; &:focus { - @apply outline-none bg-gray-200 dark:bg-dark-600; + @apply bg-gray-200 outline-none dark:bg-dark-600; } } - /* Needs an 'input' selector, otherwise when .input-text is used on a div, it's always considered read only. */ input.input-text:read-only, textarea.input-text:read-only, input.input-text-minimal:read-only, .input-text.read-only { - @apply bg-gray-300 dark:bg-dark-600 text-gray-700 dark:text-dark-200; + @apply bg-gray-300 text-gray-700 dark:bg-dark-600 dark:text-dark-200; } /* Input Groups ========================================================================== */ .input-group { - @apply appearance-none text-gray-800 w-full p-0 rounded flex items-center; + @apply flex w-full appearance-none items-center rounded p-0 text-gray-800; @apply dark:text-dark-150; height: 2.375rem; - &:not(.focus-within-only):focus, &:not(.focus-within-only):focus-within { + &:not(.focus-within-only):focus, + &:not(.focus-within-only):focus-within { @apply ring-2 ring-blue-300; @apply dark:ring-blue-600; - .input-text:focus, .input-group-prepend:focus, .input-group-append:focus, .input-group-item:focus { + .input-text:focus, + .input-group-prepend:focus, + .input-group-append:focus, + .input-group-item:focus { outline: 0; box-shadow: none; } } .input-text { - @apply flex-1 border-gray-500 min-w-0; + @apply min-w-0 flex-1 border-gray-500; @apply dark:border-dark-900; } .input-text:not(:first-child) { - @apply rtl:rounded-r-none ltr:rounded-l-none rtl:border-r-0 ltr:border-l-0; + @apply ltr:rounded-l-none ltr:border-l-0 rtl:rounded-r-none rtl:border-r-0; } .input-text:not(:last-child) { - @apply rtl:rounded-l-none ltr:rounded-r-none rtl:border-l-0 ltr:border-r-0; + @apply ltr:rounded-r-none ltr:border-r-0 rtl:rounded-l-none rtl:border-l-0; } .input-text[dir='ltr']:not(:last-child) { @apply rtl:rounded-r rtl:border-r; } - .input-group-prepend, .input-group-append, .input-group-item { - @apply rtl:rounded-r ltr:rounded-l px-2 border dark:border-dark-900 text-sm text-gray-800 dark:text-dark-150 select-none; + .input-group-prepend, + .input-group-append, + .input-group-item { + @apply select-none border px-2 text-sm text-gray-800 dark:border-dark-900 dark:text-dark-150 ltr:rounded-l rtl:rounded-r; background: linear-gradient(180deg, #fff, #f9fafb); background-clip: padding-box; border: 1px solid #c4cdd6; - box-shadow: 0 1px 0 0 rgba(25,30,35,.05); + box-shadow: 0 1px 0 0 rgba(25, 30, 35, 0.05); height: 2.375rem; line-height: 36px; @@ -103,7 +109,7 @@ input.input-text-minimal:read-only, background: linear-gradient(180deg, theme(colors.dark.500), theme(colors.dark.600)); background-clip: padding-box; border-color: theme(colors.dark.900); - box-shadow: 0 1px 0 0 rgba(0,0,0,.05); + box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.05); } &button { @@ -112,20 +118,25 @@ input.input-text-minimal:read-only, } &:has(.input-text) { - .input-group-prepend, .input-group-append, .input-group-item { + .input-group-prepend, + .input-group-append, + .input-group-item { @apply dark:border-dark-900; } } &.focus-within-only { - .input-text:focus, .input-group-prepend:focus, .input-group-append:focus, .input-group-item:focus { + .input-text:focus, + .input-group-prepend:focus, + .input-group-append:focus, + .input-group-item:focus { @apply focus-outline; z-index: 1; } } .input-group-item { - @apply rtl:rounded-r-none ltr:rounded-l-none -mx-px; + @apply -mx-px ltr:rounded-l-none rtl:rounded-r-none; } button.input-group-item:hover:not(:disabled), @@ -146,20 +157,23 @@ input.input-text-minimal:read-only, } .input-group-append { - @apply rtl:rounded-r-none ltr:rounded-l-none rtl:border-l-0 ltr:border-r-0; /* Rounded on the right side */ - &:last-child { @apply rtl:rounded-l ltr:rounded-r rtl:border-l ltr:border-r; } + @apply ltr:rounded-l-none ltr:border-r-0 rtl:rounded-r-none rtl:border-l-0; /* Rounded on the right side */ + &:last-child { + @apply ltr:rounded-r ltr:border-r rtl:rounded-l rtl:border-l; + } } - > *:last-child[class*="input-group-"], - > *:last-child [class*="input-group-"] { - @apply rtl:rounded-l ltr:rounded-r; + > *:last-child[class*='input-group-'], + > *:last-child [class*='input-group-'] { + @apply ltr:rounded-r rtl:rounded-l; } - } .input-group.input-group-sm { height: 1.625rem; - .input-group-prepend, .input-group-append, .input-group-item { + .input-group-prepend, + .input-group-append, + .input-group-item { @apply text-xs; height: 1.625rem; line-height: 25px; @@ -167,7 +181,6 @@ input.input-text-minimal:read-only, } } - /* Radio and Checkbox Fields ========================================================================== */ @@ -179,20 +192,20 @@ input.input-text-minimal:read-only, } input { - @apply leading-normal rtl:ml-1 ltr:mr-1; + @apply leading-normal ltr:mr-1 rtl:ml-1; } label { - @apply font-normal leading-none flex items-center; + @apply flex items-center font-normal leading-none; } } .radio-fieldtype .inline-mode, .checkboxes-fieldtype .inline-mode { - @apply flex items-center flex-wrap; + @apply flex flex-wrap items-center; .option { - @apply rtl:ml-4 ltr:mr-4 mb-3; + @apply mb-3 ltr:mr-4 rtl:ml-4; &:first-child { @apply mt-3; } @@ -200,28 +213,30 @@ input.input-text-minimal:read-only, } .radio-box { - @apply border rounded cursor-pointer relative p-4 h-full; + @apply relative h-full cursor-pointer rounded border p-4; &.selected { @apply border-blue text-blue shadow; } } - /* Select Fields ========================================================================== */ - .select-input-container { - @apply rounded relative; +.select-input-container { + @apply relative rounded; select { - @apply text-sm text-gray-800 dark:text-dark-150 shadow-button cursor-pointer block w-full h-full rtl:text-right ltr:text-left relative max-w-full; - @apply select-none rounded leading-normal align-middle whitespace-nowrap appearance-none subpixel-antialiased; + @apply relative block h-full w-full max-w-full cursor-pointer text-sm text-gray-800 shadow-button dark:text-dark-150 ltr:text-left rtl:text-right; + @apply select-none appearance-none whitespace-nowrap rounded align-middle leading-normal subpixel-antialiased; background: linear-gradient(180deg, #fff, #f9fafb); background-clip: padding-box; border: 1px solid #c4cdd6; height: 2.375rem; /* 38px */ letter-spacing: -0.01em; - padding: .475rem 1.75rem .475rem .75rem ; [dir="rtl"] & { padding: .475rem .75rem .475rem 1.75rem ; } + padding: 0.475rem 1.75rem 0.475rem 0.75rem; + [dir='rtl'] & { + padding: 0.475rem 0.75rem 0.475rem 1.75rem; + } .dark & { background: linear-gradient(180deg, theme(colors.dark.500), theme(colors.dark.600)); @@ -229,7 +244,8 @@ input.input-text-minimal:read-only, border-color: theme(colors.dark.800); } - &:hover:not(:disabled), &:active:not(:disabled) { + &:hover:not(:disabled), + &:active:not(:disabled) { background: linear-gradient(180deg, #f9fafb, #f4f6f8); background-clip: padding-box; border-color: #c4cdd5; @@ -243,25 +259,28 @@ input.input-text-minimal:read-only, } .select-input-toggle { - @apply pointer-events-none absolute inset-y-0 rtl:left-0 ltr:right-0 flex items-center px-2 text-gray-900 dark:text-dark-150; + @apply pointer-events-none absolute inset-y-0 flex items-center px-2 text-gray-900 dark:text-dark-150 ltr:right-0 rtl:left-0; svg { - @apply fill-current h-4 w-4; + @apply h-4 w-4 fill-current; } } - } - +} label .required { @apply text-red-500; font-style: normal; + .localizable-icon { - margin-left: 5px ; [dir="rtl"] & { margin-right: 5px ; margin-left: 0 ; } + margin-left: 5px; + [dir='rtl'] & { + margin-right: 5px; + margin-left: 0; + } } } -input[type="file"] { +input[type='file'] { padding: 16px; height: auto; line-height: 1; @@ -269,21 +288,24 @@ input[type="file"] { .filter-control { background: #fff; - border: 1px solid rgba(0,0,0,.15); + border: 1px solid rgba(0, 0, 0, 0.15); font-size: 14px; line-height: 1.5; position: relative; - &.search { height: 34px !important; } + &.search { + height: 34px !important; + } } -.help-block { width: 100%; } - +.help-block { + width: 100%; +} /* Form groups ========================================================================== */ .form-group { - @apply p-3 @sm:p-4 @lg:p-6 m-0; + @apply m-0 p-3 @sm:p-4 @lg:p-6; label { font-weight: 500; @@ -309,15 +331,19 @@ input[type="file"] { padding: 0 !important; margin: 0 !important; - .form-group { flex-basis: auto; } + .form-group { + flex-basis: auto; + } - .major { flex: 1; } + .major { + flex: 1; + } } .help-block { - @apply block mb-2 text-gray-700 dark:text-dark-150/70 text-xs; + @apply mb-2 block text-xs text-gray-700 dark:text-dark-150/70; a { - @apply text-gray-800 dark:text-dark-175 underline; + @apply text-gray-800 underline dark:text-dark-175; &:hover { @apply text-blue dark:text-dark-blue-100; } diff --git a/resources/css/elements/icons.css b/resources/css/elements/icons.css index 6c91319585..23671358c7 100644 --- a/resources/css/elements/icons.css +++ b/resources/css/elements/icons.css @@ -10,49 +10,49 @@ svg { } .dark svg { - [fill="#EAEEF9"] { + [fill='#EAEEF9'] { fill: theme(colors.dark.575); } - [fill="#989FB0"] { + [fill='#989FB0'] { fill: theme(colors.dark.700); } - [stroke="#EAEEF9"] { + [stroke='#EAEEF9'] { stroke: theme(colors.dark.200); } - [stroke="#C2C8D6"] { + [stroke='#C2C8D6'] { stroke: theme(colors.dark.700); } - [fill="white"] { + [fill='white'] { fill: theme(colors.dark.200); } - [stop-color="#B0BACC"] { + [stop-color='#B0BACC'] { stop-color: theme(colors.dark.800); } - [stop-color="#969EAE"] { + [stop-color='#969EAE'] { stop-color: theme(colors.dark.950); } - [stop-color="#FDFEFF"] { + [stop-color='#FDFEFF'] { stop-color: theme(colors.dark.200); } - [stop-color="#ECF0F5"] { + [stop-color='#ECF0F5'] { stop-color: theme(colors.dark.250); } - [fill="#D6DCE8"] { + [fill='#D6DCE8'] { fill: theme(colors.dark.300); } - [stroke="#AAB2C5"] { + [stroke='#AAB2C5'] { stroke: theme(colors.dark.950); } - [fill="#AAB2C5"] { + [fill='#AAB2C5'] { fill: theme(colors.dark.950); } - [fill="#D5DDEA"] { - fill: theme(colors.dark.700) + [fill='#D5DDEA'] { + fill: theme(colors.dark.700); } - [fill="#C2C8D6"] { - fill: theme(colors.black) + [fill='#C2C8D6'] { + fill: theme(colors.black); } - [stroke="#989FB0"] { + [stroke='#989FB0'] { stroke: theme(colors.dark.200); } } @@ -61,46 +61,55 @@ svg { fill: theme('colors.blue.DEFAULT'); } -.icon-status, .little-dot { - border-radius: 7px; - display: inline-block; - height: 7px; - position: relative; - width: 7px; +.icon-status, +.little-dot { + border-radius: 7px; + display: inline-block; + height: 7px; + position: relative; + width: 7px; flex-shrink: 0; - &.published { @apply bg-green-600 } - &.draft, &.expired { @apply bg-gray-600 dark:bg-dark-200 } - &.scheduled, &.hollow { @apply bg-transparent border border-gray-600 } + &.published { + @apply bg-green-600; + } + &.draft, + &.expired { + @apply bg-gray-600 dark:bg-dark-200; + } + &.scheduled, + &.hollow { + @apply border border-gray-600 bg-transparent; + } } .icon-header-avatar { - @apply rounded-full shadow overflow-hidden flex-shrink-0; + @apply flex-shrink-0 overflow-hidden rounded-full shadow; height: 32px; width: 32px; line-height: 32px; } .icon-user-initials { - @apply text-center text-white text-2xs bg-pink; + @apply bg-pink text-center text-2xs text-white; } .svg-icon { - @apply w-4 h-4; + @apply h-4 w-4; - &.using-svg { - @apply flex items-center; - } + &.using-svg { + @apply flex items-center; + } - svg { - width: 100%; - height: 100%; - } + svg { + width: 100%; + height: 100%; + } - div { - padding-top: 100%; - background-repeat: no-repeat; - background-size: contain; - background-position: 50% 50%; - } + div { + padding-top: 100%; + background-repeat: no-repeat; + background-size: contain; + background-position: 50% 50%; + } } diff --git a/resources/css/elements/tables.css b/resources/css/elements/tables.css index 60cd18585a..822e6a7c07 100644 --- a/resources/css/elements/tables.css +++ b/resources/css/elements/tables.css @@ -3,25 +3,29 @@ ========================================================================== */ .data-list-header { - @apply px-4 py-3 flex flex-wrap items-center; + @apply flex flex-wrap items-center px-4 py-3; } .data-list-search-input { - /* @apply text-sm px-4 py-2 flex-1 rounded border; */ - @apply bg-white; + /* @apply text-sm px-4 py-2 flex-1 rounded border; */ + @apply bg-white; - &:focus { - @apply focus-outline; - } + &:focus { + @apply focus-outline; + } } .data-list-bulk-actions { - @apply bg-white dark:bg-dark-750 absolute w-full py-2 z-1; - padding-left: 56px ; [dir="rtl"] & { padding-right: 56px ; padding-left: 0 ; } + @apply absolute z-1 w-full bg-white py-2 dark:bg-dark-750; + padding-left: 56px; + [dir='rtl'] & { + padding-right: 56px; + padding-left: 0; + } } .mode-grid .data-list-bulk-actions { - @apply bg-white dark:bg-dark-800 w-full pt-3 pb-1 z-10 rtl:pr-4 ltr:pl-4 static; + @apply static z-10 w-full bg-white pb-1 pt-3 dark:bg-dark-800 ltr:pl-4 rtl:pr-4; } .mode-grid .rotating-dots-button { @@ -29,100 +33,109 @@ } .data-list-footer { - @apply py-3 rtl:pl-4 ltr:pr-4 flex items-center border-t; + @apply flex items-center border-t py-3 ltr:pr-4 rtl:pl-4; } .data-table { - @apply rtl:text-right ltr:text-left text-gray-700 dark:text-dark-150 outline-none max-w-full w-full; - overflow-x: auto; + @apply w-full max-w-full text-gray-700 outline-none dark:text-dark-150 ltr:text-left rtl:text-right; + overflow-x: auto; thead { - @apply bg-gray-100 text-xs text-gray-900; + @apply bg-gray-100 text-xs text-gray-900; @apply dark:bg-dark-700 dark:text-dark-100; - tr { - @apply border-b dark:border-dark-900; - } + tr { + @apply border-b dark:border-dark-900; + } th { - @apply font-medium px-4 py-3 whitespace-nowrap; - &:first-child { @apply rtl:rounded-tr-lg ltr:rounded-tl-lg; } - &:last-child { @apply rtl:rounded-tl-lg ltr:rounded-tr-lg; } - &:hover { - @apply text-gray-900 dark:text-dark-100; - } - } + @apply whitespace-nowrap px-4 py-3 font-medium; + &:first-child { + @apply ltr:rounded-tl-lg rtl:rounded-tr-lg; + } + &:last-child { + @apply ltr:rounded-tr-lg rtl:rounded-tl-lg; + } + &:hover { + @apply text-gray-900 dark:text-dark-100; + } + } th.handle-column { - @apply p-0 w-4; + @apply w-4 p-0; + } + .type-column { + @apply ltr:text-right rtl:text-left; } - .type-column { - @apply ltr:text-right rtl:text-left; - } - } + } tbody { - outline: none; + outline: none; tr { - @apply border-b border-gray-400 dark:border-dark-900 text-sm; + @apply border-b border-gray-400 text-sm dark:border-dark-900; - &.row-selected { - @apply bg-gray-200 dark:bg-dark-600; - } + &.row-selected { + @apply bg-gray-200 dark:bg-dark-600; + } - &:first-child { - td:first-child, th:first-child { - @apply rtl:rounded-tr-md ltr:rounded-tl-md; - } + &:first-child { + td:first-child, + th:first-child { + @apply ltr:rounded-tl-md rtl:rounded-tr-md; + } - td:last-child, th:last-child { - @apply rtl:rounded-tl-md ltr:rounded-tr-md; - } - } + td:last-child, + th:last-child { + @apply ltr:rounded-tr-md rtl:rounded-tl-md; + } + } - &:last-child { - @apply border-none; + &:last-child { + @apply border-none; - td:first-child, th:first-child { - @apply rtl:rounded-br-md ltr:rounded-bl-md; - } + td:first-child, + th:first-child { + @apply ltr:rounded-bl-md rtl:rounded-br-md; + } - td:last-child, th:last-child { - @apply rtl:rounded-bl-md ltr:rounded-br-md; - } - } + td:last-child, + th:last-child { + @apply ltr:rounded-br-md rtl:rounded-bl-md; + } + } &:hover { @apply bg-gray-100 dark:bg-dark-575; } th { - @apply py-2 rtl:pl-4 ltr:pr-4; + @apply py-2 ltr:pr-4 rtl:pl-4; } td { - @apply py-2 px-4 break-words; + @apply break-words px-4 py-2; } td.table-drag-handle { - @apply w-1 rtl:border-l ltr:border-r h-full py-2 px-0; + @apply h-full w-1 px-0 py-2 ltr:border-r rtl:border-l; } - } + } .type-column { - @apply ltr:text-right rtl:text-left; - } + @apply ltr:text-right rtl:text-left; + } } - .sortable-column { @apply cursor-pointer select-none; &:hover { - @apply text-blue-500 dark:text-dark-blue-100; + @apply text-blue-500 dark:text-dark-blue-100; } &.current-column { - svg { opacity: 1; } + svg { + opacity: 1; + } } svg { @@ -132,7 +145,7 @@ svg.asc { transform: scaleY(-1); } - } + } .date-index-field { @apply whitespace-nowrap; @@ -142,23 +155,31 @@ /* Sticky Meta Columns */ .data-table { thead th.checkbox-column { - @apply p-0 rtl:pl-2 ltr:pr-2 sticky z-1 rtl:-right-px ltr:-left-px; + @apply sticky z-1 p-0 ltr:-left-px ltr:pr-2 rtl:-right-px rtl:pl-2; width: 45px; min-width: 45px; &:after { - @apply absolute rtl:right-0 ltr:left-0 rtl:left-0 ltr:right-0 top-0 bottom-0 -z-1 ; + @apply absolute bottom-0 top-0 -z-1 ltr:left-0 ltr:right-0 rtl:left-0 rtl:right-0; content: ''; background-image: linear-gradient(to right, theme(colors.gray.100) 70%, theme(colors.gray.100 / 0%) 100%); .dark & { - background-image: linear-gradient(to right, theme(colors.dark.550) 70%, theme(colors.dark.550 / 0%) 100%); + background-image: linear-gradient( + to right, + theme(colors.dark.550) 70%, + theme(colors.dark.550 / 0%) 100% + ); } } &:has(input:checked) { &:after { .dark & { - background-image: linear-gradient(to right, theme(colors.dark.750) 70%, theme(colors.dark.750 / 0%) 100%); + background-image: linear-gradient( + to right, + theme(colors.dark.750) 70%, + theme(colors.dark.750 / 0%) 100% + ); @apply border-b border-dark-550; } } @@ -166,23 +187,31 @@ } thead th.actions-column { - @apply p-0 rtl:pr-2 ltr:pl-2 rtl:text-left ltr:text-right sticky rtl:-left-px ltr:-right-px; + @apply sticky p-0 ltr:-right-px ltr:pl-2 ltr:text-right rtl:-left-px rtl:pr-2 rtl:text-left; width: 45px; min-width: 45px; &:after { - @apply absolute rtl:right-0 ltr:left-0 rtl:left-0 ltr:right-0 top-0 bottom-0 -z-1; + @apply absolute bottom-0 top-0 -z-1 ltr:left-0 ltr:right-0 rtl:left-0 rtl:right-0; content: ''; background-image: linear-gradient(to left, theme(colors.gray.100) 70%, theme(colors.gray.100 / 0%) 100%); .dark & { - background-image: linear-gradient(to left, theme(colors.dark.550) 70%, theme(colors.dark.550 / 0%) 100%); + background-image: linear-gradient( + to left, + theme(colors.dark.550) 70%, + theme(colors.dark.550 / 0%) 100% + ); } } &:has(input:checked) { &:after { .dark & { - background-image: linear-gradient(to left, theme(colors.dark.750) 70%, theme(colors.dark.750 / 0%) 100%); + background-image: linear-gradient( + to left, + theme(colors.dark.750) 70%, + theme(colors.dark.750 / 0%) 100% + ); @apply border-b border-dark-550; } } @@ -190,29 +219,37 @@ } tbody th.checkbox-column { - @apply px-3 sticky rtl:-right-px ltr:-left-px; + @apply sticky px-3 ltr:-left-px rtl:-right-px; &:after { - @apply absolute rtl:right-0 ltr:left-0 rtl:left-0 ltr:right-0 top-0 bottom-0 -z-1; + @apply absolute bottom-0 top-0 -z-1 ltr:left-0 ltr:right-0 rtl:left-0 rtl:right-0; content: ''; - background-image: linear-gradient(to right, rgba(255,255,255,1) 70%, rgba(255,255,255,0) 100%); + background-image: linear-gradient(to right, rgba(255, 255, 255, 1) 70%, rgba(255, 255, 255, 0) 100%); .dark & { - background-image: linear-gradient(to right, theme(colors.dark.600) 70%, theme(colors.dark.600 / 0%) 100%); + background-image: linear-gradient( + to right, + theme(colors.dark.600) 70%, + theme(colors.dark.600 / 0%) 100% + ); } } } tbody th.actions-column { - @apply p-0 rtl:pr-2 ltr:pl-2 rtl:text-left ltr:text-right sticky rtl:-left-px ltr:-right-px; + @apply sticky p-0 ltr:-right-px ltr:pl-2 ltr:text-right rtl:-left-px rtl:pr-2 rtl:text-left; min-width: 45px; width: 45px; &:after { - @apply absolute rtl:right-0 ltr:left-0 rtl:left-0 ltr:right-0 top-0 bottom-0 -z-1; + @apply absolute bottom-0 top-0 -z-1 ltr:left-0 ltr:right-0 rtl:left-0 rtl:right-0; content: ''; - background-image: linear-gradient(to left, rgba(255,255,255,1) 70%, rgba(255,255,255,0) 100%); + background-image: linear-gradient(to left, rgba(255, 255, 255, 1) 70%, rgba(255, 255, 255, 0) 100%); .dark & { - background-image: linear-gradient(to left, theme(colors.dark.600) 70%, theme(colors.dark.600 / 0%) 100%); + background-image: linear-gradient( + to left, + theme(colors.dark.600) 70%, + theme(colors.dark.600 / 0%) 100% + ); } } } @@ -250,7 +287,6 @@ } } - .data-list-header ~ .data-table { thead th { border-radius: 0; @@ -258,99 +294,120 @@ } .data-list-filter-link { - @apply border-gray-400 dark:border-dark-900 text-gray-600 dark:text-dark-150 rtl:ml-2 ltr:mr-2 p-3 pb-2; + @apply border-gray-400 p-3 pb-2 text-gray-600 dark:border-dark-900 dark:text-dark-150 ltr:mr-2 rtl:ml-2; - &:hover { - @apply border-b-3 dark:border-dark-900 text-gray-700 dark:text-dark-100; - } + &:hover { + @apply border-b-3 text-gray-700 dark:border-dark-900 dark:text-dark-100; + } - &:focus { - @apply border-blue-300 dark:border-dark-blue-100; - outline: 0; - box-shadow: inset 0 0 0 0.2rem rgba(0,125,255,.25); - } + &:focus { + @apply border-blue-300 dark:border-dark-blue-100; + outline: 0; + box-shadow: inset 0 0 0 0.2rem rgba(0, 125, 255, 0.25); + } - &.active { - @apply border-b-3 border-blue dark:border-dark-blue-100 text-gray-800 dark:text-dark-100; - } + &.active { + @apply border-b-3 border-blue text-gray-800 dark:border-dark-blue-100 dark:text-dark-100; + } } td.table-drag-handle { - @apply w-3 rtl:border-l ltr:border-r dark:border-dark-900 h-full p-2; + @apply h-full w-3 p-2 dark:border-dark-900 ltr:border-r rtl:border-l; min-width: 16px; - cursor: grab; - background: theme('colors.gray.200') url('../../svg/icons/light/drag-dots.svg') center center no-repeat; + cursor: grab; + background: theme('colors.gray.200') url('../../svg/icons/light/drag-dots.svg') center center no-repeat; background-size: 7px 17px; .dark & { background-color: theme(colors.dark.700); } - &:hover { @apply bg-gray-300 dark:bg-dark-750; } + &:hover { + @apply bg-gray-300 dark:bg-dark-750; + } } .table-row-placeholder { - background: hsla(210, 30%, 95%, 1); + background: hsla(210, 30%, 95%, 1); } .delete-column { - background: #fff; - border: 1px solid #ccc; - border-radius: 22px; - color: #777; - box-shadow: 0 1px 1px rgba(0,0,0,.05); - line-height: 1; - text-align: center; - height: 22px; - width: 22px; - float: right ; [dir="rtl"] & { float: left ; } - cursor: pointer; - - &:hover { - box-shadow: none; - color: #555; - } + background: #fff; + border: 1px solid #ccc; + border-radius: 22px; + color: #777; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); + line-height: 1; + text-align: center; + height: 22px; + width: 22px; + float: right; + [dir='rtl'] & { + float: left; + } + cursor: pointer; + + &:hover { + box-shadow: none; + color: #555; + } } .column-sortable { - cursor: pointer; - position: relative; - - &:before { - content: ""; - position: absolute; - bottom: -1px; - left: 0 ; [dir="rtl"] & { left: auto ; right: 0 ; } - right: 0 ; [dir="rtl"] & { right: auto ; left: 0 ; } - height: 2px; - } - - &:hover:before { + cursor: pointer; + position: relative; + + &:before { + content: ''; + position: absolute; + bottom: -1px; + left: 0; + [dir='rtl'] & { + left: auto; + right: 0; + } + right: 0; + [dir='rtl'] & { + right: auto; + left: 0; + } + height: 2px; + } + + &:hover:before { @apply bg-gray-300; - } - &.active:before { + } + &.active:before { @apply bg-blue; } - .icon { + .icon { position: relative; - float: right ; [dir="rtl"] & { float: left ; } + float: right; + [dir='rtl'] & { + float: left; + } top: 6px; - right: 5px ; [dir="rtl"] & { right: auto ; left: 5px ; } - } + right: 5px; + [dir='rtl'] & { + right: auto; + left: 5px; + } + } - .icon, .icon:before { - line-height: 0; - } + .icon, + .icon:before { + line-height: 0; + } } .column-status { - text-align: center; - width: 80px; + text-align: center; + width: 80px; } .column-actions { - @apply ltr:text-right rtl:text-left; - width: 30px; + @apply ltr:text-right rtl:text-left; + width: 30px; } table.control { @@ -359,11 +416,14 @@ table.control { .flush table.control { tr th:first-child { - padding-left: 30px ; [dir="rtl"] & { padding-right: 30px ; padding-left: 0 ; } + padding-left: 30px; + [dir='rtl'] & { + padding-right: 30px; + padding-left: 0; + } } } - /* Index Fields ========================================================================== */ @@ -383,7 +443,7 @@ table.control { .relationship-index-field { min-width: 10vw; .relationship-index-field-item { - @apply rounded bg-gray-100 dark:bg-dark-500 border dark:border-dark-400 px-1 flex items-center text-2xs rtl:ml-1 ltr:mr-1; + @apply flex items-center rounded border bg-gray-100 px-1 text-2xs dark:border-dark-400 dark:bg-dark-500 ltr:mr-1 rtl:ml-1; a { @apply line-clamp-1; } @@ -399,22 +459,23 @@ table.control { } .status-index-field { - @apply inline-block text-xs bg-gray-300 dark:bg-dark-200 text-gray-800 dark:text-dark-150 shrink rounded-full px-2 py-0.5 text-center justify-center; + @apply inline-block shrink justify-center rounded-full bg-gray-300 px-2 py-0.5 text-center text-xs text-gray-800 dark:bg-dark-200 dark:text-dark-150; &.status-published:not(.status-private) { - @apply text-green-900 dark:text-green-950 bg-green-200 dark:bg-green-300; + @apply bg-green-200 text-green-900 dark:bg-green-300 dark:text-green-950; } &.status-scheduled { - @apply text-amber-900 dark:text-amber-950 bg-amber-200 dark:bg-amber-300; + @apply bg-amber-200 text-amber-900 dark:bg-amber-300 dark:text-amber-950; } } -.role-index-field, .groups-index-field { - @apply flex flex-wrap -mb-1.5; +.role-index-field, +.groups-index-field { + @apply -mb-1.5 flex flex-wrap; .role-index-field-item, .groups-index-field-item { - @apply rounded bg-gray-100 dark:bg-dark-700 border dark:border-dark-900 px-1 inline-block text-2xs line-clamp-1 mb-1; + @apply mb-1 line-clamp-1 inline-block rounded border bg-gray-100 px-1 text-2xs dark:border-dark-900 dark:bg-dark-700; } } diff --git a/resources/css/tailwind.css b/resources/css/tailwind.css index 59bfe33411..747f54c098 100644 --- a/resources/css/tailwind.css +++ b/resources/css/tailwind.css @@ -1,7 +1,7 @@ -@import "tailwindcss/base"; -@import "cp"; -@import "tailwindcss/components"; -@import "tailwindcss/utilities"; -@import "core/utilities"; -@import "rtl"; -@import "dark"; +@import 'tailwindcss/base'; +@import 'cp'; +@import 'tailwindcss/components'; +@import 'tailwindcss/utilities'; +@import 'core/utilities'; +@import 'rtl'; +@import 'dark'; diff --git a/resources/css/vendors/codemirror.css b/resources/css/vendors/codemirror.css index 93377c0fec..f5b8cd6926 100644 --- a/resources/css/vendors/codemirror.css +++ b/resources/css/vendors/codemirror.css @@ -2,237 +2,349 @@ CODEMIRROR ========================================================================== */ - .CodeMirror { +.CodeMirror { /* Set height, width, borders, and global font properties here */ - @apply text-gray-900 font-mono text-sm leading-loose; + @apply font-mono text-sm leading-loose text-gray-900; min-height: 80px; - } +} - /* PADDING */ +/* PADDING */ - .CodeMirror-lines { +.CodeMirror-lines { padding: 4px 0; /* Vertical padding around content */ - } - .CodeMirror pre { +} +.CodeMirror pre { padding: 0 16px; /* Horizontal padding of content */ - } - .CodeMirror-wrap { +} +.CodeMirror-wrap { @apply rounded-b; - } +} - .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { +.CodeMirror-scrollbar-filler, +.CodeMirror-gutter-filler { background-color: white; /* The little square between H and V scrollbars */ - } +} - /* GUTTER */ +/* GUTTER */ - .CodeMirror-gutters { - @apply bg-gray-200 border-r; +.CodeMirror-gutters { + @apply border-r bg-gray-200; height: 100% !important; white-space: nowrap; - } +} - .CodeMirror-linenumbers {} - .CodeMirror-linenumber { +.CodeMirror-linenumbers { +} +.CodeMirror-linenumber { padding: 0 3px 0 5px; min-width: 20px; @apply text-right; color: #999; white-space: nowrap; - } +} - .CodeMirror-guttermarker { color: black; } - .CodeMirror-guttermarker-subtle { color: #999; } +.CodeMirror-guttermarker { + color: black; +} +.CodeMirror-guttermarker-subtle { + color: #999; +} - /* CURSOR */ +/* CURSOR */ - .CodeMirror-cursor { +.CodeMirror-cursor { border-left: 1px solid black; border-right: none; width: 0; - } - /* Shown when moving in bi-directional text */ - .CodeMirror div.CodeMirror-secondarycursor { +} +/* Shown when moving in bi-directional text */ +.CodeMirror div.CodeMirror-secondarycursor { border-left: 1px solid silver; - } - .cm-fat-cursor .CodeMirror-cursor { +} +.cm-fat-cursor .CodeMirror-cursor { width: auto; border: 0; background: #7e7; - } - .cm-fat-cursor div.CodeMirror-cursors { +} +.cm-fat-cursor div.CodeMirror-cursors { z-index: 1; - } +} - .cm-animate-fat-cursor { +.cm-animate-fat-cursor { width: auto; border: 0; -webkit-animation: blink 1.06s steps(1) infinite; -moz-animation: blink 1.06s steps(1) infinite; animation: blink 1.06s steps(1) infinite; background-color: #7e7; - } - @-moz-keyframes blink { - 0% {} - 50% { background-color: transparent; } - 100% {} - } - @-webkit-keyframes blink { - 0% {} - 50% { background-color: transparent; } - 100% {} - } - @keyframes blink { - 0% {} - 50% { background-color: transparent; } - 100% {} - } - - /* Can style cursor different in overwrite (non-insert) mode */ - .CodeMirror-overwrite .CodeMirror-cursor {} - - .cm-tab { display: inline-block; text-decoration: inherit; } - - .CodeMirror-ruler { +} +@-moz-keyframes blink { + 0% { + } + 50% { + background-color: transparent; + } + 100% { + } +} +@-webkit-keyframes blink { + 0% { + } + 50% { + background-color: transparent; + } + 100% { + } +} +@keyframes blink { + 0% { + } + 50% { + background-color: transparent; + } + 100% { + } +} + +/* Can style cursor different in overwrite (non-insert) mode */ +.CodeMirror-overwrite .CodeMirror-cursor { +} + +.cm-tab { + display: inline-block; + text-decoration: inherit; +} + +.CodeMirror-ruler { border-left: 1px solid #ccc; position: absolute; - } - - /* DEFAULT THEME */ - - .cm-s-default .cm-header {color: blue;} - .cm-s-default .cm-quote {color: #090;} - .cm-negative {color: #d44;} - .cm-positive {color: #292;} - .cm-header, .cm-strong {font-weight: bold;} - .cm-em {font-style: italic;} - .cm-link {text-decoration: underline;} - .cm-strikethrough {text-decoration: line-through;} - - .cm-s-default .cm-keyword {color: #708; @apply dark:text-purple-dark;} - .cm-s-default .cm-atom {color: #219;} - .cm-s-default .cm-number {color: #164;} - .cm-s-default .cm-def {color: #00f; @apply dark:text-blue-600;} - .cm-s-default .cm-variable, - .cm-s-default .cm-punctuation, - .cm-s-default .cm-property, - .cm-s-default .cm-operator {} - .cm-s-default .cm-variable-2 {color: #05a; @apply dark:text-blue-600;} - .cm-s-default .cm-variable-3 {color: #085; @apply dark:text-green-600;} - .cm-s-default .cm-comment {color: #a50; @apply dark:text-orange-dark;} - .cm-s-default .cm-string {color: #a11; @apply dark:text-red-500;} - .cm-s-default .cm-string-2 {color: #f50;} - .cm-s-default .cm-meta {color: #555;} - .cm-s-default .cm-qualifier {color: #555;} - .cm-s-default .cm-builtin {color: #30a;} - .cm-s-default .cm-bracket {color: #997;} - .cm-s-default .cm-tag {color: #170;} - .cm-s-default .cm-attribute {color: #00c;} - .cm-s-default .cm-hr {color: #999;} - .cm-s-default .cm-link {color: #00c; @apply dark:text-blue-500;} - - .cm-s-default .cm-error {color: #f00;} - .cm-invalidchar {color: #f00;} - - .CodeMirror-composing { border-bottom: 2px solid; } - - /* Default styles for common addons */ - - div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;} - div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} - .CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); } - .CodeMirror-activeline-background {background: #e8f2ff;} - - /* STOP */ - - /* The rest of this file contains styles related to the mechanics of +} + +/* DEFAULT THEME */ + +.cm-s-default .cm-header { + color: blue; +} +.cm-s-default .cm-quote { + color: #090; +} +.cm-negative { + color: #d44; +} +.cm-positive { + color: #292; +} +.cm-header, +.cm-strong { + font-weight: bold; +} +.cm-em { + font-style: italic; +} +.cm-link { + text-decoration: underline; +} +.cm-strikethrough { + text-decoration: line-through; +} + +.cm-s-default .cm-keyword { + color: #708; + @apply dark:text-purple-dark; +} +.cm-s-default .cm-atom { + color: #219; +} +.cm-s-default .cm-number { + color: #164; +} +.cm-s-default .cm-def { + color: #00f; + @apply dark:text-blue-600; +} +.cm-s-default .cm-variable, +.cm-s-default .cm-punctuation, +.cm-s-default .cm-property, +.cm-s-default .cm-operator { +} +.cm-s-default .cm-variable-2 { + color: #05a; + @apply dark:text-blue-600; +} +.cm-s-default .cm-variable-3 { + color: #085; + @apply dark:text-green-600; +} +.cm-s-default .cm-comment { + color: #a50; + @apply dark:text-orange-dark; +} +.cm-s-default .cm-string { + color: #a11; + @apply dark:text-red-500; +} +.cm-s-default .cm-string-2 { + color: #f50; +} +.cm-s-default .cm-meta { + color: #555; +} +.cm-s-default .cm-qualifier { + color: #555; +} +.cm-s-default .cm-builtin { + color: #30a; +} +.cm-s-default .cm-bracket { + color: #997; +} +.cm-s-default .cm-tag { + color: #170; +} +.cm-s-default .cm-attribute { + color: #00c; +} +.cm-s-default .cm-hr { + color: #999; +} +.cm-s-default .cm-link { + color: #00c; + @apply dark:text-blue-500; +} + +.cm-s-default .cm-error { + color: #f00; +} +.cm-invalidchar { + color: #f00; +} + +.CodeMirror-composing { + border-bottom: 2px solid; +} + +/* Default styles for common addons */ + +div.CodeMirror span.CodeMirror-matchingbracket { + color: #0f0; +} +div.CodeMirror span.CodeMirror-nonmatchingbracket { + color: #f22; +} +.CodeMirror-matchingtag { + background: rgba(255, 150, 0, 0.3); +} +.CodeMirror-activeline-background { + background: #e8f2ff; +} + +/* STOP */ + +/* The rest of this file contains styles related to the mechanics of the editor. You probably shouldn't touch them. */ - .CodeMirror { +.CodeMirror { position: relative; overflow: hidden; background: white; - } +} - .CodeMirror-scroll { +.CodeMirror-scroll { overflow: scroll !important; /* Things will break if this is overridden */ /* 50px is the magic margin used to hide the element's real scrollbars */ /* See overflow: hidden in .CodeMirror */ - margin-bottom: -50px; margin-right: -50px; + margin-bottom: -50px; + margin-right: -50px; padding-bottom: 50px; height: 100%; outline: none; /* Prevent dragging from highlighting the element */ position: relative; - } - .CodeMirror-sizer { +} +.CodeMirror-sizer { position: relative; border-right: 50px solid transparent; - } +} - /* The fake, visible scrollbars. Used to force redraw during scrolling +/* The fake, visible scrollbars. Used to force redraw during scrolling before actual scrolling happens, thus preventing shaking and flickering artifacts. */ - .CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { +.CodeMirror-vscrollbar, +.CodeMirror-hscrollbar, +.CodeMirror-scrollbar-filler, +.CodeMirror-gutter-filler { position: absolute; z-index: 6; display: none; - } - .CodeMirror-vscrollbar { - right: 0; top: 0; +} +.CodeMirror-vscrollbar { + right: 0; + top: 0; overflow-x: hidden; overflow-y: scroll; - } - .CodeMirror-hscrollbar { - bottom: 0; left: 0; +} +.CodeMirror-hscrollbar { + bottom: 0; + left: 0; overflow-y: hidden; overflow-x: scroll; - } - .CodeMirror-scrollbar-filler { - right: 0; bottom: 0; - } - .CodeMirror-gutter-filler { - left: 0; bottom: 0; - } - - .CodeMirror-gutters { - position: absolute; left: 0; top: 0; +} +.CodeMirror-scrollbar-filler { + right: 0; + bottom: 0; +} +.CodeMirror-gutter-filler { + left: 0; + bottom: 0; +} + +.CodeMirror-gutters { + position: absolute; + left: 0; + top: 0; min-height: 100%; z-index: 3; - } - .CodeMirror-gutter { +} +.CodeMirror-gutter { white-space: normal; height: 100%; display: inline-block; vertical-align: top; margin-bottom: -50px; - } - .CodeMirror-gutter-wrapper { +} +.CodeMirror-gutter-wrapper { position: absolute; z-index: 4; background: none !important; border: none !important; - } - .CodeMirror-gutter-background { +} +.CodeMirror-gutter-background { position: absolute; - top: 0; bottom: 0; + top: 0; + bottom: 0; z-index: 4; - } - .CodeMirror-gutter-elt { +} +.CodeMirror-gutter-elt { position: absolute; cursor: default; z-index: 4; - } - .CodeMirror-gutter-wrapper ::selection { background-color: transparent } - .CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent } - - .CodeMirror-lines { +} +.CodeMirror-gutter-wrapper ::selection { + background-color: transparent; +} +.CodeMirror-gutter-wrapper ::-moz-selection { + background-color: transparent; +} + +.CodeMirror-lines { cursor: text; min-height: 1px; /* prevents collapsing before first draw */ - } - .CodeMirror pre.CodeMirror-line, - .CodeMirror pre.CodeMirror-line-like { +} +.CodeMirror pre.CodeMirror-line, +.CodeMirror pre.CodeMirror-line-like { /* Reset some styles that the rest of the page might have set */ - -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; border-width: 0; background: transparent; font-family: inherit; @@ -248,256 +360,278 @@ -webkit-tap-highlight-color: transparent; -webkit-font-variant-ligatures: contextual; font-variant-ligatures: contextual; - } - .CodeMirror-wrap pre.CodeMirror-line, - .CodeMirror-wrap pre.CodeMirror-line-like { +} +.CodeMirror-wrap pre.CodeMirror-line, +.CodeMirror-wrap pre.CodeMirror-line-like { word-wrap: break-word; white-space: pre-wrap; word-break: normal; - } +} - .CodeMirror-linebackground { +.CodeMirror-linebackground { position: absolute; - left: 0; right: 0; top: 0; bottom: 0; + left: 0; + right: 0; + top: 0; + bottom: 0; z-index: 0; - } +} - .CodeMirror-linewidget { +.CodeMirror-linewidget { position: relative; z-index: 2; padding: 0.1px; /* Force widget margins to stay inside of the container */ - } +} - .CodeMirror-widget {} +.CodeMirror-widget { +} - .CodeMirror-rtl pre { direction: ltr; } +.CodeMirror-rtl pre { + direction: ltr; +} - .CodeMirror-code { +.CodeMirror-code { outline: none; - } - - /* Force content-box sizing for the elements where we expect it */ - .CodeMirror-scroll, - .CodeMirror-sizer, - .CodeMirror-gutter, - .CodeMirror-gutters, - .CodeMirror-linenumber { +} + +/* Force content-box sizing for the elements where we expect it */ +.CodeMirror-scroll, +.CodeMirror-sizer, +.CodeMirror-gutter, +.CodeMirror-gutters, +.CodeMirror-linenumber { -moz-box-sizing: content-box; box-sizing: content-box; - } +} - .CodeMirror-measure { +.CodeMirror-measure { position: absolute; width: 100%; height: 0; overflow: hidden; visibility: hidden; - } +} - .CodeMirror-cursor { +.CodeMirror-cursor { position: absolute; pointer-events: none; - } - .CodeMirror-measure pre { position: static; } +} +.CodeMirror-measure pre { + position: static; +} - div.CodeMirror-cursors { +div.CodeMirror-cursors { visibility: hidden; position: relative; z-index: 3; - } - div.CodeMirror-dragcursors { +} +div.CodeMirror-dragcursors { visibility: visible; - } +} - .CodeMirror-focused div.CodeMirror-cursors { +.CodeMirror-focused div.CodeMirror-cursors { visibility: visible; - } - - .CodeMirror-selected { background: #d9d9d9; } - .CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; } - .CodeMirror-crosshair { cursor: crosshair; } - .CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; } - .CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; } - - .cm-searching { +} + +.CodeMirror-selected { + background: #d9d9d9; +} +.CodeMirror-focused .CodeMirror-selected { + background: #d7d4f0; +} +.CodeMirror-crosshair { + cursor: crosshair; +} +.CodeMirror-line::selection, +.CodeMirror-line > span::selection, +.CodeMirror-line > span > span::selection { + background: #d7d4f0; +} +.CodeMirror-line::-moz-selection, +.CodeMirror-line > span::-moz-selection, +.CodeMirror-line > span > span::-moz-selection { + background: #d7d4f0; +} + +.cm-searching { background-color: #ffa; - background-color: rgba(255, 255, 0, .4); - } + background-color: rgba(255, 255, 0, 0.4); +} - /* Used to force a border model for a node */ - .cm-force-border { padding-right: .1px; } +/* Used to force a border model for a node */ +.cm-force-border { + padding-right: 0.1px; +} - @media print { +@media print { /* Hide the cursor when printing */ .CodeMirror div.CodeMirror-cursors { - visibility: hidden; + visibility: hidden; } - } - - /* See issue #2901 */ - .cm-tab-wrap-hack:after { content: ''; } +} - /* Help users use markselection to safely style text background */ - span.CodeMirror-selectedtext { background: none; } +/* See issue #2901 */ +.cm-tab-wrap-hack:after { + content: ''; +} +/* Help users use markselection to safely style text background */ +span.CodeMirror-selectedtext { + background: none; +} - .CodeMirror-fullscreen { - @apply fixed h-auto inset-0 pt-14 rounded-none; - } +.CodeMirror-fullscreen { + @apply fixed inset-0 h-auto rounded-none pt-14; +} - .CodeMirror-rulers { - @apply absolute left-0 right-0 overflow-hidden; - top: -50px; - bottom: -20px; - } +.CodeMirror-rulers { + @apply absolute left-0 right-0 overflow-hidden; + top: -50px; + bottom: -20px; +} - .CodeMirror-ruler { - @apply top-0 bottom-0; - } +.CodeMirror-ruler { + @apply bottom-0 top-0; +} - - /* Light Theme +/* Light Theme ========================================================================== */ - .code-fieldtype .theme-light { - +.code-fieldtype .theme-light { .CodeMirror { - @apply border p-0 + @apply border p-0; } - } +} - - - /* Material Theme +/* Material Theme ========================================================================== */ - .cm-s-material.CodeMirror { +.cm-s-material.CodeMirror { background: #263238; @apply dark:bg-dark-650; - color: #EEFFFF; - } + color: #eeffff; +} - .cm-s-material .CodeMirror-gutters { +.cm-s-material .CodeMirror-gutters { background: #263238; @apply dark:bg-dark-650; - color: #546E7A; + color: #546e7a; border: none; - } +} - .cm-s-material .CodeMirror-guttermarker, - .cm-s-material .CodeMirror-guttermarker-subtle, - .cm-s-material .CodeMirror-linenumber { - color: #546E7A; - } +.cm-s-material .CodeMirror-guttermarker, +.cm-s-material .CodeMirror-guttermarker-subtle, +.cm-s-material .CodeMirror-linenumber { + color: #546e7a; +} - .cm-s-material .CodeMirror-cursor { - border-left: 1px solid #FFCC00; - } +.cm-s-material .CodeMirror-cursor { + border-left: 1px solid #ffcc00; +} - .cm-s-material div.CodeMirror-selected { +.cm-s-material div.CodeMirror-selected { background: rgba(128, 203, 196, 0.2); - } +} - .cm-s-material.CodeMirror-focused div.CodeMirror-selected { +.cm-s-material.CodeMirror-focused div.CodeMirror-selected { background: rgba(128, 203, 196, 0.2); - } +} - .cm-s-material .CodeMirror-line::selection, - .cm-s-material .CodeMirror-line>span::selection, - .cm-s-material .CodeMirror-line>span>span::selection { +.cm-s-material .CodeMirror-line::selection, +.cm-s-material .CodeMirror-line > span::selection, +.cm-s-material .CodeMirror-line > span > span::selection { background: rgba(128, 203, 196, 0.2); - } +} - .cm-s-material .CodeMirror-line::-moz-selection, - .cm-s-material .CodeMirror-line>span::-moz-selection, - .cm-s-material .CodeMirror-line>span>span::-moz-selection { +.cm-s-material .CodeMirror-line::-moz-selection, +.cm-s-material .CodeMirror-line > span::-moz-selection, +.cm-s-material .CodeMirror-line > span > span::-moz-selection { background: rgba(128, 203, 196, 0.2); - } +} - .cm-s-material .CodeMirror-activeline-background { +.cm-s-material .CodeMirror-activeline-background { background: rgba(0, 0, 0, 0.5); - } +} - .cm-s-material .cm-keyword { - color: #C792EA; - } +.cm-s-material .cm-keyword { + color: #c792ea; +} - .cm-s-material .cm-operator { - color: #89DDFF; - } +.cm-s-material .cm-operator { + color: #89ddff; +} - .cm-s-material .cm-variable-2 { - color: #EEFFFF; - } +.cm-s-material .cm-variable-2 { + color: #eeffff; +} - .cm-s-material .cm-variable-3, - .cm-s-material .cm-type { +.cm-s-material .cm-variable-3, +.cm-s-material .cm-type { color: #f07178; - } +} - .cm-s-material .cm-builtin { - color: #FFCB6B; - } +.cm-s-material .cm-builtin { + color: #ffcb6b; +} - .cm-s-material .cm-atom { - color: #F78C6C; - } +.cm-s-material .cm-atom { + color: #f78c6c; +} - .cm-s-material .cm-number { - color: #FF5370; - } +.cm-s-material .cm-number { + color: #ff5370; +} - .cm-s-material .cm-def { - color: #82AAFF; - } +.cm-s-material .cm-def { + color: #82aaff; +} - .cm-s-material .cm-string { - color: #C3E88D; - } +.cm-s-material .cm-string { + color: #c3e88d; +} - .cm-s-material .cm-string-2 { +.cm-s-material .cm-string-2 { color: #f07178; - } +} - .cm-s-material .cm-comment { - color: #546E7A; - } +.cm-s-material .cm-comment { + color: #546e7a; +} - .cm-s-material .cm-variable { +.cm-s-material .cm-variable { color: #f07178; - } - - .cm-s-material .cm-tag { - color: #FF5370; - } +} - .cm-s-material .cm-meta { - color: #FFCB6B; - } +.cm-s-material .cm-tag { + color: #ff5370; +} - .cm-s-material .cm-attribute { - color: #C792EA; - } +.cm-s-material .cm-meta { + color: #ffcb6b; +} - .cm-s-material .cm-property { - color: #C792EA; - } +.cm-s-material .cm-attribute { + color: #c792ea; +} - .cm-s-material .cm-qualifier { - color: #DECB6B; - } +.cm-s-material .cm-property { + color: #c792ea; +} - .cm-s-material .cm-variable-3, - .cm-s-material .cm-type { - color: #DECB6B; - } +.cm-s-material .cm-qualifier { + color: #decb6b; +} +.cm-s-material .cm-variable-3, +.cm-s-material .cm-type { + color: #decb6b; +} - .cm-s-material .cm-error { - color: rgba(255, 255, 255, 1.0); - background-color: #FF5370; - } +.cm-s-material .cm-error { + color: rgba(255, 255, 255, 1); + background-color: #ff5370; +} - .cm-s-material .CodeMirror-matchingbracket { +.cm-s-material .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; - } +} diff --git a/resources/css/vendors/vue-select.css b/resources/css/vendors/vue-select.css index 0a39ea9862..00d3fc7f67 100644 --- a/resources/css/vendors/vue-select.css +++ b/resources/css/vendors/vue-select.css @@ -1,5 +1,5 @@ .v-select { - @apply rounded min-w-0 relative font-sans; + @apply relative min-w-0 rounded font-sans; [dir='rtl'] & { direction: rtl; @@ -8,12 +8,12 @@ .vs__fade-enter-active, .vs__fade-leave-active { - /* transition: opacity .15s cubic-bezier(1, .5, .8, 1) */ + /* transition: opacity .15s cubic-bezier(1, .5, .8, 1) */ } .vs__fade-enter, .vs__fade-leave-to { - opacity: 0 + opacity: 0; } .vs--disabled .vs__clear, @@ -21,45 +21,46 @@ .vs--disabled .vs__open-indicator, .vs--disabled .vs__search, .vs--disabled .vs__selected { - cursor: not-allowed !important; + cursor: not-allowed !important; } .vs--disabled .vs__dropdown-toggle { - @apply bg-gray-200 dark:bg-dark-550; + @apply bg-gray-200 dark:bg-dark-550; } -.v-select[dir=rtl] .vs__actions { - padding: 0 3px 0 6px +.v-select[dir='rtl'] .vs__actions { + padding: 0 3px 0 6px; } -.v-select[dir=rtl] .vs__clear { - margin-left: 6px; - margin-right: 0 +.v-select[dir='rtl'] .vs__clear { + margin-left: 6px; + margin-right: 0; } -.v-select[dir=rtl] .vs__deselect { - margin-left: 0; - margin-right: 2px +.v-select[dir='rtl'] .vs__deselect { + margin-left: 0; + margin-right: 2px; } -.v-select[dir=rtl] .vs__dropdown-menu { - text-align: right +.v-select[dir='rtl'] .vs__dropdown-menu { + text-align: right; } .vs__dropdown-toggle { - @apply appearance-none text-gray-800 w-full p-0 rounded flex items-center bg-gray-100 shadow-inner border border-gray-500; - @apply dark:text-dark-150 dark:bg-dark-650 dark:border-dark-900 dark:shadow-inner-dark; + @apply flex w-full appearance-none items-center rounded border border-gray-500 bg-gray-100 p-0 text-gray-800 shadow-inner; + @apply dark:border-dark-900 dark:bg-dark-650 dark:text-dark-150 dark:shadow-inner-dark; height: 2.375rem; - transition: border-color .15s ease-in-out, - box-shadow .15s ease-in-out; + transition: + border-color 0.15s ease-in-out, + box-shadow 0.15s ease-in-out; &:focus-within { @apply ring-2; } - .vs--disabled & { - @apply bg-gray-200; - } + .vs--disabled & { + @apply bg-gray-200; + } } .vs__selected-options { @@ -71,22 +72,23 @@ } .v-select .vs__selected-options { - @apply appearance-none text-gray-800 dark:text-dark-150 text-sm; - @apply flex basis-1 grow rounded-s relative h-full py-1 rtl:pr-2 ltr:pl-2 leading-normal; - width: calc(100% - 32px); + @apply appearance-none text-sm text-gray-800 dark:text-dark-150; + @apply relative flex h-full grow basis-1 rounded-s py-1 leading-normal ltr:pl-2 rtl:pr-2; + width: calc(100% - 32px); - transition: border-color .15s ease-in-out, - box-shadow .15s ease-in-out; + transition: + border-color 0.15s ease-in-out, + box-shadow 0.15s ease-in-out; } .vs--single .vs__selected-options { - padding: 8px 12px !important; + padding: 8px 12px !important; } .vs--single.vs--unsearchable .vs__selected-options { - @apply clickable; - @apply flex flex-1 rounded-s relative h-full border-0; - width: calc(100% - 34px); + @apply clickable; + @apply relative flex h-full flex-1 rounded-s border-0; + width: calc(100% - 34px); } .vs__actions { @@ -95,54 +97,56 @@ } .vs--searchable .vs__dropdown-toggle { - cursor: text + cursor: text; } .vs--unsearchable .vs__dropdown-toggle { - cursor: pointer + cursor: pointer; } .vs__open-indicator { - @apply clickable; - @apply flex items-center rounded-e px-2 text-sm shrink-0 h-full border-e-0 bg-clip-padding dark:border-dark-800; - /* height: 2.375rem; */ + @apply clickable; + @apply flex h-full shrink-0 items-center rounded-e border-e-0 bg-clip-padding px-2 text-sm dark:border-dark-800; + /* height: 2.375rem; */ } .vs__open-indicator svg { - @apply flex items-center text-gray-900 dark:text-dark-100 relative w-4 h-4; - transform: translateY(1px) scale(1); - transition: -webkit-transform .15s cubic-bezier(1, -.115, .975, .855); - transition: transform .15s cubic-bezier(1, -.115, .975, .855); - transition: transform .15s cubic-bezier(1, -.115, .975, .855), -webkit-transform .15s cubic-bezier(1, -.115, .975, .855); - transition-timing-function: cubic-bezier(1, -.115, .975, .855) + @apply relative flex h-4 w-4 items-center text-gray-900 dark:text-dark-100; + transform: translateY(1px) scale(1); + transition: -webkit-transform 0.15s cubic-bezier(1, -0.115, 0.975, 0.855); + transition: transform 0.15s cubic-bezier(1, -0.115, 0.975, 0.855); + transition: + transform 0.15s cubic-bezier(1, -0.115, 0.975, 0.855), + -webkit-transform 0.15s cubic-bezier(1, -0.115, 0.975, 0.855); + transition-timing-function: cubic-bezier(1, -0.115, 0.975, 0.855); } .vs--open .vs__open-indicator svg { - -webkit-transform: rotate(180deg) scale(1); - transform: rotate(180deg) scale(1) translateY(0px); + -webkit-transform: rotate(180deg) scale(1); + transform: rotate(180deg) scale(1) translateY(0px); } .vs--loading .vs__open-indicator { - opacity: 0 + opacity: 0; } .vs__clear { - @apply text-gray-900 dark:text-dark-100 rtl:pl-2 ltr:pr-2 rtl:pr-px ltr:pl-px rtl:@xs:pr-2 ltr:@xs:pl-2 cursor-pointer text-base bg-transparent shadow-none; - &:hover { - @apply text-blue; - } + @apply cursor-pointer bg-transparent text-base text-gray-900 shadow-none dark:text-dark-100 ltr:pl-px ltr:pr-2 ltr:@xs:pl-2 rtl:pl-2 rtl:pr-px rtl:@xs:pr-2; + &:hover { + @apply text-blue; + } } .vs__dropdown-menu { - @apply block absolute z-top m-0 w-full; - @apply bg-white dark:bg-dark-550 flex flex-col shadow-popover dark:shadow-dark-popover block p-4 rounded-md rtl:text-right ltr:text-left; - top: 46px; - padding: 0; - max-height: 350px; - min-width: 160px; - overflow-y: auto; - @apply ltr:text-left rtl:text-right; - list-style: none; + @apply absolute z-top m-0 block w-full; + @apply block flex flex-col rounded-md bg-white p-4 shadow-popover dark:bg-dark-550 dark:shadow-dark-popover ltr:text-left rtl:text-right; + top: 46px; + padding: 0; + max-height: 350px; + min-width: 160px; + overflow-y: auto; + @apply ltr:text-left rtl:text-right; + list-style: none; .v-select & { @apply ltr:left-0 rtl:right-0; @@ -150,12 +154,12 @@ } .vs__no-options { - text-align: center + text-align: center; } .vs__dropdown-option { - @apply block text-sm text-gray-800 dark:text-dark-100 cursor-pointer; - padding: 6px 12px; + @apply block cursor-pointer text-sm text-gray-800 dark:text-dark-100; + padding: 6px 12px; } .vs__dropdown-option--highlight { @@ -163,57 +167,61 @@ } .vs__dropdown-option--selected { - opacity: .25; - cursor: text; + opacity: 0.25; + cursor: text; } .v-select:not(.vs--single) .vs__selected { - @apply clickable; - @apply flex items-center text-sm rounded py-0 px-2 rtl:ml-2 ltr:mr-2; + @apply clickable; + @apply flex items-center rounded px-2 py-0 text-sm ltr:mr-2 rtl:ml-2; - &.sortable-item { @apply !cursor-grab; } + &.sortable-item { + @apply !cursor-grab; + } &.invalid { - @apply border-red-300 dark:border-dark-red bg-red-100 dark:bg-red-400 text-red-500 dark:text-red-950; + @apply border-red-300 bg-red-100 text-red-500 dark:border-dark-red dark:bg-red-400 dark:text-red-950; background-image: none; - .vs__deselect { @apply text-red-500 dark:text-red-950 } + .vs__deselect { + @apply text-red-500 dark:text-red-950; + } } } .vs__deselect { - @apply flex items-center cursor-pointer text-gray-600 dark:text-dark-175 rtl:mr-1 ltr:ml-1 p-0 outline-none; + @apply flex cursor-pointer items-center p-0 text-gray-600 outline-none dark:text-dark-175 ltr:ml-1 rtl:mr-1; - &:hover { - @apply text-gray-700 dark:text-dark-100; - } + &:hover { + @apply text-gray-700 dark:text-dark-100; + } - &:focus { - @apply outline-none; - } + &:focus { + @apply outline-none; + } - span { - @apply text-md shrink-0 font-normal; - } + span { + @apply shrink-0 text-md font-normal; + } } .vs--single .vs__selected { - overflow: hidden; + overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; - background-color: transparent; - border-color: transparent; - padding: 0; - margin: 0; + background-color: transparent; + border-color: transparent; + padding: 0; + margin: 0; } .vs--single.vs--open .vs__selected { - opacity: .75; + opacity: 0.75; } .vs--single.vs--searching .vs__selected { - display: none + display: none; } .vs__search::-ms-clear, @@ -221,15 +229,15 @@ .vs__search::-webkit-search-decoration, .vs__search::-webkit-search-results-button, .vs__search::-webkit-search-results-decoration { - display: none + display: none; } .vs__search, .vs__search:focus { - @apply appearance-none text-sm text-gray-800 dark:text-dark-150 rtl:pl-2 ltr:pr-2 border-transparent outline-none m-0 p-0 bg-transparent max-w-full; - line-height: 1.4; - border-left: none; - box-shadow: none; + @apply m-0 max-w-full appearance-none border-transparent bg-transparent p-0 text-sm text-gray-800 outline-none dark:text-dark-150 ltr:pr-2 rtl:pl-2; + line-height: 1.4; + border-left: none; + box-shadow: none; flex-grow: 1; width: 0; } @@ -238,66 +246,66 @@ } .vs__search::placeholder { - @apply text-gray-600; + @apply text-gray-600; } .vs--unsearchable .vs__search { - opacity: 1 + opacity: 1; } .vs--unsearchable .vs__search:hover { - cursor: pointer + cursor: pointer; } .vs--single.vs--searching:not(.vs--open):not(.vs--loading) .vs__search { - opacity: .2 + opacity: 0.2; } .vs__spinner { - align-self: center; - opacity: 0; - font-size: 5px; - text-indent: -9999em; - overflow: hidden; - border: .9em solid hsla(0, 0%, 39.2%, .1); - border-left-color: rgba(60, 60, 60, .45); - -webkit-transform: translateZ(0); - transform: translateZ(0); - -webkit-animation: vSelectSpinner 1.1s linear infinite; - animation: vSelectSpinner 1.1s linear infinite; - transition: opacity .1s + align-self: center; + opacity: 0; + font-size: 5px; + text-indent: -9999em; + overflow: hidden; + border: 0.9em solid hsla(0, 0%, 39.2%, 0.1); + border-left-color: rgba(60, 60, 60, 0.45); + -webkit-transform: translateZ(0); + transform: translateZ(0); + -webkit-animation: vSelectSpinner 1.1s linear infinite; + animation: vSelectSpinner 1.1s linear infinite; + transition: opacity 0.1s; } .vs__spinner, .vs__spinner:after { - border-radius: 50%; - width: 5em; - height: 5em + border-radius: 50%; + width: 5em; + height: 5em; } .vs--loading .vs__spinner { - opacity: 1 + opacity: 1; } /* Animation */ @-webkit-keyframes vSelectSpinner { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg) - } - to { - -webkit-transform: rotate(1turn); - transform: rotate(1turn) - } + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + to { + -webkit-transform: rotate(1turn); + transform: rotate(1turn); + } } @keyframes vSelectSpinner { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg) - } - to { - -webkit-transform: rotate(1turn); - transform: rotate(1turn) - } + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + to { + -webkit-transform: rotate(1turn); + transform: rotate(1turn); + } } diff --git a/resources/js/bootstrap/App.vue b/resources/js/bootstrap/App.vue index ffdeec08a0..d88666875d 100644 --- a/resources/js/bootstrap/App.vue +++ b/resources/js/bootstrap/App.vue @@ -47,7 +47,6 @@ import PortalTargets from '../components/portals/PortalTargets.vue'; import SitesEditForm from '../components/sites/EditForm.vue'; export default { - components: { GlobalSearch, GlobalSiteSelector, @@ -105,11 +104,10 @@ export default { appendedComponents: Statamic.$components.components, isLicensingBannerSnoozed: localStorage.getItem(`statamic.snooze_license_banner`) > new Date().valueOf(), copyToClipboardModalUrl: null, - } + }; }, computed: { - version() { return Statamic.$config.get('version'); }, @@ -120,14 +118,13 @@ export default { wrapperClass() { return this.$config.get('wrapperClass', 'max-w-xl'); - } - + }, }, mounted() { this.bindWindowResizeListener(); - this.$keys.bind(['command+\\'], e => { + this.$keys.bind(['command+\\'], (e) => { e.preventDefault(); this.toggleNav(); }); @@ -159,11 +156,9 @@ export default { }); Statamic.$callbacks.add('bustAndReloadImageCaches', function (urls) { - urls.forEach(async url => { + urls.forEach(async (url) => { await fetch(url, { cache: 'reload', mode: 'no-cors' }); - document.body - .querySelectorAll(`img[src='${url}']`) - .forEach(img => img.src = url); + document.body.querySelectorAll(`img[src='${url}']`).forEach((img) => (img.src = url)); }); }); @@ -171,7 +166,6 @@ export default { }, methods: { - bindWindowResizeListener() { window.addEventListener('resize', () => { this.$store.commit('statamic/windowWidth', document.documentElement.clientWidth); @@ -180,12 +174,12 @@ export default { }, toggleNav() { - this.navOpen = ! this.navOpen; + this.navOpen = !this.navOpen; localStorage.setItem('statamic.nav', this.navOpen ? 'open' : 'closed'); }, toggleMobileNav() { - this.mobileNavOpen = ! this.mobileNavOpen; + this.mobileNavOpen = !this.mobileNavOpen; }, hideBanner() { @@ -227,12 +221,11 @@ export default { MM: __('moment.relativeTime.MM'), y: __('moment.relativeTime.y'), yy: __('moment.relativeTime.yy'), - } + }, }; window.moment.updateLocale(locale, spec); this.$moment.updateLocale(locale, spec); - } - } - -} + }, + }, +}; diff --git a/resources/js/bootstrap/components.js b/resources/js/bootstrap/components.js index fe0249cd59..d2d5dbadeb 100644 --- a/resources/js/bootstrap/components.js +++ b/resources/js/bootstrap/components.js @@ -147,4 +147,4 @@ export default function registerGlobalComponents(app) { app.component('stack-test', StackTest); app.component('blueprint-resetter', BlueprintResetter); -}; +} diff --git a/resources/js/bootstrap/fieldtypes.js b/resources/js/bootstrap/fieldtypes.js index cfb9113385..08d24a6305 100644 --- a/resources/js/bootstrap/fieldtypes.js +++ b/resources/js/bootstrap/fieldtypes.js @@ -1,5 +1,5 @@ -import RevealerFieldtype from '../components/fieldtypes/RevealerFieldtype.vue' -import TemplateFieldtype from '../components/fieldtypes/TemplateFieldtype.vue' +import RevealerFieldtype from '../components/fieldtypes/RevealerFieldtype.vue'; +import TemplateFieldtype from '../components/fieldtypes/TemplateFieldtype.vue'; import Select from '../components/inputs/Select.vue'; import Text from '../components/inputs/Text.vue'; import Textarea from '../components/inputs/Textarea.vue'; @@ -22,9 +22,9 @@ import Routes from '../components/collections/Routes.vue'; import TitleFormats from '../components/collections/TitleFormats.vue'; import ColorFieldtype from '../components/fieldtypes/ColorFieldtype.vue'; import DateFieldtype from '../components/fieldtypes/DateFieldtype.vue'; -import DictionaryFieldtype from "../components/fieldtypes/DictionaryFieldtype.vue"; -import DictionaryIndexFieldtype from "../components/fieldtypes/DictionaryIndexFieldtype.vue"; -import DictionaryFields from "../components/fieldtypes/DictionaryFields.vue"; +import DictionaryFieldtype from '../components/fieldtypes/DictionaryFieldtype.vue'; +import DictionaryIndexFieldtype from '../components/fieldtypes/DictionaryIndexFieldtype.vue'; +import DictionaryFields from '../components/fieldtypes/DictionaryFields.vue'; import FieldDisplayFieldtype from '../components/fieldtypes/FieldDisplayFieldtype.vue'; import FieldsFieldtype from '../components/fieldtypes/grid/FieldsFieldtype.vue'; import FilesFieldtype from '../components/fieldtypes/FilesFieldtype.vue'; @@ -133,4 +133,4 @@ export default function registerFieldtypes(app) { app.component('set-field', SetField); app.component('revealer-fieldtype', RevealerFieldtype); app.component('template-fieldtype', TemplateFieldtype); -}; +} diff --git a/resources/js/bootstrap/globals.js b/resources/js/bootstrap/globals.js index aca3362eb7..832ce45c3b 100644 --- a/resources/js/bootstrap/globals.js +++ b/resources/js/bootstrap/globals.js @@ -6,19 +6,19 @@ import PreviewHtml from '../components/fieldtypes/replicator/PreviewHtml'; export function cp_url(url) { url = Statamic.$config.get('cpUrl') + '/' + url; return tidy_url(url); -}; +} export function docs_url(url) { return tidy_url('https://statamic.dev/' + url); -}; +} export function resource_url(url) { url = Statamic.$config.get('resourceUrl') + '/' + url; return tidy_url(url); -}; +} export function tidy_url(url) { - return url.replace(/([^:])(\/\/+)/g, '$1/') + return url.replace(/([^:])(\/\/+)/g, '$1/'); } export function relative_url(url) { @@ -27,14 +27,14 @@ export function relative_url(url) { export function dd(args) { console.log(args); -}; +} -export function data_get(obj, path, fallback=null) { +export function data_get(obj, path, fallback = null) { // Source: https://stackoverflow.com/a/22129960 var properties = Array.isArray(path) ? path : path.split('.'); var value = properties.reduce((prev, curr) => prev && prev[curr], obj); return value !== undefined ? value : fallback; -}; +} export function data_set(obj, path, value) { // Source: https://stackoverflow.com/a/20240290 @@ -42,11 +42,11 @@ export function data_set(obj, path, value) { while (parts.length - 1) { var key = parts.shift(); var shouldBeArray = parts.length ? new RegExp('^[0-9]+$').test(parts[0]) : false; - if (! (key in obj)) obj[key] = shouldBeArray ? [] : {}; + if (!(key in obj)) obj[key] = shouldBeArray ? [] : {}; obj = obj[key]; } obj[parts[0]] = value; -}; +} export function clone(value) { if (value === undefined) return undefined; @@ -61,7 +61,7 @@ export function tailwind_width_class(width) { 50: 'w-full @lg:w-1/2', 66: 'w-full @lg:w-2/3', 75: 'w-full @lg:w-3/4', - 100: 'w-full' + 100: 'w-full', }; return `${widths[width] || 'w-full'}`; @@ -69,7 +69,7 @@ export function tailwind_width_class(width) { export function markdown(value) { return marked(value); -}; +} export function __(string, replacements) { return translate(string, replacements); @@ -80,8 +80,9 @@ export function __n(string, number, replacements) { export function utf8btoa(stringToEncode) { // first we convert it to utf-8 - const utf8String = encodeURIComponent(stringToEncode) - .replace(/%([0-9A-F]{2})/g, (_, code) => String.fromCharCode(`0x${code}`)); + const utf8String = encodeURIComponent(stringToEncode).replace(/%([0-9A-F]{2})/g, (_, code) => + String.fromCharCode(`0x${code}`), + ); // return base64 encoded string return btoa(utf8String); @@ -92,22 +93,27 @@ export function utf8atob(stringToDecode) { const utf8String = atob(stringToDecode); // Convert the UTF-8 byte representation back to a regular string - return decodeURIComponent(utf8String.split('') - .map(c => '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2)).join('')); + return decodeURIComponent( + utf8String + .split('') + .map((c) => '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2)) + .join(''), + ); } export function uniqid() { return uid(); } -export function truncate(string, length, ending='...') { +export function truncate(string, length, ending = '...') { if (string.length <= length) return string; return string.substring(0, length - ending.length) + ending; } export function escapeHtml(string) { - return string.replaceAll('&', '&') + return string + .replaceAll('&', '&') .replaceAll('<', '<') .replaceAll('>', '>') .replaceAll('"', '"') diff --git a/resources/js/bootstrap/statamic.js b/resources/js/bootstrap/statamic.js index bbf3ad71f8..d54201a368 100644 --- a/resources/js/bootstrap/statamic.js +++ b/resources/js/bootstrap/statamic.js @@ -22,7 +22,7 @@ import '@hoppscotch/vue-toasted/style.css'; import 'vue-final-modal/style.css'; import PortalVue from 'portal-vue'; import Keys from '../components/keys/Keys'; -import FieldActions from "../components/field-actions/FieldActions.js"; +import FieldActions from '../components/field-actions/FieldActions.js'; import Callbacks from '../components/Callbacks'; import Slugs from '../components/slugs/Manager'; import Portals from '../components/portals/Portals'; @@ -42,7 +42,6 @@ let bootedCallbacks = []; let components; export default { - booting(callback) { bootingCallbacks.push(callback); }, @@ -138,11 +137,11 @@ export default { text: '×', onClick: (e, toastObject) => { toastObject.goAway(0); - } - } - }) + }, + }, + }); - const portals = markRaw(new Portals); + const portals = markRaw(new Portals()); components = new Components(this.$app); @@ -153,20 +152,20 @@ export default { $preferences: new Preferences(store), $progress: useProgressBar(), $config: this.$config, - $keys: new Keys, - $fieldActions: new FieldActions, - $conditions: new FieldConditions, - $callbacks: new Callbacks, + $keys: new Keys(), + $fieldActions: new FieldActions(), + $conditions: new FieldConditions(), + $callbacks: new Callbacks(), $dirty: useDirtyState(), - $slug: new Slugs, + $slug: new Slugs(), $portals: portals, $stacks: new Stacks(portals), - $hooks: new Hooks, + $hooks: new Hooks(), $toast: new Toasts(useToasted()), - $bard: new Bard, - $reveal: new Reveal, - $echo: new Echo, - $permissions: new Permission, + $bard: new Bard(), + $reveal: new Reveal(), + $echo: new Echo(), + $permissions: new Permission(), }); Object.assign(this.$app.config.globalProperties, { @@ -191,14 +190,14 @@ export default { return permissions.includes('super') || permissions.includes(permission); }, $wait(ms) { - return new Promise(resolve => { + return new Promise((resolve) => { setTimeout(resolve, ms); }); - } + }, }); this.$app.directive('elastic', { - mounted: (el) => autosize(el) + mounted: (el) => autosize(el), }); registerGlobalComponents(this.$app); @@ -216,13 +215,12 @@ export default { axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; axios.defaults.headers.common['X-CSRF-TOKEN'] = Statamic.$config.get('csrfToken'); - bootingCallbacks.forEach(callback => callback(this)); + bootingCallbacks.forEach((callback) => callback(this)); bootingCallbacks = []; this.$app.mount('#statamic'); - bootedCallbacks.forEach(callback => callback(this)); + bootedCallbacks.forEach((callback) => callback(this)); bootedCallbacks = []; - } - -} + }, +}; diff --git a/resources/js/bootstrap/vue-select/OpenChevron.vue b/resources/js/bootstrap/vue-select/OpenChevron.vue index 262b3f743e..d0a68b6ee5 100644 --- a/resources/js/bootstrap/vue-select/OpenChevron.vue +++ b/resources/js/bootstrap/vue-select/OpenChevron.vue @@ -1,3 +1,5 @@ diff --git a/resources/js/bootstrap/vue-select/vue-select.js b/resources/js/bootstrap/vue-select/vue-select.js index 505e7a236e..7dbd97367b 100644 --- a/resources/js/bootstrap/vue-select/vue-select.js +++ b/resources/js/bootstrap/vue-select/vue-select.js @@ -9,14 +9,15 @@ export default function registerVueSelect(app) { render: () => h('span', __('×')), }, OpenIndicator: { - render: () => h( - 'span', - { - class: { 'toggle': true }, - }, - h(OpenChevron) - ) - } + render: () => + h( + 'span', + { + class: { toggle: true }, + }, + h(OpenChevron), + ), + }, }); app.component('v-select', VueSelect); diff --git a/resources/js/components/AddonDetails.vue b/resources/js/components/AddonDetails.vue index 6cf559be52..eea055f246 100644 --- a/resources/js/components/AddonDetails.vue +++ b/resources/js/components/AddonDetails.vue @@ -1,31 +1,35 @@ diff --git a/resources/js/components/AssetContainerList.vue b/resources/js/components/AssetContainerList.vue index b3b5773350..dd293856dd 100644 --- a/resources/js/components/AssetContainerList.vue +++ b/resources/js/components/AssetContainerList.vue @@ -18,30 +18,22 @@ diff --git a/resources/js/components/Avatar.vue b/resources/js/components/Avatar.vue index ff9db23a6f..6ce462c33e 100644 --- a/resources/js/components/Avatar.vue +++ b/resources/js/components/Avatar.vue @@ -1,27 +1,25 @@ diff --git a/resources/js/components/Bard.js b/resources/js/components/Bard.js index 07bff22c13..720fe9d8d4 100644 --- a/resources/js/components/Bard.js +++ b/resources/js/components/Bard.js @@ -31,8 +31,8 @@ class Bard { pm: { state, model, - view - } + view, + }, }; } } diff --git a/resources/js/components/Breadcrumb.vue b/resources/js/components/Breadcrumb.vue index 4e5a5d948d..828f6eb9c5 100644 --- a/resources/js/components/Breadcrumb.vue +++ b/resources/js/components/Breadcrumb.vue @@ -1,6 +1,9 @@ diff --git a/resources/js/components/HasWizardSteps.js b/resources/js/components/HasWizardSteps.js index 052b2c2f28..5f832b8ac9 100644 --- a/resources/js/components/HasWizardSteps.js +++ b/resources/js/components/HasWizardSteps.js @@ -1,8 +1,7 @@ export default { - data() { return { - currentStep: 0 + currentStep: 0, }; }, @@ -17,7 +16,7 @@ export default { canContinue() { return this.canGoToStep(this.currentStep + 1); - } + }, }, methods: { @@ -28,16 +27,15 @@ export default { }, next() { - if (! this.onLastStep) { + if (!this.onLastStep) { this.goToStep(this.currentStep + 1); } }, previous() { - if (! this.onFirstStep) { + if (!this.onFirstStep) { this.goToStep(this.currentStep - 1); } - } - } - -} + }, + }, +}; diff --git a/resources/js/components/Hooks.js b/resources/js/components/Hooks.js index aa8c66f905..a399ed6d7c 100644 --- a/resources/js/components/Hooks.js +++ b/resources/js/components/Hooks.js @@ -3,24 +3,24 @@ class Hooks { this.hooks = {}; } - on(key, callback, priority=10) { + on(key, callback, priority = 10) { if (this.hooks[key] === undefined) { this.hooks[key] = []; } - this.hooks[key].push({callback, priority}); + this.hooks[key].push({ callback, priority }); } run(key, payload) { return new Promise((resolve, reject) => { this.getCallbacks(key) .sort((a, b) => b.priority - a.priority) - .map(hook => this.convertToPromiseCallback(hook.callback, payload)) + .map((hook) => this.convertToPromiseCallback(hook.callback, payload)) .reduce((promise, callback) => { - return promise.then(result => callback().then(Array.prototype.concat.bind(result))); + return promise.then((result) => callback().then(Array.prototype.concat.bind(result))); }, Promise.resolve([])) - .then(results => resolve(results)) - .catch(error => reject(error)); + .then((results) => resolve(results)) + .catch((error) => reject(error)); }); } diff --git a/resources/js/components/LengthLimiter.vue b/resources/js/components/LengthLimiter.vue index f81bd1595d..1646618806 100644 --- a/resources/js/components/LengthLimiter.vue +++ b/resources/js/components/LengthLimiter.vue @@ -1,11 +1,10 @@ diff --git a/resources/js/components/Listing.vue b/resources/js/components/Listing.vue index 9b69c759d6..b3bf79e70a 100644 --- a/resources/js/components/Listing.vue +++ b/resources/js/components/Listing.vue @@ -5,13 +5,7 @@ import HasPagination from './data-list/HasPagination'; import HasPreferences from './data-list/HasPreferences'; export default { - - mixins: [ - HasActions, - HasFilters, - HasPagination, - HasPreferences, - ], + mixins: [HasActions, HasFilters, HasPagination, HasPreferences], props: { initialSortColumn: String, @@ -31,18 +25,17 @@ export default { loading: true, items: [], columns: this.initialColumns, - visibleColumns: this.initialColumns.filter(column => column.visible), + visibleColumns: this.initialColumns.filter((column) => column.visible), sortColumn: this.initialSortColumn, sortDirection: this.initialSortDirection, meta: null, pushQuery: false, popping: false, - } + }; }, computed: { - - parameterMap() { + parameterMap() { return { sort: 'sortColumn', order: 'sortDirection', @@ -54,27 +47,28 @@ export default { }; }, - parameters: { + parameters: { get() { - const parameters = Object.fromEntries(Object.entries(this.parameterMap) - .map(([key, prop]) => { - return [key, this[prop]]; - }) - .filter(([key, value]) => { - return value !== null && value !== undefined && value !== ''; - })); + const parameters = Object.fromEntries( + Object.entries(this.parameterMap) + .map(([key, prop]) => { + return [key, this[prop]]; + }) + .filter(([key, value]) => { + return value !== null && value !== undefined && value !== ''; + }), + ); return { ...parameters, ...this.additionalParameters, }; }, set(value) { - Object.entries(this.parameterMap) - .forEach(([key, prop]) => { - if (value.hasOwnProperty(key)) { - this[prop] = value[key]; - } - }); + Object.entries(this.parameterMap).forEach(([key, prop]) => { + if (value.hasOwnProperty(key)) { + this[prop] = value[key]; + } + }); }, }, @@ -95,10 +89,12 @@ export default { if (_.isEmpty(this.visibleColumns)) { return null; } - return this.visibleColumns.map(column => column.field).join(','); + return this.visibleColumns.map((column) => column.field).join(','); }, set(value) { - this.visibleColumns = value.split(',').map(field => this.columns.find(column => column.field === field)); + this.visibleColumns = value + .split(',') + .map((field) => this.columns.find((column) => column.field === field)); }, }, @@ -114,7 +110,6 @@ export default { return false; }, - }, created() { @@ -137,7 +132,6 @@ export default { }, watch: { - parameters: { deep: true, handler(after, before) { @@ -148,14 +142,14 @@ export default { if (JSON.stringify(before) === JSON.stringify(after)) return; this.request(); this.pushState(); - } + }, }, loading: { immediate: true, handler(loading) { this.$progress.loading(this.listingKey, loading); - } + }, }, searchQuery(query) { @@ -164,14 +158,12 @@ export default { this.resetPage(); this.request(); this.pushState(); - } - + }, }, methods: { - request() { - if (! this.requestUrl) { + if (!this.requestUrl) { this.loading = false; return; } @@ -181,25 +173,30 @@ export default { if (this.source) this.source.abort(); this.source = new AbortController(); - this.$axios.get(this.requestUrl, { - params: this.parameters, - signal: this.source.signal - }).then(response => { - this.columns = response.data.meta.columns; - this.activeFilterBadges = {...response.data.meta.activeFilterBadges}; - this.items = Object.values(response.data.data); - this.meta = response.data.meta; - if (this.shouldRequestFirstPage) return this.request(); - this.loading = false; - this.initializing = false; - this.afterRequestCompleted(response); - }).catch(e => { - if (this.$axios.isCancel(e)) return; - this.loading = false; - this.initializing = false; - if (e.request && ! e.response) return; - this.$toast.error(e.response ? e.response.data.message : __('Something went wrong'), { duration: null }); - }) + this.$axios + .get(this.requestUrl, { + params: this.parameters, + signal: this.source.signal, + }) + .then((response) => { + this.columns = response.data.meta.columns; + this.activeFilterBadges = { ...response.data.meta.activeFilterBadges }; + this.items = Object.values(response.data.data); + this.meta = response.data.meta; + if (this.shouldRequestFirstPage) return this.request(); + this.loading = false; + this.initializing = false; + this.afterRequestCompleted(response); + }) + .catch((e) => { + if (this.$axios.isCancel(e)) return; + this.loading = false; + this.initializing = false; + if (e.request && !e.response) return; + this.$toast.error(e.response ? e.response.data.message : __('Something went wrong'), { + duration: null, + }); + }); }, afterRequestCompleted(response) { @@ -236,9 +233,11 @@ export default { const parameters = this.parameters; const keys = Object.keys(this.parameterMap); // This ensures no additionalParameters are added to the URL - const searchParams = new URLSearchParams(Object.fromEntries(keys - .filter(key => parameters.hasOwnProperty(key)) - .map(key => [key, parameters[key]]))); + const searchParams = new URLSearchParams( + Object.fromEntries( + keys.filter((key) => parameters.hasOwnProperty(key)).map((key) => [key, parameters[key]]), + ), + ); window.history.pushState({ parameters }, '', '?' + searchParams.toString()); }, @@ -254,8 +253,6 @@ export default { this.popping = false; }); }, - - } - -} + }, +}; diff --git a/resources/js/components/LoadingGraphic.vue b/resources/js/components/LoadingGraphic.vue index 9178e498d8..9efa3d14b8 100644 --- a/resources/js/components/LoadingGraphic.vue +++ b/resources/js/components/LoadingGraphic.vue @@ -1,15 +1,19 @@ - - - diff --git a/resources/js/components/Modal.vue b/resources/js/components/Modal.vue index f8d2bc03ab..36635b7a86 100644 --- a/resources/js/components/Modal.vue +++ b/resources/js/components/Modal.vue @@ -1,18 +1,11 @@ diff --git a/resources/js/components/Popover.vue b/resources/js/components/Popover.vue index 0c5d8b8ddd..4d4ac01099 100644 --- a/resources/js/components/Popover.vue +++ b/resources/js/components/Popover.vue @@ -1,24 +1,20 @@ @@ -26,34 +22,35 @@ import { computePosition, flip, shift, offset, autoUpdate } from '@floating-ui/dom'; export default { - props: { autoclose: { type: Boolean, - default: false + default: false, }, clickaway: { type: Boolean, - default: true + default: true, }, disabled: { type: Boolean, - default: false + default: false, }, offset: { type: Array, - default: () => [10, 0] + default: () => [10, 0], }, placement: { type: String, default: 'bottom-end', }, - class: { // Gets applied to the popover content. + class: { + // Gets applied to the popover content. type: String, }, - triggerClass: { // Gets applied to the trigger. + triggerClass: { + // Gets applied to the trigger. type: String, - } + }, }, data() { @@ -65,21 +62,18 @@ export default { provide: { popover: this.makeProvide(), }, - } + }; }, computed: { - targetClass() { return this.class; - } - + }, }, methods: { - computePosition() { - if (! this.$refs.trigger) return; + if (!this.$refs.trigger) return; computePosition(this.$refs.trigger.firstElementChild, this.$refs.popover, { placement: this.placement, @@ -103,19 +97,27 @@ export default { if (this.disabled) return; this.isOpen = true; - this.escBinding = this.$keys.bindGlobal('esc', e => this.close()); + this.escBinding = this.$keys.bindGlobal('esc', (e) => this.close()); this.$nextTick(() => { - this.cleanupAutoUpdater = autoUpdate(this.$refs.trigger.firstElementChild, this.$refs.popover, this.computePosition); - - this.$refs.popover.addEventListener('transitionend', () => { - this.$emit('opened'); - }, { once: true }); + this.cleanupAutoUpdater = autoUpdate( + this.$refs.trigger.firstElementChild, + this.$refs.popover, + this.computePosition, + ); + + this.$refs.popover.addEventListener( + 'transitionend', + () => { + this.$emit('opened'); + }, + { once: true }, + ); }); }, clickawayClose(e) { // If disabled or closed, do nothing. - if (! this.clickaway || ! this.isOpen) return; + if (!this.clickaway || !this.isOpen) return; // If clicking within the popover, or inside the trigger, do nothing. // These need to be checked separately, because the popover contents away. @@ -126,7 +128,7 @@ export default { }, close() { - if (! this.isOpen) return; + if (!this.isOpen) return; this.isOpen = false; this.$emit('closed'); @@ -145,7 +147,7 @@ export default { vm: { get: () => this }, }); return provide; - } - } -} + }, + }, +}; diff --git a/resources/js/components/Preference.js b/resources/js/components/Preference.js index 3f1bf0a985..940d9b8f69 100644 --- a/resources/js/components/Preference.js +++ b/resources/js/components/Preference.js @@ -15,21 +15,15 @@ export default class Preference { } set(key, value) { - return this.commitOnSuccessAndReturnPromise( - axios.post(this.url, {key, value}) - ); + return this.commitOnSuccessAndReturnPromise(axios.post(this.url, { key, value })); } append(key, value) { - return this.commitOnSuccessAndReturnPromise( - axios.post(this.url, {key, value, append: true}) - ); + return this.commitOnSuccessAndReturnPromise(axios.post(this.url, { key, value, append: true })); } - remove(key, value=null, cleanup=true) { - return this.commitOnSuccessAndReturnPromise( - axios.delete(`${this.url}/${key}`, { data: { value, cleanup } }) - ); + remove(key, value = null, cleanup = true) { + return this.commitOnSuccessAndReturnPromise(axios.delete(`${this.url}/${key}`, { data: { value, cleanup } })); } removeValue(key, value) { @@ -37,7 +31,7 @@ export default class Preference { } commitOnSuccessAndReturnPromise(promise) { - promise.then(response => { + promise.then((response) => { this.store.commit('statamic/preferences', response.data); }); diff --git a/resources/js/components/ResourceDeleter.vue b/resources/js/components/ResourceDeleter.vue index 76e7fe1845..b1aa7d67dc 100644 --- a/resources/js/components/ResourceDeleter.vue +++ b/resources/js/components/ResourceDeleter.vue @@ -13,30 +13,29 @@ diff --git a/resources/js/components/SessionExpiry.vue b/resources/js/components/SessionExpiry.vue index be24fb0dbe..039f7ee7e1 100644 --- a/resources/js/components/SessionExpiry.vue +++ b/resources/js/components/SessionExpiry.vue @@ -1,60 +1,52 @@ diff --git a/resources/js/components/SiteSelector.vue b/resources/js/components/SiteSelector.vue index 163685c202..f4eaa77a0b 100644 --- a/resources/js/components/SiteSelector.vue +++ b/resources/js/components/SiteSelector.vue @@ -1,32 +1,26 @@ diff --git a/resources/js/components/SvgIcon.vue b/resources/js/components/SvgIcon.vue index af0f5ef4be..8ec177208b 100644 --- a/resources/js/components/SvgIcon.vue +++ b/resources/js/components/SvgIcon.vue @@ -4,18 +4,18 @@ diff --git a/resources/js/components/Toasts.js b/resources/js/components/Toasts.js index 3958aaf492..aae10c1de4 100644 --- a/resources/js/components/Toasts.js +++ b/resources/js/components/Toasts.js @@ -1,20 +1,20 @@ export default class Toasts { - constructor(toasted) { this.toasted = toasted; } registerInterceptor(axios) { - axios.interceptors.response.use(response => { + axios.interceptors.response.use((response) => { const data = response?.data; if (!data) return response; - const promise = data instanceof Blob - ? data.text().then(text => JSON.parse(text)) - : new Promise(resolve => resolve(data)); + const promise = + data instanceof Blob + ? data.text().then((text) => JSON.parse(text)) + : new Promise((resolve) => resolve(data)); - promise.then(json => this.#displayToasts(json._toasts ?? [])); + promise.then((json) => this.#displayToasts(json._toasts ?? [])); return response; }); @@ -26,7 +26,7 @@ export default class Toasts { } #displayToasts(toasts) { - toasts.forEach(({type, message, duration}) => this[type](message, {duration})) + toasts.forEach(({ type, message, duration }) => this[type](message, { duration })); } #normalizeToastOptions(opts) { @@ -36,35 +36,47 @@ export default class Toasts { } success(message, opts) { - this.toasted.success(message, this.#normalizeToastOptions({ - iconPack: 'callback', - icon: (el) => { - el.innerHTML = ''; - return el; - }, - ...opts - })) + this.toasted.success( + message, + this.#normalizeToastOptions({ + iconPack: 'callback', + icon: (el) => { + el.innerHTML = + ''; + return el; + }, + ...opts, + }), + ); } info(message, opts) { - this.toasted.show(message, this.#normalizeToastOptions({ - iconPack: 'callback', - icon: (el) => { - el.innerHTML = ''; - return el; - }, - ...opts - })) + this.toasted.show( + message, + this.#normalizeToastOptions({ + iconPack: 'callback', + icon: (el) => { + el.innerHTML = + ''; + return el; + }, + ...opts, + }), + ); } error(message, opts) { - this.toasted.error(message, this.#normalizeToastOptions({ - iconPack: 'callback', - icon: (el) => { - el.innerHTML = ''; - return el; - }, - ...opts - })) + this.toasted.error( + message, + this.#normalizeToastOptions({ + iconPack: 'callback', + icon: (el) => { + el.innerHTML = + ''; + return el; + }, + ...opts, + }), + ); } } diff --git a/resources/js/components/UpdatesBadge.vue b/resources/js/components/UpdatesBadge.vue index 0809dc9926..16cb921264 100644 --- a/resources/js/components/UpdatesBadge.vue +++ b/resources/js/components/UpdatesBadge.vue @@ -5,46 +5,45 @@ diff --git a/resources/js/components/ValidationErrors.vue b/resources/js/components/ValidationErrors.vue index 7d8c8ce9c3..0243fe9ef0 100644 --- a/resources/js/components/ValidationErrors.vue +++ b/resources/js/components/ValidationErrors.vue @@ -1,32 +1,26 @@ diff --git a/resources/js/components/addons/Editions.vue b/resources/js/components/addons/Editions.vue index 619822152c..1f5c5d9e2c 100644 --- a/resources/js/components/addons/Editions.vue +++ b/resources/js/components/addons/Editions.vue @@ -1,6 +1,6 @@ @@ -23,13 +23,13 @@ diff --git a/resources/js/components/asset-containers/CreateForm.vue b/resources/js/components/asset-containers/CreateForm.vue index e8456f62d6..c71a6b065b 100644 --- a/resources/js/components/asset-containers/CreateForm.vue +++ b/resources/js/components/asset-containers/CreateForm.vue @@ -1,5 +1,4 @@ diff --git a/resources/js/components/asset-containers/EditForm.vue b/resources/js/components/asset-containers/EditForm.vue index 867a6ffbae..421f209559 100644 --- a/resources/js/components/asset-containers/EditForm.vue +++ b/resources/js/components/asset-containers/EditForm.vue @@ -1,5 +1,4 @@ diff --git a/resources/js/components/assets/AssetManager.vue b/resources/js/components/assets/AssetManager.vue index a2622ceaa6..6d94541cdf 100644 --- a/resources/js/components/assets/AssetManager.vue +++ b/resources/js/components/assets/AssetManager.vue @@ -1,35 +1,22 @@ diff --git a/resources/js/components/assets/Browser/Breadcrumbs.vue b/resources/js/components/assets/Browser/Breadcrumbs.vue index 033558b344..fc052c1fb7 100644 --- a/resources/js/components/assets/Browser/Breadcrumbs.vue +++ b/resources/js/components/assets/Browser/Breadcrumbs.vue @@ -1,30 +1,31 @@ diff --git a/resources/js/components/assets/Browser/Browser.vue b/resources/js/components/assets/Browser/Browser.vue index 95ae4df808..0404fca992 100644 --- a/resources/js/components/assets/Browser/Browser.vue +++ b/resources/js/components/assets/Browser/Browser.vue @@ -1,8 +1,7 @@ diff --git a/resources/js/components/assets/Browser/CreateFolder.vue b/resources/js/components/assets/Browser/CreateFolder.vue index ba04482b8e..06d2b228c6 100644 --- a/resources/js/components/assets/Browser/CreateFolder.vue +++ b/resources/js/components/assets/Browser/CreateFolder.vue @@ -1,15 +1,6 @@ diff --git a/resources/js/components/assets/Browser/Thumbnail.vue b/resources/js/components/assets/Browser/Thumbnail.vue index 7f25fef542..3ec63e337d 100644 --- a/resources/js/components/assets/Browser/Thumbnail.vue +++ b/resources/js/components/assets/Browser/Thumbnail.vue @@ -1,40 +1,36 @@ diff --git a/resources/js/components/assets/Editor/Editor.vue b/resources/js/components/assets/Editor/Editor.vue index e7e3a044e2..485e6980c0 100644 --- a/resources/js/components/assets/Editor/Editor.vue +++ b/resources/js/components/assets/Editor/Editor.vue @@ -1,205 +1,291 @@ - diff --git a/resources/js/components/assets/Editor/EditorActions.vue b/resources/js/components/assets/Editor/EditorActions.vue index cb0bc457d7..9cf12f7bca 100644 --- a/resources/js/components/assets/Editor/EditorActions.vue +++ b/resources/js/components/assets/Editor/EditorActions.vue @@ -1,5 +1,4 @@ diff --git a/resources/js/components/assets/Editor/FocalPointEditor.vue b/resources/js/components/assets/Editor/FocalPointEditor.vue index c8b7023d98..b781e57902 100644 --- a/resources/js/components/assets/Editor/FocalPointEditor.vue +++ b/resources/js/components/assets/Editor/FocalPointEditor.vue @@ -1,82 +1,90 @@ diff --git a/resources/js/components/assets/Editor/FocalPointPreviewFrame.vue b/resources/js/components/assets/Editor/FocalPointPreviewFrame.vue index 8c76b986f5..ebd3b6e88d 100644 --- a/resources/js/components/assets/Editor/FocalPointPreviewFrame.vue +++ b/resources/js/components/assets/Editor/FocalPointPreviewFrame.vue @@ -1,42 +1,39 @@ \ No newline at end of file + diff --git a/resources/js/components/assets/Editor/PdfViewer.vue b/resources/js/components/assets/Editor/PdfViewer.vue index e34f53884e..cae6bf30cc 100644 --- a/resources/js/components/assets/Editor/PdfViewer.vue +++ b/resources/js/components/assets/Editor/PdfViewer.vue @@ -1,20 +1,19 @@ diff --git a/resources/js/components/assets/Selector.vue b/resources/js/components/assets/Selector.vue index 1244cfcdb0..7dd9fe2cef 100644 --- a/resources/js/components/assets/Selector.vue +++ b/resources/js/components/assets/Selector.vue @@ -1,55 +1,46 @@ diff --git a/resources/js/components/assets/Upload.vue b/resources/js/components/assets/Upload.vue index 8fb5b5a3b7..da4cada3bc 100644 --- a/resources/js/components/assets/Upload.vue +++ b/resources/js/components/assets/Upload.vue @@ -1,34 +1,35 @@ - diff --git a/resources/js/components/assets/Uploader.vue b/resources/js/components/assets/Uploader.vue index 10da51639a..2a8021b1d7 100644 --- a/resources/js/components/assets/Uploader.vue +++ b/resources/js/components/assets/Uploader.vue @@ -4,82 +4,75 @@ import uniqid from 'uniqid'; import { h } from 'vue'; export default { - render() { const fileField = h('input', { class: { hidden: true }, attrs: { type: 'file', multiple: true }, - ref: 'nativeFileField' + ref: 'nativeFileField', }); - return h('div', { on: { - 'dragenter': this.dragenter, - 'dragover': this.dragover, - 'dragleave': this.dragleave, - 'drop': this.drop, - }}, [ - h('div', { class: { 'pointer-events-none': this.dragging }}, [ - fileField, - ...this.$slots.default({ dragging: this.enabled ? this.dragging : false }) - ]) - ]); + return h( + 'div', + { + on: { + dragenter: this.dragenter, + dragover: this.dragover, + dragleave: this.dragleave, + drop: this.drop, + }, + }, + [ + h('div', { class: { 'pointer-events-none': this.dragging } }, [ + fileField, + ...this.$slots.default({ dragging: this.enabled ? this.dragging : false }), + ]), + ], + ); }, - props: { enabled: { type: Boolean, - default: () => true + default: () => true, }, container: String, path: String, url: { type: String, default: () => cp_url('assets') }, extraData: { type: Object, - default: () => ({}) - } + default: () => ({}), + }, }, - data() { return { dragging: false, - uploads: [] - } + uploads: [], + }; }, - mounted() { this.$refs.nativeFileField.addEventListener('change', this.addNativeFileFieldSelections); }, - beforeUnmount() { this.$refs.nativeFileField.removeEventListener('change', this.addNativeFileFieldSelections); }, - watch: { - uploads(uploads) { this.$emit('updated', uploads); this.processUploadQueue(); - } - + }, }, - computed: { - activeUploads() { - return this.uploads.filter(u => u.instance.state === 'started'); - } - + return this.uploads.filter((u) => u.instance.state === 'started'); + }, }, - methods: { - browse() { this.$refs.nativeFileField.click(); }, @@ -140,7 +133,7 @@ export default { this.addFilesFromDirectory(entry, entry.name); } } else if (item.getAsFile) { - if (item.kind === "file" || ! item.kind) { + if (item.kind === 'file' || !item.kind) { this.addFile(item.getAsFile()); } } @@ -149,28 +142,29 @@ export default { addFilesFromDirectory(directory, path) { const reader = directory.createReader(); - const readEntries = () => reader.readEntries((entries) => { - if (!entries.length) return; - for (let entry of entries) { - if (entry.isFile) { - entry.file((file) => { - if (! file.name.startsWith('.')) { - file.relativePath = path; - this.addFile(file); - } - }); - } else if (entry.isDirectory) { - this.addFilesFromDirectory(entry, `${path}/${entry.name}`); + const readEntries = () => + reader.readEntries((entries) => { + if (!entries.length) return; + for (let entry of entries) { + if (entry.isFile) { + entry.file((file) => { + if (!file.name.startsWith('.')) { + file.relativePath = path; + this.addFile(file); + } + }); + } else if (entry.isDirectory) { + this.addFilesFromDirectory(entry, `${path}/${entry.name}`); + } } - } - // Handle directories with more than 100 files in Chrome - readEntries(); - }, console.error); + // Handle directories with more than 100 files in Chrome + readEntries(); + }, console.error); return readEntries(); }, addFile(file, data = {}) { - if (! this.enabled) return; + if (!this.enabled) return; const id = uniqid(); const upload = this.makeUpload(id, file, data); @@ -183,16 +177,16 @@ export default { errorMessage: null, errorStatus: null, instance: upload, - retry: (opts) => this.retry(id, opts) + retry: (opts) => this.retry(id, opts), }); }, findUpload(id) { - return this.uploads.find(u => u.id === id); + return this.uploads.find((u) => u.id === id); }, findUploadIndex(id) { - return this.uploads.findIndex(u => u.id === id); + return this.uploads.findIndex((u) => u.id === id); }, makeUpload(id, file, data = {}) { @@ -200,11 +194,11 @@ export default { url: this.url, form: this.makeFormData(file, data), headers: { - Accept: 'application/json' - } + Accept: 'application/json', + }, }); - upload.on('progress', progress => { + upload.on('progress', (progress) => { this.findUpload(id).percent = progress * 100; }); @@ -225,8 +219,8 @@ export default { ...this.extraData, container: this.container, folder: this.path, - _token: Statamic.$config.get('csrfToken') - } + _token: Statamic.$config.get('csrfToken'), + }; for (let key in parameters) { form.append(key, parameters[key]); @@ -244,12 +238,12 @@ export default { if (this.activeUploads.length) return; // Make sure we're not grabbing a running or failed upload - const upload = this.uploads.find(u => u.instance.state === 'new' && !u.errorMessage); + const upload = this.uploads.find((u) => u.instance.state === 'new' && !u.errorMessage); if (!upload) return; const id = upload.id; - upload.instance.upload().then(response => { + upload.instance.upload().then((response) => { let json = null; try { @@ -274,7 +268,7 @@ export default { handleUploadError(id, status, response) { const upload = this.findUpload(id); let msg = response?.message; - if (! msg) { + if (!msg) { if (status === 413) { msg = __('Upload failed. The file is larger than is allowed by your server.'); } else { @@ -295,8 +289,7 @@ export default { let file = this.findUpload(id).instance.form.get('file'); this.addFile(file, args); this.uploads.splice(this.findUploadIndex(id), 1); - } - } - -} + }, + }, +}; diff --git a/resources/js/components/assets/Uploads.vue b/resources/js/components/assets/Uploads.vue index 58df3dc98c..6dad3a8d87 100644 --- a/resources/js/components/assets/Uploads.vue +++ b/resources/js/components/assets/Uploads.vue @@ -1,6 +1,5 @@ - diff --git a/resources/js/components/blueprints/BlueprintResetter.vue b/resources/js/components/blueprints/BlueprintResetter.vue index f7d983b0d1..f5e8dff31b 100644 --- a/resources/js/components/blueprints/BlueprintResetter.vue +++ b/resources/js/components/blueprints/BlueprintResetter.vue @@ -14,23 +14,22 @@ diff --git a/resources/js/components/blueprints/Builder.vue b/resources/js/components/blueprints/Builder.vue index 314a291858..e213948207 100644 --- a/resources/js/components/blueprints/Builder.vue +++ b/resources/js/components/blueprints/Builder.vue @@ -1,7 +1,5 @@ diff --git a/resources/js/components/blueprints/Field.vue b/resources/js/components/blueprints/Field.vue index ef53d41dde..720c8ed2ba 100644 --- a/resources/js/components/blueprints/Field.vue +++ b/resources/js/components/blueprints/Field.vue @@ -1,20 +1,18 @@ diff --git a/resources/js/components/blueprints/Fields.vue b/resources/js/components/blueprints/Fields.vue index 9b5e8d3fa0..3ebbf1d7d5 100644 --- a/resources/js/components/blueprints/Fields.vue +++ b/resources/js/components/blueprints/Fields.vue @@ -1,9 +1,8 @@ diff --git a/resources/js/components/blueprints/ImportField.vue b/resources/js/components/blueprints/ImportField.vue index 047525157e..ad9a8a27c4 100644 --- a/resources/js/components/blueprints/ImportField.vue +++ b/resources/js/components/blueprints/ImportField.vue @@ -1,18 +1,28 @@ diff --git a/resources/js/components/blueprints/LinkFields.vue b/resources/js/components/blueprints/LinkFields.vue index 733cdb53d8..7de400933b 100644 --- a/resources/js/components/blueprints/LinkFields.vue +++ b/resources/js/components/blueprints/LinkFields.vue @@ -1,29 +1,26 @@