UNPKG

@codegouvfr/react-dsfr

Version:

French State Design System React integration library

1 lines 9.5 kB
{"version":3,"sources":["<no source>","file:///Users/ket/Documents/work/dsfr/src/dsfr/core/print.scss","file:///Users/ket/Documents/work/dsfr/src/dsfr/core/style/print/_module.scss","%3Cinput%20css%20zCRGwt%3E","file:///Users/ket/Documents/work/dsfr/src/dsfr/core/style/print/_typography.scss","file:///Users/ket/Documents/work/dsfr/src/dsfr/core/style/typography/tool/_styles.scss","file:///Users/ket/Documents/work/dsfr/src/dsfr/core/style/spacing/tool/_space.scss","file:///Users/ket/Documents/work/dsfr/src/dsfr/core/style/selector/tool/_pattern.scss","file:///Users/ket/Documents/work/dsfr/src/dsfr/core/style/print/_icon.scss"],"names":[],"mappings":"AAAA;;GAAA,ACAA,aCAA,aACE,YCEA,CCHF,YAKE,iBAAA,CADA,sBDMA,CCFF,EACE,SAAA,CACA,QDIA,CCDF,0BCaE,wBAAA,CAGE,4BAAA,CCIA,0BHbF,CIbW,0ECDX,gCAAA,CACA,wBLiBA,CACF","file":"core.print.min.css","sourcesContent":[null,"@media print {\n @import 'index';\n @import 'style/print';\n}\n","#{ns(no-print)} {\n display: none;\n}\n","@media print {\n .fr-no-print {\n display: none;\n }\n h1,\n h2,\n h3,\n h4 {\n page-break-after: avoid;\n break-after: avoid;\n }\n p {\n orphans: 3;\n widows: 3;\n }\n .fr-text--sm,\n .fr-text--xs {\n font-size: 1rem !important;\n line-height: 1.5rem !important;\n margin: var(--text-spacing);\n }\n [class^=fr-icon-], [class*=\" fr-icon-\"], [class^=fr-fi-], [class*=\" fr-fi-\"] {\n -webkit-print-color-adjust: exact;\n print-color-adjust: exact;\n }\n}","h1,\nh2,\nh3,\nh4 {\n page-break-after: avoid;\n break-after: avoid;\n}\n\np {\n orphans: 3;\n widows: 3;\n}\n\n#{ns(text)}--sm,\n#{ns(text)}--xs {\n @include text-style(md, true, true, null, true);\n}\n","////\n/// Core Tool : Typography build\n/// @group core\n////\n\n@use 'src/module/spacing';\n\n@function get-text-style($font-size) {\n @return map-get($text-styles, $font-size);\n}\n\n@function get-title-style($font-size) {\n @return map-get($title-styles, $font-size);\n}\n\n@mixin _stylize($font-size, $styles, $prepend, $append) {\n $style: map-get($styles, $font-size);\n\n @if $prepend == null {\n $prepend: '';\n }\n\n @if $append == null {\n $append: '';\n }\n\n font-size: #{$prepend} spacing.space($font-size) #{$append};\n\n @if map-has-key($style, line-height) {\n line-height: #{$prepend} spacing.space(map-get($style, line-height)) #{$append};\n }\n}\n\n@mixin _responsive-styles($settings, $styles, $is-responsive, $prepend, $append) {\n $breakpoints: map-get($settings, breakpoints);\n\n @if map-has-key($settings, weight) {\n font-weight: #{$prepend} map-get($font-weight-scale, map-get($settings, weight)) #{$append};\n }\n\n @if $is-responsive {\n @each $breakpoint, $size in $breakpoints {\n @if $breakpoint == first {\n @include _stylize($size, $styles, $prepend, $append);\n }\n @else {\n @include respond-from($breakpoint) {\n @include _stylize($size, $styles, $prepend, $append);\n }\n }\n }\n }\n @else {\n @if map-has-key($breakpoints, md) {\n @include _stylize(map-get($breakpoints, md), $styles);\n }\n @else {\n @include _stylize(map-get($breakpoints, first), $styles);\n }\n }\n}\n\n@mixin _space-text($settings) {\n @include margin( var(#{'--' + map-get($settings, 'margin') + '-spacing'}) );\n}\n\n@mixin text-style($name, $with-spacing: false, $is-responsive: true, $prepend: null, $important: false) {\n $settings: map-get($text-settings, $name);\n @if $settings {\n $append: '';\n @if $important {\n $append: ' !important';\n }\n\n @include _responsive-styles($settings, $text-styles, $is-responsive, $prepend, $append);\n\n @if $with-spacing {\n @include _space-text($settings);\n }\n }\n}\n\n@mixin title-style($name, $with-spacing: false, $is-responsive: true, $prepend: null, $important: false) {\n $settings: map-get($title-settings, $name);\n @if $settings {\n $append: '';\n @if $important {\n $append: ' !important';\n }\n\n @include _responsive-styles($settings, $title-styles, $is-responsive, $prepend, $append);\n\n @if $with-spacing {\n @include _space-text($settings);\n }\n }\n}\n\n@mixin _set-typography-var($name, $value, $bp: null) {\n @if $bp != null {\n @include respond-from(#{$bp}) {\n --#{$name}-spacing: #{space($value)};\n }\n }\n @else {\n --#{$name}-spacing: #{space($value)};\n }\n}\n\n@mixin set-title-margin($margin, $bp:null) {\n @include _set-typography-var(title, $margin, $bp);\n}\n\n@mixin set-text-margin($margin, $bp:null) {\n @include _set-typography-var(text, $margin, $bp);\n}\n\n@mixin set-display-margin($margin, $bp:null) {\n @include _set-typography-var(display, $margin, $bp);\n}\n","////\n/// Core Tool : Spacing space\n/// @group core\n////\n\n@use 'src/module/spacing';\n\n/// Set space property\n///\n/// @param {String} $property ['margin'] - propriété à appliquer à l'espacement `['margin', 'padding']`\n/// @param {Number | list} $value [2] - valeur de l'espacement en v ou w. peut être une liste si la direction n'est pas renseignée\n/// @param {String} $direction - direction de l'espacement `['x', 'y', 'top', 'right', 'bottom', 'left']`\n///\n/// @example scss - Set margin-bottom to 24px\n/// .foo {\n/// @include _spacing('margin', 6v, 'bottom');\n/// }\n@mixin _spacing($property: margin, $value: 0, $direction: null) {\n $v: spacing.space($value);\n @if $direction != null {\n @if $direction == 'x' {\n #{$property}-left: $v;\n #{$property}-right: $v;\n }\n @else if $direction == 'y' {\n #{$property}-top: $v;\n #{$property}-bottom: $v;\n }\n @else {\n #{$property}-#{$direction}: $v;\n }\n }\n @else {\n #{$property}: $v;\n }\n}\n\n@mixin _spacing-from($property: margin, $value: 0, $direction: null, $from: null) {\n @include respond-from($from) {\n @include _spacing($property, $value, $direction);\n }\n}\n\n@mixin padding($values: 0 0 0 0, $from: null) {\n @include _spacing-from(padding, $values, null, $from);\n}\n\n@mixin padding-x($value: 0, $from: null) {\n @include _spacing-from(padding, $value, 'x', $from);\n}\n\n@mixin padding-y($value: 0, $from: null) {\n @include _spacing-from(padding, $value, 'y', $from);\n}\n\n@mixin padding-top($value: 0, $from: null) {\n @include _spacing-from(padding, $value, 'top', $from);\n}\n\n@mixin padding-right($value: 0, $from: null) {\n @include _spacing-from(padding, $value, 'right', $from);\n}\n\n@mixin padding-bottom($value: 0, $from: null) {\n @include _spacing-from(padding, $value, 'bottom', $from);\n}\n\n@mixin padding-left($value: 0, $from: null) {\n @include _spacing-from(padding, $value, 'left', $from);\n}\n\n@mixin margin($values: 0 0 0 0, $from: null) {\n @include _spacing-from(margin, $values, null, $from);\n}\n\n@mixin margin-x($value: 0, $from: null) {\n @include _spacing-from(margin, $value, 'x', $from);\n}\n\n@mixin margin-y($value: 0, $from: null) {\n @include _spacing-from(margin, $value, 'y', $from);\n}\n\n@mixin margin-top($value: 0, $from: null) {\n @include _spacing-from(margin, $value, 'top', $from);\n}\n\n@mixin margin-right($value: 0, $from: null) {\n @include _spacing-from(margin, $value, 'right', $from);\n}\n\n@mixin margin-bottom($value: 0, $from: null) {\n @include _spacing-from(margin, $value, 'bottom', $from);\n}\n\n@mixin margin-left($value: 0, $from: null) {\n @include _spacing-from(margin, $value, 'left', $from);\n}\n","////\n/// Core Tool : Selector pattern\n/// @group core\n////\n\n@mixin _class-pattern($selector, $unify: true) {\n @if & == null {\n @at-root #{$selector} {\n @content;\n }\n }\n @else if $unify {\n @at-root #{selector-unify(&, $selector)} {\n @content;\n }\n }\n @else {\n #{$selector} {\n @content;\n }\n }\n}\n\n@mixin class-contains($unify: true, $patterns...) {\n\n @if length($patterns) == 1 and length(nth($patterns, 1)) > 1 {\n $patterns: nth($patterns, 1);\n }\n\n $selectors: '';\n\n @each $pattern in $patterns {\n $selectors: '#{$selectors}[class*=\"#{$pattern}\"]';\n }\n\n @include _class-pattern($selectors, $unify) {\n @content;\n }\n}\n\n@mixin class-not-contains($unify: true, $patterns...) {\n\n @if length($patterns) == 1 and length(nth($patterns, 1)) > 1 {\n $patterns: nth($patterns, 1);\n }\n\n $selectors: '';\n @each $pattern in $patterns {\n $selectors: '#{$selectors}:not([class*=\"#{$pattern}\"])';\n }\n\n @include _class-pattern($selectors, $unify) {\n @content;\n }\n}\n\n@mixin class-start-with($start, $unify: true) {\n @include _class-pattern(class-start-with($start), $unify) {\n @content;\n }\n}\n\n@mixin class-not-start-with($start, $unify: true) {\n @include _class-pattern(class-not-start-with($start), $unify) {\n @content;\n }\n}\n\n@mixin class-end-with($end, $unify: true) {\n @include _class-pattern(class-end-with($end), $unify) {\n @content;\n }\n}\n\n@mixin class-not-end-with($end, $unify: true) {\n @include _class-pattern(class-not-end-with($end), $unify) {\n @content;\n }\n}\n\n@mixin class-is-ns($unify: true) {\n @include class-start-with(ns('', ''), $unify) {\n @content;\n }\n}\n\n@mixin class-is-not-ns($unify: true) {\n @include class-not-start-with(ns('', ''), $unify) {\n @content;\n }\n}\n","////\n/// Core Module : Icons\n/// @group core\n////\n\n@include has-icon {\n -webkit-print-color-adjust: exact;\n print-color-adjust: exact;\n}\n"]}