{"version":3,"sources":["../../../src/govuk/settings/_warnings.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,2BAA2B;AAC3B,GAAG;AACH,gBAAgB;;AAEhB,0BAA0B;AAC1B,EAAE;AACF,2EAA2E;AAC3E,2EAA2E;AAC3E,qEAAqE;AACrE,8EAA8E;AAC9E,4EAA4E;AAC5E,EAAE;AACF,gFAAgF;AAChF,uEAAuE;AACvE,EAAE;AACF,iBAAiB;AACjB,wBAAwB;AACxB,wEAAwE;AACxE,sDAAsD;AACtD,kCAAkC;AAClC,aAAa;AACb,OAAO;AACP,EAAE;AACF,aAAa;AACb,iBAAiB;;AAEjB,uCAAuC;;AAEvC,WAAW;AACX,EAAE;AACF,2DAA2D;AAC3D,EAAE;AACF,sDAAsD;AACtD,EAAE;AACF,oFAAoF;AACpF,2EAA2E;AAC3E,4EAA4E;AAC5E,iEAAiE;AACjE,8EAA8E;AAC9E,wEAAwE;AACxE,EAAE;AACF,oFAAoF;AACpF,iEAAiE;AACjE,qEAAqE;AACrE,yEAAyE;AACzE,kCAAkC;AAClC,kBAAkB;;AAElB;EACE;IACE,mCAAmC;;IAEnC;MACE,iFAAiF;IACnF;EACF;AACF;;AAEA,mGAAmG;AACnG,EAAE;AACF,2GAA2G;AAC3G,kBAAkB;AAClB;EACE,yEAAyE;;EAEzE,sHAAsH;;EAEtH,qFAAqF;AACvF;;AAEA,kEAAkE;AAClE,EAAE;AACF,qFAAqF;AACrF,kBAAkB;;AAElB;EACE,4DAA4D;AAC9D;;AAEA,mEAAmE;AACnE,EAAE;AACF,iEAAiE;AACjE,+CAA+C;AAC/C,kBAAkB;;AAElB;EACE,yGAAyG;AAC3G","file":"_warnings.scss","sourcesContent":["////\n/// @group settings/warnings\n////\n@use \"sass:list\";\n\n/// Suppressed warnings map\n///\n/// This map is used to determine which deprecation warnings to **not** show\n/// to users when compiling sass. This is in place for codebases that do not\n/// have the necessary capacity to upgrade and remove the deprecation,\n/// particularly if the deprecation is significant. For example, the removal of\n/// mixins and functions that were previously available to users of Frontend.\n///\n/// You can add to this map and define which warnings to suppress by appending to\n/// it using the warning key, found in the warning message. For example:\n///\n/// @example scss:\n///   // warning message:\n///   //  $foobar is no longer supported. To silence this warning, update\n///   //  $govuk-suppressed-warnings with key: \"foobar\"\n///   $govuk-suppressed-warnings: (\n///     foobar\n///   );\n///\n/// @type List\n/// @access public\n\n$govuk-suppressed-warnings: () !default;\n\n/// Warnings\n///\n/// Acts as a wrapper for the built in `@warn` sass function\n///\n/// We use this instead of using `@warn` for 3 reasons:\n///\n/// - To check if a warning is being suppressed through `$govuk-suppressed-warnings`,\n/// in which case we don't call `@warn` and printing the warning to the user\n/// - To format the passed warning `$message` with the warning key at the end\n/// - To prevent duplicate warnings by adding the passed `$key` to\n/// `$govuk-suppressed-warnings` after `@warn` is called to ensure it only runs\n/// once per sass compilation (unless $silence-further-warnings is false)\n///\n/// @param {String} $key - The key to be checked against `$govuk-suppressed-warnings`\n/// and then passed to it to prevent multiple of the same warning.\n/// @param {String} $message - The message to use when calling `@warn`\n/// @param {Boolean} $silence-further-warnings - Whether to silence future\n/// warnings that use the same $key\n/// @access private\n\n@mixin _warning($key, $message, $silence-further-warnings: true) {\n  @if _should-warn($key) {\n    @warn _warning-text($key, $message);\n\n    @if $silence-further-warnings {\n      $govuk-suppressed-warnings: list.append($govuk-suppressed-warnings, $key) !global;\n    }\n  }\n}\n\n/// Logs a deprecation warning that the given component's `<COMPONENT_NAME>.scss` file is deprecated\n///\n/// @param {string} $component-name - The name of component, as it appears in the folder gathering its files\n/// @access private\n@mixin _component-scss-file-warning($component-name) {\n  $component-path: \"<PATH_TO_GOVUK_FRONTEND>/components/#{$component-name}\";\n\n  $message: \"Importing `#{$component-path}/#{$component-name}` is deprecated.\" + \" Import `#{$component-path}` instead.\";\n\n  @include _warning(\"component-scss-files\", $message, $silence-further-warnings: false);\n}\n\n/// Check whether a key is present in the suppressed warnings list.\n///\n/// @param {String} $key - The key to be checked against `$govuk-suppressed-warnings`.\n/// @access private\n\n@function _should-warn($key) {\n  @return list.index($govuk-suppressed-warnings, $key) == null;\n}\n\n/// Format a warning by appending information on how to suppress it.\n///\n/// @param {String} $key - The key needed to suppress the warning.\n/// @param {String} $message - The warning text.\n/// @access private\n\n@function _warning-text($key, $message) {\n  @return $message + \" To silence this warning, update $govuk-suppressed-warnings \" + 'with key: \"#{$key}\"';\n}\n"]}
