@fpkit/acss 3.2.1 → 3.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.
Files changed (63) hide show
  1. package/libs/chunk-KAR3HDXK.js +8 -0
  2. package/libs/chunk-KAR3HDXK.js.map +1 -0
  3. package/libs/chunk-M5JARVJD.cjs +18 -0
  4. package/libs/chunk-M5JARVJD.cjs.map +1 -0
  5. package/libs/components/alert/alert.min.min.css +2 -0
  6. package/libs/components/badge/badge.min.min.css +2 -0
  7. package/libs/components/box/box.min.min.css +2 -0
  8. package/libs/components/breadcrumbs/breadcrumb.min.min.css +2 -0
  9. package/libs/components/buttons/button.min.min.css +2 -0
  10. package/libs/components/card.cjs +6 -6
  11. package/libs/components/card.js +1 -1
  12. package/libs/components/cards/card-style.min.min.css +2 -0
  13. package/libs/components/cards/card.min.min.css +2 -0
  14. package/libs/components/cluster/cluster.min.min.css +2 -0
  15. package/libs/components/details/details.min.min.css +2 -0
  16. package/libs/components/dialog/dialog.min.min.css +2 -0
  17. package/libs/components/flexbox/flex.min.min.css +2 -0
  18. package/libs/components/form/form.min.min.css +2 -0
  19. package/libs/components/grid/grid.min.min.css +2 -0
  20. package/libs/components/icons/icon.min.min.css +2 -0
  21. package/libs/components/images/img.min.min.css +2 -0
  22. package/libs/components/layout/landmarks.min.min.css +2 -0
  23. package/libs/components/link/link.min.min.css +2 -0
  24. package/libs/components/list/list.min.min.css +2 -0
  25. package/libs/components/nav/nav.min.min.css +2 -0
  26. package/libs/components/progress/progress.min.min.css +2 -0
  27. package/libs/components/stack/stack.min.min.css +2 -0
  28. package/libs/components/styles/index.min.min.css +2 -0
  29. package/libs/components/tag/tag.min.min.css +2 -0
  30. package/libs/components/text-to-speech/text-to-speech.min.min.css +2 -0
  31. package/libs/index.cjs +27 -25
  32. package/libs/index.cjs.map +1 -1
  33. package/libs/index.css +1 -1
  34. package/libs/index.css.map +1 -1
  35. package/libs/index.d.cts +275 -1
  36. package/libs/index.d.ts +275 -1
  37. package/libs/index.js +10 -10
  38. package/libs/index.js.map +1 -1
  39. package/package.json +2 -2
  40. package/src/components/cards/card.stories.tsx +1 -1
  41. package/src/components/cards/card.tsx +46 -41
  42. package/src/components/col/README.mdx +532 -0
  43. package/src/components/col/col.stories.tsx +424 -0
  44. package/src/components/col/col.test.tsx +321 -0
  45. package/src/components/col/col.tsx +105 -0
  46. package/src/components/col/col.types.ts +76 -0
  47. package/src/components/row/README.mdx +324 -0
  48. package/src/components/row/row.stories.tsx +595 -0
  49. package/src/components/row/row.test.tsx +358 -0
  50. package/src/components/row/row.tsx +121 -0
  51. package/src/components/row/row.types.ts +93 -0
  52. package/src/index.scss +1 -0
  53. package/src/index.ts +2 -0
  54. package/src/sass/README.mdx +597 -0
  55. package/src/sass/_columns.scss +198 -0
  56. package/src/sass/columns.stories.tsx +456 -0
  57. package/src/styles/index.css +340 -0
  58. package/src/styles/index.css.map +1 -1
  59. package/src/types/layout-primitives.ts +61 -0
  60. package/libs/chunk-OU52NIKA.js +0 -8
  61. package/libs/chunk-OU52NIKA.js.map +0 -1
  62. package/libs/chunk-WWPLBWCQ.cjs +0 -18
  63. package/libs/chunk-WWPLBWCQ.cjs.map +0 -1
@@ -10,7 +10,7 @@ const meta: Meta<typeof Card> = {
10
10
  component: Card,
11
11
  args: {
12
12
  children: <p>{content}</p>,
13
- classes: "shadow-md",
13
+ classes: "shadow-sm rounded-lg",
14
14
  },
15
15
  argTypes: {
16
16
  as: {
@@ -1,13 +1,18 @@
1
- import React from 'react'
2
- import UI from '#components/ui'
1
+ import React from "react";
2
+ import UI from "#components/ui";
3
3
  import type {
4
4
  CardProps,
5
5
  CardTitleProps,
6
6
  CardContentProps,
7
7
  CardFooterProps,
8
8
  CardComponent,
9
- } from './card.types'
10
- import { cn, CARD_CLASSES, handleCardKeyDown, warnInteractiveUsage } from './card.utils'
9
+ } from "./card.types";
10
+ import {
11
+ cn,
12
+ CARD_CLASSES,
13
+ handleCardKeyDown,
14
+ warnInteractiveUsage,
15
+ } from "./card.utils";
11
16
 
12
17
  /**
13
18
  * Card.Title - Title sub-component for Card
@@ -36,22 +41,22 @@ export const Title = ({
36
41
  children,
37
42
  className,
38
43
  style,
39
- as = 'h3',
44
+ as = "h3",
40
45
  ...props
41
46
  }: CardTitleProps) => {
42
47
  return (
43
48
  <UI
44
49
  as={as}
45
- className={cn(CARD_CLASSES.TITLE, className)}
50
+ classes={cn(CARD_CLASSES.TITLE, className)}
46
51
  styles={style}
47
52
  {...props}
48
53
  >
49
54
  {children}
50
55
  </UI>
51
- )
52
- }
56
+ );
57
+ };
53
58
 
54
- Title.displayName = 'Card.Title'
59
+ Title.displayName = "Card.Title";
55
60
 
56
61
  /**
57
62
  * Card.Content - Content sub-component for Card
@@ -86,22 +91,22 @@ export const Content = ({
86
91
  children,
87
92
  className,
88
93
  style,
89
- as = 'article',
94
+ as = "article",
90
95
  ...props
91
96
  }: CardContentProps) => {
92
97
  return (
93
98
  <UI
94
99
  as={as}
95
- className={cn(CARD_CLASSES.CONTENT, className)}
100
+ classes={cn(CARD_CLASSES.CONTENT, className)}
96
101
  styles={style}
97
102
  {...props}
98
103
  >
99
104
  {children}
100
105
  </UI>
101
- )
102
- }
106
+ );
107
+ };
103
108
 
104
- Content.displayName = 'Card.Content'
109
+ Content.displayName = "Card.Content";
105
110
 
106
111
  /**
107
112
  * Card.Footer - Footer sub-component for Card
@@ -133,22 +138,22 @@ export const Footer = ({
133
138
  children,
134
139
  className,
135
140
  style,
136
- as = 'div',
141
+ as = "div",
137
142
  ...props
138
143
  }: CardFooterProps) => {
139
144
  return (
140
145
  <UI
141
146
  as={as}
142
- className={cn(CARD_CLASSES.FOOTER, className)}
147
+ classes={cn(CARD_CLASSES.FOOTER, className)}
143
148
  styles={style}
144
149
  {...props}
145
150
  >
146
151
  {children}
147
152
  </UI>
148
- )
149
- }
153
+ );
154
+ };
150
155
 
151
- Footer.displayName = 'Card.Footer'
156
+ Footer.displayName = "Card.Footer";
152
157
 
153
158
  /**
154
159
  * Card - A flexible, accessible card component with compound component pattern
@@ -220,35 +225,35 @@ Footer.displayName = 'Card.Footer'
220
225
  * ```
221
226
  */
222
227
  const CardRoot = ({
223
- as = 'div',
228
+ as = "div",
224
229
  styles,
225
230
  children,
226
- classes = 'shadow-sm',
231
+ classes = "shadow-sm",
227
232
  id,
228
233
  interactive = false,
229
234
  onClick,
230
235
  tabIndex,
231
236
  role,
232
- 'aria-label': ariaLabel,
233
- 'aria-labelledby': ariaLabelledBy,
234
- 'aria-describedby': ariaDescribedBy,
237
+ "aria-label": ariaLabel,
238
+ "aria-labelledby": ariaLabelledBy,
239
+ "aria-describedby": ariaDescribedBy,
235
240
  ...props
236
241
  }: CardProps) => {
237
242
  // Development warnings for common accessibility issues
238
243
  React.useEffect(() => {
239
- warnInteractiveUsage(!!onClick, interactive)
240
- }, [onClick, interactive])
244
+ warnInteractiveUsage(!!onClick, interactive);
245
+ }, [onClick, interactive]);
241
246
 
242
247
  // Interactive card handling
243
248
  const handleKeyDown = (event: React.KeyboardEvent) => {
244
249
  if (interactive || onClick) {
245
- handleCardKeyDown(event, onClick)
250
+ handleCardKeyDown(event, onClick);
246
251
  }
247
- }
252
+ };
248
253
 
249
254
  const interactiveProps = interactive
250
255
  ? {
251
- role: role || 'button',
256
+ role: role || "button",
252
257
  tabIndex: tabIndex ?? 0,
253
258
  onClick,
254
259
  onKeyDown: handleKeyDown,
@@ -256,34 +261,34 @@ const CardRoot = ({
256
261
  : {
257
262
  role,
258
263
  onClick,
259
- }
264
+ };
260
265
 
261
266
  return (
262
267
  <UI
263
268
  as={as}
264
269
  id={id}
265
270
  styles={styles}
266
- className={classes}
271
+ classes={classes}
267
272
  aria-label={ariaLabel}
268
273
  aria-labelledby={ariaLabelledBy}
269
274
  aria-describedby={ariaDescribedBy}
270
- data-card={interactive ? 'interactive' : true}
275
+ data-card={interactive ? "interactive" : true}
271
276
  {...interactiveProps}
272
277
  {...props}
273
278
  >
274
279
  {children}
275
280
  </UI>
276
- )
277
- }
281
+ );
282
+ };
278
283
 
279
284
  // Create compound component with proper TypeScript typing
280
- export const Card = CardRoot as CardComponent
281
- Card.displayName = 'Card'
282
- Card.Title = Title
283
- Card.Content = Content
284
- Card.Footer = Footer
285
+ export const Card = CardRoot as CardComponent;
286
+ Card.displayName = "Card";
287
+ Card.Title = Title;
288
+ Card.Content = Content;
289
+ Card.Footer = Footer;
285
290
 
286
- export default Card
291
+ export default Card;
287
292
 
288
293
  // Export types for external consumption
289
294
  export type {
@@ -292,4 +297,4 @@ export type {
292
297
  CardContentProps,
293
298
  CardFooterProps,
294
299
  CardComponent,
295
- } from './card.types'
300
+ } from "./card.types";