@mastors/flexer 1.1.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.
@@ -0,0 +1,16 @@
1
+ // @mastors/flexer — utilities/_flex-grow.scss
2
+ // flex-grow utility classes.
3
+ // ─────────────────────────────────────────────────────────────
4
+
5
+ @use "@mastors/core/scss/generators/class-generator" as gen;
6
+
7
+ @include gen.generate-utilities((
8
+ "flex-grow": (
9
+ property: flex-grow,
10
+ prefix: "grow",
11
+ values: (
12
+ "": 1, // .grow → flex-grow: 1
13
+ "0": 0, // .grow-0 → flex-grow: 0
14
+ ),
15
+ ),
16
+ ));
@@ -0,0 +1,13 @@
1
+ // @mastors/flexer — utilities/_flex-shorthand.scss
2
+ // flex shorthand utility classes (grow + shrink + basis combined).
3
+ // ─────────────────────────────────────────────────────────────
4
+
5
+ // .flex-1 → flex: 1 1 0% (grow, shrink, zero basis — the workhorse)
6
+ // .flex-auto → flex: 1 1 auto (grow, shrink, natural basis)
7
+ // .flex-initial→ flex: 0 1 auto (don't grow, shrink, natural basis — browser default)
8
+ // .flex-none → flex: none (no grow, no shrink, natural basis — rigid)
9
+
10
+ .flex-1 { flex: 1 1 0%; }
11
+ .flex-auto { flex: 1 1 auto; }
12
+ .flex-initial { flex: 0 1 auto; }
13
+ .flex-none { flex: none; }
@@ -0,0 +1,16 @@
1
+ // @mastors/flexer — utilities/_flex-shrink.scss
2
+ // flex-shrink utility classes.
3
+ // ─────────────────────────────────────────────────────────────
4
+
5
+ @use "@mastors/core/scss/generators/class-generator" as gen;
6
+
7
+ @include gen.generate-utilities((
8
+ "flex-shrink": (
9
+ property: flex-shrink,
10
+ prefix: "shrink",
11
+ values: (
12
+ "": 1, // .shrink → flex-shrink: 1
13
+ "0": 0, // .shrink-0 → flex-shrink: 0
14
+ ),
15
+ ),
16
+ ));
@@ -0,0 +1,18 @@
1
+ // @mastors/flexer — utilities/_flex-wrap.scss
2
+ // flex-wrap utility classes.
3
+ // ─────────────────────────────────────────────────────────────
4
+
5
+ @use "@mastors/core/scss/generators/class-generator" as gen;
6
+
7
+ @include gen.generate-utilities((
8
+ "flex-wrap": (
9
+ property: flex-wrap,
10
+ prefix: "flex",
11
+ values: (
12
+ "wrap": wrap,
13
+ "wrap-reverse": wrap-reverse,
14
+ "nowrap": nowrap,
15
+ ),
16
+ responsive: true,
17
+ ),
18
+ ));
@@ -0,0 +1,17 @@
1
+ // @mastors/flexer — utilities/_gap.scss
2
+ // Gap utilities for flex containers (from spacing tokens).
3
+ // ─────────────────────────────────────────────────────────────
4
+ //
5
+ // NOTE: Generic gap utilities (.gap-*, .gap-x-*, .gap-y-*) are already
6
+ // emitted by @mastors/core's utilities/_spacing.scss and work for both
7
+ // flex and grid containers. They do not need re-declaration here.
8
+ //
9
+ // This stub ensures the _index.scss @forward "gap" resolves without error.
10
+ // If flexer is used standalone (without core), uncomment the block below:
11
+
12
+ // @use "@mastors/core/scss/tokens/spacing" as sp;
13
+ // @each $key, $val in sp.$spacing-tokens {
14
+ // .gap-#{$key} { gap: $val; }
15
+ // .gap-x-#{$key} { column-gap: $val; }
16
+ // .gap-y-#{$key} { row-gap: $val; }
17
+ // }
@@ -0,0 +1,22 @@
1
+ // flexer/scss/utilities/_index.scss
2
+ // ─────────────────────────────────────────────────────────────
3
+
4
+ @forward "flex-display";
5
+ @forward "flex-direction";
6
+ @forward "flex-wrap";
7
+ @forward "flex-flow";
8
+ @forward "flex-grow";
9
+ @forward "flex-shrink";
10
+ @forward "flex-basis";
11
+ @forward "flex-shorthand";
12
+ @forward "justify-content";
13
+ @forward "justify-items";
14
+ @forward "justify-self";
15
+ @forward "align-content";
16
+ @forward "align-items";
17
+ @forward "align-self";
18
+ @forward "place-content";
19
+ @forward "place-items";
20
+ @forward "place-self";
21
+ @forward "order";
22
+ @forward "gap";
@@ -0,0 +1,23 @@
1
+ // @mastors/flexer — utilities/_justify-content.scss
2
+ // justify-content utility classes (main-axis alignment for flex items).
3
+ // ─────────────────────────────────────────────────────────────
4
+
5
+ @use "@mastors/core/scss/generators/class-generator" as gen;
6
+
7
+ @include gen.generate-utilities((
8
+ "justify-content": (
9
+ property: justify-content,
10
+ prefix: "justify",
11
+ values: (
12
+ "start": flex-start,
13
+ "end": flex-end,
14
+ "center": center,
15
+ "between": space-between,
16
+ "around": space-around,
17
+ "evenly": space-evenly,
18
+ "stretch": stretch,
19
+ "normal": normal,
20
+ ),
21
+ responsive: true,
22
+ ),
23
+ ));
@@ -0,0 +1,19 @@
1
+ // @mastors/flexer — utilities/_justify-items.scss
2
+ // justify-items utility classes (inline-axis alignment for all flex items).
3
+ // ─────────────────────────────────────────────────────────────
4
+
5
+ @use "@mastors/core/scss/generators/class-generator" as gen;
6
+
7
+ @include gen.generate-utilities((
8
+ "justify-items": (
9
+ property: justify-items,
10
+ prefix: "justify-items",
11
+ values: (
12
+ "start": start,
13
+ "end": end,
14
+ "center": center,
15
+ "stretch": stretch,
16
+ ),
17
+ responsive: true,
18
+ ),
19
+ ));
@@ -0,0 +1,20 @@
1
+ // @mastors/flexer — utilities/_justify-self.scss
2
+ // justify-self utility classes (inline-axis alignment for a single flex item).
3
+ // ─────────────────────────────────────────────────────────────
4
+
5
+ @use "@mastors/core/scss/generators/class-generator" as gen;
6
+
7
+ @include gen.generate-utilities((
8
+ "justify-self": (
9
+ property: justify-self,
10
+ prefix: "justify-self",
11
+ values: (
12
+ "auto": auto,
13
+ "start": start,
14
+ "end": end,
15
+ "center": center,
16
+ "stretch": stretch,
17
+ ),
18
+ responsive: true,
19
+ ),
20
+ ));
@@ -0,0 +1,23 @@
1
+ // @mastors/flexer — utilities/_order.scss
2
+ // order utility classes (visual ordering of flex items).
3
+ // ─────────────────────────────────────────────────────────────
4
+
5
+ @use "@mastors/core/scss/generators/class-generator" as gen;
6
+
7
+ // Named convenience values
8
+ @include gen.generate-utilities((
9
+ "order-named": (
10
+ property: order,
11
+ prefix: "order",
12
+ values: (
13
+ "first": -9999,
14
+ "last": 9999,
15
+ "none": 0,
16
+ ),
17
+ ),
18
+ ));
19
+
20
+ // Numeric scale: .order-{1–12}
21
+ @each $n in 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 {
22
+ .order-#{$n} { order: $n; }
23
+ }
@@ -0,0 +1,23 @@
1
+ // @mastors/flexer — utilities/_place-content.scss
2
+ // place-content shorthand (align-content + justify-content).
3
+ // ─────────────────────────────────────────────────────────────
4
+
5
+ @use "@mastors/core/scss/generators/class-generator" as gen;
6
+
7
+ @include gen.generate-utilities((
8
+ "place-content": (
9
+ property: place-content,
10
+ prefix: "place-content",
11
+ values: (
12
+ "center": center,
13
+ "start": start,
14
+ "end": end,
15
+ "between": space-between,
16
+ "around": space-around,
17
+ "evenly": space-evenly,
18
+ "stretch": stretch,
19
+ "baseline":baseline,
20
+ ),
21
+ responsive: true,
22
+ ),
23
+ ));
@@ -0,0 +1,20 @@
1
+ // @mastors/flexer — utilities/_place-items.scss
2
+ // place-items shorthand (align-items + justify-items).
3
+ // ─────────────────────────────────────────────────────────────
4
+
5
+ @use "@mastors/core/scss/generators/class-generator" as gen;
6
+
7
+ @include gen.generate-utilities((
8
+ "place-items": (
9
+ property: place-items,
10
+ prefix: "place-items",
11
+ values: (
12
+ "start": start,
13
+ "end": end,
14
+ "center": center,
15
+ "stretch": stretch,
16
+ "baseline":baseline,
17
+ ),
18
+ responsive: true,
19
+ ),
20
+ ));
@@ -0,0 +1,20 @@
1
+ // @mastors/flexer — utilities/_place-self.scss
2
+ // place-self shorthand (align-self + justify-self).
3
+ // ─────────────────────────────────────────────────────────────
4
+
5
+ @use "@mastors/core/scss/generators/class-generator" as gen;
6
+
7
+ @include gen.generate-utilities((
8
+ "place-self": (
9
+ property: place-self,
10
+ prefix: "place-self",
11
+ values: (
12
+ "auto": auto,
13
+ "start": start,
14
+ "end": end,
15
+ "center": center,
16
+ "stretch": stretch,
17
+ ),
18
+ responsive: true,
19
+ ),
20
+ ));