@fpkit/acss 5.0.0 → 6.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.
Files changed (172) hide show
  1. package/libs/{chunk-DIJBIOFE.js → chunk-2ZJV6KQ3.js} +3 -3
  2. package/libs/{chunk-LXODKKA3.cjs → chunk-3D6WUYSL.cjs} +4 -4
  3. package/libs/{chunk-2JCDEC32.js → chunk-3ENBUQIB.js} +3 -3
  4. package/libs/{chunk-NCGVF2QS.cjs → chunk-3RVZZZWX.cjs} +4 -4
  5. package/libs/{chunk-M7JLT62Q.js → chunk-4F6SI5V5.js} +2 -2
  6. package/libs/chunk-4KJP3L35.js +7 -0
  7. package/libs/chunk-4KJP3L35.js.map +1 -0
  8. package/libs/chunk-66C2J4IX.cjs +13 -0
  9. package/libs/chunk-66C2J4IX.cjs.map +1 -0
  10. package/libs/{chunk-3XJC4XUG.js → chunk-6ADHES7B.js} +2 -2
  11. package/libs/{chunk-AOFQDQVS.cjs → chunk-6WMLG4O5.cjs} +3 -3
  12. package/libs/{chunk-Q7OAQLUT.js → chunk-AQAI6COH.js} +2 -2
  13. package/libs/{chunk-6BUJZ4DJ.cjs → chunk-BVPUT2PP.cjs} +3 -3
  14. package/libs/{chunk-F64GE6RG.cjs → chunk-GVVCXXKI.cjs} +4 -4
  15. package/libs/{chunk-75YQDONV.cjs → chunk-H4JRUNKU.cjs} +6 -6
  16. package/libs/{chunk-G3TFKMWB.js → chunk-H6A2CUWA.js} +5 -5
  17. package/libs/{chunk-2GJHKWEK.cjs → chunk-LQPWXSCK.cjs} +3 -3
  18. package/libs/{chunk-IBUTNPTQ.js → chunk-M5ES7OWP.js} +2 -2
  19. package/libs/{chunk-AWZLSWDO.js → chunk-MAG46S3P.js} +2 -2
  20. package/libs/{chunk-KAR3HDXK.js → chunk-MJJKNHVH.js} +2 -2
  21. package/libs/{chunk-5CJPTDK3.cjs → chunk-OZM455LO.cjs} +3 -3
  22. package/libs/{chunk-NPWHQVYB.cjs → chunk-QU5AQQ4S.cjs} +3 -3
  23. package/libs/{chunk-U5VA34SU.js → chunk-RQSMWB3J.js} +2 -2
  24. package/libs/{chunk-5QSNJQVH.cjs → chunk-S7NIA6PI.cjs} +3 -3
  25. package/libs/{chunk-MBWI67UT.js → chunk-SPESKPUA.js} +2 -2
  26. package/libs/{chunk-PMWL5XZ4.js → chunk-SQ44OCJ2.js} +3 -3
  27. package/libs/{chunk-EKJYOCLY.cjs → chunk-VISQ434C.cjs} +3 -3
  28. package/libs/{chunk-AFINOD2L.cjs → chunk-VN2CVD4H.cjs} +3 -3
  29. package/libs/{chunk-M5JARVJD.cjs → chunk-WTWGTWVI.cjs} +3 -3
  30. package/libs/{chunk-TF3GQKOY.js → chunk-X2RDXWH5.js} +2 -2
  31. package/libs/components/breadcrumbs/breadcrumb.cjs +6 -6
  32. package/libs/components/breadcrumbs/breadcrumb.d.cts +1 -1
  33. package/libs/components/breadcrumbs/breadcrumb.d.ts +1 -1
  34. package/libs/components/breadcrumbs/breadcrumb.js +3 -3
  35. package/libs/components/button.cjs +4 -4
  36. package/libs/components/button.d.cts +1 -1
  37. package/libs/components/button.d.ts +1 -1
  38. package/libs/components/button.js +2 -2
  39. package/libs/components/card.cjs +7 -7
  40. package/libs/components/card.d.cts +1 -1
  41. package/libs/components/card.d.ts +1 -1
  42. package/libs/components/card.js +2 -2
  43. package/libs/components/dialog/dialog.cjs +7 -7
  44. package/libs/components/dialog/dialog.js +5 -5
  45. package/libs/components/form/checkbox.css +1 -1
  46. package/libs/components/form/checkbox.css.map +1 -1
  47. package/libs/components/form/checkbox.min.css +2 -2
  48. package/libs/components/form/fields.cjs +4 -4
  49. package/libs/components/form/fields.d.cts +1 -1
  50. package/libs/components/form/fields.d.ts +1 -1
  51. package/libs/components/form/fields.js +2 -2
  52. package/libs/components/form/form.css +1 -1
  53. package/libs/components/form/form.css.map +1 -1
  54. package/libs/components/form/form.min.css +2 -2
  55. package/libs/components/form/select.css +1 -0
  56. package/libs/components/form/select.css.map +1 -0
  57. package/libs/components/form/select.min.css +3 -0
  58. package/libs/components/form/textarea.cjs +4 -4
  59. package/libs/components/form/textarea.js +2 -2
  60. package/libs/components/heading/heading.cjs +3 -3
  61. package/libs/components/heading/heading.d.cts +2 -2
  62. package/libs/components/heading/heading.d.ts +2 -2
  63. package/libs/components/heading/heading.js +2 -2
  64. package/libs/components/icons/icon.cjs +4 -4
  65. package/libs/components/icons/icon.d.cts +2 -2
  66. package/libs/components/icons/icon.d.ts +2 -2
  67. package/libs/components/icons/icon.js +2 -2
  68. package/libs/components/link/link.cjs +6 -6
  69. package/libs/components/link/link.js +2 -2
  70. package/libs/components/list/list.cjs +5 -5
  71. package/libs/components/list/list.d.cts +2 -2
  72. package/libs/components/list/list.d.ts +2 -2
  73. package/libs/components/list/list.js +2 -2
  74. package/libs/components/modal.cjs +4 -4
  75. package/libs/components/modal.js +3 -3
  76. package/libs/components/nav/nav.cjs +7 -7
  77. package/libs/components/nav/nav.d.cts +2 -2
  78. package/libs/components/nav/nav.d.ts +2 -2
  79. package/libs/components/nav/nav.js +3 -3
  80. package/libs/components/text/text.cjs +5 -5
  81. package/libs/components/text/text.d.cts +1 -1
  82. package/libs/components/text/text.d.ts +1 -1
  83. package/libs/components/text/text.js +2 -2
  84. package/libs/{heading-81eef89a.d.ts → heading-064675b6.d.ts} +1 -1
  85. package/libs/hooks.cjs +4 -4
  86. package/libs/hooks.d.cts +1 -1
  87. package/libs/hooks.d.ts +1 -1
  88. package/libs/hooks.js +3 -3
  89. package/libs/{icons-df8e744f.d.ts → icons-48788561.d.ts} +1 -1
  90. package/libs/icons.cjs +3 -3
  91. package/libs/icons.d.cts +2 -2
  92. package/libs/icons.d.ts +2 -2
  93. package/libs/icons.js +2 -2
  94. package/libs/index.cjs +49 -49
  95. package/libs/index.cjs.map +1 -1
  96. package/libs/index.css +1 -1
  97. package/libs/index.css.map +1 -1
  98. package/libs/index.d.cts +74 -25
  99. package/libs/index.d.ts +74 -25
  100. package/libs/index.js +21 -21
  101. package/libs/index.js.map +1 -1
  102. package/libs/{list.types-d26de310.d.ts → list.types-bf2c44c1.d.ts} +1 -1
  103. package/libs/{ui-d01b50d4.d.ts → ui-993fc2e2.d.ts} +5 -2
  104. package/package.json +4 -7
  105. package/src/components/alert/alert.stories.tsx +1 -1
  106. package/src/components/alert/elements/dismiss-button.stories.tsx +1 -2
  107. package/src/components/badge/badge.stories.tsx +1 -1
  108. package/src/components/breadcrumbs/breadcrumb.stories.tsx +1 -2
  109. package/src/components/buttons/button.stories.tsx +1 -3
  110. package/src/components/cards/card.stories.tsx +1 -1
  111. package/src/components/cards/card.test.tsx +1 -1
  112. package/src/components/details/details.stories.tsx +1 -2
  113. package/src/components/dialog/dialog-modal.stories.tsx +1 -2
  114. package/src/components/dialog/dialog.stories.tsx +1 -1
  115. package/src/components/dialog/views/dialog-header.stories.tsx +1 -2
  116. package/src/components/form/CHECKBOX-STYLES.mdx +766 -0
  117. package/src/components/form/CHECKBOX.mdx +665 -0
  118. package/src/components/form/checkbox.scss +28 -0
  119. package/src/components/form/checkbox.tsx +72 -22
  120. package/src/components/form/form.scss +11 -14
  121. package/src/components/form/form.stories.tsx +1 -1
  122. package/src/components/form/input.stories.tsx +72 -23
  123. package/src/components/form/select.scss +97 -0
  124. package/src/components/form/select.stories.tsx +225 -9
  125. package/src/components/form/select.test.tsx +541 -0
  126. package/src/components/form/select.tsx +133 -16
  127. package/src/components/heading/heading.stories.tsx +1 -2
  128. package/src/components/images/figure.stories.tsx +1 -2
  129. package/src/components/images/img.stories.tsx +1 -1
  130. package/src/components/nav/nav.stories.tsx +1 -2
  131. package/src/components/text/text.stories.tsx +1 -1
  132. package/src/components/text-to-speech/TextToSpeech.stories.tsx +1 -1
  133. package/src/components/title/title.stories.tsx +1 -2
  134. package/src/components/ui.tsx +11 -4
  135. package/src/styles/form/checkbox.css +19 -0
  136. package/src/styles/form/checkbox.css.map +1 -1
  137. package/src/styles/form/form.css +100 -14
  138. package/src/styles/form/form.css.map +1 -1
  139. package/src/styles/form/select.css +75 -0
  140. package/src/styles/form/select.css.map +1 -0
  141. package/src/styles/index.css +100 -14
  142. package/src/styles/index.css.map +1 -1
  143. package/libs/chunk-DDSXKOUB.js +0 -7
  144. package/libs/chunk-DDSXKOUB.js.map +0 -1
  145. package/libs/chunk-EJ6KYBFE.cjs +0 -13
  146. package/libs/chunk-EJ6KYBFE.cjs.map +0 -1
  147. /package/libs/{chunk-DIJBIOFE.js.map → chunk-2ZJV6KQ3.js.map} +0 -0
  148. /package/libs/{chunk-LXODKKA3.cjs.map → chunk-3D6WUYSL.cjs.map} +0 -0
  149. /package/libs/{chunk-2JCDEC32.js.map → chunk-3ENBUQIB.js.map} +0 -0
  150. /package/libs/{chunk-NCGVF2QS.cjs.map → chunk-3RVZZZWX.cjs.map} +0 -0
  151. /package/libs/{chunk-M7JLT62Q.js.map → chunk-4F6SI5V5.js.map} +0 -0
  152. /package/libs/{chunk-3XJC4XUG.js.map → chunk-6ADHES7B.js.map} +0 -0
  153. /package/libs/{chunk-AOFQDQVS.cjs.map → chunk-6WMLG4O5.cjs.map} +0 -0
  154. /package/libs/{chunk-Q7OAQLUT.js.map → chunk-AQAI6COH.js.map} +0 -0
  155. /package/libs/{chunk-6BUJZ4DJ.cjs.map → chunk-BVPUT2PP.cjs.map} +0 -0
  156. /package/libs/{chunk-F64GE6RG.cjs.map → chunk-GVVCXXKI.cjs.map} +0 -0
  157. /package/libs/{chunk-75YQDONV.cjs.map → chunk-H4JRUNKU.cjs.map} +0 -0
  158. /package/libs/{chunk-G3TFKMWB.js.map → chunk-H6A2CUWA.js.map} +0 -0
  159. /package/libs/{chunk-2GJHKWEK.cjs.map → chunk-LQPWXSCK.cjs.map} +0 -0
  160. /package/libs/{chunk-IBUTNPTQ.js.map → chunk-M5ES7OWP.js.map} +0 -0
  161. /package/libs/{chunk-AWZLSWDO.js.map → chunk-MAG46S3P.js.map} +0 -0
  162. /package/libs/{chunk-KAR3HDXK.js.map → chunk-MJJKNHVH.js.map} +0 -0
  163. /package/libs/{chunk-5CJPTDK3.cjs.map → chunk-OZM455LO.cjs.map} +0 -0
  164. /package/libs/{chunk-NPWHQVYB.cjs.map → chunk-QU5AQQ4S.cjs.map} +0 -0
  165. /package/libs/{chunk-U5VA34SU.js.map → chunk-RQSMWB3J.js.map} +0 -0
  166. /package/libs/{chunk-5QSNJQVH.cjs.map → chunk-S7NIA6PI.cjs.map} +0 -0
  167. /package/libs/{chunk-MBWI67UT.js.map → chunk-SPESKPUA.js.map} +0 -0
  168. /package/libs/{chunk-PMWL5XZ4.js.map → chunk-SQ44OCJ2.js.map} +0 -0
  169. /package/libs/{chunk-EKJYOCLY.cjs.map → chunk-VISQ434C.cjs.map} +0 -0
  170. /package/libs/{chunk-AFINOD2L.cjs.map → chunk-VN2CVD4H.cjs.map} +0 -0
  171. /package/libs/{chunk-M5JARVJD.cjs.map → chunk-WTWGTWVI.cjs.map} +0 -0
  172. /package/libs/{chunk-TF3GQKOY.js.map → chunk-X2RDXWH5.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { U as UI } from './ui-d01b50d4.js';
2
+ import { U as UI } from './ui-993fc2e2.js';
3
3
 
4
4
  /**
5
5
  * Props for the List component.
@@ -101,7 +101,8 @@ type PolymorphicComponentPropWithRef<C extends React.ElementType, Props = {}> =
101
101
  * Styles are always rendered regardless of this prop value.
102
102
  * @property {React.CSSProperties} [styles] - Inline styles to apply (overrides defaultStyles)
103
103
  * @property {React.CSSProperties} [defaultStyles] - Base styles that can be overridden by styles prop
104
- * @property {string} [classes] - CSS class names to apply to the element
104
+ * @property {string} [classes] - CSS class names to apply to the element (custom prop)
105
+ * @property {string} [className] - CSS class names to apply to the element (React standard prop)
105
106
  * @property {string} [id] - HTML id attribute
106
107
  * @property {React.ReactNode} [children] - Child elements to render
107
108
  *
@@ -119,6 +120,7 @@ type UIProps<C extends React.ElementType> = PolymorphicComponentPropWithRef<C, {
119
120
  styles?: React.CSSProperties;
120
121
  defaultStyles?: React.CSSProperties;
121
122
  classes?: string;
123
+ className?: string;
122
124
  id?: string;
123
125
  children?: React.ReactNode;
124
126
  }>;
@@ -166,7 +168,8 @@ type UIComponent = (<C extends React.ElementType = "div">(props: UIProps<C>) =>
166
168
  *
167
169
  * @param {C} [as='div'] - The HTML element type to render. Defaults to 'div'.
168
170
  * @param {React.CSSProperties} [styles] - Inline styles to apply. Overrides defaultStyles.
169
- * @param {string} [classes] - CSS class names to apply to the element.
171
+ * @param {string} [classes] - CSS class names to apply (custom prop). Takes precedence over className.
172
+ * @param {string} [className] - CSS class names to apply (React standard). Used if classes is not provided.
170
173
  * @param {React.CSSProperties} [defaultStyles] - Base styles that can be overridden by styles prop.
171
174
  * @param {React.ReactNode} [children] - Child elements to render inside the component.
172
175
  * @param {PolymorphicRef<C>} [ref] - Forwarded ref with proper typing for the element type.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fpkit/acss",
3
3
  "description": "A lightweight React UI library for building modern and accessible components that leverage CSS custom properties for reactive Styles.",
4
4
  "private": false,
5
- "version": "5.0.0",
5
+ "version": "6.1.0",
6
6
  "engines": {
7
7
  "node": ">=22.12.0",
8
8
  "npm": ">=8.0.0"
@@ -24,8 +24,8 @@
24
24
  "test:coverage": "vitest --coverage",
25
25
  "test:ui:coverage": "vitest --coverage --ui",
26
26
  "test:snapshot": "vitest --run --update",
27
- "lint": "eslint . --ext .jsx,.tsx",
28
- "lint-fix": "eslint . --ext .jsx,.tsx"
27
+ "lint": "eslint .",
28
+ "lint-fix": "eslint . --fix"
29
29
  },
30
30
  "dependencies": {
31
31
  "focus-trap": "^7.5.2",
@@ -47,9 +47,6 @@
47
47
  "@vitest/ui": "^0.33.0",
48
48
  "autoprefixer": "^10.4.16",
49
49
  "c8": "^8.0.0",
50
- "eslint": "^8.56.0",
51
- "eslint-config-prettier": "^9.1.0",
52
- "eslint-plugin-prettier": "^5.1.3",
53
50
  "happy-dom": "^10.5.2",
54
51
  "jsdom": "^22.1.0",
55
52
  "npm-run-all": "^4.1.5",
@@ -126,5 +123,5 @@
126
123
  "publishConfig": {
127
124
  "access": "public"
128
125
  },
129
- "gitHead": "79600c132b52299259f087d029847acfcb2196e1"
126
+ "gitHead": "bc68a8f70b20f347add9535dd661682f7aeff13a"
130
127
  }
@@ -35,7 +35,7 @@ const instructions = (
35
35
  );
36
36
 
37
37
  const meta: Meta<typeof Alert> = {
38
- title: "FP.REACT Components/Alert",
38
+ title: "FP.React Components/Alert",
39
39
  component: Alert,
40
40
  tags: ["beta"],
41
41
  parameters: {
@@ -3,11 +3,10 @@ import { within, expect } from "storybook/test";
3
3
  import DismissButton from "./dismiss-button";
4
4
 
5
5
  const meta: Meta<typeof DismissButton> = {
6
- title: "FP.REACT Elements/DismissButton",
6
+ title: "FP.React Elements/DismissButton",
7
7
  component: DismissButton,
8
8
  tags: ["new"],
9
9
  parameters: {
10
- actions: { argTypesRegex: "^on.*" },
11
10
  docs: {
12
11
  description: {
13
12
  component: "A button component used to dismiss alerts.",
@@ -5,7 +5,7 @@ import Badge from "./badge";
5
5
  import "./badge.scss";
6
6
 
7
7
  const meta: Meta<typeof Badge> = {
8
- title: "FP.REACT Components/Badge",
8
+ title: "FP.React Components/Badge",
9
9
  component: Badge,
10
10
  tags: ["beta", "accessible"],
11
11
  parameters: {
@@ -6,11 +6,10 @@ import Breadcrumb from "./breadcrumb";
6
6
  const linkClicked = fn();
7
7
 
8
8
  const meta: Meta<typeof Breadcrumb> = {
9
- title: "FP.REACT Components/Breadcrumb",
9
+ title: "FP.React Components/Breadcrumb",
10
10
  component: Breadcrumb,
11
11
  tags: ["autodocs"],
12
12
  parameters: {
13
- actions: { argTypesRegex: "^on.*" },
14
13
  docs: {
15
14
  description: {
16
15
  component: `A WCAG 2.1 AA compliant breadcrumb navigation component that helps users understand their current location within a site hierarchy.
@@ -14,9 +14,7 @@ const meta = {
14
14
  children: "Click me",
15
15
  onClick: buttonClicked,
16
16
  },
17
- parameters: {
18
- actions: { argTypesRegex: "^on.*" },
19
- },
17
+ parameters: {},
20
18
  } as Meta;
21
19
 
22
20
  export default meta;
@@ -5,7 +5,7 @@ const content =
5
5
  "Enim aliquip excepteur veniam esse culpa. Et exercitation incididunt occaecat incididunt proident consectetur. Voluptate elit reprehenderit nulla reprehenderit excepteur tempor adipisicing officia eiusmod est id aute. Nisi do et nulla fugiat enim id pariatur ex. Culpa aliquip excepteur velit fugiat qui magna deserunt adipisicing dolore quis. Esse proident qui consectetur Lorem id fugiat elit amet proident enim deserunt dolore sit.";
6
6
 
7
7
  const meta: Meta<typeof Card> = {
8
- title: "FP.REACT Components/Card",
8
+ title: "FP.React Components/Card",
9
9
  tags: ["stable", "autodocs"],
10
10
  component: Card,
11
11
  args: {
@@ -50,7 +50,7 @@ describe('Card', () => {
50
50
  it('applies default shadow class', () => {
51
51
  render(<Card data-testid="card">Content</Card>)
52
52
  const card = screen.getByTestId('card')
53
- expect(card).toHaveClass('shadow')
53
+ expect(card).toHaveClass('shadow-sm')
54
54
  })
55
55
  })
56
56
 
@@ -29,7 +29,7 @@ const content = (
29
29
  const icon = <Icons.Add />;
30
30
 
31
31
  const meta: Meta<typeof Details> = {
32
- title: "FP.REACT Components/Details",
32
+ title: "FP.React Components/Details",
33
33
  component: Details,
34
34
  tags: ["stable"],
35
35
  parameters: {
@@ -77,7 +77,6 @@ const meta: Meta<typeof Details> = {
77
77
  icon: icon,
78
78
  summary: <>Summary Section</>,
79
79
  },
80
- actions: { argTypesRegex: "^on.*" },
81
80
  decorators: [
82
81
  (Story) => (
83
82
  <div className="container" style={{ minWidth: "50vw" }}>
@@ -4,11 +4,10 @@ import { within, expect, userEvent, waitFor } from "storybook/test";
4
4
  import DialogModal from "./dialog-modal";
5
5
  import WithInstructions from "#/decorators/instructions";
6
6
  const meta: Meta<typeof DialogModal> = {
7
- title: "FP.REACT Components/Dialog/DialogModal",
7
+ title: "FP.React Components/Dialog/DialogModal",
8
8
  component: DialogModal,
9
9
  tags: ["autodocs", "experimental"],
10
10
  parameters: {
11
- actions: { argTypesRegex: "^on.*" },
12
11
  docs: {
13
12
  description: {
14
13
  component:
@@ -28,7 +28,7 @@ const buttonDecorator = [
28
28
  ];
29
29
 
30
30
  const meta: Meta<typeof Dialog> = {
31
- title: "FP.REACT Components/Dialog/Dialogs",
31
+ title: "FP.React Components/Dialog/Dialogs",
32
32
  component: Dialog,
33
33
  tags: ["alpha"],
34
34
  parameters: {
@@ -4,11 +4,10 @@ import { within, expect } from "storybook/test";
4
4
  import DialogHeader from "./dialog-header";
5
5
 
6
6
  const meta: Meta<typeof DialogHeader> = {
7
- title: "FP.REACT Components/Dialog/Views/DialogHeader",
7
+ title: "FP.React Components/Dialog/Views/DialogHeader",
8
8
  component: DialogHeader,
9
9
  parameters: {
10
10
  layout: "centered",
11
- actions: { argTypesRegex: "^on.*" },
12
11
  docs: {
13
12
  description: {
14
13
  component: