@auriel/peppertino 0.3.0 → 0.4.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.
@@ -16,7 +16,7 @@ select {
16
16
  font-size: font-size('base');
17
17
  font-weight: map.get($font-weights, 'regular');
18
18
  color: $color-on-surface;
19
- background-color: #fff;
19
+ background-color: var(--pp-bg-select);
20
20
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2371717a' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
21
21
  background-repeat: no-repeat;
22
22
  background-position: right spacing(4) center;
@@ -38,7 +38,7 @@ select {
38
38
  &:disabled {
39
39
  opacity: 0.5;
40
40
  cursor: not-allowed;
41
- background-color: $color-neutral-100;
41
+ background-color: var(--pp-neutral-100);
42
42
  }
43
43
  }
44
44
 
@@ -64,7 +64,7 @@ select {
64
64
  font-size: font-size('base');
65
65
  font-weight: map.get($font-weights, 'regular');
66
66
  color: $color-on-surface;
67
- background: #fff;
67
+ background: var(--pp-bg-select);
68
68
  border: 1px solid $color-border;
69
69
  border-radius: map.get($radius, 'md');
70
70
  cursor: pointer;
@@ -103,7 +103,7 @@ select {
103
103
  top: calc(100% + spacing(1));
104
104
  left: 0;
105
105
  right: 0;
106
- background: #fff;
106
+ background: var(--pp-bg-select-panel);
107
107
  border: 1px solid $color-border;
108
108
  border-radius: map.get($radius, 'lg');
109
109
  box-shadow: $shadow-lg;
@@ -132,7 +132,7 @@ select {
132
132
 
133
133
  &:hover,
134
134
  &:focus {
135
- background: $color-neutral-100;
135
+ background: var(--pp-neutral-100);
136
136
  color: $color-on-surface;
137
137
  outline: none;
138
138
  }
@@ -8,8 +8,8 @@
8
8
  border-collapse: collapse;
9
9
  font-size: font-size('base');
10
10
  font-family: $font-sans;
11
- background: #fff;
12
- color: #000;
11
+ background: var(--pp-bg-card);
12
+ color: var(--pp-on-surface);
13
13
 
14
14
  th,
15
15
  td {
@@ -23,7 +23,7 @@
23
23
  th:first-child {
24
24
  font-weight: map.get($font-weights, 'bold');
25
25
  font-size: font-size('2xl');
26
- color: #000;
26
+ color: var(--pp-on-surface);
27
27
  white-space: nowrap;
28
28
  padding-left: 0;
29
29
  width: 1%;
@@ -31,7 +31,7 @@
31
31
 
32
32
  // Header row — no background, just a bottom divider
33
33
  thead tr {
34
- border-bottom: 1px solid $color-neutral-200;
34
+ border-bottom: 1px solid var(--pp-border);
35
35
  }
36
36
 
37
37
  thead th {
@@ -42,7 +42,7 @@
42
42
 
43
43
  // Body rows separated by a light divider
44
44
  tbody tr {
45
- border-bottom: 1px solid $color-neutral-200;
45
+ border-bottom: 1px solid var(--pp-border);
46
46
 
47
47
  &:last-child {
48
48
  border-bottom: none;
@@ -0,0 +1,243 @@
1
+ // PeppertinoCSS — Utilities
2
+ // Margin, padding, display, visibility, flex, grid helpers
3
+
4
+ @use 'sass:map';
5
+ @use 'sass:string';
6
+ @use 'base' as *;
7
+
8
+ // ─── Display ──────────────────────────────────────────────────────────────────
9
+ .d-block { display: block; }
10
+ .d-inline { display: inline; }
11
+ .d-inline-block { display: inline-block; }
12
+ .d-flex { display: flex; }
13
+ .d-inline-flex { display: inline-flex; }
14
+ .d-grid { display: grid; }
15
+ .d-inline-grid { display: inline-grid; }
16
+ .d-none { display: none; }
17
+ .d-contents { display: contents; }
18
+
19
+ // ─── Visibility ───────────────────────────────────────────────────────────────
20
+ .visible { visibility: visible; }
21
+ .invisible { visibility: hidden; }
22
+ .sr-only {
23
+ position: absolute;
24
+ width: 1px;
25
+ height: 1px;
26
+ padding: 0;
27
+ margin: -1px;
28
+ overflow: hidden;
29
+ clip: rect(0, 0, 0, 0);
30
+ white-space: nowrap;
31
+ border-width: 0;
32
+ }
33
+ .not-sr-only {
34
+ position: static;
35
+ width: auto;
36
+ height: auto;
37
+ padding: 0;
38
+ margin: 0;
39
+ overflow: visible;
40
+ clip: auto;
41
+ white-space: normal;
42
+ }
43
+
44
+ // ─── Opacity ──────────────────────────────────────────────────────────────────
45
+ .opacity-0 { opacity: 0; }
46
+ .opacity-25 { opacity: 0.25; }
47
+ .opacity-50 { opacity: 0.5; }
48
+ .opacity-75 { opacity: 0.75; }
49
+ .opacity-100 { opacity: 1; }
50
+
51
+ // ─── Spacing helpers — generate .m-*, .mt-*, .mx-*, .p-*, etc. ───────────────
52
+ // Keys: 0 1 2 3 4 5 6 8 10 12 16 20 24 32 + auto
53
+ // Sides: (none)=all, t=top, b=bottom, l=left, r=right, x=horizontal, y=vertical
54
+
55
+ $_sides: (
56
+ '': '',
57
+ 't': '-top',
58
+ 'b': '-bottom',
59
+ 'l': '-left',
60
+ 'r': '-right',
61
+ );
62
+
63
+ @each $abbr, $prop in $_sides {
64
+ @each $key, $value in $spacing {
65
+ .m#{$abbr}-#{$key} { margin#{$prop}: $value; }
66
+ .p#{$abbr}-#{$key} { padding#{$prop}: $value; }
67
+ }
68
+ .m#{$abbr}-auto { margin#{$prop}: auto; }
69
+ }
70
+
71
+ // x / y axes
72
+ @each $key, $value in $spacing {
73
+ .mx-#{$key} { margin-left: $value; margin-right: $value; }
74
+ .my-#{$key} { margin-top: $value; margin-bottom: $value; }
75
+ .px-#{$key} { padding-left: $value; padding-right: $value; }
76
+ .py-#{$key} { padding-top: $value; padding-bottom: $value; }
77
+ }
78
+ .mx-auto { margin-left: auto; margin-right: auto; }
79
+ .my-auto { margin-top: auto; margin-bottom: auto; }
80
+
81
+ // ─── Gap ──────────────────────────────────────────────────────────────────────
82
+ @each $key, $value in $spacing {
83
+ .gap-#{$key} { gap: $value; }
84
+ .gap-x-#{$key} { column-gap: $value; }
85
+ .gap-y-#{$key} { row-gap: $value; }
86
+ }
87
+
88
+ // ─── Flex helpers ─────────────────────────────────────────────────────────────
89
+ .flex-row { flex-direction: row; }
90
+ .flex-row-reverse { flex-direction: row-reverse; }
91
+ .flex-col { flex-direction: column; }
92
+ .flex-col-reverse { flex-direction: column-reverse; }
93
+
94
+ .flex-wrap { flex-wrap: wrap; }
95
+ .flex-nowrap { flex-wrap: nowrap; }
96
+ .flex-wrap-reverse { flex-wrap: wrap-reverse; }
97
+
98
+ .flex-1 { flex: 1 1 0%; }
99
+ .flex-auto { flex: 1 1 auto; }
100
+ .flex-none { flex: none; }
101
+ .flex-shrink-0 { flex-shrink: 0; }
102
+ .flex-grow { flex-grow: 1; }
103
+ .flex-grow-0 { flex-grow: 0; }
104
+
105
+ // Justify content
106
+ .justify-start { justify-content: flex-start; }
107
+ .justify-end { justify-content: flex-end; }
108
+ .justify-center { justify-content: center; }
109
+ .justify-between { justify-content: space-between; }
110
+ .justify-around { justify-content: space-around; }
111
+ .justify-evenly { justify-content: space-evenly; }
112
+
113
+ // Align items
114
+ .items-start { align-items: flex-start; }
115
+ .items-end { align-items: flex-end; }
116
+ .items-center { align-items: center; }
117
+ .items-baseline { align-items: baseline; }
118
+ .items-stretch { align-items: stretch; }
119
+
120
+ // Align self
121
+ .self-auto { align-self: auto; }
122
+ .self-start { align-self: flex-start; }
123
+ .self-end { align-self: flex-end; }
124
+ .self-center { align-self: center; }
125
+ .self-stretch { align-self: stretch; }
126
+
127
+ // ─── Grid helpers ─────────────────────────────────────────────────────────────
128
+ .grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
129
+ .grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
130
+ .grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
131
+ .grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
132
+ .grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
133
+ .grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
134
+ .grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
135
+
136
+ .grid-rows-1 { grid-template-rows: repeat(1, minmax(0, 1fr)); }
137
+ .grid-rows-2 { grid-template-rows: repeat(2, minmax(0, 1fr)); }
138
+ .grid-rows-3 { grid-template-rows: repeat(3, minmax(0, 1fr)); }
139
+ .grid-rows-4 { grid-template-rows: repeat(4, minmax(0, 1fr)); }
140
+
141
+ // Col span
142
+ .col-span-1 { grid-column: span 1 / span 1; }
143
+ .col-span-2 { grid-column: span 2 / span 2; }
144
+ .col-span-3 { grid-column: span 3 / span 3; }
145
+ .col-span-4 { grid-column: span 4 / span 4; }
146
+ .col-span-6 { grid-column: span 6 / span 6; }
147
+ .col-span-full { grid-column: 1 / -1; }
148
+
149
+ // Row span
150
+ .row-span-1 { grid-row: span 1 / span 1; }
151
+ .row-span-2 { grid-row: span 2 / span 2; }
152
+ .row-span-3 { grid-row: span 3 / span 3; }
153
+ .row-span-full { grid-row: 1 / -1; }
154
+
155
+ // ─── Width ────────────────────────────────────────────────────────────────────
156
+ .w-full { width: 100%; }
157
+ .w-screen { width: 100vw; }
158
+ .w-auto { width: auto; }
159
+ .w-fit { width: fit-content; }
160
+ .w-min { width: min-content; }
161
+ .w-max { width: max-content; }
162
+ .w-half { width: 50%; }
163
+
164
+ // ─── Height ───────────────────────────────────────────────────────────────────
165
+ .h-full { height: 100%; }
166
+ .h-screen { height: 100vh; }
167
+ .h-auto { height: auto; }
168
+ .h-fit { height: fit-content; }
169
+
170
+ // ─── Overflow ─────────────────────────────────────────────────────────────────
171
+ .overflow-auto { overflow: auto; }
172
+ .overflow-hidden { overflow: hidden; }
173
+ .overflow-visible { overflow: visible; }
174
+ .overflow-scroll { overflow: scroll; }
175
+ .overflow-x-auto { overflow-x: auto; }
176
+ .overflow-y-auto { overflow-y: auto; }
177
+ .overflow-x-hidden { overflow-x: hidden; }
178
+ .overflow-y-hidden { overflow-y: hidden; }
179
+
180
+ // ─── Position ─────────────────────────────────────────────────────────────────
181
+ .static { position: static; }
182
+ .relative { position: relative; }
183
+ .absolute { position: absolute; }
184
+ .fixed { position: fixed; }
185
+ .sticky { position: sticky; }
186
+
187
+ // ─── Z-index ──────────────────────────────────────────────────────────────────
188
+ @each $key, $value in $z {
189
+ .z-#{$key} { z-index: $value; }
190
+ }
191
+
192
+ // ─── Border radius ────────────────────────────────────────────────────────────
193
+ @each $key, $value in $radius {
194
+ .rounded-#{$key} { border-radius: $value; }
195
+ }
196
+ .rounded { border-radius: map.get($radius, 'base'); }
197
+
198
+ // ─── Box shadow ───────────────────────────────────────────────────────────────
199
+ .shadow-none { box-shadow: none; }
200
+ .shadow-sm { box-shadow: $shadow-sm; }
201
+ .shadow { box-shadow: $shadow; }
202
+ .shadow-md { box-shadow: $shadow-md; }
203
+ .shadow-lg { box-shadow: $shadow-lg; }
204
+ .shadow-xl { box-shadow: $shadow-xl; }
205
+
206
+ // ─── Pointer / cursor ────────────────────────────────────────────────────────
207
+ .cursor-default { cursor: default; }
208
+ .cursor-pointer { cursor: pointer; }
209
+ .cursor-not-allowed { cursor: not-allowed; }
210
+ .cursor-grab { cursor: grab; }
211
+ .cursor-text { cursor: text; }
212
+
213
+ .pointer-events-none { pointer-events: none; }
214
+ .pointer-events-auto { pointer-events: auto; }
215
+
216
+ // ─── User select ─────────────────────────────────────────────────────────────
217
+ .select-none { user-select: none; }
218
+ .select-text { user-select: text; }
219
+ .select-all { user-select: all; }
220
+ .select-auto { user-select: auto; }
221
+
222
+ // ─── Responsive display helpers ──────────────────────────────────────────────
223
+ // .sm-d-none, .md-d-flex, .xl-d-grid, .w2xl-d-none (2xl → w2xl, digit prefix invalid)
224
+ $_bp-aliases: (
225
+ 'sm': 'sm',
226
+ 'md': 'md',
227
+ 'lg': 'lg',
228
+ 'xl': 'xl',
229
+ '2xl': 'w2xl',
230
+ );
231
+
232
+ @each $bp, $alias in $_bp-aliases {
233
+ $val: map.get($breakpoints, $bp);
234
+ @media (min-width: $val) {
235
+ .#{$alias}-d-none { display: none; }
236
+ .#{$alias}-d-block { display: block; }
237
+ .#{$alias}-d-flex { display: flex; }
238
+ .#{$alias}-d-grid { display: grid; }
239
+ .#{$alias}-d-inline { display: inline; }
240
+ .#{$alias}-d-inline-flex { display: inline-flex; }
241
+ .#{$alias}-d-inline-block { display: inline-block; }
242
+ }
243
+ }