@cdx-ui/components 0.3.6 → 0.3.8

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 (191) hide show
  1. package/docs/components/content.md +2 -0
  2. package/docs/components/country-flag/content.md +232 -0
  3. package/docs/components/currency-flag/content.md +202 -0
  4. package/docs/components/currency-input/content.md +175 -56
  5. package/docs/components/data-grid/content.md +3 -1
  6. package/docs/components/icon/content.md +1 -1
  7. package/docs/components/input/content.md +1 -0
  8. package/docs/components/progress-bar/content.md +164 -3
  9. package/docs/components/select/content.md +1 -0
  10. package/docs/foundations/expressions/icons/content.md +3 -2
  11. package/docs/getting-started/developers/content.md +1 -1
  12. package/docs/getting-started/developers/styling/content.md +2 -2
  13. package/docs/llms.txt +5 -0
  14. package/docs/patterns/insights/content.md +70 -1
  15. package/docs/resources/content.md +1 -0
  16. package/docs/resources/release-notes/0.3.6/content.md +29 -0
  17. package/docs/resources/release-notes/0.3.7/content.md +27 -0
  18. package/docs/resources/release-notes/content.md +2 -0
  19. package/docs/resources/skills/content.md +66 -0
  20. package/lib/commonjs/components/BarChart/index.js +5 -12
  21. package/lib/commonjs/components/BarChart/index.js.map +1 -1
  22. package/lib/commonjs/components/CountryFlag/index.js +56 -0
  23. package/lib/commonjs/components/CountryFlag/index.js.map +1 -0
  24. package/lib/commonjs/components/CurrencyFlag/index.js +77 -0
  25. package/lib/commonjs/components/CurrencyFlag/index.js.map +1 -0
  26. package/lib/commonjs/components/CurrencyInput/index.js +3 -1
  27. package/lib/commonjs/components/CurrencyInput/index.js.map +1 -1
  28. package/lib/commonjs/components/CurrencyInput/styles.js +23 -7
  29. package/lib/commonjs/components/CurrencyInput/styles.js.map +1 -1
  30. package/lib/commonjs/components/Input/index.js.map +1 -1
  31. package/lib/commonjs/components/LineChart/index.js +3 -6
  32. package/lib/commonjs/components/LineChart/index.js.map +1 -1
  33. package/lib/commonjs/components/ProgressBar/index.js +44 -12
  34. package/lib/commonjs/components/ProgressBar/index.js.map +1 -1
  35. package/lib/commonjs/components/ProgressBar/styles.js +31 -2
  36. package/lib/commonjs/components/ProgressBar/styles.js.map +1 -1
  37. package/lib/commonjs/components/Select/index.js.map +1 -1
  38. package/lib/commonjs/components/chart/hiddenSvgProps.js +23 -0
  39. package/lib/commonjs/components/chart/hiddenSvgProps.js.map +1 -0
  40. package/lib/commonjs/components/index.js +24 -0
  41. package/lib/commonjs/components/index.js.map +1 -1
  42. package/lib/commonjs/figma/Accordion.figma.js +2 -2
  43. package/lib/commonjs/figma/Accordion.figma.js.map +1 -1
  44. package/lib/commonjs/figma/Alert.figma.js +7 -7
  45. package/lib/commonjs/figma/Alert.figma.js.map +1 -1
  46. package/lib/commonjs/figma/Badge.Indicator.figma.js +6 -5
  47. package/lib/commonjs/figma/Badge.Indicator.figma.js.map +1 -1
  48. package/lib/commonjs/figma/Badge.figma.js +22 -22
  49. package/lib/commonjs/figma/Badge.figma.js.map +1 -1
  50. package/lib/commonjs/figma/Button.figma.js +5 -2
  51. package/lib/commonjs/figma/Button.figma.js.map +1 -1
  52. package/lib/commonjs/figma/CLAUDE.md +1 -0
  53. package/lib/commonjs/figma/Card.Header.figma.js +8 -4
  54. package/lib/commonjs/figma/Card.Header.figma.js.map +1 -1
  55. package/lib/commonjs/figma/Card.figma.js +2 -1
  56. package/lib/commonjs/figma/Card.figma.js.map +1 -1
  57. package/lib/commonjs/figma/Chip.figma.js +2 -2
  58. package/lib/commonjs/figma/Chip.figma.js.map +1 -1
  59. package/lib/commonjs/figma/CurrencyInput.figma.js +1 -1
  60. package/lib/commonjs/figma/CurrencyInput.figma.js.map +1 -1
  61. package/lib/commonjs/figma/Dialog.figma.js +5 -2
  62. package/lib/commonjs/figma/Dialog.figma.js.map +1 -1
  63. package/lib/commonjs/figma/Divider.figma.js +1 -1
  64. package/lib/commonjs/figma/Divider.figma.js.map +1 -1
  65. package/lib/commonjs/figma/Drawer.figma.js +3 -3
  66. package/lib/commonjs/figma/Drawer.figma.js.map +1 -1
  67. package/lib/commonjs/figma/IconButton.figma.js +10 -4
  68. package/lib/commonjs/figma/IconButton.figma.js.map +1 -1
  69. package/lib/commonjs/figma/Input.figma.js +2 -1
  70. package/lib/commonjs/figma/Input.figma.js.map +1 -1
  71. package/lib/commonjs/figma/Insight.figma.js +3 -3
  72. package/lib/commonjs/figma/Insight.figma.js.map +1 -1
  73. package/lib/commonjs/figma/ProgressBar.figma.js +11 -2
  74. package/lib/commonjs/figma/ProgressBar.figma.js.map +1 -1
  75. package/lib/commonjs/figma/ProgressSegmented.figma.js +9 -1
  76. package/lib/commonjs/figma/ProgressSegmented.figma.js.map +1 -1
  77. package/lib/commonjs/figma/Select.figma.js +2 -1
  78. package/lib/commonjs/figma/Select.figma.js.map +1 -1
  79. package/lib/commonjs/figma/SystemAlert.figma.js +2 -3
  80. package/lib/commonjs/figma/SystemAlert.figma.js.map +1 -1
  81. package/lib/commonjs/styles.css +0 -1
  82. package/lib/module/components/BarChart/index.js +5 -12
  83. package/lib/module/components/BarChart/index.js.map +1 -1
  84. package/lib/module/components/CountryFlag/index.js +52 -0
  85. package/lib/module/components/CountryFlag/index.js.map +1 -0
  86. package/lib/module/components/CurrencyFlag/index.js +72 -0
  87. package/lib/module/components/CurrencyFlag/index.js.map +1 -0
  88. package/lib/module/components/CurrencyInput/index.js +3 -1
  89. package/lib/module/components/CurrencyInput/index.js.map +1 -1
  90. package/lib/module/components/CurrencyInput/styles.js +23 -7
  91. package/lib/module/components/CurrencyInput/styles.js.map +1 -1
  92. package/lib/module/components/Input/index.js.map +1 -1
  93. package/lib/module/components/LineChart/index.js +3 -6
  94. package/lib/module/components/LineChart/index.js.map +1 -1
  95. package/lib/module/components/ProgressBar/index.js +47 -15
  96. package/lib/module/components/ProgressBar/index.js.map +1 -1
  97. package/lib/module/components/ProgressBar/styles.js +31 -2
  98. package/lib/module/components/ProgressBar/styles.js.map +1 -1
  99. package/lib/module/components/Select/index.js.map +1 -1
  100. package/lib/module/components/chart/hiddenSvgProps.js +20 -0
  101. package/lib/module/components/chart/hiddenSvgProps.js.map +1 -0
  102. package/lib/module/components/index.js +2 -0
  103. package/lib/module/components/index.js.map +1 -1
  104. package/lib/module/figma/Accordion.figma.js +2 -2
  105. package/lib/module/figma/Accordion.figma.js.map +1 -1
  106. package/lib/module/figma/Alert.figma.js +7 -7
  107. package/lib/module/figma/Alert.figma.js.map +1 -1
  108. package/lib/module/figma/Badge.Indicator.figma.js +6 -5
  109. package/lib/module/figma/Badge.Indicator.figma.js.map +1 -1
  110. package/lib/module/figma/Badge.figma.js +22 -22
  111. package/lib/module/figma/Badge.figma.js.map +1 -1
  112. package/lib/module/figma/Button.figma.js +5 -2
  113. package/lib/module/figma/Button.figma.js.map +1 -1
  114. package/lib/module/figma/CLAUDE.md +1 -0
  115. package/lib/module/figma/Card.Header.figma.js +8 -4
  116. package/lib/module/figma/Card.Header.figma.js.map +1 -1
  117. package/lib/module/figma/Card.figma.js +2 -1
  118. package/lib/module/figma/Card.figma.js.map +1 -1
  119. package/lib/module/figma/Chip.figma.js +2 -2
  120. package/lib/module/figma/Chip.figma.js.map +1 -1
  121. package/lib/module/figma/CurrencyInput.figma.js +1 -1
  122. package/lib/module/figma/CurrencyInput.figma.js.map +1 -1
  123. package/lib/module/figma/Dialog.figma.js +5 -2
  124. package/lib/module/figma/Dialog.figma.js.map +1 -1
  125. package/lib/module/figma/Divider.figma.js +1 -1
  126. package/lib/module/figma/Divider.figma.js.map +1 -1
  127. package/lib/module/figma/Drawer.figma.js +3 -3
  128. package/lib/module/figma/Drawer.figma.js.map +1 -1
  129. package/lib/module/figma/IconButton.figma.js +10 -4
  130. package/lib/module/figma/IconButton.figma.js.map +1 -1
  131. package/lib/module/figma/Input.figma.js +2 -1
  132. package/lib/module/figma/Input.figma.js.map +1 -1
  133. package/lib/module/figma/Insight.figma.js +3 -3
  134. package/lib/module/figma/Insight.figma.js.map +1 -1
  135. package/lib/module/figma/ProgressBar.figma.js +12 -2
  136. package/lib/module/figma/ProgressBar.figma.js.map +1 -1
  137. package/lib/module/figma/ProgressSegmented.figma.js +9 -1
  138. package/lib/module/figma/ProgressSegmented.figma.js.map +1 -1
  139. package/lib/module/figma/Select.figma.js +2 -1
  140. package/lib/module/figma/Select.figma.js.map +1 -1
  141. package/lib/module/figma/SystemAlert.figma.js +2 -3
  142. package/lib/module/figma/SystemAlert.figma.js.map +1 -1
  143. package/lib/module/styles.css +0 -1
  144. package/lib/typescript/components/BarChart/index.d.ts.map +1 -1
  145. package/lib/typescript/components/CountryFlag/index.d.ts +40 -0
  146. package/lib/typescript/components/CountryFlag/index.d.ts.map +1 -0
  147. package/lib/typescript/components/CurrencyFlag/index.d.ts +47 -0
  148. package/lib/typescript/components/CurrencyFlag/index.d.ts.map +1 -0
  149. package/lib/typescript/components/CurrencyInput/index.d.ts.map +1 -1
  150. package/lib/typescript/components/CurrencyInput/styles.d.ts +6 -1
  151. package/lib/typescript/components/CurrencyInput/styles.d.ts.map +1 -1
  152. package/lib/typescript/components/Input/index.d.ts +2 -0
  153. package/lib/typescript/components/Input/index.d.ts.map +1 -1
  154. package/lib/typescript/components/LineChart/index.d.ts.map +1 -1
  155. package/lib/typescript/components/ProgressBar/index.d.ts +16 -1
  156. package/lib/typescript/components/ProgressBar/index.d.ts.map +1 -1
  157. package/lib/typescript/components/ProgressBar/styles.d.ts +7 -2
  158. package/lib/typescript/components/ProgressBar/styles.d.ts.map +1 -1
  159. package/lib/typescript/components/Select/index.d.ts +2 -0
  160. package/lib/typescript/components/Select/index.d.ts.map +1 -1
  161. package/lib/typescript/components/chart/hiddenSvgProps.d.ts +17 -0
  162. package/lib/typescript/components/chart/hiddenSvgProps.d.ts.map +1 -0
  163. package/lib/typescript/components/index.d.ts +2 -0
  164. package/lib/typescript/components/index.d.ts.map +1 -1
  165. package/lib/typescript/figma/Alert.figma.d.ts.map +1 -1
  166. package/lib/typescript/figma/Badge.Indicator.figma.d.ts.map +1 -1
  167. package/lib/typescript/figma/Badge.figma.d.ts.map +1 -1
  168. package/lib/typescript/figma/Button.figma.d.ts.map +1 -1
  169. package/lib/typescript/figma/Card.Header.figma.d.ts.map +1 -1
  170. package/lib/typescript/figma/Card.figma.d.ts.map +1 -1
  171. package/lib/typescript/figma/Dialog.figma.d.ts.map +1 -1
  172. package/lib/typescript/figma/IconButton.figma.d.ts.map +1 -1
  173. package/lib/typescript/figma/Input.figma.d.ts.map +1 -1
  174. package/lib/typescript/figma/ProgressBar.figma.d.ts.map +1 -1
  175. package/lib/typescript/figma/ProgressSegmented.figma.d.ts.map +1 -1
  176. package/lib/typescript/figma/Select.figma.d.ts.map +1 -1
  177. package/lib/typescript/figma/SystemAlert.figma.d.ts.map +1 -1
  178. package/package.json +5 -5
  179. package/src/components/BarChart/index.tsx +5 -12
  180. package/src/components/CountryFlag/index.tsx +58 -0
  181. package/src/components/CurrencyFlag/index.tsx +71 -0
  182. package/src/components/CurrencyInput/index.tsx +2 -1
  183. package/src/components/CurrencyInput/styles.ts +29 -3
  184. package/src/components/Input/index.tsx +2 -0
  185. package/src/components/LineChart/index.tsx +3 -6
  186. package/src/components/ProgressBar/index.tsx +66 -14
  187. package/src/components/ProgressBar/styles.ts +35 -4
  188. package/src/components/Select/index.tsx +2 -0
  189. package/src/components/chart/hiddenSvgProps.ts +15 -0
  190. package/src/components/index.ts +2 -0
  191. package/src/styles.css +0 -1
@@ -129,32 +129,72 @@ export default function CurrencyInputCustomSymbolDemo() {
129
129
 
130
130
  ## States
131
131
 
132
- The root controls disabled, read-only, required, and invalid state for the field.
132
+ The root controls disabled, read-only, required, and invalid state for the field. Disabled, read-only, and invalid apply to both `ghost` and `outline`.
133
133
 
134
134
  ```tsx
135
- import { Box, CurrencyInput, Text } from '@cdx-ui/components';
135
+ import { Box, CurrencyInput, Text, type CurrencyInputProps } from '@cdx-ui/components';
136
+
137
+ const variants = ['ghost', 'outline'] as const satisfies readonly NonNullable<
138
+ CurrencyInputProps['variant']
139
+ >[];
140
+
141
+ const states = [
142
+ { label: 'Disabled', value: 1200, isDisabled: true },
143
+ { label: 'Read-only', value: 4890, isReadOnly: true },
144
+ { label: 'Invalid', value: 0, isInvalid: true },
145
+ ] as const satisfies readonly {
146
+ label: string;
147
+ value: number;
148
+ isDisabled?: boolean;
149
+ isReadOnly?: boolean;
150
+ isInvalid?: boolean;
151
+ }[];
152
+
153
+ function StateRow({
154
+ variant,
155
+ label,
156
+ value,
157
+ isDisabled,
158
+ isReadOnly,
159
+ isInvalid,
160
+ }: {
161
+ variant: NonNullable<CurrencyInputProps['variant']>;
162
+ label: string;
163
+ value: number;
164
+ isDisabled?: boolean;
165
+ isReadOnly?: boolean;
166
+ isInvalid?: boolean;
167
+ }) {
168
+ return (
169
+ <Box className="gap-2">
170
+ <Text size="sm" color="secondary">
171
+ {label}
172
+ </Text>
173
+ <CurrencyInput
174
+ accessibilityLabel={`${label} ${variant} transfer amount`}
175
+ isDisabled={isDisabled}
176
+ isInvalid={isInvalid}
177
+ isReadOnly={isReadOnly}
178
+ variant={variant}
179
+ value={value}
180
+ />
181
+ </Box>
182
+ );
183
+ }
136
184
 
137
185
  export default function CurrencyInputStatesDemo() {
138
186
  return (
139
- <Box className="w-full gap-4">
140
- <Box className="gap-2">
141
- <Text size="sm" color="secondary">
142
- Disabled
143
- </Text>
144
- <CurrencyInput accessibilityLabel="Disabled transfer amount" isDisabled value={1200} />
145
- </Box>
146
- <Box className="gap-2">
147
- <Text size="sm" color="secondary">
148
- Read-only
149
- </Text>
150
- <CurrencyInput accessibilityLabel="Read-only transfer amount" isReadOnly value={4890} />
151
- </Box>
152
- <Box className="gap-2">
153
- <Text size="sm" color="secondary">
154
- Invalid
155
- </Text>
156
- <CurrencyInput accessibilityLabel="Invalid transfer amount" isInvalid value={0} />
157
- </Box>
187
+ <Box className="w-full gap-6">
188
+ {variants.map((variant) => (
189
+ <Box key={variant} className="gap-4">
190
+ <Text size="sm" color="secondary">
191
+ {variant}
192
+ </Text>
193
+ {states.map((state) => (
194
+ <StateRow key={state.label} variant={variant} {...state} />
195
+ ))}
196
+ </Box>
197
+ ))}
158
198
  </Box>
159
199
  );
160
200
  }
@@ -200,60 +240,138 @@ export default function CurrencyInputWithFieldDemo() {
200
240
  }
201
241
  ```
202
242
 
203
- ## With field and validation
243
+ ## In card
204
244
 
205
- Set invalid state on both `Field` and `CurrencyInput` so the error message and amount styling stay in sync.
245
+ Stack the label above the amount. Align `Field.Label` to the start, and set `align="end"` on `CurrencyInput`.
206
246
 
207
247
  ```tsx
208
- import { useState } from 'react';
209
- import { CurrencyInput, Field } from '@cdx-ui/components';
210
-
211
- const DAILY_LIMIT = 1200;
212
-
213
- export default function CurrencyInputOutlineWithFieldInvalidDemo() {
214
- const [amount, setAmount] = useState(1500);
215
- const isInvalid = amount > DAILY_LIMIT;
248
+ import { Card, CurrencyInput, Field } from '@cdx-ui/components';
216
249
 
250
+ export default function CurrencyInputInCardDemo() {
217
251
  return (
218
- <Field className="w-full" isRequired isInvalid={isInvalid}>
219
- <Field.Label>Amount</Field.Label>
220
- <CurrencyInput
221
- isInvalid={isInvalid}
222
- isRequired
223
- variant="outline"
224
- value={amount}
225
- onChangeValue={setAmount}
226
- />
227
- <Field.Error>Amount exceeds your daily limit.</Field.Error>
228
- </Field>
252
+ <Card className="w-full max-w-md">
253
+ <Card.Content>
254
+ <Field className="w-full">
255
+ <Field.Label className="self-start">Available balance</Field.Label>
256
+ <CurrencyInput align="end" isReadOnly size="small" value={4250.18} />
257
+ </Field>
258
+ </Card.Content>
259
+ </Card>
229
260
  );
230
261
  }
231
262
  ```
232
263
 
233
- The same validation in the `ghost` pattern, with a centered label and error.
264
+ ## With field and validation
265
+
266
+ Set disabled, read-only, and invalid on both `Field` and `CurrencyInput` so the label, message, and amount styling stay in sync. Keep the `outline` label and error aligned to the start. For `ghost`, center the label and error and use `size="small"`.
234
267
 
235
268
  ```tsx
236
269
  import { useState } from 'react';
237
- import { CurrencyInput, Field } from '@cdx-ui/components';
270
+ import { Box, CurrencyInput, Field, Text } from '@cdx-ui/components';
238
271
 
239
272
  const DAILY_LIMIT = 1200;
240
273
 
241
- export default function CurrencyInputWithFieldInvalidDemo() {
274
+ function OutlineFields() {
242
275
  const [amount, setAmount] = useState(1500);
243
276
  const isInvalid = amount > DAILY_LIMIT;
244
277
 
245
278
  return (
246
- <Field className="w-full" isRequired isInvalid={isInvalid}>
247
- <Field.Label className="text-center">Amount</Field.Label>
248
- <CurrencyInput
249
- isInvalid={isInvalid}
250
- isRequired
251
- size="small"
252
- value={amount}
253
- onChangeValue={setAmount}
254
- />
255
- <Field.Error className="justify-center">Amount exceeds your daily limit.</Field.Error>
256
- </Field>
279
+ <Box className="w-full gap-4">
280
+ <Text size="sm" color="secondary">
281
+ outline
282
+ </Text>
283
+ <Box className="gap-2">
284
+ <Text size="sm" color="secondary">
285
+ Disabled
286
+ </Text>
287
+ <Field className="w-full" isDisabled>
288
+ <Field.Label>Amount</Field.Label>
289
+ <CurrencyInput isDisabled variant="outline" value={1200} />
290
+ </Field>
291
+ </Box>
292
+ <Box className="gap-2">
293
+ <Text size="sm" color="secondary">
294
+ Read-only
295
+ </Text>
296
+ <Field className="w-full" isReadOnly>
297
+ <Field.Label>Amount</Field.Label>
298
+ <CurrencyInput isReadOnly variant="outline" value={4890} />
299
+ </Field>
300
+ </Box>
301
+ <Box className="gap-2">
302
+ <Text size="sm" color="secondary">
303
+ Invalid
304
+ </Text>
305
+ <Field className="w-full" isRequired isInvalid={isInvalid}>
306
+ <Field.Label>Amount</Field.Label>
307
+ <CurrencyInput
308
+ isInvalid={isInvalid}
309
+ isRequired
310
+ variant="outline"
311
+ value={amount}
312
+ onChangeValue={setAmount}
313
+ />
314
+ <Field.Error>Amount exceeds your daily limit.</Field.Error>
315
+ </Field>
316
+ </Box>
317
+ </Box>
318
+ );
319
+ }
320
+
321
+ function GhostFields() {
322
+ const [amount, setAmount] = useState(1500);
323
+ const isInvalid = amount > DAILY_LIMIT;
324
+
325
+ return (
326
+ <Box className="w-full gap-4">
327
+ <Text size="sm" color="secondary">
328
+ ghost
329
+ </Text>
330
+ <Box className="gap-2">
331
+ <Text size="sm" color="secondary">
332
+ Disabled
333
+ </Text>
334
+ <Field className="w-full" isDisabled>
335
+ <Field.Label className="text-center">Amount</Field.Label>
336
+ <CurrencyInput isDisabled size="small" variant="ghost" value={1200} />
337
+ </Field>
338
+ </Box>
339
+ <Box className="gap-2">
340
+ <Text size="sm" color="secondary">
341
+ Read-only
342
+ </Text>
343
+ <Field className="w-full" isReadOnly>
344
+ <Field.Label className="text-center">Amount</Field.Label>
345
+ <CurrencyInput isReadOnly size="small" variant="ghost" value={4890} />
346
+ </Field>
347
+ </Box>
348
+ <Box className="gap-2">
349
+ <Text size="sm" color="secondary">
350
+ Invalid
351
+ </Text>
352
+ <Field className="w-full" isRequired isInvalid={isInvalid}>
353
+ <Field.Label className="text-center">Amount</Field.Label>
354
+ <CurrencyInput
355
+ isInvalid={isInvalid}
356
+ isRequired
357
+ size="small"
358
+ variant="ghost"
359
+ value={amount}
360
+ onChangeValue={setAmount}
361
+ />
362
+ <Field.Error className="justify-center">Amount exceeds your daily limit.</Field.Error>
363
+ </Field>
364
+ </Box>
365
+ </Box>
366
+ );
367
+ }
368
+
369
+ export default function CurrencyInputOutlineWithFieldInvalidDemo() {
370
+ return (
371
+ <Box className="w-full gap-6">
372
+ <OutlineFields />
373
+ <GhostFields />
374
+ </Box>
257
375
  );
258
376
  }
259
377
  ```
@@ -278,6 +396,7 @@ Controlled calculator-style monetary entry. The numeric `value` is expressed in
278
396
  | `isFullWidth?` | `boolean` | — | If true, the input element will span the full width of its parent. |
279
397
  | `variant?` | `'ghost' \| 'outline'` | `'ghost'` | Visual style. `ghost` is the large, centered, borderless amount entry; `outline` renders the bordered `Input` shell with a leading currency-symbol prefix, for amounts that sit alongside other form fields. |
280
398
  | `size?` | `'default' \| 'small'` | `'default'` | Height, padding, and text size. |
399
+ | `align?` | `'center' \| 'end'` | — | Horizontal alignment of the amount. Defaults to `center` on `ghost`. On `outline`, the amount stays at the start of the field until `align` is set. |
281
400
 
282
401
  Supports `accessibilityLabel`, `accessibilityHint`, `testID`, `onFocus`, `onBlur`, and `returnKeyType` from [`TextInputProps`](https://reactnative.dev/docs/textinput#props). `style` applies to the root container, and the forwarded ref targets the underlying `TextInput`.
283
402
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Resources: [Storybook](https://victorious-wave-0daadf00f.6.azurestaticapps.net/?path=/story/data-visualization-datagrid--default)
4
4
 
5
- `DataGrid` is a **web-only** data-driven grid. Install `@cdx-ui/data-grid` in addition to `@cdx-ui/components`. For fully custom markup use `Table`. For a standalone pager use `TablePagination`.
5
+ `DataGrid` is a **web-only** data-driven grid. Install `@cdx-ui/data-grid` in addition to `@cdx-ui/components`, and add `@import '@cdx-ui/data-grid/styles.css';` after `@cdx-ui/components/styles.css` in your Tailwind CSS entry; without it the grid renders without its border, header background, or row dividers. For fully custom markup use `Table`. For a standalone pager use `TablePagination`.
6
6
 
7
7
  ```tsx
8
8
  import {
@@ -26,6 +26,8 @@ Search is **not** always on. Set `showToolbar` to show the search field (same op
26
26
 
27
27
  The grid is a fixed viewport like MUI Data Grid Community: **300px** tall by default. Column headers stay visible while rows scroll; pagination stays at the bottom. Override height with a `className` such as `h-full` or a spacing-scale height (`h-130`).
28
28
 
29
+ Set `autoHeight` to size the grid to its rows instead, so a short table leaves no empty space below the last row. The grid then grows with every row on the page, so pair it with pagination for long data. The empty state keeps a minimum height.
30
+
29
31
  When `rows` is empty, a centered "No rows" message is shown and pagination is omitted. Pass `noRowsOverlay` to replace the default message.
30
32
 
31
33
  ```tsx
@@ -180,7 +180,7 @@ Inherits all `ForgeIconProps` except the SVG `color`: [`SvgProps`](https://githu
180
180
  - A raw `color` value, such as a hex string, is deprecated. It is passed to the SVG unchanged and logs a one-time warning in development. Use a semantic color instead.
181
181
  - `className` defaults to `size-5 shrink-0`, so an icon keeps its size in a row of text on web.
182
182
  - Consumer classes are merged after the defaults, so `size-*` and `shrink` utilities override them.
183
- - Don't pass the inherited numeric `size` prop; it bypasses the spacing scale. Use `size-4` or `size-6` when the default doesn't fit.
183
+ - Don't pass the inherited numeric `size` prop; it bypasses the spacing scale. Use another `size-*` class on the spacing scale when the default doesn't fit.
184
184
  - `filled` defaults to `false`.
185
185
 
186
186
  ## Accessibility
@@ -346,6 +346,7 @@ Renders a Forge icon sized to the input. Inherits size from the parent Input con
346
346
  | Prop | Type | Default | Description |
347
347
  | --- | --- | --- | --- |
348
348
  | `className?` | `string` | — | Utility classes for size (`size-*`) and placement, merged after the defaults. |
349
+ | `children?` | `ReactNode` | — | The element rendered when `asChild` is set. |
349
350
  | `filled?` | `boolean` | — | When `true`, renders the filled variant of the icon (if available). Defaults to `false` (outlined). |
350
351
  | `size?` | `string \| number` | — | Width and height of the icon, in pixels or any SVG length. The bare icon renders at 24 when omitted. |
351
352
  | `data-testid?` | `string` | — | Test identifier forwarded to the rendered SVG. |
@@ -47,6 +47,165 @@ export default function ProgressBarValuesDemo() {
47
47
  }
48
48
  ```
49
49
 
50
+ ## Sizes
51
+
52
+ `default` is 6px tall; `large` is 8px. Size is set on the root and applied to the track.
53
+
54
+ ```tsx
55
+ import { Box, ProgressBar, Text } from '@cdx-ui/components';
56
+
57
+ export default function ProgressBarSizesDemo() {
58
+ return (
59
+ <Box className="w-full max-w-md gap-4">
60
+ <Box className="gap-1.5">
61
+ <Text size="sm" color="secondary">
62
+ default
63
+ </Text>
64
+ <ProgressBar value={60} max={100} size="default" accessibilityLabel="Default size progress">
65
+ <ProgressBar.Indicator />
66
+ </ProgressBar>
67
+ </Box>
68
+ <Box className="gap-1.5">
69
+ <Text size="sm" color="secondary">
70
+ large
71
+ </Text>
72
+ <ProgressBar value={60} max={100} size="large" accessibilityLabel="Large size progress">
73
+ <ProgressBar.Indicator />
74
+ </ProgressBar>
75
+ </Box>
76
+ </Box>
77
+ );
78
+ }
79
+ ```
80
+
81
+ ## Colors
82
+
83
+ Severity colors use `surface-*-strong` fills. Categorical colors use `chart-categorical-*` so FI theme overrides flow through without a component change. The track is always `surface-neutral-subtle`.
84
+
85
+ ```tsx
86
+ import { Box, ProgressBar, Text, type ProgressBarColor } from '@cdx-ui/components';
87
+
88
+ const COLORS: readonly ProgressBarColor[] = [
89
+ 'action',
90
+ 'danger',
91
+ 'warning',
92
+ 'success',
93
+ 'info',
94
+ 'categorical-1',
95
+ 'categorical-2',
96
+ 'categorical-3',
97
+ 'categorical-4',
98
+ 'categorical-5',
99
+ 'categorical-6',
100
+ ];
101
+
102
+ export default function ProgressBarColorsDemo() {
103
+ return (
104
+ <Box className="w-full max-w-md gap-3">
105
+ {COLORS.map((color) => (
106
+ <Box key={color} className="gap-1.5">
107
+ <Text size="sm" color="secondary">
108
+ {color}
109
+ </Text>
110
+ <ProgressBar value={65} max={100} color={color} accessibilityLabel={`${color} progress`}>
111
+ <ProgressBar.Indicator />
112
+ </ProgressBar>
113
+ </Box>
114
+ ))}
115
+ </Box>
116
+ );
117
+ }
118
+ ```
119
+
120
+ ## Indeterminate
121
+
122
+ Pass `value={null}` for a segment that passes across the track until a value is known.
123
+
124
+ ```tsx
125
+ import { ProgressBar } from '@cdx-ui/components';
126
+
127
+ export default function ProgressBarIndeterminateDemo() {
128
+ return (
129
+ <ProgressBar value={null} accessibilityLabel="Loading">
130
+ <ProgressBar.Indicator />
131
+ </ProgressBar>
132
+ );
133
+ }
134
+ ```
135
+
136
+ ## Budget rows
137
+
138
+ Compose a label, percent, bar, and caption so status is clear in text, not by color alone.
139
+
140
+ ```tsx
141
+ import { Box, HStack, ProgressBar, Text, type ProgressBarColor } from '@cdx-ui/components';
142
+
143
+ interface BudgetRow {
144
+ readonly label: string;
145
+ readonly percent: number;
146
+ readonly caption: string;
147
+ readonly color: ProgressBarColor;
148
+ }
149
+
150
+ const ROWS: readonly BudgetRow[] = [
151
+ {
152
+ label: 'Dining',
153
+ percent: 80,
154
+ caption: '$320 of $400 — 10 days left',
155
+ color: 'categorical-1',
156
+ },
157
+ {
158
+ label: 'Groceries',
159
+ percent: 55,
160
+ caption: '$275 of $500 — on track',
161
+ color: 'categorical-2',
162
+ },
163
+ {
164
+ label: 'Transport',
165
+ percent: 95,
166
+ caption: '$190 of $200 — near limit',
167
+ color: 'warning',
168
+ },
169
+ {
170
+ label: 'Entertainment',
171
+ percent: 40,
172
+ caption: '$60 of $150 — under budget',
173
+ color: 'success',
174
+ },
175
+ ];
176
+
177
+ export default function ProgressBarBudgetRowsDemo() {
178
+ return (
179
+ <Box className="w-full max-w-md gap-4">
180
+ {ROWS.map((row) => (
181
+ <Box key={row.label} className="gap-1.5">
182
+ <HStack space="sm" className="items-baseline justify-between">
183
+ <Text size="sm" weight="medium">
184
+ {row.label}
185
+ </Text>
186
+ <Text size="sm" color="secondary">
187
+ {row.percent}%
188
+ </Text>
189
+ </HStack>
190
+ <ProgressBar
191
+ value={row.percent}
192
+ max={100}
193
+ size="large"
194
+ color={row.color}
195
+ accessibilityLabel={`${row.label} budget ${String(row.percent)} percent used`}
196
+ >
197
+ <ProgressBar.Indicator />
198
+ </ProgressBar>
199
+ <Text size="sm" color="secondary">
200
+ {row.caption}
201
+ </Text>
202
+ </Box>
203
+ ))}
204
+ </Box>
205
+ );
206
+ }
207
+ ```
208
+
50
209
  ## API
51
210
 
52
211
  ### ProgressBar
@@ -55,8 +214,10 @@ Sets `role="progressbar"` and `accessibilityRole="progressbar"`. Pass `value={nu
55
214
 
56
215
  | Prop | Type | Default | Description |
57
216
  | --- | --- | --- | --- |
58
- | `className?` | `string` | — | — |
217
+ | `className?` | `string` | — | Additional Uniwind/Tailwind classes, merged after the track's own styles. |
59
218
  | `children?` | `React.ReactNode` | — | — |
219
+ | `size?` | `'default' \| 'large'` | `'default'` | Track height. Inherited by `ProgressBar.Indicator` via style context. |
220
+ | `color?` | `'action' \| 'danger' \| 'warning' \| 'success' \| 'info' \| 'categorical-1' \| 'categorical-2' \| 'categorical-3' \| 'categorical-4' \| 'categorical-5' \| 'categorical-6'` | `'action'` | Indicator fill color. Inherited by `ProgressBar.Indicator` via style context. The track is always `surface-neutral-subtle`. |
60
221
  | `value?` | `number \| null` | `0` | Current value in the range `[0, max]`, or `null` for indeterminate progress. Values below `0` clamp to `0`; values above `max` clamp to `max`. Non-finite values (such as `NaN`) are treated as `0`. |
61
222
  | `max?` | `number` | `100` | Maximum value. The minimum is always `0`. A `max` of `0` or less is treated as complete. |
62
223
  | `getValueLabel?` | `((value: number, max: number) => string)` | — | Screen-reader text for determinate progress (`accessibilityValue.text`). Defaults to a rounded percentage of `max`, such as `"45%"`. No effect when `value` is `null`, or when `accessibilityValue` is set. |
@@ -73,11 +234,11 @@ Inherits all [`ViewProps`](https://reactnative.dev/docs/view#props).
73
234
 
74
235
  ### ProgressBar.Indicator
75
236
 
76
- The filled portion of the track. Width is set automatically from `value / max`.
237
+ The filled portion of the track. Width is set automatically from `value / max`. In indeterminate mode a partial segment passes across the track.
77
238
 
78
239
  | Prop | Type | Default | Description |
79
240
  | --- | --- | --- | --- |
80
- | `className?` | `string` | — | — |
241
+ | `className?` | `string` | — | Additional Uniwind/Tailwind classes, merged after the indicator's own styles. |
81
242
  | `children?` | `React.ReactNode` | — | — |
82
243
 
83
244
  Inherits all [`ViewProps`](https://reactnative.dev/docs/view#props).
@@ -644,6 +644,7 @@ Renders a Forge icon sized to the select. Use it as the `indicator` value when a
644
644
  | Prop | Type | Default | Description |
645
645
  | --- | --- | --- | --- |
646
646
  | `className?` | `string` | — | Utility classes for size (`size-*`) and placement, merged after the defaults. |
647
+ | `children?` | `ReactNode` | — | The element rendered when `asChild` is set. |
647
648
  | `filled?` | `boolean` | — | When `true`, renders the filled variant of the icon (if available). Defaults to `false` (outlined). |
648
649
  | `size?` | `string \| number` | — | Width and height of the icon, in pixels or any SVG length. The bare icon renders at 24 when omitted. |
649
650
  | `data-testid?` | `string` | — | Test identifier forwarded to the rendered SVG. |
@@ -2,8 +2,9 @@
2
2
 
3
3
  Cross-platform icon library for Forge UI, built on [Material Symbols](https://fonts.google.com/icons) (outlined style, weight 400, optical size 24). Renders via `react-native-svg` and targets iOS, Android, and Web.
4
4
 
5
- 3,986 icons are available, each with outlined and filled variants, plus support for custom
6
- SVGs.
5
+ 3,991 icons are available, each with outlined and filled variants, plus support for custom
6
+ SVGs. Country flags are a separate set and do not appear in the browser below. Render one with
7
+ [`CountryFlag`](https://design.candescent.com/docs/components/country-flag/content.md).
7
8
 
8
9
  ```bash
9
10
  pnpm add @cdx-ui/icons
@@ -93,7 +93,7 @@ Create `global.css` in your project root:
93
93
  - **`@custom-variant dark`** — Switches Tailwind v4's dark mode from `@media (prefers-color-scheme)` to class-based activation. Required for `ScopedTheme` to work on web. Harmless if you don't use `ScopedTheme` — global dark mode continues to work via `Uniwind.setTheme()`.
94
94
  - **`@cdx-ui/styles/theme.css`** — Design tokens (colors, spacing, radii, shadows, fonts) as a Tailwind v4 `@theme static` block, plus light/dark mode and platform font overrides via `@variant`.
95
95
  - **`@cdx-ui/styles/utilities.css`** — Composite typography utilities (`heading-xl`…`heading-xs`, `body-xl`…`body-xs`, `label-sm`, `label-xs`) used by `Heading`, `Text`, and `Link`. Each has a `-size` companion (`body-sm-size`) that sets only the font size, line height, and letter spacing, so nested text can change size and keep its inherited font family and weight.
96
- - **`@cdx-ui/components/styles.css`** — `@source` directive telling Tailwind where to scan for component utility classes.
96
+ - **`@cdx-ui/components/styles.css`** — `@source` directive telling Tailwind where to scan for component utility classes. If you use `DataGrid`, also import `@cdx-ui/data-grid/styles.css`, which does the same for `@cdx-ui/data-grid`.
97
97
 
98
98
  > [!NOTE]
99
99
  >
@@ -52,7 +52,7 @@ Every component's API table lists the props that choose its look. Reach for them
52
52
  - **Typography:** `Text` takes `size`, `weight` and `italic`. `Heading` takes `size` only.
53
53
  - **Nesting:** a `Text` inside another text element (a `Text`, a `Heading`, or a slot such as `Button.Label`) inherits its color, size and weight. Set only what differs.
54
54
  - **Alignment:** `text-center`, `text-start` and `text-end` are allowed as classes. Never use `text-left` or `text-right`, which break right-to-left layouts.
55
- - **Casing:** `uppercase` is allowed as a class.
55
+ - **Other text styling:** `color`, `size`, `weight` and `italic` are the only typography props, and Forge UI will not add more. Everything else is a plain class, on `Text`, `Heading` and a component's text slot (`Button.Label`, `Chip.Label`): decoration (`underline`, `line-through`), casing (`uppercase`, `capitalize`), truncation and wrapping (`truncate`, `line-clamp-*`, `text-ellipsis`, `whitespace-nowrap`) and numerals (`tabular-nums`). Line height and letter spacing come with `size`, so `leading-*` and `tracking-*` stay off.
56
56
  - **Icon size:** use a `size-*` class on the spacing scale. The default is `size-5`, so don't restate it, and don't pass a numeric `size`.
57
57
 
58
58
  ```tsx
@@ -86,7 +86,7 @@ On a Forge UI component, `className` positions the component in its parent and n
86
86
  | Width constraints | `w-full`, `max-w-md`, `min-w-0` |
87
87
  | Margin on the spacing scale | `mt-4`, `mx-2` |
88
88
 
89
- Padding, backgrounds, borders, radii, colors, typography and heights are not allowed, on the component or on any of its parts. Between siblings, prefer a stack's `space` prop to margins.
89
+ Padding, backgrounds, borders, radii, colors, font size, weight and family, and heights are not allowed, on the component or on any of its parts. The text classes under [Text, Heading and Icon](#text-heading-and-icon) are. Between siblings, prefer a stack's `space` prop to margins.
90
90
 
91
91
  ```tsx
92
92
  // Wrong: restyling Card parts to match a mockup
package/docs/llms.txt CHANGED
@@ -85,6 +85,8 @@ Links point at each page's `content.md`, which carries the page's prose, demo so
85
85
  - [Divider](components/divider/content.md): A horizontal or vertical separator for grouping related content, with an optional inline label. Resources: [Figma](https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--Components?node-id=6771-8895), [Storybook](https://victorious-wave-0daadf00f.6.azurestaticapps.net/?path=/story/layout-divider--default)
86
86
  - [Insurance Disclosure](components/insurance-disclosure/content.md): Domain-specific regulatory disclosure — official FDIC lockup with optional copy for account footers, deposit screens, and onboarding. Resources: [Figma](https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--Components?node-id=8550-3291), [Storybook](https://victorious-wave-0daadf00f.6.azurestaticapps.net/?path=/story/domain-insurancedisclosure--default)
87
87
  - [Icon](components/icon/content.md): A cross-platform SVG icon wrapper with semantic color, sizing, filled variants, and accessibility support. Resources: [Figma](https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--React-Native-Components?node-id=397-33), [Storybook](https://victorious-wave-0daadf00f.6.azurestaticapps.net/?path=/story/content-icon--default)
88
+ - [Country Flag](components/country-flag/content.md): A flag for a country-flag-icons code, including unofficial codes used by libphonenumber-js. Resources: [Storybook](https://victorious-wave-0daadf00f.6.azurestaticapps.net/?path=/story/content-countryflag--default)
89
+ - [Currency Flag](components/currency-flag/content.md): The flag of the country or union that issues an ISO 4217 currency. Resources: [Storybook](https://victorious-wave-0daadf00f.6.azurestaticapps.net/?path=/story/content-currencyflag--default)
88
90
  - [Image](components/image/content.md): Displays local or remote images across native and web platforms. Resources: [Figma](https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--Components?node-id=9091-16186), [Storybook](https://victorious-wave-0daadf00f.6.azurestaticapps.net/?path=/story/content-image--default)
89
91
  - [List Item](components/list-item/content.md): A composable row for display and navigation — accounts, transactions, alerts, settings, and nav rows. Resources: [Figma](https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--React-Native-Components?node-id=3710-4649), [Storybook](https://victorious-wave-0daadf00f.6.azurestaticapps.net/?path=/story/surfaces-listitem--default)
90
92
  - [Reorderable List](components/reorderable-list/content.md): A short, mount-all list that lets members drag rows into a new order via an explicit handle. Resources: [Storybook](https://victorious-wave-0daadf00f.6.azurestaticapps.net/?path=/story/layout-reorderablelist--default)
@@ -141,6 +143,7 @@ Links point at each page's `content.md`, which carries the page's prose, demo so
141
143
 
142
144
  - **Tools**
143
145
  - [Figma libraries](resources/figma-libraries/content.md): Access our official design system Figma libraries
146
+ - [Agent skills](resources/skills/content.md): Teach AI coding agents to build with Forge UI components as they ship, without restyling them.
144
147
 
145
148
  - **Changelogs**
146
149
  - Release notes
@@ -148,6 +151,8 @@ Links point at each page's `content.md`, which carries the page's prose, demo so
148
151
 
149
152
  ## Release notes
150
153
 
154
+ - [0.3.7](resources/release-notes/0.3.7/content.md): Adds CountryFlag for ISO country flags, ProgressBar size and color props, DataGrid autoHeight, and fixes for web charts and published DataGrid styles.
155
+ - [0.3.6](resources/release-notes/0.3.6/content.md): Adds SystemAlert, bar, line, and pie charts on a shared MUI X-shaped API, Stepper, and a fix for tabs scroll controls.
151
156
  - [0.3.5](resources/release-notes/0.3.5/content.md): Selected subtle Chip labels stay visible on Android when the variant changes from outline to subtle.
152
157
  - [0.3.4](resources/release-notes/0.3.4/content.md): Select adds multiple selection, in-list search, and a native bottom sheet; Input gains a subtle variant for fields inside popups and sheets.
153
158
  - [0.3.3](resources/release-notes/0.3.3/content.md): Insight and InsightStack add dismissible summary cards with status colors, optional AI styling, and stacked depth for insight feeds.