minolith 0.0.0

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 (68) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -0
  3. package/dist/css/minolith.css +196773 -0
  4. package/dist/css/minolith.css.map +1 -0
  5. package/dist/css/minolith.min.css +4 -0
  6. package/dist/css/minolith.min.css.map +1 -0
  7. package/package.json +46 -0
  8. package/src/animations/fade.scss +41 -0
  9. package/src/animations/index.scss +1 -0
  10. package/src/backgrounds/gingham.scss +47 -0
  11. package/src/backgrounds/index.scss +2 -0
  12. package/src/backgrounds/stripe.scss +33 -0
  13. package/src/base/index.scss +3 -0
  14. package/src/base/normalize.scss +389 -0
  15. package/src/base/tabula.scss +7 -0
  16. package/src/components/accordion.scss +115 -0
  17. package/src/components/badge.scss +95 -0
  18. package/src/components/button.scss +109 -0
  19. package/src/components/card.scss +53 -0
  20. package/src/components/footer.scss +8 -0
  21. package/src/components/hamburger.scss +152 -0
  22. package/src/components/header.scss +16 -0
  23. package/src/components/heading.scss +37 -0
  24. package/src/components/image.scss +7 -0
  25. package/src/components/index.scss +19 -0
  26. package/src/components/input.scss +220 -0
  27. package/src/components/label.scss +5 -0
  28. package/src/components/link.scss +28 -0
  29. package/src/components/list.scss +14 -0
  30. package/src/components/loader.scss +38 -0
  31. package/src/components/main.scss +5 -0
  32. package/src/components/message.scss +41 -0
  33. package/src/components/modal.scss +36 -0
  34. package/src/components/nav.scss +373 -0
  35. package/src/components/progress.scss +39 -0
  36. package/src/css-variables/animation.scss +11 -0
  37. package/src/css-variables/border.scss +16 -0
  38. package/src/css-variables/color.scss +262 -0
  39. package/src/css-variables/index.scss +6 -0
  40. package/src/css-variables/miscellaneous.scss +10 -0
  41. package/src/css-variables/typography.scss +19 -0
  42. package/src/functions/index.scss +1 -0
  43. package/src/functions/string.scss +17 -0
  44. package/src/icons/check.scss +21 -0
  45. package/src/icons/chevron.scss +30 -0
  46. package/src/icons/index.scss +2 -0
  47. package/src/layouts/container.scss +19 -0
  48. package/src/layouts/index.scss +2 -0
  49. package/src/minolith.scss +10 -0
  50. package/src/mixins/animation.scss +80 -0
  51. package/src/mixins/color.scss +33 -0
  52. package/src/mixins/index.scss +4 -0
  53. package/src/mixins/responsive.scss +220 -0
  54. package/src/utilities/border.scss +47 -0
  55. package/src/utilities/color.scss +217 -0
  56. package/src/utilities/decoration.scss +16 -0
  57. package/src/utilities/index.scss +7 -0
  58. package/src/utilities/positioning.scss +44 -0
  59. package/src/utilities/sizing.scss +109 -0
  60. package/src/utilities/spacing.scss +111 -0
  61. package/src/utilities/typography.scss +105 -0
  62. package/src/variables/animation.scss +8 -0
  63. package/src/variables/border.scss +56 -0
  64. package/src/variables/color.scss +415 -0
  65. package/src/variables/index.scss +7 -0
  66. package/src/variables/layout.scss +28 -0
  67. package/src/variables/miscellaneous.scss +10 -0
  68. package/src/variables/typography.scss +22 -0
@@ -0,0 +1,262 @@
1
+ @use "sass:map";
2
+ @use "sass:string";
3
+ @use "../variables/index.scss" as variables;
4
+ @use "../mixins/index.scss" as mixins;
5
+
6
+
7
+ :root {
8
+ $white-oklch: #{variables.$color-lightness-white} #{variables.$color-chroma-gray} #{variables.$color-hue-gray};
9
+ --#{variables.$prefix}color-white-oklch: #{$white-oklch};
10
+ --#{variables.$prefix}color-white: oklch(#{$white-oklch});
11
+
12
+ $black-oklch: #{variables.$color-lightness-black} #{variables.$color-chroma-gray} #{variables.$color-hue-gray};
13
+ --#{variables.$prefix}color-black-oklch: #{$black-oklch};
14
+ --#{variables.$prefix}color-black: oklch(#{$black-oklch});
15
+
16
+ @each $color in variables.$colors {
17
+ $name: map.get($color, "name");
18
+ $hue: map.get($color, "hue");
19
+ $chroma: map.get($color, "chroma");
20
+ $p: "0" !default;
21
+ @for $i from 1 through 19 {
22
+ $p: "" + ($i * 5);
23
+ @if (string.length($p) == 1) {
24
+ $p: "0" + $p;
25
+ }
26
+ $lightness: variables.$color-lightness-50 !default;
27
+ @if ($i < 10) {
28
+ $lightness-offset: (10 - $i) * variables.$color-lightness-offset-darker;
29
+ $lightness: variables.$color-lightness-50 - $lightness-offset;
30
+ } @else if ($i > 10) {
31
+ $lightness-offset: ($i - 10) * variables.$color-lightness-offset-lighter;
32
+ $lightness: variables.$color-lightness-50 + $lightness-offset;
33
+ } @else if ($i == 10) {
34
+ $lightness: variables.$color-lightness-50;
35
+ }
36
+
37
+ $oklch: #{$lightness} #{$chroma} #{$hue};
38
+
39
+ --#{variables.$prefix}color-#{$name}-#{$p}-oklch: #{$oklch};
40
+ --#{variables.$prefix}color-#{$name}-#{$p}: oklch(#{$oklch});
41
+ }
42
+ }
43
+
44
+ color-scheme: light;
45
+ }
46
+
47
+ @mixin setColor($colorShade, $colorName, $pseudoName, $componentName: "") {
48
+ $srcColorName: $colorName !default;
49
+ $destColorName: $colorName !default;
50
+ @if ($colorName == "default") {
51
+ $srcColorName: "gray";
52
+ }
53
+
54
+ $pseudo: "" !default;
55
+ @if ($pseudoName != "plain") {
56
+ $pseudo: "-#{$pseudoName}"
57
+ }
58
+
59
+ $component: "" !default;
60
+ @if ($componentName != "") {
61
+ $component: "-#{$componentName}"
62
+ }
63
+
64
+ $fore: map.get($colorShade, "fore");
65
+ @if ($fore != null) {
66
+ --#{variables.$prefix}color-#{$destColorName}#{$component}#{$pseudo}-fore:
67
+ var(--#{variables.$prefix}color-#{$srcColorName}-#{$fore});
68
+ --#{variables.$prefix}color-#{$destColorName}#{$component}#{$pseudo}-fore-oklch:
69
+ var(--#{variables.$prefix}color-#{$srcColorName}-#{$fore}-oklch);
70
+ }
71
+
72
+ $back: map.get($colorShade, "back");
73
+ @if ($back != null) {
74
+ --#{variables.$prefix}color-#{$destColorName}#{$component}#{$pseudo}-back:
75
+ var(--#{variables.$prefix}color-#{$srcColorName}-#{$back});
76
+ --#{variables.$prefix}color-#{$destColorName}#{$component}#{$pseudo}-back-oklch:
77
+ var(--#{variables.$prefix}color-#{$srcColorName}-#{$back}-oklch);
78
+ }
79
+
80
+ $border: map.get($colorShade, "border");
81
+ @if ($border != null) {
82
+ --#{variables.$prefix}color-#{$destColorName}#{$component}#{$pseudo}-border:
83
+ var(--#{variables.$prefix}color-#{$srcColorName}-#{$border});
84
+ }
85
+
86
+ $placeholder: map.get($colorShade, "placeholder");
87
+ @if ($placeholder != null) {
88
+ --#{variables.$prefix}color-#{$destColorName}#{$component}#{$pseudo}-placeholder:
89
+ var(--#{variables.$prefix}color-#{$srcColorName}-#{$placeholder});
90
+ }
91
+
92
+ $shadow: map.get($colorShade, "shadow");
93
+ @if ($shadow != null) {
94
+ --#{variables.$prefix}color-#{$destColorName}#{$component}#{$pseudo}-shadow:
95
+ var(--#{variables.$prefix}color-#{$srcColorName}-#{$shadow});
96
+ }
97
+ }
98
+
99
+ @mixin setColorShades($colorShades) {
100
+
101
+ @each $colorShade in $colorShades {
102
+ $name: map.get($colorShade, "name");
103
+
104
+ @include setColor($colorShade, "default", $name);
105
+
106
+ --#{variables.$prefix}color-default-code-back: var(--#{variables.$prefix}color-gray-10);
107
+
108
+ //#region accordion
109
+ $accordion: map.get($colorShade, "accordion");
110
+ @if ($accordion != null) {
111
+ @include setColor($accordion, "default", $name, "accordion");
112
+
113
+ $accordionSummary: map.get($accordion, "accordionSummary");
114
+ @if ($accordionSummary != null) {
115
+ @include setColor($accordionSummary, "default", $name, "accordion-summary");
116
+ }
117
+
118
+ $accordionDetails: map.get($accordion, "accordionDetails");
119
+ @if ($accordionDetails != null) {
120
+ @include setColor($accordionDetails, "default", $name, "accordion-details");
121
+ }
122
+ }
123
+ //#endregion accordion
124
+
125
+ //#region button
126
+ $button: map.get($colorShade, "button");
127
+ @if ($button != null) {
128
+ @include setColor($button, "default", $name, "button");
129
+ }
130
+ //#endregion button
131
+
132
+ //#region card
133
+ $card: map.get($colorShade, "card");
134
+ @if ($card != null) {
135
+ @include setColor($card, "default", $name, "card");
136
+
137
+ $cardHeader: map.get($card, "cardHeader");
138
+ @if ($cardHeader != null) {
139
+ @include setColor($cardHeader, "default", $name, "card-header");
140
+ }
141
+
142
+ $cardBody: map.get($card, "cardBody");
143
+ @if ($cardBody != null) {
144
+ @include setColor($cardBody, "default", $name, "card-body");
145
+ }
146
+
147
+ $cardFooter: map.get($card, "cardFooter");
148
+ @if ($cardFooter != null) {
149
+ @include setColor($cardFooter, "default", $name, "card-footer");
150
+ }
151
+ }
152
+ //#endregion card
153
+
154
+ //#region message
155
+ $message: map.get($colorShade, "message");
156
+ @if ($message != null) {
157
+ @include setColor($message, "default", $name, "message");
158
+
159
+ $messageHeader: map.get($message, "messageHeader");
160
+ @if ($messageHeader != null) {
161
+ @include setColor($messageHeader, "default", $name, "message-header");
162
+ }
163
+
164
+ $messageBody: map.get($message, "messageBody");
165
+ @if ($messageBody != null) {
166
+ @include setColor($messageBody, "default", $name, "message-body");
167
+ }
168
+ }
169
+ //#endregion message
170
+
171
+ @each $color in variables.$colors {
172
+ $colorName: map.get($color, "name");
173
+
174
+ @include setColor($colorShade, $colorName, $name);
175
+
176
+ //#region accordion
177
+ $accordion: map.get($colorShade, "accordion");
178
+ @if ($accordion != null) {
179
+ @include setColor($accordion, $colorName, $name, "accordion");
180
+
181
+ $accordionSummary: map.get($accordion, "accordionSummary");
182
+ @if ($accordionSummary != null) {
183
+ @include setColor($accordionSummary, $colorName, $name, "accordion-summary");
184
+ }
185
+
186
+ $accordionDetails: map.get($accordion, "accordionDetails");
187
+ @if ($accordionDetails != null) {
188
+ @include setColor($accordionDetails, $colorName, $name, "accordion-details");
189
+ }
190
+ }
191
+ //#endregion accordion
192
+
193
+ //#region button
194
+ $button: map.get($colorShade, "button");
195
+ @if ($button != null) {
196
+ @include setColor($button, $colorName, $name, "button");
197
+ }
198
+ //#endregion button
199
+
200
+ //#region card
201
+ $card: map.get($colorShade, "card");
202
+ @if ($card != null) {
203
+ @include setColor($card, $colorName, $name, "card");
204
+
205
+ $cardHeader: map.get($card, "cardHeader");
206
+ @if ($cardHeader != null) {
207
+ @include setColor($cardHeader, $colorName, $name, "card-header");
208
+ }
209
+
210
+ $cardBody: map.get($card, "cardBody");
211
+ @if ($cardBody != null) {
212
+ @include setColor($cardBody, $colorName, $name, "card-body");
213
+ }
214
+
215
+ $cardFooter: map.get($card, "cardFooter");
216
+ @if ($cardFooter != null) {
217
+ @include setColor($cardFooter, $colorName, $name, "card-footer");
218
+ }
219
+ }
220
+ //#endregion card
221
+
222
+ //#region message
223
+ $message: map.get($colorShade, "message");
224
+ @if ($message != null) {
225
+ @include setColor($message, $colorName, $name, "message");
226
+
227
+ $messageHeader: map.get($message, "messageHeader");
228
+ @if ($messageHeader != null) {
229
+ @include setColor($messageHeader, $colorName, $name, "message-header");
230
+ }
231
+
232
+ $messageBody: map.get($message, "messageBody");
233
+ @if ($messageBody != null) {
234
+ @include setColor($messageBody, $colorName, $name, "message-body");
235
+ }
236
+ }
237
+ //#endregion message
238
+ }
239
+ }
240
+ }
241
+
242
+ @mixin setColorLight() {
243
+ @include setColorShades(variables.$colorShadesLight);
244
+ color-scheme: light;
245
+ }
246
+
247
+ @mixin setColorDark() {
248
+ @include setColorShades(variables.$colorShadesDark);
249
+ color-scheme: dark;
250
+ }
251
+
252
+ :root {
253
+ @include setColorLight();
254
+ }
255
+
256
+ @include mixins.setCssVariableColorScheme("light") {
257
+ @include setColorLight();
258
+ }
259
+
260
+ @include mixins.setCssVariableColorScheme("dark") {
261
+ @include setColorDark();
262
+ }
@@ -0,0 +1,6 @@
1
+
2
+ @forward "./animation.scss";
3
+ @forward "./border.scss";
4
+ @forward "./color.scss";
5
+ @forward "./miscellaneous.scss";
6
+ @forward "./typography.scss";
@@ -0,0 +1,10 @@
1
+ @use "../variables/index.scss" as variables;
2
+
3
+ :root {
4
+ --#{variables.$prefix}z-index-tabula: #{variables.$z-index-tabula};
5
+
6
+ --#{variables.$prefix}z-index-modal: #{variables.$z-index-modal};
7
+ --#{variables.$prefix}z-index-modal-content: #{variables.$z-index-modal-content};
8
+
9
+ --#{variables.$prefix}z-index-header-is-sticky: #{variables.$z-index-header-is-sticky};
10
+ }
@@ -0,0 +1,19 @@
1
+ @use "../variables/index.scss" as variables;
2
+
3
+ :root {
4
+ --#{variables.$prefix}font-size-xsmall: #{variables.$font-size-xsmall};
5
+ --#{variables.$prefix}font-size-small: #{variables.$font-size-small};
6
+ --#{variables.$prefix}font-size-normal: #{variables.$font-size-normal};
7
+ --#{variables.$prefix}font-size-medium: #{variables.$font-size-medium};
8
+ --#{variables.$prefix}font-size-large: #{variables.$font-size-large};
9
+ --#{variables.$prefix}font-size-xlarge: #{variables.$font-size-xlarge};
10
+ --#{variables.$prefix}font-size-xxlarge: #{variables.$font-size-xxlarge};
11
+ --#{variables.$prefix}font-size-xxxlarge: #{variables.$font-size-xxxlarge};
12
+ --#{variables.$prefix}font-size-xxxxlarge: #{variables.$font-size-xxxxlarge};
13
+ --#{variables.$prefix}font-size-xxxxxlarge: #{variables.$font-size-xxxxxlarge};
14
+ --#{variables.$prefix}font-weight-light: #{variables.$font-weight-light};
15
+ --#{variables.$prefix}font-weight-normal: #{variables.$font-weight-normal};
16
+ --#{variables.$prefix}font-weight-medium: #{variables.$font-weight-medium};
17
+ --#{variables.$prefix}font-weight-semibold: #{variables.$font-weight-semibold};
18
+ --#{variables.$prefix}font-weight-bold: #{variables.$font-weight-bold};
19
+ }
@@ -0,0 +1 @@
1
+ @forward "./string.scss";
@@ -0,0 +1,17 @@
1
+ @function strReplace($str, $substr, $newsubstr, $all: false) {
2
+ $pos: str-index($str, $substr);
3
+
4
+ @while $pos != null {
5
+ $strlen: str-length($substr);
6
+ $start: str-slice($str, 0, $pos - 1);
7
+ $end: str-slice($str, $pos + $strlen);
8
+ $str: $start + $newsubstr + $end;
9
+
10
+ @if $all == true {
11
+ $pos: str-index($str, $substr);
12
+ } @else {
13
+ $pos: null;
14
+ }
15
+ }
16
+ @return $str;
17
+ }
@@ -0,0 +1,21 @@
1
+ @use "sass:map";
2
+ @use "../variables/index.scss" as variables;
3
+
4
+ .check {
5
+ background-color: transparent;
6
+ border-color: var(--color-default-fore);
7
+ border-radius: 25%;
8
+ border-style: solid;
9
+ border-width: 0 var(--border-width-medium) var(--border-width-medium) 0;
10
+ content: "";
11
+ display: inline-block;
12
+ height: 1rem;
13
+ transform: rotate(45deg);
14
+ width: 0.5rem;
15
+ @each $color in variables.$colors {
16
+ $colorName: map.get($color, "name");
17
+ &.is-#{$colorName} {
18
+ border-color: var(--color-#{$colorName}-fore);
19
+ }
20
+ }
21
+ }
@@ -0,0 +1,30 @@
1
+ @use "sass:map";
2
+ @use "../variables/index.scss" as variables;
3
+
4
+ $line-height: 0.2rem;
5
+
6
+ @mixin chevron() {
7
+ display: inline-block;
8
+ width: 1rem;
9
+ aspect-ratio: 5/3;
10
+ clip-path: polygon(
11
+ 0 0,
12
+ 0 #{$line-height},
13
+ 50% 100%,
14
+ 100% #{$line-height},
15
+ 100% 0,
16
+ 50% calc(100% - #{$line-height})
17
+ );
18
+ background: var(--color-default-fore);
19
+ @each $color in variables.$colors {
20
+ $colorName: map.get($color, "name");
21
+ &.is-#{$colorName} {
22
+ background: var(--color-#{$colorName}-fore);
23
+ }
24
+ }
25
+ @content;
26
+ }
27
+
28
+ .chevron {
29
+ @include chevron();
30
+ }
@@ -0,0 +1,2 @@
1
+ @forward "./check.scss";
2
+ @forward "./chevron.scss";
@@ -0,0 +1,19 @@
1
+
2
+ @use "../variables/index.scss" as variables;
3
+ @use "../mixins/index.scss" as mixins;
4
+
5
+ .container {
6
+ margin: 0 auto;
7
+ padding: 0 1rem;
8
+ position: relative;
9
+ width: auto;
10
+ @include mixins.screen("medium") {
11
+ max-width: variables.$breakpoint-medium;
12
+ }
13
+ @include mixins.screen("large") {
14
+ max-width: variables.$breakpoint-large;
15
+ }
16
+ @include mixins.screen("xlarge") {
17
+ max-width: variables.$breakpoint-xlarge;
18
+ }
19
+ }
@@ -0,0 +1,2 @@
1
+
2
+ @forward "./container.scss";
@@ -0,0 +1,10 @@
1
+ /*! minolith | MIT License | github.com/minominolyly/minolith */
2
+
3
+ @forward "./css-variables/index.scss";
4
+ @forward "./base/index.scss";
5
+ @forward "./animations/index.scss";
6
+ @forward "./icons/index.scss";
7
+ @forward "./components/index.scss";
8
+ @forward "./backgrounds/index.scss";
9
+ @forward "./layouts/index.scss";
10
+ @forward "./utilities/index.scss";
@@ -0,0 +1,80 @@
1
+ @use "../variables/index.scss" as variables;
2
+
3
+ @mixin animation() {
4
+ animation-fill-mode: both;
5
+ animation-duration: var(--#{variables.$prefix}animation-speed-normal);
6
+
7
+ &.is-infinite {
8
+ animation-iteration-count: infinite;
9
+ }
10
+
11
+ &.is-heavy {
12
+ animation-duration: var(--#{variables.$prefix}animation-speed-heavy);
13
+ }
14
+
15
+ &.is-slower {
16
+ animation-duration: var(--#{variables.$prefix}animation-speed-slower);
17
+ }
18
+
19
+ &.is-slow {
20
+ animation-duration: var(--#{variables.$prefix}animation-speed-slow);
21
+ }
22
+
23
+ &.is-fast {
24
+ animation-duration: var(--#{variables.$prefix}animation-speed-fast);
25
+ }
26
+
27
+ &.is-faster {
28
+ animation-duration: var(--#{variables.$prefix}animation-speed-faster);
29
+ }
30
+
31
+ &.is-flash {
32
+ animation-duration: var(--#{variables.$prefix}animation-speed-flash);
33
+ }
34
+
35
+ //#region direction
36
+ &.is-alternate {
37
+ animation-direction: alternate;
38
+ }
39
+
40
+ &.is-reverse {
41
+ animation-direction: reverse;
42
+ }
43
+ //#endregion direction
44
+
45
+ //#region timing-function
46
+ &.is-linear {
47
+ animation-timing-function: cubic-bezier(0, 0, 1, 1);
48
+ }
49
+
50
+ &.is-ease {
51
+ animation-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1);
52
+ }
53
+
54
+ &.is-ease-in {
55
+ animation-timing-function: cubic-bezier(0.42, 0, 1, 1);
56
+ }
57
+
58
+ &.is-ease-out {
59
+ animation-timing-function: cubic-bezier(0, 0, 0.58, 1);
60
+ }
61
+
62
+ &.is-ease-in-out {
63
+ animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
64
+ }
65
+ //#endregion timing-function
66
+
67
+ @for $sec from 1 through 10 {
68
+ &.is-delay-#{$sec} {
69
+ animation-delay: 1s * $sec;
70
+ }
71
+ }
72
+
73
+ @content;
74
+ }
75
+
76
+ @mixin reduce-motion() {
77
+ @media (print), (prefers-reduced-motion: reduce) {
78
+ @content;
79
+ }
80
+ }
@@ -0,0 +1,33 @@
1
+ @use "../variables/index.scss" as variables;
2
+
3
+ @mixin setCssVariableColorScheme($colorScheme: "") {
4
+ @if $colorScheme == "light" or $colorScheme == "dark" {
5
+ @media (prefers-color-scheme: $colorScheme) {
6
+ :root {
7
+ @content;
8
+ }
9
+ }
10
+ [data-color-scheme="#{$colorScheme}"] {
11
+ @content;
12
+ }
13
+ } @else {
14
+ [data-color-scheme="#{$colorScheme}"] {
15
+ @content;
16
+ }
17
+ }
18
+ }
19
+
20
+ @mixin setColorScheme($colorScheme: "") {
21
+ @if $colorScheme == "light" or $colorScheme == "dark" {
22
+ @media (prefers-color-scheme: $colorScheme) {
23
+ @content;
24
+ }
25
+ [data-color-scheme="#{$colorScheme}"] {
26
+ @content;
27
+ }
28
+ } @else {
29
+ [data-color-scheme="#{$colorScheme}"] {
30
+ @content;
31
+ }
32
+ }
33
+ }
@@ -0,0 +1,4 @@
1
+
2
+ @forward "./animation.scss";
3
+ @forward "./color.scss";
4
+ @forward "./responsive.scss";