@fpkit/acss 6.0.0 → 6.2.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 (176) 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/fields.cjs +4 -4
  46. package/libs/components/form/fields.d.cts +1 -1
  47. package/libs/components/form/fields.d.ts +1 -1
  48. package/libs/components/form/fields.js +2 -2
  49. package/libs/components/form/form.css +1 -1
  50. package/libs/components/form/form.css.map +1 -1
  51. package/libs/components/form/form.min.css +2 -2
  52. package/libs/components/form/select.css +1 -0
  53. package/libs/components/form/select.css.map +1 -0
  54. package/libs/components/form/select.min.css +3 -0
  55. package/libs/components/form/textarea.cjs +4 -4
  56. package/libs/components/form/textarea.js +2 -2
  57. package/libs/components/heading/heading.cjs +3 -3
  58. package/libs/components/heading/heading.d.cts +2 -2
  59. package/libs/components/heading/heading.d.ts +2 -2
  60. package/libs/components/heading/heading.js +2 -2
  61. package/libs/components/icons/icon.cjs +4 -4
  62. package/libs/components/icons/icon.d.cts +2 -2
  63. package/libs/components/icons/icon.d.ts +2 -2
  64. package/libs/components/icons/icon.js +2 -2
  65. package/libs/components/layout/landmarks.css +1 -1
  66. package/libs/components/layout/landmarks.css.map +1 -1
  67. package/libs/components/layout/landmarks.min.css +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 +56 -55
  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 +43 -6
  99. package/libs/index.d.ts +43 -6
  100. package/libs/index.js +27 -27
  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 +1 -1
  117. package/src/components/form/CHECKBOX.mdx +1 -1
  118. package/src/components/form/form.scss +4 -14
  119. package/src/components/form/form.stories.tsx +1 -1
  120. package/src/components/form/input.stories.tsx +1 -1
  121. package/src/components/form/select.scss +97 -0
  122. package/src/components/form/select.stories.tsx +225 -9
  123. package/src/components/form/select.test.tsx +541 -0
  124. package/src/components/form/select.tsx +133 -16
  125. package/src/components/heading/heading.stories.tsx +1 -2
  126. package/src/components/images/figure.stories.tsx +1 -2
  127. package/src/components/images/img.stories.tsx +1 -1
  128. package/src/components/layout/README.mdx +1117 -0
  129. package/src/components/layout/STYLES.mdx +159 -4
  130. package/src/components/layout/fieldset.stories.tsx +387 -0
  131. package/src/components/layout/landmarks.scss +115 -2
  132. package/src/components/layout/landmarks.stories.tsx +2 -6
  133. package/src/components/layout/landmarks.tsx +96 -27
  134. package/src/components/nav/nav.stories.tsx +1 -2
  135. package/src/components/text/text.stories.tsx +1 -1
  136. package/src/components/text-to-speech/TextToSpeech.stories.tsx +1 -1
  137. package/src/components/title/title.stories.tsx +1 -2
  138. package/src/components/ui.tsx +11 -4
  139. package/src/styles/form/form.css +75 -14
  140. package/src/styles/form/form.css.map +1 -1
  141. package/src/styles/form/select.css +75 -0
  142. package/src/styles/form/select.css.map +1 -0
  143. package/src/styles/index.css +157 -14
  144. package/src/styles/index.css.map +1 -1
  145. package/src/styles/layout/landmarks.css +83 -0
  146. package/src/styles/layout/landmarks.css.map +1 -1
  147. package/libs/chunk-DDSXKOUB.js +0 -7
  148. package/libs/chunk-DDSXKOUB.js.map +0 -1
  149. package/libs/chunk-EJ6KYBFE.cjs +0 -13
  150. package/libs/chunk-EJ6KYBFE.cjs.map +0 -1
  151. /package/libs/{chunk-DIJBIOFE.js.map → chunk-2ZJV6KQ3.js.map} +0 -0
  152. /package/libs/{chunk-LXODKKA3.cjs.map → chunk-3D6WUYSL.cjs.map} +0 -0
  153. /package/libs/{chunk-2JCDEC32.js.map → chunk-3ENBUQIB.js.map} +0 -0
  154. /package/libs/{chunk-NCGVF2QS.cjs.map → chunk-3RVZZZWX.cjs.map} +0 -0
  155. /package/libs/{chunk-M7JLT62Q.js.map → chunk-4F6SI5V5.js.map} +0 -0
  156. /package/libs/{chunk-3XJC4XUG.js.map → chunk-6ADHES7B.js.map} +0 -0
  157. /package/libs/{chunk-AOFQDQVS.cjs.map → chunk-6WMLG4O5.cjs.map} +0 -0
  158. /package/libs/{chunk-Q7OAQLUT.js.map → chunk-AQAI6COH.js.map} +0 -0
  159. /package/libs/{chunk-6BUJZ4DJ.cjs.map → chunk-BVPUT2PP.cjs.map} +0 -0
  160. /package/libs/{chunk-F64GE6RG.cjs.map → chunk-GVVCXXKI.cjs.map} +0 -0
  161. /package/libs/{chunk-75YQDONV.cjs.map → chunk-H4JRUNKU.cjs.map} +0 -0
  162. /package/libs/{chunk-G3TFKMWB.js.map → chunk-H6A2CUWA.js.map} +0 -0
  163. /package/libs/{chunk-2GJHKWEK.cjs.map → chunk-LQPWXSCK.cjs.map} +0 -0
  164. /package/libs/{chunk-IBUTNPTQ.js.map → chunk-M5ES7OWP.js.map} +0 -0
  165. /package/libs/{chunk-AWZLSWDO.js.map → chunk-MAG46S3P.js.map} +0 -0
  166. /package/libs/{chunk-KAR3HDXK.js.map → chunk-MJJKNHVH.js.map} +0 -0
  167. /package/libs/{chunk-5CJPTDK3.cjs.map → chunk-OZM455LO.cjs.map} +0 -0
  168. /package/libs/{chunk-NPWHQVYB.cjs.map → chunk-QU5AQQ4S.cjs.map} +0 -0
  169. /package/libs/{chunk-U5VA34SU.js.map → chunk-RQSMWB3J.js.map} +0 -0
  170. /package/libs/{chunk-5QSNJQVH.cjs.map → chunk-S7NIA6PI.cjs.map} +0 -0
  171. /package/libs/{chunk-MBWI67UT.js.map → chunk-SPESKPUA.js.map} +0 -0
  172. /package/libs/{chunk-PMWL5XZ4.js.map → chunk-SQ44OCJ2.js.map} +0 -0
  173. /package/libs/{chunk-EKJYOCLY.cjs.map → chunk-VISQ434C.cjs.map} +0 -0
  174. /package/libs/{chunk-AFINOD2L.cjs.map → chunk-VN2CVD4H.cjs.map} +0 -0
  175. /package/libs/{chunk-M5JARVJD.cjs.map → chunk-WTWGTWVI.cjs.map} +0 -0
  176. /package/libs/{chunk-TF3GQKOY.js.map → chunk-X2RDXWH5.js.map} +0 -0
@@ -1,17 +1,17 @@
1
- import UI from '../ui'
2
- import React, { ReactNode } from 'react'
1
+ import UI from "../ui";
2
+ import React, { ReactNode } from "react";
3
3
 
4
- type ComponentProps = React.ComponentProps<typeof UI>
4
+ type ComponentProps = React.ComponentProps<typeof UI>;
5
5
 
6
6
  /**
7
7
  * Renders children elements without any wrapping component.
8
8
  * Can be used as a placeholder when no semantic landmark is needed.
9
9
  */
10
- export const Landmarks = (children?: React.FC) => <>{children}</>
10
+ export const Landmarks = (children?: React.FC) => <>{children}</>;
11
11
 
12
12
  type HeaderProps = {
13
- headerBackground?: ReactNode
14
- } & ComponentProps
13
+ headerBackground?: ReactNode;
14
+ } & ComponentProps;
15
15
  /**
16
16
  * Header component.
17
17
  *
@@ -34,8 +34,8 @@ export const Header = ({
34
34
  {headerBackground}
35
35
  <UI as="section">{children}</UI>
36
36
  </UI>
37
- )
38
- }
37
+ );
38
+ };
39
39
 
40
40
  /**
41
41
  * Main component.
@@ -57,8 +57,8 @@ export const Main = ({
57
57
  <UI as="main" id={id} styles={styles} {...props} className={classes}>
58
58
  {children}
59
59
  </UI>
60
- )
61
- }
60
+ );
61
+ };
62
62
 
63
63
  /**
64
64
  * Footer component that renders a footer element with a section element inside.
@@ -76,10 +76,10 @@ export const Footer = ({
76
76
  }: ComponentProps) => {
77
77
  return (
78
78
  <UI as="footer" id={id} className={classes} styles={styles} {...props}>
79
- <UI as="section">{children || 'Copyright © 2022'}</UI>
79
+ <UI as="section">{children || "Copyright © 2022"}</UI>
80
80
  </UI>
81
- )
82
- }
81
+ );
82
+ };
83
83
 
84
84
  export const Aside = ({
85
85
  id,
@@ -92,8 +92,8 @@ export const Aside = ({
92
92
  <UI as="aside" id={id} styles={styles} className={classes} {...props}>
93
93
  <UI as="section">{children}</UI>
94
94
  </UI>
95
- )
96
- }
95
+ );
96
+ };
97
97
 
98
98
  /**
99
99
  * Section component that renders a section element.
@@ -113,8 +113,8 @@ export const Section = ({
113
113
  <UI as="section" id={id} styles={styles} className={classes} {...props}>
114
114
  {children}
115
115
  </UI>
116
- )
117
- }
116
+ );
117
+ };
118
118
 
119
119
  /**
120
120
  * Article component renders an HTML <article> element.
@@ -135,15 +135,84 @@ export const Article = ({
135
135
  <UI as="article" id={id} styles={styles} className={classes} {...props}>
136
136
  {children}
137
137
  </UI>
138
- )
139
- }
138
+ );
139
+ };
140
140
 
141
- export default Landmarks
141
+ type FieldsetProps = {
142
+ /**
143
+ * Optional legend content displayed as the fieldset's accessible name
144
+ */
145
+ legend?: ReactNode;
146
+ /**
147
+ * Additional description text for complex fieldsets
148
+ * Enhances accessibility via aria-describedby
149
+ */
150
+ description?: string;
151
+ /**
152
+ * Custom ID for the description element
153
+ * Auto-generated if description is provided without custom ID
154
+ */
155
+ descriptionId?: string;
156
+ } & ComponentProps;
142
157
 
143
- Landmarks.displayName = 'Landmarks'
144
- Landmarks.Header = Header
145
- Landmarks.Main = Main
146
- Landmarks.Footer = Footer
147
- Landmarks.Aside = Aside
148
- Landmarks.Section = Section
149
- Landmarks.Article = Article
158
+ /**
159
+ * Fieldset landmark for semantic content grouping.
160
+ * Provides WCAG 2.1 Level AA compliant form grouping with optional descriptions.
161
+ *
162
+ * @param legend - Optional legend content (accessible name)
163
+ * @param description - Optional description for additional context
164
+ * @param descriptionId - Custom ID for description element
165
+ * @param children - Content inside fieldset section
166
+ *
167
+ * @example
168
+ * ```tsx
169
+ * <Fieldset
170
+ * legend="Shipping Address"
171
+ * description="This address will be used for delivery"
172
+ * >
173
+ * {/* form controls *\/}
174
+ * </Fieldset>
175
+ * ```
176
+ */
177
+ export const Fieldset = ({
178
+ id,
179
+ children,
180
+ legend,
181
+ description,
182
+ descriptionId,
183
+ styles,
184
+ classes,
185
+ ...props
186
+ }: FieldsetProps) => {
187
+ const descId = descriptionId || (description ? `${id}-desc` : undefined);
188
+
189
+ return (
190
+ <UI
191
+ as="fieldset"
192
+ id={id}
193
+ styles={styles}
194
+ className={classes}
195
+ aria-describedby={descId}
196
+ {...props}
197
+ >
198
+ {legend && <UI as="legend">{legend}</UI>}
199
+ {description && (
200
+ <p id={descId} className="fieldset-description">
201
+ {description}
202
+ </p>
203
+ )}
204
+ {children}
205
+ </UI>
206
+ );
207
+ };
208
+
209
+ export default Landmarks;
210
+
211
+ Landmarks.displayName = "Landmarks";
212
+ Landmarks.Header = Header;
213
+ Landmarks.Main = Main;
214
+ Landmarks.Footer = Footer;
215
+ Landmarks.Aside = Aside;
216
+ Landmarks.Section = Section;
217
+ Landmarks.Article = Article;
218
+ Landmarks.Fieldset = Fieldset;
@@ -8,11 +8,10 @@ import Link from "../link/link";
8
8
  import Button from "../buttons/button";
9
9
 
10
10
  const meta: Meta<typeof Nav> = {
11
- title: "FP.REACT Components/Nav",
11
+ title: "FP.React Components/Nav",
12
12
  component: Nav,
13
13
  tags: ["stable"],
14
14
  parameters: {
15
- actions: { argTypesRegex: "^on.*" },
16
15
  docs: {
17
16
  description: {
18
17
  component: `Navigation component with accessible markup and customizable styling via CSS variables.
@@ -4,7 +4,7 @@ import { within, expect } from "storybook/test";
4
4
  import Text from "./text";
5
5
 
6
6
  const meta: Meta<typeof Text> = {
7
- title: "FP.REACT Components/Text",
7
+ title: "FP.React Components/Text",
8
8
  component: Text,
9
9
  tags: ["version:1.0.0"],
10
10
  args: {
@@ -3,7 +3,7 @@ import TextToSpeech from "./TextToSpeech";
3
3
  import "./text-to-speech.scss";
4
4
 
5
5
  const meta: Meta<typeof TextToSpeech> = {
6
- title: "FP.REACT Components/TextToSpeech",
6
+ title: "FP.React Components/TextToSpeech",
7
7
  component: TextToSpeech,
8
8
  tags: ["experimental"],
9
9
  argTypes: {
@@ -4,11 +4,10 @@ import { within, expect } from "storybook/test";
4
4
  import Title from "./title";
5
5
 
6
6
  const meta: Meta<typeof Title> = {
7
- title: "FP.REACT Components/Title",
7
+ title: "FP.React Components/Title",
8
8
  component: Title,
9
9
  tags: ["version:2.0.0", "autodocs"],
10
10
  parameters: {
11
- actions: { argTypesRegex: "^on.*" },
12
11
  docs: {
13
12
  description: {
14
13
  component: `
@@ -117,7 +117,8 @@ type PolymorphicComponentPropWithRef<
117
117
  * Styles are always rendered regardless of this prop value.
118
118
  * @property {React.CSSProperties} [styles] - Inline styles to apply (overrides defaultStyles)
119
119
  * @property {React.CSSProperties} [defaultStyles] - Base styles that can be overridden by styles prop
120
- * @property {string} [classes] - CSS class names to apply to the element
120
+ * @property {string} [classes] - CSS class names to apply to the element (custom prop)
121
+ * @property {string} [className] - CSS class names to apply to the element (React standard prop)
121
122
  * @property {string} [id] - HTML id attribute
122
123
  * @property {React.ReactNode} [children] - Child elements to render
123
124
  *
@@ -137,6 +138,7 @@ type UIProps<C extends React.ElementType> = PolymorphicComponentPropWithRef<
137
138
  styles?: React.CSSProperties;
138
139
  defaultStyles?: React.CSSProperties;
139
140
  classes?: string;
141
+ className?: string;
140
142
  id?: string;
141
143
  children?: React.ReactNode;
142
144
  }
@@ -187,7 +189,8 @@ type UIComponent = (<C extends React.ElementType = "div">(
187
189
  *
188
190
  * @param {C} [as='div'] - The HTML element type to render. Defaults to 'div'.
189
191
  * @param {React.CSSProperties} [styles] - Inline styles to apply. Overrides defaultStyles.
190
- * @param {string} [classes] - CSS class names to apply to the element.
192
+ * @param {string} [classes] - CSS class names to apply (custom prop). Takes precedence over className.
193
+ * @param {string} [className] - CSS class names to apply (React standard). Used if classes is not provided.
191
194
  * @param {React.CSSProperties} [defaultStyles] - Base styles that can be overridden by styles prop.
192
195
  * @param {React.ReactNode} [children] - Child elements to render inside the component.
193
196
  * @param {PolymorphicRef<C>} [ref] - Forwarded ref with proper typing for the element type.
@@ -307,15 +310,19 @@ type UIComponent = (<C extends React.ElementType = "div">(
307
310
  */
308
311
  const UI: UIComponent = React.forwardRef(
309
312
  <C extends React.ElementType>(
310
- { as, styles, style, classes, children, defaultStyles, ...props }: UIProps<C>,
313
+ { as, styles, style, classes, className, children, defaultStyles, ...props }: UIProps<C>,
311
314
  ref?: PolymorphicRef<C>
312
315
  ) => {
313
316
  const Component = as ?? "div";
314
317
 
315
318
  const styleObj: React.CSSProperties = { ...defaultStyles, ...styles, ...style };
316
319
 
320
+ // Support both 'classes' (custom) and 'className' (React standard)
321
+ // 'classes' takes precedence if both are provided
322
+ const classNameValue = classes ?? className;
323
+
317
324
  return (
318
- <Component {...props} ref={ref} style={styleObj} className={classes}>
325
+ <Component {...props} ref={ref} style={styleObj} className={classNameValue}>
319
326
  {children}
320
327
  </Component>
321
328
  );
@@ -112,6 +112,79 @@ div:has(> input[type=checkbox])[data-checkbox-size~=lg] {
112
112
  align-items: flex-start;
113
113
  }
114
114
  }
115
+ :root {
116
+ --select-arrow-color: var(--color-text);
117
+ --select-width-mobile: 18.75rem; /* 300px minimum on mobile */
118
+ --select-width-desktop: 100%; /* Full width on larger screens */
119
+ }
120
+
121
+ select {
122
+ border: var(--input-outline);
123
+ border-radius: var(--input-radius);
124
+ outline: none;
125
+ background-color: var(--input-bg, var(--color-surface));
126
+ -webkit-appearance: none; /* Remove default arrow in Chrome and Safari */
127
+ -moz-appearance: none; /* Remove default arrow in Firefox */
128
+ appearance: none; /* Remove default arrow in other browsers */
129
+ background-image: linear-gradient(45deg, transparent 50%, var(--select-arrow-color, currentColor) 50%), linear-gradient(135deg, var(--select-arrow-color, currentColor) 50%, transparent 50%);
130
+ background-position: calc(100% - 1.25rem) center, calc(100% - 1rem) center;
131
+ background-size: 0.3125rem 0.3125rem, 0.3125rem 0.3125rem;
132
+ background-repeat: no-repeat;
133
+ padding-inline-start: var(--input-padding-inline);
134
+ padding-inline-end: 2.5rem;
135
+ padding-block: var(--input-padding-block);
136
+ width: max(var(--select-width-mobile), var(--select-width-desktop));
137
+ }
138
+
139
+ /* ==========================================================================
140
+ Option Styling with Data Attributes
141
+ ========================================================================== */
142
+ /*
143
+ option[data-option="primary"] {
144
+ background-color: var(--color-primary-light, #dbeafe);
145
+ color: var(--color-primary, #2563eb);
146
+ font-weight: 600;
147
+ }
148
+
149
+ option[data-option="success"] {
150
+ background-color: var(--color-success-bg, #dcfce7);
151
+ color: var(--color-success, #16a34a);
152
+ }
153
+
154
+ option[data-option="error"] {
155
+ background-color: var(--color-error-bg, #fee2e2);
156
+ color: var(--color-error, #dc2626);
157
+ }
158
+
159
+ option[data-option="warning"] {
160
+ background-color: var(--color-warning-bg, #fef3c7);
161
+ color: var(--color-warning, #d97706);
162
+ }
163
+ */
164
+ /*
165
+ option[data-size="sm"] {
166
+ font-size: 0.875rem; // 14px
167
+ padding: 0.25rem 0.5rem;
168
+ }
169
+
170
+ option[data-size="lg"] {
171
+ font-size: 1.125rem; // 18px
172
+ padding: 0.75rem 1rem;
173
+ font-weight: 500;
174
+ }
175
+ */
176
+ /*
177
+ option[data-featured="true"] {
178
+ font-weight: 700;
179
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
180
+ color: white;
181
+ }
182
+
183
+ option[data-category="premium"] {
184
+ background-color: #fef3c7;
185
+ font-style: italic;
186
+ }
187
+ */
115
188
  :root {
116
189
  --input-border-color: var(--color-border);
117
190
  --input-appearance: none;
@@ -120,9 +193,9 @@ div:has(> input[type=checkbox])[data-checkbox-size~=lg] {
120
193
  --input-outline: thin solid var(--input-border-color);
121
194
  --input-padding-inline: 0.6rem;
122
195
  --input-padding-block: 0.4rem;
123
- --input-radius: --var(--radius);
196
+ --input-radius: var(--radius);
124
197
  --input-fs: var(--fs);
125
- --input-width: clamp(200px, 100%, 500px);
198
+ --input-width: clamp(12.5rem, 100%, 31.25rem);
126
199
  --input-focus-outline: medium solid var(--input-border-color);
127
200
  --input-focus-outline-offset: 0;
128
201
  --input-disabled-bg: var(--color-disabled-bg);
@@ -132,7 +205,6 @@ div:has(> input[type=checkbox])[data-checkbox-size~=lg] {
132
205
  --placeholder-style: italic;
133
206
  --placeholder-fs: smaller;
134
207
  --form-direction: column;
135
- --select-arrow: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20'><polyline points='6,9 10,13 14,9' stroke='%23000000' stroke-width='1.5' fill='none' /></svg>");
136
208
  /* ==========================================================================
137
209
  Size Tokens
138
210
  ========================================================================== */
@@ -235,15 +307,4 @@ input[type=checkbox]:checked {
235
307
  background: var(--checkbox-checked-bg) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'><path d='M6.173 11.414l-3.89-3.89 1.414-1.414 2.476 2.475 5.657-5.657 1.414 1.414z'/></svg>") no-repeat center center;
236
308
  }
237
309
 
238
- select {
239
- border: var(--input-outline);
240
- outline: none;
241
- -webkit-appearance: none; /* Remove default arrow in Chrome and Safari */
242
- -moz-appearance: none; /* Remove default arrow in Firefox */
243
- appearance: none; /* Remove default arrow in other browsers */
244
- background: var(--select-arrow) no-repeat;
245
- background-position: right 0.5rem top 50%;
246
- padding-inline-end: 0;
247
- }
248
-
249
310
  /*# sourceMappingURL=form.css.map */
@@ -1 +1 @@
1
- {"version":3,"sourceRoot":"","sources":["../../components/form/checkbox.scss","../../components/form/form.scss"],"names":[],"mappings":"AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA+BA;EACE;EACA;EACA;EACA;AAqDA;AAAA;AAAA;;AAlDA;EACE;EACA;;AAKA;EACE;;AAOF;EACE;EAEA;EACA;;AAMJ;EACE;EACA;;AAEA;EACE;EACA;;AAOF;EACE;;AAMF;EACE;;AASJ;EACE;EACA;;AAIF;EACE;EACA;;AAIF;EACE;EACA;;AAIF;EACE;EACA;;;AAKJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGA;EAXF;IAYI;;;AAGF;EACE;EACA;EACA;;;AAQF;EAHF;IAII;;;;AAMJ;EACE;IACE;IACA;;;ACvJJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EAGA;EACA;EACA;EAGA;EACA;EACA;EAEA;EACA;AAEA;AAAA;AAAA;EAIA;EACA;EACA;EACA;AAEA;EACA;EACA;EACA;EACA;AAEA;AAAA;AAAA;EAIA;EACA;EACA;EACA;EACA;EACA;EACA;AAEA;AAAA;AAAA;EAIA;EACA;;;AAGF;EACE;EACA;EACA;;AACA;EACE;EACA;EACA;;AAGF;EACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EAEE;EACA;;AAGF;EAEE;EACA;EACA;EACA;EACA;EACA;;;AAOF;AAAA;AAAA;EACE;EACA;EACA;EACA;;AAGA;AAAA;AAAA;EACE;EACA;;AACA;AAAA;AAAA;EACE;;;AAMR;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;;AAMJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA","file":"form.css"}
1
+ {"version":3,"sourceRoot":"","sources":["../../components/form/checkbox.scss","../../components/form/select.scss","../../components/form/form.scss"],"names":[],"mappings":"AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA+BA;EACE;EACA;EACA;EACA;AAqDA;AAAA;AAAA;;AAlDA;EACE;EACA;;AAKA;EACE;;AAOF;EACE;EAEA;EACA;;AAMJ;EACE;EACA;;AAEA;EACE;EACA;;AAOF;EACE;;AAMF;EACE;;AASJ;EACE;EACA;;AAIF;EACE;EACA;;AAIF;EACE;EACA;;AAIF;EACE;EACA;;;AAKJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGA;EAXF;IAYI;;;AAGF;EACE;EACA;EACA;;;AAQF;EAHF;IAII;;;;AAMJ;EACE;IACE;IACA;;;ACxJJ;EAEE;EAGA;EACA;;;AAGF;EAEE;EACA;EACA;EACA;EAGA;EACA;EACA;EAGA;EAEA;EAEA;EAEA;EAGA;EACA;EACA;EAGA;;;AAGF;AAAA;AAAA;AAMA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAwBA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AChFA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EAGA;EACA;EACA;EAGA;EACA;EACA;EAEA;AAEA;AAAA;AAAA;EAIA;EACA;EACA;EACA;AAEA;EACA;EACA;EACA;EACA;AAEA;AAAA;AAAA;EAIA;EACA;EACA;EACA;EACA;EACA;EACA;AAEA;AAAA;AAAA;EAIA;EACA;;;AAGF;EACE;EACA;EACA;;AACA;EACE;EACA;EACA;;AAGF;EACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EAEE;EACA;;AAGF;EAEE;EACA;EACA;EACA;EACA;EACA;;;AAOF;AAAA;AAAA;EACE;EACA;EACA;EACA;;AAGA;AAAA;AAAA;EACE;EACA;;AACA;AAAA;AAAA;EACE;;;AAMR;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA","file":"form.css"}
@@ -0,0 +1,75 @@
1
+ :root {
2
+ --select-arrow-color: var(--color-text);
3
+ --select-width-mobile: 18.75rem; /* 300px minimum on mobile */
4
+ --select-width-desktop: 100%; /* Full width on larger screens */
5
+ }
6
+
7
+ select {
8
+ border: var(--input-outline);
9
+ border-radius: var(--input-radius);
10
+ outline: none;
11
+ background-color: var(--input-bg, var(--color-surface));
12
+ -webkit-appearance: none; /* Remove default arrow in Chrome and Safari */
13
+ -moz-appearance: none; /* Remove default arrow in Firefox */
14
+ appearance: none; /* Remove default arrow in other browsers */
15
+ background-image: linear-gradient(45deg, transparent 50%, var(--select-arrow-color, currentColor) 50%), linear-gradient(135deg, var(--select-arrow-color, currentColor) 50%, transparent 50%);
16
+ background-position: calc(100% - 1.25rem) center, calc(100% - 1rem) center;
17
+ background-size: 0.3125rem 0.3125rem, 0.3125rem 0.3125rem;
18
+ background-repeat: no-repeat;
19
+ padding-inline-start: var(--input-padding-inline);
20
+ padding-inline-end: 2.5rem;
21
+ padding-block: var(--input-padding-block);
22
+ width: max(var(--select-width-mobile), var(--select-width-desktop));
23
+ }
24
+
25
+ /* ==========================================================================
26
+ Option Styling with Data Attributes
27
+ ========================================================================== */
28
+ /*
29
+ option[data-option="primary"] {
30
+ background-color: var(--color-primary-light, #dbeafe);
31
+ color: var(--color-primary, #2563eb);
32
+ font-weight: 600;
33
+ }
34
+
35
+ option[data-option="success"] {
36
+ background-color: var(--color-success-bg, #dcfce7);
37
+ color: var(--color-success, #16a34a);
38
+ }
39
+
40
+ option[data-option="error"] {
41
+ background-color: var(--color-error-bg, #fee2e2);
42
+ color: var(--color-error, #dc2626);
43
+ }
44
+
45
+ option[data-option="warning"] {
46
+ background-color: var(--color-warning-bg, #fef3c7);
47
+ color: var(--color-warning, #d97706);
48
+ }
49
+ */
50
+ /*
51
+ option[data-size="sm"] {
52
+ font-size: 0.875rem; // 14px
53
+ padding: 0.25rem 0.5rem;
54
+ }
55
+
56
+ option[data-size="lg"] {
57
+ font-size: 1.125rem; // 18px
58
+ padding: 0.75rem 1rem;
59
+ font-weight: 500;
60
+ }
61
+ */
62
+ /*
63
+ option[data-featured="true"] {
64
+ font-weight: 700;
65
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
66
+ color: white;
67
+ }
68
+
69
+ option[data-category="premium"] {
70
+ background-color: #fef3c7;
71
+ font-style: italic;
72
+ }
73
+ */
74
+
75
+ /*# sourceMappingURL=select.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sourceRoot":"","sources":["../../components/form/select.scss"],"names":[],"mappings":"AAEA;EAEE;EAGA;EACA;;;AAGF;EAEE;EACA;EACA;EACA;EAGA;EACA;EACA;EAGA;EAEA;EAEA;EAEA;EAGA;EACA;EACA;EAGA;;;AAGF;AAAA;AAAA;AAMA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAwBA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA","file":"select.css"}
@@ -1741,6 +1741,88 @@ footer > div {
1741
1741
  text-align: center;
1742
1742
  }
1743
1743
 
1744
+ fieldset {
1745
+ border: var(--fieldset-border, 1px solid var(--border-default, #999));
1746
+ border-radius: var(--fieldset-border-radius, 0.5rem);
1747
+ padding: var(--fieldset-padding, 1rem);
1748
+ padding-inline: var(--fieldset-padding-inline, 1.5rem);
1749
+ padding-block: var(--fieldset-padding-block, 1rem);
1750
+ margin-block: var(--fieldset-margin-block, 2rem);
1751
+ background: var(--fieldset-bg, transparent);
1752
+ display: flex;
1753
+ flex-direction: column;
1754
+ gap: 1rem;
1755
+ }
1756
+ fieldset > legend {
1757
+ font-size: var(--legend-fs, 1rem);
1758
+ font-weight: var(--legend-fw, 600);
1759
+ padding-inline: var(--legend-padding-inline, 0.5rem);
1760
+ color: var(--legend-color, currentColor);
1761
+ }
1762
+ fieldset .fieldset-description {
1763
+ margin-block-start: 0.5rem;
1764
+ margin-block-end: 0;
1765
+ font-size: var(--fieldset-description-fs, 0.875rem);
1766
+ color: var(--fieldset-description-color, var(--text-subtle, #666));
1767
+ }
1768
+
1769
+ fieldset:focus-within {
1770
+ outline: var(--fieldset-focus-outline, 2px solid var(--focus-color, #005a9c));
1771
+ outline-offset: var(--fieldset-focus-offset, 2px);
1772
+ }
1773
+
1774
+ @media (hover: hover) {
1775
+ fieldset:focus-within:not(:focus-visible) {
1776
+ outline: none;
1777
+ }
1778
+ }
1779
+ fieldset:disabled {
1780
+ opacity: var(--fieldset-disabled-opacity, 0.6);
1781
+ cursor: not-allowed;
1782
+ }
1783
+ fieldset:disabled > legend {
1784
+ color: var(--legend-disabled-color, var(--text-disabled, #757575));
1785
+ }
1786
+
1787
+ fieldset[data-legend=inline] {
1788
+ --fieldset-border: none;
1789
+ --fieldset-padding: 0;
1790
+ }
1791
+ fieldset[data-legend=inline] > legend {
1792
+ float: inline-start;
1793
+ margin-inline-end: 1rem;
1794
+ margin-block-end: 0.5rem;
1795
+ }
1796
+
1797
+ fieldset[data-fieldset=grouped] {
1798
+ --fieldset-bg: var(--surface-subtle, #f5f5f5);
1799
+ --fieldset-padding-block: 1.5rem;
1800
+ --fieldset-border: 2px solid var(--border-focus, #005a9c);
1801
+ }
1802
+ fieldset[data-fieldset=grouped] > legend {
1803
+ --legend-fs: 1.125rem;
1804
+ --legend-fw: 700;
1805
+ }
1806
+
1807
+ @media (prefers-contrast: high) {
1808
+ fieldset {
1809
+ border-width: 2px;
1810
+ }
1811
+ fieldset > legend {
1812
+ font-weight: 700;
1813
+ }
1814
+ }
1815
+ @media (forced-colors: active) {
1816
+ fieldset {
1817
+ border: 1px solid CanvasText;
1818
+ }
1819
+ fieldset > legend {
1820
+ color: CanvasText;
1821
+ }
1822
+ fieldset .fieldset-description {
1823
+ color: CanvasText;
1824
+ }
1825
+ }
1744
1826
  /**
1745
1827
  * Box Component Styles
1746
1828
  *
@@ -3674,6 +3756,79 @@ div:has(> input[type=checkbox])[data-checkbox-size~=lg] {
3674
3756
  align-items: flex-start;
3675
3757
  }
3676
3758
  }
3759
+ :root {
3760
+ --select-arrow-color: var(--color-text);
3761
+ --select-width-mobile: 18.75rem; /* 300px minimum on mobile */
3762
+ --select-width-desktop: 100%; /* Full width on larger screens */
3763
+ }
3764
+
3765
+ select {
3766
+ border: var(--input-outline);
3767
+ border-radius: var(--input-radius);
3768
+ outline: none;
3769
+ background-color: var(--input-bg, var(--color-surface));
3770
+ -webkit-appearance: none; /* Remove default arrow in Chrome and Safari */
3771
+ -moz-appearance: none; /* Remove default arrow in Firefox */
3772
+ appearance: none; /* Remove default arrow in other browsers */
3773
+ background-image: linear-gradient(45deg, transparent 50%, var(--select-arrow-color, currentColor) 50%), linear-gradient(135deg, var(--select-arrow-color, currentColor) 50%, transparent 50%);
3774
+ background-position: calc(100% - 1.25rem) center, calc(100% - 1rem) center;
3775
+ background-size: 0.3125rem 0.3125rem, 0.3125rem 0.3125rem;
3776
+ background-repeat: no-repeat;
3777
+ padding-inline-start: var(--input-padding-inline);
3778
+ padding-inline-end: 2.5rem;
3779
+ padding-block: var(--input-padding-block);
3780
+ width: max(var(--select-width-mobile), var(--select-width-desktop));
3781
+ }
3782
+
3783
+ /* ==========================================================================
3784
+ Option Styling with Data Attributes
3785
+ ========================================================================== */
3786
+ /*
3787
+ option[data-option="primary"] {
3788
+ background-color: var(--color-primary-light, #dbeafe);
3789
+ color: var(--color-primary, #2563eb);
3790
+ font-weight: 600;
3791
+ }
3792
+
3793
+ option[data-option="success"] {
3794
+ background-color: var(--color-success-bg, #dcfce7);
3795
+ color: var(--color-success, #16a34a);
3796
+ }
3797
+
3798
+ option[data-option="error"] {
3799
+ background-color: var(--color-error-bg, #fee2e2);
3800
+ color: var(--color-error, #dc2626);
3801
+ }
3802
+
3803
+ option[data-option="warning"] {
3804
+ background-color: var(--color-warning-bg, #fef3c7);
3805
+ color: var(--color-warning, #d97706);
3806
+ }
3807
+ */
3808
+ /*
3809
+ option[data-size="sm"] {
3810
+ font-size: 0.875rem; // 14px
3811
+ padding: 0.25rem 0.5rem;
3812
+ }
3813
+
3814
+ option[data-size="lg"] {
3815
+ font-size: 1.125rem; // 18px
3816
+ padding: 0.75rem 1rem;
3817
+ font-weight: 500;
3818
+ }
3819
+ */
3820
+ /*
3821
+ option[data-featured="true"] {
3822
+ font-weight: 700;
3823
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
3824
+ color: white;
3825
+ }
3826
+
3827
+ option[data-category="premium"] {
3828
+ background-color: #fef3c7;
3829
+ font-style: italic;
3830
+ }
3831
+ */
3677
3832
  :root {
3678
3833
  --input-border-color: var(--color-border);
3679
3834
  --input-appearance: none;
@@ -3682,9 +3837,9 @@ div:has(> input[type=checkbox])[data-checkbox-size~=lg] {
3682
3837
  --input-outline: thin solid var(--input-border-color);
3683
3838
  --input-padding-inline: 0.6rem;
3684
3839
  --input-padding-block: 0.4rem;
3685
- --input-radius: --var(--radius);
3840
+ --input-radius: var(--radius);
3686
3841
  --input-fs: var(--fs);
3687
- --input-width: clamp(200px, 100%, 500px);
3842
+ --input-width: clamp(12.5rem, 100%, 31.25rem);
3688
3843
  --input-focus-outline: medium solid var(--input-border-color);
3689
3844
  --input-focus-outline-offset: 0;
3690
3845
  --input-disabled-bg: var(--color-disabled-bg);
@@ -3694,7 +3849,6 @@ div:has(> input[type=checkbox])[data-checkbox-size~=lg] {
3694
3849
  --placeholder-style: italic;
3695
3850
  --placeholder-fs: smaller;
3696
3851
  --form-direction: column;
3697
- --select-arrow: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20'><polyline points='6,9 10,13 14,9' stroke='%23000000' stroke-width='1.5' fill='none' /></svg>");
3698
3852
  /* ==========================================================================
3699
3853
  Size Tokens
3700
3854
  ========================================================================== */
@@ -3797,17 +3951,6 @@ input[type=checkbox]:checked {
3797
3951
  background: var(--checkbox-checked-bg) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'><path d='M6.173 11.414l-3.89-3.89 1.414-1.414 2.476 2.475 5.657-5.657 1.414 1.414z'/></svg>") no-repeat center center;
3798
3952
  }
3799
3953
 
3800
- select {
3801
- border: var(--input-outline);
3802
- outline: none;
3803
- -webkit-appearance: none; /* Remove default arrow in Chrome and Safari */
3804
- -moz-appearance: none; /* Remove default arrow in Firefox */
3805
- appearance: none; /* Remove default arrow in other browsers */
3806
- background: var(--select-arrow) no-repeat;
3807
- background-position: right 0.5rem top 50%;
3808
- padding-inline-end: 0;
3809
- }
3810
-
3811
3954
  nav:not(body > nav),
3812
3955
  nav[data-breadcrumb] {
3813
3956
  --breadcrumb-padding-inline: unset;