@nappr/nappr-styles 0.3.1 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/README.md +33 -20
  2. package/dist/styles.css +7462 -1
  3. package/dist/styles.css.map +1 -1
  4. package/dist/styles.min.css +3 -0
  5. package/dist/styles.min.css.map +1 -0
  6. package/docs/_coverpage.md +2 -2
  7. package/docs/_sidebar.md +2 -2
  8. package/docs/docs.theme.css +2 -1
  9. package/docs/docs.theme.css.map +1 -1
  10. package/docs/index.html +1 -1
  11. package/docs/pages/displays.md +26 -8
  12. package/docs/pages/grid.md +365 -0
  13. package/docs/pages/helpers.md +30 -18
  14. package/docs/pages/quick-start.md +100 -14
  15. package/docs/temp.scss +122 -0
  16. package/index.d.ts +25 -0
  17. package/package.json +48 -14
  18. package/sass/_globals.module.scss +43 -0
  19. package/sass/_globals.scss +78 -0
  20. package/sass/components/_.scss +1 -0
  21. package/sass/components/_badge.scss +58 -0
  22. package/sass/components/_button.scss +212 -0
  23. package/sass/components/scrollbar/_.scss +102 -0
  24. package/sass/configs/_.scss +7 -0
  25. package/sass/configs/_breakpoints.scss +12 -0
  26. package/sass/configs/_defaults.scss +6 -0
  27. package/sass/configs/_grid.scss +8 -0
  28. package/sass/configs/_palettes.scss +72 -0
  29. package/sass/configs/_spacing.scss +36 -0
  30. package/sass/configs/_text.scss +41 -0
  31. package/sass/configs/_themes.scss +24 -0
  32. package/sass/core/funcs/_list.scss +43 -0
  33. package/sass/core/funcs/_map.scss +42 -0
  34. package/sass/core/funcs/_math.scss +35 -0
  35. package/sass/core/funcs/_string.scss +47 -0
  36. package/sass/core/mixins/_.scss +3 -0
  37. package/{lib → sass/core}/mixins/_links.scss +2 -2
  38. package/sass/core/mixins/_media-queries.scss +22 -0
  39. package/sass/core/mixins/_typography.scss +26 -0
  40. package/sass/core/placeholders/_.scss +4 -0
  41. package/sass/core/placeholders/_dimensions.scss +16 -0
  42. package/sass/core/placeholders/_flexbox.scss +11 -0
  43. package/sass/core/placeholders/_lists.scss +41 -0
  44. package/sass/core/placeholders/_positions.scss +19 -0
  45. package/sass/core/placeholders/_typography.scss +10 -0
  46. package/sass/elements/_.scss +6 -0
  47. package/sass/elements/_dialog.scss +13 -0
  48. package/{lib/htmls → sass/elements}/_form.scss +28 -6
  49. package/sass/elements/_links.scss +21 -0
  50. package/sass/elements/_lists.scss +11 -0
  51. package/{lib/htmls → sass/elements}/_table.scss +2 -6
  52. package/sass/elements/_typography.scss +13 -0
  53. package/sass/layout/grid/_.scss +4 -0
  54. package/sass/layout/grid/_columns.scss +32 -0
  55. package/sass/layout/grid/_gaps.scss +42 -0
  56. package/sass/layout/grid/_grid.scss +130 -0
  57. package/sass/layout/grid/_offsets.scss +35 -0
  58. package/sass/main.scss +59 -0
  59. package/sass/resets/_.scss +5 -0
  60. package/sass/resets/_base.scss +69 -0
  61. package/sass/resets/_nappr.scss +82 -0
  62. package/sass/themes/_dark.scss +17 -0
  63. package/sass/themes/_dracula.scss +17 -0
  64. package/sass/themes/_github-light.scss +17 -0
  65. package/sass/themes/_light.scss +17 -0
  66. package/sass/themes/_monokai-pro.scss +17 -0
  67. package/sass/themes/_night-owl.scss +17 -0
  68. package/sass/themes/_nord.scss +17 -0
  69. package/sass/themes/_tokyo-night.scss +17 -0
  70. package/sass/utilities/_.scss +21 -0
  71. package/sass/utilities/_dimensions.scss +11 -0
  72. package/sass/utilities/_displays.scss +111 -0
  73. package/sass/utilities/_flexbox.scss +81 -0
  74. package/{lib/helpers → sass/utilities}/_floats.scss +10 -13
  75. package/sass/utilities/_lists.scss +86 -0
  76. package/sass/utilities/_negates.scss +121 -0
  77. package/sass/utilities/_palette.scss +11 -0
  78. package/sass/utilities/_scrolls.scss +67 -0
  79. package/sass/utilities/_spacers.scss +120 -0
  80. package/sass/utilities/_square-grid.scss +33 -0
  81. package/sass/utilities/_typography.scss +106 -0
  82. package/sass/utilities/_visibility.scss +60 -0
  83. package/sass/utilities/_wrap.scss +12 -0
  84. package/styles.scss +5 -1
  85. package/lib/_globals.scss +0 -16
  86. package/lib/_reset.scss +0 -223
  87. package/lib/customs/scrollbar.scss +0 -40
  88. package/lib/funcs/_.scss +0 -5
  89. package/lib/funcs/_get-color.scss +0 -3
  90. package/lib/funcs/_math.scss +0 -5
  91. package/lib/funcs/_merge-palette.scss +0 -12
  92. package/lib/funcs/_rem.scss +0 -104
  93. package/lib/funcs/_strings.scss +0 -35
  94. package/lib/grid/_.scss +0 -4
  95. package/lib/grid/_col.scss +0 -117
  96. package/lib/grid/_row.scss +0 -117
  97. package/lib/grid/_square.scss +0 -34
  98. package/lib/grid/_wrap.scss +0 -39
  99. package/lib/helpers/_.scss +0 -9
  100. package/lib/helpers/_displays.scss +0 -151
  101. package/lib/helpers/_flexbox.scss +0 -105
  102. package/lib/helpers/_margins.scss +0 -13
  103. package/lib/helpers/_negates.scss +0 -171
  104. package/lib/helpers/_scrolls.scss +0 -55
  105. package/lib/helpers/_texts.scss +0 -101
  106. package/lib/helpers/_visibility.scss +0 -34
  107. package/lib/htmls/_.scss +0 -4
  108. package/lib/htmls/_headings.scss +0 -29
  109. package/lib/htmls/_links.scss +0 -11
  110. package/lib/mixins/_.scss +0 -9
  111. package/lib/mixins/_border-radius.scss +0 -61
  112. package/lib/mixins/_border.scss +0 -48
  113. package/lib/mixins/_dimensions.scss +0 -48
  114. package/lib/mixins/_font-size.scss +0 -22
  115. package/lib/mixins/_line-height.scss +0 -19
  116. package/lib/mixins/_margin-padding.scss +0 -66
  117. package/lib/mixins/_root-variables.scss +0 -11
  118. package/lib/mixins/_theme.scss +0 -25
  119. package/lib/styles.scss +0 -19
  120. package/lib/variables/_.scss +0 -4
  121. package/lib/variables/_breakpoints.scss +0 -5
  122. package/lib/variables/_colors.scss +0 -60
  123. package/lib/variables/_defaults.scss +0 -53
  124. /package/{lib/helpers → sass/utilities}/_pointers.scss +0 -0
@@ -0,0 +1,17 @@
1
+ $theme: (
2
+ 'background': #011627,
3
+ 'panel': #001c38,
4
+ 'rollover': #09345c,
5
+ 'accent': #c792ea,
6
+ 'border': #1d3d5d,
7
+ 'text-primary': #efffef,
8
+ 'text-secondary': #637777,
9
+ 'text-disabled': #a0a0a0,
10
+ 'text-hover-bg': #f0f0f0,
11
+ 'text-active-bg': #e8f0fe,
12
+ 'state-success': #add793,
13
+ 'state-warning': #ffcb6b,
14
+ 'state-error': #ff5874,
15
+ 'state-info': #82aaff,
16
+ 'state-debug': #ff9800,
17
+ );
@@ -0,0 +1,17 @@
1
+ $theme: (
2
+ 'background': #2e3440,
3
+ 'panel': #3b4252,
4
+ 'rollover': #4c566a,
5
+ 'accent': #81a1c1,
6
+ 'border': #4c566a,
7
+ 'text-primary': #d8dee9,
8
+ 'text-secondary': #4c566a,
9
+ 'text-disabled': #a0a0a0,
10
+ 'text-hover-bg': #f0f0f0,
11
+ 'text-active-bg': #e8f0fe,
12
+ 'state-success': #a3be8c,
13
+ 'state-warning': #ebcb8b,
14
+ 'state-error': #bf616a,
15
+ 'state-info': #88c0d0,
16
+ 'state-debug': #ff9800,
17
+ );
@@ -0,0 +1,17 @@
1
+ $theme: (
2
+ 'background': #24283b,
3
+ 'panel': #414868,
4
+ 'rollover': #545c77,
5
+ 'accent': #7dcfff,
6
+ 'border': #444b6a,
7
+ 'text-primary': #c0cae8,
8
+ 'text-secondary': #444b6a,
9
+ 'text-disabled': #a0a0a0,
10
+ 'text-hover-bg': #f0f0f0,
11
+ 'text-active-bg': #e8f0fe,
12
+ 'state-success': #9ece6a,
13
+ 'state-warning': #e0af68,
14
+ 'state-error': #f7768e,
15
+ 'state-info': #7dcfff,
16
+ 'state-debug': #ff9800,
17
+ );
@@ -0,0 +1,21 @@
1
+ @use 'dimensions';
2
+ @use 'displays';
3
+ @use 'flexbox';
4
+ @use 'floats';
5
+ @use 'negates';
6
+ @use 'palette';
7
+ @use 'pointers';
8
+ @use 'scrolls';
9
+ @use 'spacers';
10
+ @use 'square-grid';
11
+ @use 'typography';
12
+ @use 'visibility';
13
+ @use 'wrap';
14
+
15
+ // @use 'lists';
16
+
17
+ body {
18
+ color: var(--nappr-theme-text-secondary);
19
+ font-family: var(--nappr-text-font-family);
20
+ font-size: var(--nappr-text-font-size);
21
+ }
@@ -0,0 +1,11 @@
1
+ @use '../core/funcs/list' as list;
2
+ @use '../core/funcs/math' as math;
3
+
4
+ // ==========================================================
5
+ // UTILITY CLASSES
6
+ // ==========================================================
7
+ @each $size in list.steps(5, 100) {
8
+ .nappr-w-#{$size} {
9
+ width: math.number-to-percent($size);
10
+ }
11
+ }
@@ -0,0 +1,111 @@
1
+ @use '../core/placeholders/' as *;
2
+
3
+ // ==========================================================
4
+ // VERTICAL ALIGNMENT
5
+ // ==========================================================
6
+
7
+ @each $key in (top, middle, bottom, baseline, sub, super) {
8
+ .valign-#{$key} {
9
+ vertical-align: $key;
10
+ }
11
+ }
12
+
13
+ // ==========================================================
14
+ // DISPLAY TYPES
15
+ // ==========================================================
16
+
17
+ @each $key in (flex, grid, block, inline, inline-block, table, table-cell) {
18
+ .is-#{$key} {
19
+ display: $key;
20
+ }
21
+ }
22
+
23
+ // ==========================================================
24
+ // STRETCHING
25
+ // ==========================================================
26
+
27
+ .stretch-y {
28
+ bottom: 0;
29
+ top: 0;
30
+ }
31
+
32
+ .stretch-x {
33
+ left: 0;
34
+ right: 0;
35
+ }
36
+
37
+ // ==========================================================
38
+ // PLACEMENTS
39
+ // ==========================================================
40
+
41
+ @each $token,
42
+ $values
43
+ in (
44
+ 'tl': (
45
+ top,
46
+ left,
47
+ ),
48
+ 'br': (
49
+ bottom,
50
+ right,
51
+ ),
52
+ 'bl': (
53
+ bottom,
54
+ left,
55
+ ),
56
+ 'tr': (
57
+ top,
58
+ right,
59
+ )
60
+ )
61
+ {
62
+ .placement-#{$token} {
63
+ @each $value in $values {
64
+ #{$value}: 0;
65
+ }
66
+ }
67
+ }
68
+
69
+ // ==========================================================
70
+ // POSITIONING
71
+ // ==========================================================
72
+
73
+ @each $key in (relative, absolute, fixed, sticky) {
74
+ .is-#{$key} {
75
+ position: $key;
76
+ }
77
+ }
78
+
79
+ // ==========================================================
80
+ // COVERING and OVERLAYING
81
+ // ==========================================================
82
+
83
+ .is-cover {
84
+ @extend %is-all-edges;
85
+ }
86
+
87
+ .is-overlay {
88
+ @extend %is-all-edges;
89
+ @extend %position-absolute;
90
+ }
91
+
92
+ .is-overlay--fixed {
93
+ @extend %is-all-edges;
94
+ @extend %position-fixed;
95
+ }
96
+
97
+ // ==========================================================
98
+ // SIZES
99
+ // ==========================================================
100
+
101
+ .is-full-width {
102
+ @extend %is-full-width;
103
+ }
104
+
105
+ .is-full-height {
106
+ @extend %is-full-height;
107
+ }
108
+
109
+ .is-full-layout {
110
+ @extend %is-full-layout;
111
+ }
@@ -0,0 +1,81 @@
1
+ @use '../core/placeholders/' as *;
2
+ @use '../core/funcs/list' as list;
3
+
4
+ @each $value in list.steps(1, 12) {
5
+ .flex-#{$value} {
6
+ flex: #{$value};
7
+ }
8
+ }
9
+
10
+ @each $key, $direction in ('columns': row, 'rows': column) {
11
+ .flex-#{$key} {
12
+ @extend %flex-base;
13
+
14
+ flex-direction: $direction;
15
+ }
16
+
17
+ .flex-#{$key}-reverse {
18
+ flex-direction: #{$direction}-reverse;
19
+ }
20
+ }
21
+
22
+ .flex-wrap {
23
+ flex-wrap: wrap;
24
+ }
25
+
26
+ .flex-wrap-inverse {
27
+ flex-wrap: wrap-reverse;
28
+ }
29
+
30
+ .flex-wrapper {
31
+ @extend %flex-wrapper;
32
+ }
33
+
34
+ // ==========================================================
35
+ // Flexbox Layouts (Distribution)
36
+ // ==========================================================
37
+
38
+ @each $key,
39
+ $value
40
+ in (
41
+ 'start': flex-start,
42
+ 'center': center,
43
+ 'end': flex-end,
44
+ 'between': space-between,
45
+ 'around': space-around,
46
+ 'evenly': space-evenly,
47
+ 'stretch': stretch
48
+ )
49
+ {
50
+ .flex-#{$key} {
51
+ justify-content: $value;
52
+ }
53
+ }
54
+
55
+ // fait grandir les éléments eux-mêmes pour occuper l'espace disponible sur l'axe principal
56
+ .flex-justify > * {
57
+ flex: 1 1 auto;
58
+ }
59
+
60
+ // ==========================================================
61
+ // Items Spacers
62
+ // ==========================================================
63
+
64
+ @each $key,
65
+ $value
66
+ in (
67
+ 'start': flex-start,
68
+ 'center': center,
69
+ 'end': flex-end,
70
+ 'stretch': stretch,
71
+ 'baseline': baseline
72
+ )
73
+ {
74
+ .items-#{$key} {
75
+ align-items: $value;
76
+ }
77
+
78
+ .self-#{$key} {
79
+ align-self: $value;
80
+ }
81
+ }
@@ -1,3 +1,6 @@
1
+ // ==========================================================
2
+ // Utility Classes
3
+ // ==========================================================
1
4
  .clearfix {
2
5
  *zoom: 1;
3
6
 
@@ -22,18 +25,12 @@
22
25
  clear: both;
23
26
  }
24
27
 
25
- .clear-right {
26
- clear: right;
27
- }
28
-
29
- .clear-left {
30
- clear: left;
31
- }
32
-
33
- .float-left {
34
- float: left;
35
- }
28
+ @each $name in (right, left) {
29
+ .clear-#{$name} {
30
+ clear: $name;
31
+ }
36
32
 
37
- .float-right {
38
- float: right;
33
+ .float-#{$name} {
34
+ float: $name;
35
+ }
39
36
  }
@@ -0,0 +1,86 @@
1
+ @use '../core/placeholders/' as *;
2
+
3
+ // =================================================================
4
+ // 1. Lists
5
+ // =================================================================
6
+
7
+ // --- 1.1. Unordered Lists ---
8
+
9
+ ul.list--styled,
10
+ ul.list--unstyled {
11
+ > li::marker {
12
+ font-size: calc(var(--xl-size) * 0.9);
13
+ }
14
+ }
15
+
16
+ ul.list--unstyled {
17
+ @extend %list-type--unstyled;
18
+ }
19
+
20
+ ul.list--styled {
21
+ @extend %list-type--styled;
22
+
23
+ list-style-type: disc;
24
+ }
25
+
26
+ // --- 1.2. Ordered Lists ---
27
+
28
+ ol.list--styled,
29
+ ol.list--unstyled {
30
+ counter-reset: li-counter;
31
+
32
+ > li {
33
+ counter-increment: li-counter;
34
+ }
35
+
36
+ > li::marker {
37
+ font-size: var(--xl-size);
38
+ font-weight: 700;
39
+ }
40
+ }
41
+
42
+ ol.list--unstyled {
43
+ @extend %list-type--unstyled;
44
+
45
+ > li::marker {
46
+ content: none;
47
+ }
48
+ }
49
+
50
+ ol.list--styled {
51
+ @extend %list-type--styled;
52
+
53
+ list-style-type: decimal;
54
+
55
+ > li::marker {
56
+ content: counters(li-counter, '.') '.  ';
57
+ }
58
+ }
59
+
60
+ // --- 1.3. Definition Lists ---
61
+
62
+ dl.list--styled,
63
+ dl.list--unstyled {
64
+ dd,
65
+ dl {
66
+ margin: 0;
67
+ }
68
+ }
69
+
70
+ dl.list--unstyled {
71
+ @extend %list-type--unstyled;
72
+
73
+ dd,
74
+ dl {
75
+ padding-inline-start: 0;
76
+ }
77
+ }
78
+
79
+ dl.list--styled {
80
+ @extend %list-type--styled;
81
+
82
+ dd,
83
+ dl {
84
+ padding-inline-start: 1rem;
85
+ }
86
+ }
@@ -0,0 +1,121 @@
1
+ @use '../core/funcs/map' as map;
2
+
3
+ // ==========================================================
4
+ // NEGATES
5
+ // ==========================================================
6
+
7
+ // --- TEXT DECORATION NEGATES (with link states) ---
8
+ @each $state in ('', ':hover', ':active', ':visited') {
9
+ .no-underline,
10
+ a.no-underline#{$state} {
11
+ text-decoration: none;
12
+ }
13
+
14
+ .no-no-underline,
15
+ a.no-no-underline#{$state} {
16
+ text-decoration: none !important;
17
+ }
18
+ }
19
+
20
+ // --- NEGATES ---
21
+ @each $name,
22
+ $config
23
+ in (
24
+ 'background': (
25
+ 'property': 'background',
26
+ 'value': none,
27
+ ),
28
+ 'events': (
29
+ 'property': 'pointer-events',
30
+ 'value': none,
31
+ ),
32
+ 'flex-grow': (
33
+ 'property': 'flex',
34
+ 'value': 0 1,
35
+ ),
36
+ 'flex-shrink': (
37
+ 'property': 'flex',
38
+ 'value': 1 0,
39
+ ),
40
+ 'float': (
41
+ 'property': 'float',
42
+ 'value': none,
43
+ ),
44
+ 'flex': (
45
+ 'property': 'flex',
46
+ 'value': none,
47
+ ),
48
+ 'margin': (
49
+ 'property': 'margin',
50
+ 'value': 0,
51
+ ),
52
+ 'padding': (
53
+ 'property': 'padding',
54
+ 'value': 0,
55
+ ),
56
+ 'border': (
57
+ 'property': 'border',
58
+ 'value': 0,
59
+ ),
60
+ 'radius': (
61
+ 'property': 'border-radius',
62
+ 'value': 0,
63
+ ),
64
+ 'outline': (
65
+ 'property': 'outline',
66
+ 'value': none,
67
+ ),
68
+ 'pointer': (
69
+ 'property': 'cursor',
70
+ 'value': default,
71
+ ),
72
+ 'select': (
73
+ 'property': 'user-select',
74
+ 'value': none,
75
+ ),
76
+ 'wrap': (
77
+ 'property': 'white-space',
78
+ 'value': nowrap,
79
+ )
80
+ )
81
+ {
82
+ $property: map.get($config, 'property');
83
+ $value: map.get($config, 'value');
84
+
85
+ .no-#{$name} {
86
+ #{$property}: #{$value};
87
+ }
88
+
89
+ .no-no-#{$name} {
90
+ #{$property}: #{$value} !important;
91
+ }
92
+ }
93
+
94
+ // --- UTILITY CLASSES ---
95
+ .no-click-allowed {
96
+ cursor: not-allowed;
97
+ }
98
+
99
+ .no-overflow {
100
+ overflow: hidden;
101
+ }
102
+
103
+ .no-no-overflow {
104
+ overflow: hidden !important;
105
+ }
106
+
107
+ .no-overflow-x {
108
+ overflow-x: hidden;
109
+ }
110
+
111
+ .no-no-overflow-x {
112
+ overflow-x: hidden !important;
113
+ }
114
+
115
+ .no-overflow-y {
116
+ overflow-y: hidden;
117
+ }
118
+
119
+ .no-no-overflow-y {
120
+ overflow-y: hidden !important;
121
+ }
@@ -0,0 +1,11 @@
1
+ // Applique la variable CSS locale --nappr-data-color à la couleur du texte.
2
+ // @example <div data-color="black" class="text-data-color">Texte noir</div>
3
+ .text-data-color {
4
+ color: var(--nappr-data-color);
5
+ }
6
+
7
+ // Applique la variable CSS locale --nappr-data-color au fond.
8
+ // @example <div data-color="black" class="bg-data-color">Fond noir</div>
9
+ .bg-data-color {
10
+ background-color: var(--nappr-data-color);
11
+ }
@@ -0,0 +1,67 @@
1
+ @use '../core/placeholders/' as *;
2
+
3
+ // ==========================================================
4
+ // Placeholders
5
+ // ==========================================================
6
+ %is-scrollbox {
7
+ @extend %is-full-layout;
8
+ @extend %position-absolute;
9
+
10
+ overflow: auto;
11
+ }
12
+
13
+ %is-scrollbox-y {
14
+ @extend %is-full-layout;
15
+ @extend %position-absolute;
16
+
17
+ overflow: hidden auto;
18
+ }
19
+
20
+ %scroll-x-auto {
21
+ overflow: auto hidden;
22
+ }
23
+
24
+ %scroll-y-auto {
25
+ overflow: hidden auto;
26
+ }
27
+
28
+ // ==========================================================
29
+ // Utility Classes
30
+ // ==========================================================
31
+ .scroll-x-only {
32
+ overflow: scroll hidden;
33
+ }
34
+
35
+ .scroll-y-only {
36
+ overflow: hidden scroll;
37
+ }
38
+
39
+ .scroll-x-auto {
40
+ @extend %scroll-x-auto;
41
+ }
42
+
43
+ .scroll-y-auto {
44
+ @extend %scroll-y-auto;
45
+ }
46
+
47
+ .scrollbox-wrapper {
48
+ @extend %position-relative;
49
+ }
50
+
51
+ .scrollbox {
52
+ @extend %is-scrollbox;
53
+ }
54
+
55
+ .scrollbox-y {
56
+ @extend %is-scrollbox;
57
+ @extend %scroll-y-auto;
58
+
59
+ height: auto;
60
+ }
61
+
62
+ .scrollbox-x {
63
+ @extend %is-scrollbox;
64
+ @extend %scroll-x-auto;
65
+
66
+ height: auto;
67
+ }