@bccampus/ui-components 0.8.0 → 0.8.2

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.
package/README.md CHANGED
@@ -1,69 +1,3 @@
1
- # React + TypeScript + Vite
1
+ # @bccampus/ui-components
2
2
 
3
- This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4
-
5
- Currently, two official plugins are available:
6
-
7
- - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
8
- - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9
-
10
- ## Expanding the ESLint configuration
11
-
12
- If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
13
-
14
- ```js
15
- export default defineConfig([
16
- globalIgnores(['dist']),
17
- {
18
- files: ['**/*.{ts,tsx}'],
19
- extends: [
20
- // Other configs...
21
-
22
- // Remove tseslint.configs.recommended and replace with this
23
- tseslint.configs.recommendedTypeChecked,
24
- // Alternatively, use this for stricter rules
25
- tseslint.configs.strictTypeChecked,
26
- // Optionally, add this for stylistic rules
27
- tseslint.configs.stylisticTypeChecked,
28
-
29
- // Other configs...
30
- ],
31
- languageOptions: {
32
- parserOptions: {
33
- project: ['./tsconfig.node.json', './tsconfig.app.json'],
34
- tsconfigRootDir: import.meta.dirname,
35
- },
36
- // other options...
37
- },
38
- },
39
- ])
40
- ```
41
-
42
- You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
43
-
44
- ```js
45
- // eslint.config.js
46
- import reactX from 'eslint-plugin-react-x'
47
- import reactDom from 'eslint-plugin-react-dom'
48
-
49
- export default defineConfig([
50
- globalIgnores(['dist']),
51
- {
52
- files: ['**/*.{ts,tsx}'],
53
- extends: [
54
- // Other configs...
55
- // Enable lint rules for React
56
- reactX.configs['recommended-typescript'],
57
- // Enable lint rules for React DOM
58
- reactDom.configs.recommended,
59
- ],
60
- languageOptions: {
61
- parserOptions: {
62
- project: ['./tsconfig.node.json', './tsconfig.app.json'],
63
- tsconfigRootDir: import.meta.dirname,
64
- },
65
- // other options...
66
- },
67
- },
68
- ])
69
- ```
3
+ BCcampus React components
@@ -1,5 +1,6 @@
1
- import { atom } from "nanostores";
1
+ import { atom, onSet } from "nanostores";
2
2
  import { CompositeDataItem } from "../CompositeDataItem.js";
3
+ import { symmetricDifference } from "../../../../lib/set-operations.js";
3
4
  class AbstractSelectionManager {
4
5
  data;
5
6
  dataOptions;
@@ -16,6 +17,10 @@ class AbstractSelectionManager {
16
17
  } else {
17
18
  this.dataOptions.selectedKeys.forEach((selectedKey) => this.select(selectedKey));
18
19
  }
20
+ onSet(this.selectedKeys, ({ newValue, abort }) => {
21
+ const diff = symmetricDifference(this.selectedKeys.get(), newValue);
22
+ if (diff.size === 0) abort();
23
+ });
19
24
  }
20
25
  getSelectedKeys() {
21
26
  return this.selectedKeys.get();
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { c as cn } from "../../_chunks/utils.js";
3
3
  import { c as cva } from "../../_chunks/index2.js";
4
- const pageSectionVariants = cva("group @container/page-section relative w-full", {
4
+ const pageSectionVariants = cva("group @container/page-section relative w-full text-foreground", {
5
5
  variants: {
6
6
  px: {
7
7
  none: "px-0",
@@ -5,7 +5,7 @@ import { c as cn } from "../../../_chunks/utils.js";
5
5
  const captionVariants = cva("tracking-tight text-balance", {
6
6
  variants: {
7
7
  variant: {
8
- default: "scroll-mr-5 text-lg/5 font-bold text-secondary dark:text-foreground",
8
+ default: "scroll-mr-5 text-lg/5 font-bold text-secondary",
9
9
  light: "scroll-mr-4 text-sm/4 font-normal text-primary"
10
10
  }
11
11
  },
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@bccampus/ui-components",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
+ "description": "BCcampus React components",
4
5
  "type": "module",
5
6
  "exports": {
6
7
  ".": {
@@ -74,4 +75,4 @@
74
75
  "vite": "^7.3.1",
75
76
  "vite-plugin-dts": "^4.5.4"
76
77
  }
77
- }
78
+ }
@@ -60,7 +60,7 @@ function CardTitle({ size = "md", className, ...props }: CardTitleProps) {
60
60
  "heading-2": size === "md",
61
61
  "heading-3": size === "sm",
62
62
  },
63
- className
63
+ className,
64
64
  )}
65
65
  {...props}
66
66
  />
@@ -76,7 +76,7 @@ function CardSubtitle({ size = "md", className, ...props }: CardTitleProps) {
76
76
  "heading-3": size === "md",
77
77
  "text-base": size === "sm",
78
78
  },
79
- className
79
+ className,
80
80
  )}
81
81
  {...props}
82
82
  />
@@ -1,8 +1,9 @@
1
- import { atom, type PreinitializedWritableAtom } from "nanostores";
1
+ import { atom, onSet, type PreinitializedWritableAtom } from "nanostores";
2
2
  import type { CompositeData } from "../CompositeData";
3
3
  import { CompositeDataItem } from "../CompositeDataItem";
4
4
  import type { CompositeDataOptions, CompositeItemKey } from "../types";
5
5
  import type { SelectionManager, SelectionManagerOptions } from "./types";
6
+ import { symmetricDifference } from "@/lib";
6
7
 
7
8
  export abstract class AbstractSelectionManager<T extends object> implements SelectionManager<T> {
8
9
  protected data!: CompositeData<T>;
@@ -27,6 +28,11 @@ export abstract class AbstractSelectionManager<T extends object> implements Sele
27
28
  // Set default selected items
28
29
  this.dataOptions.selectedKeys.forEach((selectedKey) => this.select(selectedKey));
29
30
  }
31
+
32
+ onSet(this.selectedKeys, ({ newValue, abort }) => {
33
+ const diff = symmetricDifference(this.selectedKeys.get(), newValue);
34
+ if (diff.size === 0) abort();
35
+ });
30
36
  }
31
37
 
32
38
  getSelectedKeys() {
@@ -1,7 +1,7 @@
1
1
  import { cn } from "@/lib/utils";
2
2
  import { cva, type VariantProps } from "class-variance-authority";
3
3
 
4
- const pageSectionVariants = cva("group @container/page-section relative w-full", {
4
+ const pageSectionVariants = cva("group @container/page-section relative w-full text-foreground", {
5
5
  variants: {
6
6
  px: {
7
7
  none: "px-0",
@@ -6,7 +6,7 @@ import { cn } from "@/lib/utils";
6
6
  const captionVariants = cva("tracking-tight text-balance", {
7
7
  variants: {
8
8
  variant: {
9
- default: "scroll-mr-5 text-lg/5 font-bold text-secondary dark:text-foreground",
9
+ default: "scroll-mr-5 text-lg/5 font-bold text-secondary",
10
10
  light: "scroll-mr-4 text-sm/4 font-normal text-primary",
11
11
  },
12
12
  },
@@ -122,11 +122,11 @@
122
122
  --foreground: oklch(0.985 0 0);
123
123
  --card: oklch(0.141 0.005 285.823);
124
124
  --card-foreground: oklch(0.985 0 0);
125
- --popover: oklch(0.3741 0.0774 245.65);
125
+ --popover: oklch(0.141 0.005 285.823);
126
126
  --popover-foreground: oklch(0.985 0 0);
127
127
  --primary: oklch(0.985 0 0);
128
128
  --primary-foreground: oklch(0.3741 0.0774 245.65);
129
- --secondary: oklch(0.6058 0.103 199.86);
129
+ --secondary: oklch(0.9156 0.0315 200);
130
130
  --secondary-foreground: oklch(0 0 0);
131
131
  --muted: oklch(0.274 0.006 286.033);
132
132
  --muted-foreground: oklch(0.705 0.015 286.067);
@@ -9,11 +9,10 @@
9
9
  .heading-1,
10
10
  .heading-2,
11
11
  .heading-3 {
12
- font-family: var(--font-sans-accent);
13
- color: var(--primary);
12
+ @apply font-sans-accent text-primary font-normal;
13
+
14
14
  text-wrap: balance;
15
15
  letter-spacing: var(--tracking-tight);
16
- font-weight: var(--font-weight-normal);
17
16
  --tw-tracking: var(--tracking-tight);
18
17
  line-height: 1.125em;
19
18
  }
@@ -54,82 +53,66 @@
54
53
  }
55
54
 
56
55
  p {
57
- --tw-leading: --spacing(6);
58
- line-height: --spacing(6);
56
+ @apply leading-6 text-foreground;
59
57
  }
60
58
 
61
59
  a {
62
- text-decoration-line: underline;
63
- text-underline-offset: 4px;
60
+ @apply no-underline underline-offset-4;
64
61
 
65
62
  &:hover {
66
63
  @apply text-shadow-lg text-shadow-complement-1-50;
67
64
  }
68
65
 
69
66
  &:focus-visible {
70
- outline-color: var(--color-ring);
71
- outline-style: solid;
72
- outline-offset: 0;
73
- outline-width: calc(var(--spacing) * 0.5);
67
+ @apply outline-ring outline-offset-0 outline-solid outline-2;
74
68
  }
75
69
 
76
70
  &[data-slot] {
77
- @apply text-shadow-none;
78
- text-decoration-line: none;
71
+ @apply text-shadow-none no-underline;
79
72
  }
80
73
  }
81
74
 
82
75
  .bcc-typography {
83
76
  blockquote {
84
- color: var(--primary);
85
- font-family: var(--font-sans-accent);
86
- font-weight: var(--font-weight-medium);
87
-
88
- margin-inline: --spacing(4);
89
- margin-block: --spacing(6);
77
+ @apply text-primary font-sans-accent mx-4 my-6;
90
78
 
91
79
  & > cite {
92
80
  display: block;
93
81
  text-align: end;
94
82
  }
95
83
 
96
- @media (width >= 40rem) {
97
- margin-inline: --spacing(16);
84
+ @variant sm {
85
+ @apply mx-16;
98
86
  }
99
87
  }
100
88
 
101
89
  aside {
90
+ @apply w-xs mt-4 mb-2 mx-auto p-4 border-y-4 text-sidebar-accent-foreground bg-sidebar-accent border-sidebar-border;
91
+
102
92
  display: block;
103
93
  float: none;
104
- width: var(--container-xs);
105
- margin-block-start: --spacing(4);
106
- margin-block-end: --spacing(2);
107
- margin-inline: auto;
108
- padding: --spacing(4);
109
- border-block-width: var(--spacing);
110
94
 
111
- color: var(--color-sidebar-accent-foreground);
112
- background-color: var(--color-sidebar-accent);
113
- border-color: var(--color-sidebar-border);
95
+ @variant sm {
96
+ @apply mx-16;
97
+ }
114
98
 
115
99
  @media (width >= 40rem) {
100
+ @apply ml-2 border-y-0 border-s-4;
101
+
116
102
  float: inline-end;
117
- margin-left: --spacing(2);
118
- border-block-width: 0px;
119
- border-inline-start-width: var(--spacing);
120
103
  }
121
104
  }
122
105
 
123
106
  ul,
124
107
  ol {
125
- margin-left: --spacing(4);
108
+ @apply ml-4 text-foreground;
126
109
 
127
110
  & > li {
128
- margin-top: --spacing(2);
111
+ @apply mt-2;
129
112
  }
130
113
 
131
- @media (width >= 40rem) {
132
- margin-left: --spacing(8);
114
+ @variant sm {
115
+ @apply ml-8;
133
116
  }
134
117
  }
135
118
  ul {
@@ -153,247 +136,173 @@
153
136
  }
154
137
 
155
138
  dl {
156
- margin-top: --spacing(2);
139
+ @apply mt-2 text-foreground;
140
+
157
141
  & > dt {
158
- font-family: var(--font-sans-accent);
159
- font-weight: var(--font-weight-medium);
160
- font-style: italic;
161
- margin-top: calc(var(--spacing));
142
+ @apply font-sans-accent font-medium italic mt-1;
143
+
162
144
  &::after {
163
145
  content: ": ";
164
146
  }
165
147
  }
166
148
 
167
149
  & > dd {
168
- margin-left: --spacing(4);
169
- font-size: var(--text-sm);
150
+ @apply ml-4 text-sm;
170
151
  }
171
152
  }
172
153
 
173
154
  details {
174
- margin-top: --spacing(4);
175
- border-width: 1px;
176
- border-radius: var(--radius-container);
177
-
178
- transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke,
179
- --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
180
- transition-timing-function: var(--default-transition-timing-function);
181
- transition-duration: var(--default-transition-duration);
155
+ @apply text-foreground mt-4 border rounded transition ease-in duration-200;
182
156
 
183
157
  &:hover {
184
- background-color: var(--muted);
158
+ @apply bg-muted;
159
+ }
160
+
161
+ &:focus-within {
162
+ @apply outline-offset-0 outline-ring outline-2 outline-solid;
185
163
  }
186
164
 
187
165
  & > summary {
188
- border-radius: var(--radius-container);
189
- padding-inline: --spacing(4);
190
- padding-block: --spacing(2);
191
- list-style: none;
166
+ @apply rounded px-4 py-2 list-none;
192
167
 
193
168
  &::-webkit-details-marker {
194
169
  display: none;
195
170
  }
196
171
 
197
172
  &:focus-visible {
198
- outline-color: var(--color-ring);
199
- outline-style: solid;
200
- outline-offset: 0;
201
- outline-width: var(--spacing);
173
+ @apply outline-none;
202
174
  }
203
175
  }
204
176
 
205
177
  &[open] {
206
- background-color: var(--muted);
207
- & > summary {
208
- border-bottom-width: 1px;
178
+ @apply bg-muted;
209
179
 
210
- border-bottom-left-radius: 0;
211
- border-bottom-right-radius: 0;
180
+ & > summary {
181
+ @apply border-b rounded-br-none rounded-bl-none;
212
182
  }
213
183
 
214
184
  & > p {
215
- margin: 0;
216
- padding: --spacing(4);
185
+ @apply m-0 p-4;
217
186
  }
218
187
  }
219
188
  }
220
189
 
221
190
  details + details {
222
- margin-top: calc(var(--spacing));
191
+ @apply mt-1;
223
192
  }
224
193
 
225
194
  address {
226
- font-style: italic;
227
- margin-block: --spacing(4);
195
+ @apply text-foreground italic my-4;
228
196
  }
229
197
 
230
198
  code,
231
199
  kbd,
232
200
  samp {
233
- position: relative;
234
- color: var(--primary);
235
- font-family: var(--font-mono);
236
- font-size: var(--text-sm);
237
- font-weight: var(--font-weight-medium);
201
+ @apply relative text-sm text-primary font-mono font-medium;
238
202
  }
239
203
 
240
204
  code {
241
- background-color: var(--color-muted);
242
- border-radius: var(--radius-sm);
243
-
244
- padding-inline: --spacing(2);
245
- padding-block: var(--spacing);
205
+ @apply bg-muted rounded-sm px-2 py-1;
246
206
  }
247
207
 
248
208
  kbd {
249
- text-shadow: var(--text-shadow-sm);
209
+ @apply text-shadow-sm;
210
+
250
211
  > kbd {
251
- white-space: nowrap;
252
- padding-inline: --spacing(2);
253
- padding-block: var(--spacing);
254
- background-color: var(--color-muted);
255
- border-radius: var(--radius-sm);
256
- border-width: 1px;
257
- box-shadow: 0 1px 1px color-mix(in oklab, var(--color-foreground) 20%, transparent),
212
+ @apply px-2 py-1 bg-muted rounded-sm border whitespace-nowrap;
213
+
214
+ box-shadow:
215
+ 0 1px 1px color-mix(in oklab, var(--color-foreground) 20%, transparent),
258
216
  0 2px 0 0 color-mix(in oklab, var(--color-background) 20%, transparent) inset;
259
217
  }
260
218
  }
261
219
 
262
220
  pre {
263
- background-color: var(--color-muted);
264
- border-radius: var(--radius-sm);
265
- padding: --spacing(4);
266
- line-height: var(--text-lg--line-height);
267
- font-size: var(--text-sm);
221
+ @apply bg-muted text-foreground rounded-sm p-4 leading-6 text-sm;
268
222
 
269
223
  code {
270
- padding: 0px;
224
+ @apply p-0;
271
225
  }
272
226
  }
273
227
 
274
228
  del {
275
- text-decoration: none;
276
- background-color: var(--color-red-200);
277
- color: var(--foreground);
278
- padding-inline: var(--spacing);
279
- &:is(.dark *) {
280
- background-color: var(--color-red-900);
229
+ @apply no-underline bg-red-200 text-foreground px-1;
230
+
231
+ @variant dark {
232
+ @apply bg-red-900;
281
233
  }
282
234
  }
283
235
 
284
236
  ins {
285
- text-decoration: none;
286
- background-color: var(--color-green-200);
287
- color: var(--foreground);
288
- padding-inline: var(--spacing);
289
- &:is(.dark *) {
290
- background-color: var(--color-green-900);
237
+ @apply no-underline bg-green-200 text-foreground px-1;
238
+
239
+ @variant dark {
240
+ @apply bg-green-900;
291
241
  }
292
242
  }
293
243
 
294
244
  mark {
295
- text-decoration: none;
296
- color: var(--foreground);
297
- background-color: var(--color-teal-100);
298
- padding-inline: var(--spacing);
299
- &:is(.dark *) {
300
- background-color: var(--color-teal-900);
245
+ @apply no-underline bg-amber-100 text-foreground px-1;
246
+
247
+ @variant dark {
248
+ @apply bg-amber-900;
301
249
  }
302
250
  }
303
251
 
304
252
  abbr {
305
- text-underline-offset: 4px;
253
+ @apply underline-offset-4;
306
254
  }
307
255
 
308
256
  small {
309
- font-size: var(--text-sm);
310
- line-height: --spacing(6);
257
+ @apply text-sm leading-4;
311
258
  }
312
259
 
313
260
  /* Table */
314
261
  .scroll-enclosure {
315
- position: relative;
316
- display: block;
317
- width: 100%;
318
- overflow: auto;
262
+ @apply relative block w-full overflow-auto;
319
263
  }
320
264
 
321
265
  .bordered-enclosure {
322
- border-width: 1px;
323
- border-radius: var(--radius-container);
266
+ @apply border rounded;
324
267
  }
325
268
 
326
269
  table.no-wrap {
327
270
  td {
328
- white-space: nowrap;
271
+ @apply whitespace-nowrap;
329
272
  }
330
273
  }
331
274
 
332
275
  table {
333
- table-layout: auto;
334
- position: relative;
335
- border-spacing: 0;
336
- border-collapse: separate;
337
- caption-side: bottom;
338
- background-color: var(--background);
339
-
340
- display: block;
341
- width: fit-content;
342
- max-width: 100%;
343
- overflow-x: auto;
344
- margin-inline: auto;
276
+ @apply table-auto relative block border-spacing-0 border-separate caption-bottom bg-background text-foreground w-fit max-w-full overflow-x-auto mx-auto;
345
277
 
346
278
  .scroll-enclosure > & {
347
- display: table;
348
- overflow-x: initial;
349
- width: 100%;
350
- height: 100%;
279
+ @apply table overflow-x-auto w-full h-full;
351
280
  }
352
281
  }
353
282
 
354
283
  caption {
355
- color: var(--muted-foreground);
356
- margin: 0px;
357
- padding: --spacing(2);
358
- border-top-width: 1px;
359
-
360
- text-align: center;
361
- font-family: var(--font-sans-accent);
362
- font-size: var(--text-sm);
363
- font-weight: var(--font-weight-medium);
364
- line-height: 1.5em;
284
+ @apply text-muted-foreground m-0 p-2 border-t text-center font-sans-accent text-sm font-medium leading-5;
365
285
  }
366
286
 
367
287
  tr {
368
- padding: 0px;
369
- margin: 0px;
288
+ @apply p-0 m-0;
370
289
  }
371
290
  th,
372
291
  td {
373
- padding-inline: --spacing(4);
374
- padding-block: --spacing(2);
375
- text-align: left;
376
- vertical-align: top;
377
- white-space: pre-wrap;
292
+ @apply px-4 py-2 text-left align-top whitespace-pre-wrap;
378
293
 
379
294
  &[align="center"] {
380
- text-align: center;
295
+ @apply text-center;
381
296
  }
382
297
  &[align="right"] {
383
- text-align: right;
298
+ @apply text-right;
384
299
  }
385
300
  }
386
301
 
387
302
  thead {
388
- position: sticky;
389
- z-index: 5;
390
- top: 0px;
303
+ @apply sticky z-5 top-0;
391
304
  & th {
392
- border-bottom-width: 1px;
393
- font-family: var(--font-sans-accent);
394
- font-weight: var(--font-weight-semibold);
395
- background-color: var(--color-background);
396
- vertical-align: bottom;
305
+ @apply bg-background text-foreground align-bottom font-sans-accent font-semibold border-b;
397
306
  }
398
307
  }
399
308
 
@@ -401,78 +310,54 @@
401
310
  & > tr:not(:last-child) {
402
311
  th,
403
312
  td {
404
- border-bottom-width: 1px;
313
+ @apply border-b;
405
314
  }
406
315
  }
407
316
  }
408
317
 
409
318
  tfoot {
410
- position: sticky;
411
- z-index: 5;
412
- bottom: 0px;
319
+ @apply sticky z-5 bottom-0;
413
320
  th,
414
321
  td {
415
- background-color: var(--muted);
416
- font-family: var(--font-sans-accent);
417
- font-weight: var(--font-weight-medium);
418
- border-top-width: 1px;
322
+ @apply bg-muted text-foreground font-sans-accent font-medium border-t;
419
323
  }
420
324
  }
421
325
 
422
326
  /* Media */
423
327
  :is(img, audio, video, iframe) {
424
- border-width: 1px;
425
- border-radius: var(--radius-container);
426
- overflow: hidden;
427
- max-width: 100%;
428
- margin-inline: auto;
328
+ @apply border rounded overflow-hidden max-w-full mx-auto;
429
329
  }
430
330
 
431
331
  :is(audio, video, iframe)::-webkit-media-controls-enclosure {
432
- border-radius: 0px;
332
+ @apply rounded-none;
433
333
  }
434
334
 
435
335
  video,
436
336
  iframe {
437
- object-fit: cover;
337
+ @apply object-cover;
438
338
  }
439
339
 
440
340
  /* Figure */
441
341
  figure {
442
- position: relative;
443
- border-width: 1px;
444
- border-radius: var(--radius-container);
445
- overflow: hidden;
446
- margin-inline: auto;
447
- width: fit-content;
448
- max-width: 100%;
342
+ @apply relative border rounded overflow-hidden mx-auto w-fit max-w-full;
449
343
 
450
344
  & > figcaption {
451
- color: var(--muted-foreground);
452
- margin: 0px;
453
- padding: --spacing(2);
454
- text-align: center;
455
- font-family: var(--font-sans-accent);
456
- font-size: var(--text-sm);
457
- font-weight: var(--font-weight-medium);
458
- line-height: 1.5em;
345
+ @apply text-muted-foreground m-0 p-2 text-center font-sans-accent text-sm font-medium leading-6;
459
346
 
460
347
  &:first-child {
461
- font-weight: var(--font-weight-bold);
462
- border-bottom-width: 1px;
348
+ @apply font-bold border-b;
463
349
  }
464
350
  &:last-child {
465
- border-top-width: 1px;
351
+ @apply border-t;
466
352
  }
467
353
  }
468
354
 
469
355
  :is(img, audio, video, iframe, .bordered-enclosure) {
470
- border-radius: 0;
471
- border: none;
356
+ @apply border-none rounded-none;
472
357
  }
473
358
 
474
359
  :is(img, video, iframe) {
475
- object-fit: contain;
360
+ @apply object-contain;
476
361
  }
477
362
  }
478
363
 
@@ -486,7 +371,7 @@
486
371
  pre,
487
372
  figure {
488
373
  &:not(:first-child) {
489
- margin-top: --spacing(4);
374
+ @apply mt-4;
490
375
  }
491
376
  }
492
377
  }
@@ -1,8 +1,8 @@
1
- import path from "path"
2
- import { fileURLToPath } from "url"
3
- import tailwindcss from "@tailwindcss/vite"
4
- import { defineConfig } from 'vite'
5
- import react from '@vitejs/plugin-react-swc'
1
+ import path from "path";
2
+ import { fileURLToPath } from "url";
3
+ import tailwindcss from "@tailwindcss/vite";
4
+ import { defineConfig } from "vite";
5
+ import react from "@vitejs/plugin-react-swc";
6
6
 
7
7
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
8
8
 
@@ -14,4 +14,4 @@ export default defineConfig({
14
14
  "@": path.resolve(__dirname, "./src"),
15
15
  },
16
16
  },
17
- })
17
+ });