@cdx-ui/components 0.3.2 → 0.3.4

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 (125) hide show
  1. package/README.md +2 -2
  2. package/coverage.svg +1 -1
  3. package/docs/components/color-field/content.md +2 -2
  4. package/docs/components/content.md +6 -4
  5. package/docs/components/data-grid/content.md +125 -1
  6. package/docs/components/date-field/content.md +2 -2
  7. package/docs/components/date-time-field/content.md +2 -2
  8. package/docs/components/input/content.md +20 -2
  9. package/docs/components/input/design.md +1 -1
  10. package/docs/components/insight/content.md +644 -0
  11. package/docs/components/insight-stack/content.md +231 -0
  12. package/docs/components/insurance-disclosure/content.md +1 -1
  13. package/docs/components/otp-input/content.md +2 -2
  14. package/docs/components/select/content.md +223 -24
  15. package/docs/components/text/content.md +97 -0
  16. package/docs/foundations/styles/tokens/all-tokens/content.md +23 -3
  17. package/docs/llms.txt +8 -4
  18. package/docs/patterns/forms/content.md +407 -0
  19. package/docs/resources/release-notes/0.3.2/content.md +17 -0
  20. package/docs/resources/release-notes/0.3.3/content.md +23 -0
  21. package/docs/resources/release-notes/content.md +2 -0
  22. package/lib/commonjs/components/Drawer/index.js +1 -1
  23. package/lib/commonjs/components/Drawer/index.js.map +1 -1
  24. package/lib/commonjs/components/Input/index.js.map +1 -1
  25. package/lib/commonjs/components/Input/styles.js +13 -6
  26. package/lib/commonjs/components/Input/styles.js.map +1 -1
  27. package/lib/commonjs/components/Insight/index.js +438 -0
  28. package/lib/commonjs/components/Insight/index.js.map +1 -0
  29. package/lib/commonjs/components/Insight/insetRadius.js +35 -0
  30. package/lib/commonjs/components/Insight/insetRadius.js.map +1 -0
  31. package/lib/commonjs/components/Insight/styles.js +186 -0
  32. package/lib/commonjs/components/Insight/styles.js.map +1 -0
  33. package/lib/commonjs/components/InsightStack/index.js +93 -0
  34. package/lib/commonjs/components/InsightStack/index.js.map +1 -0
  35. package/lib/commonjs/components/InsightStack/styles.js +61 -0
  36. package/lib/commonjs/components/InsightStack/styles.js.map +1 -0
  37. package/lib/commonjs/components/OtpInput/index.js.map +1 -1
  38. package/lib/commonjs/components/Select/index.js +326 -24
  39. package/lib/commonjs/components/Select/index.js.map +1 -1
  40. package/lib/commonjs/components/Select/styles.js +32 -1
  41. package/lib/commonjs/components/Select/styles.js.map +1 -1
  42. package/lib/commonjs/components/index.js +24 -0
  43. package/lib/commonjs/components/index.js.map +1 -1
  44. package/lib/commonjs/components/picker/surfaces.js +18 -3
  45. package/lib/commonjs/components/picker/surfaces.js.map +1 -1
  46. package/lib/commonjs/figma/Insight.figma.js +73 -0
  47. package/lib/commonjs/figma/Insight.figma.js.map +1 -0
  48. package/lib/commonjs/figma/InsightStack.figma.js +39 -0
  49. package/lib/commonjs/figma/InsightStack.figma.js.map +1 -0
  50. package/lib/module/components/Drawer/index.js +1 -1
  51. package/lib/module/components/Drawer/index.js.map +1 -1
  52. package/lib/module/components/Input/index.js.map +1 -1
  53. package/lib/module/components/Input/styles.js +14 -6
  54. package/lib/module/components/Input/styles.js.map +1 -1
  55. package/lib/module/components/Insight/index.js +433 -0
  56. package/lib/module/components/Insight/index.js.map +1 -0
  57. package/lib/module/components/Insight/insetRadius.js +30 -0
  58. package/lib/module/components/Insight/insetRadius.js.map +1 -0
  59. package/lib/module/components/Insight/styles.js +183 -0
  60. package/lib/module/components/Insight/styles.js.map +1 -0
  61. package/lib/module/components/InsightStack/index.js +89 -0
  62. package/lib/module/components/InsightStack/index.js.map +1 -0
  63. package/lib/module/components/InsightStack/styles.js +58 -0
  64. package/lib/module/components/InsightStack/styles.js.map +1 -0
  65. package/lib/module/components/OtpInput/index.js.map +1 -1
  66. package/lib/module/components/Select/index.js +328 -26
  67. package/lib/module/components/Select/index.js.map +1 -1
  68. package/lib/module/components/Select/styles.js +31 -0
  69. package/lib/module/components/Select/styles.js.map +1 -1
  70. package/lib/module/components/index.js +2 -0
  71. package/lib/module/components/index.js.map +1 -1
  72. package/lib/module/components/picker/surfaces.js +17 -3
  73. package/lib/module/components/picker/surfaces.js.map +1 -1
  74. package/lib/module/figma/Insight.figma.js +67 -0
  75. package/lib/module/figma/Insight.figma.js.map +1 -0
  76. package/lib/module/figma/InsightStack.figma.js +33 -0
  77. package/lib/module/figma/InsightStack.figma.js.map +1 -0
  78. package/lib/typescript/components/ColorField/styles.d.ts +4 -2
  79. package/lib/typescript/components/ColorField/styles.d.ts.map +1 -1
  80. package/lib/typescript/components/DateField/styles.d.ts +4 -2
  81. package/lib/typescript/components/DateField/styles.d.ts.map +1 -1
  82. package/lib/typescript/components/Input/index.d.ts +3 -2
  83. package/lib/typescript/components/Input/index.d.ts.map +1 -1
  84. package/lib/typescript/components/Input/styles.d.ts +1 -1
  85. package/lib/typescript/components/Input/styles.d.ts.map +1 -1
  86. package/lib/typescript/components/Insight/index.d.ts +87 -0
  87. package/lib/typescript/components/Insight/index.d.ts.map +1 -0
  88. package/lib/typescript/components/Insight/insetRadius.d.ts +8 -0
  89. package/lib/typescript/components/Insight/insetRadius.d.ts.map +1 -0
  90. package/lib/typescript/components/Insight/styles.d.ts +33 -0
  91. package/lib/typescript/components/Insight/styles.d.ts.map +1 -0
  92. package/lib/typescript/components/InsightStack/index.d.ts +21 -0
  93. package/lib/typescript/components/InsightStack/index.d.ts.map +1 -0
  94. package/lib/typescript/components/InsightStack/styles.d.ts +11 -0
  95. package/lib/typescript/components/InsightStack/styles.d.ts.map +1 -0
  96. package/lib/typescript/components/OtpInput/index.d.ts +3 -2
  97. package/lib/typescript/components/OtpInput/index.d.ts.map +1 -1
  98. package/lib/typescript/components/Select/index.d.ts +73 -6
  99. package/lib/typescript/components/Select/index.d.ts.map +1 -1
  100. package/lib/typescript/components/Select/styles.d.ts +9 -0
  101. package/lib/typescript/components/Select/styles.d.ts.map +1 -1
  102. package/lib/typescript/components/index.d.ts +2 -0
  103. package/lib/typescript/components/index.d.ts.map +1 -1
  104. package/lib/typescript/components/picker/surfaces.d.ts +14 -3
  105. package/lib/typescript/components/picker/surfaces.d.ts.map +1 -1
  106. package/lib/typescript/figma/Insight.figma.d.ts +8 -0
  107. package/lib/typescript/figma/Insight.figma.d.ts.map +1 -0
  108. package/lib/typescript/figma/InsightStack.figma.d.ts +8 -0
  109. package/lib/typescript/figma/InsightStack.figma.d.ts.map +1 -0
  110. package/package.json +5 -5
  111. package/src/components/ColorField/styles.ts +3 -1
  112. package/src/components/DateField/styles.ts +6 -1
  113. package/src/components/Drawer/index.tsx +1 -1
  114. package/src/components/Input/index.tsx +3 -2
  115. package/src/components/Input/styles.ts +35 -15
  116. package/src/components/Insight/index.tsx +531 -0
  117. package/src/components/Insight/insetRadius.ts +30 -0
  118. package/src/components/Insight/styles.ts +193 -0
  119. package/src/components/InsightStack/index.tsx +86 -0
  120. package/src/components/InsightStack/styles.ts +61 -0
  121. package/src/components/OtpInput/index.tsx +3 -2
  122. package/src/components/Select/index.tsx +411 -29
  123. package/src/components/Select/styles.ts +36 -0
  124. package/src/components/index.ts +2 -0
  125. package/src/components/picker/surfaces.tsx +29 -4
package/README.md CHANGED
@@ -48,7 +48,7 @@ The [component reference](https://design.candescent.com/docs/components) is the
48
48
 
49
49
  The package also ships that reference as markdown in `docs/`, matched to the installed version; coding agents should start at `AGENTS.md` in the package root.
50
50
 
51
- > `Box` is exported but deprecated — use React Native's `View` directly.
51
+ > Use [`Box`](https://design.candescent.com/docs/components/box) for layout containers. The `View` re-export below is deprecated.
52
52
 
53
53
  ### Providers
54
54
 
@@ -91,7 +91,7 @@ For convenience, the package re-exports several core RN components and hooks wit
91
91
 
92
92
  | Export | Source |
93
93
  | ---------------------- | -------------------------------- |
94
- | `View` | `react-native` |
94
+ | `View` (deprecated) | `react-native` |
95
95
  | `ScrollView` | `react-native` |
96
96
  | `KeyboardAvoidingView` | `react-native` |
97
97
  | `SafeAreaView` | `react-native-safe-area-context` |
package/coverage.svg CHANGED
@@ -1 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="108" height="20" role="img" aria-label="coverage: 92.6%"><title>coverage: 92.6%</title><filter id="blur"><feGaussianBlur stdDeviation="16"/></filter><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="108" height="20" rx="3"/></clipPath><g clip-path="url(#r)"><rect width="61" height="20" fill="#555"/><rect x="61" width="47" height="20" fill="#4b0"/><rect width="108" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><g transform="scale(.1)"><g aria-hidden="true" fill="#010101"><text x="315" y="150" fill-opacity=".8" filter="url(#blur)" textLength="510">coverage</text><text x="315" y="150" fill-opacity=".3" textLength="510">coverage</text></g><text x="315" y="140" textLength="510">coverage</text></g><g transform="scale(.1)"><g aria-hidden="true" fill="#010101"><text x="835" y="150" fill-opacity=".8" filter="url(#blur)" textLength="370">92.6%</text><text x="835" y="150" fill-opacity=".3" textLength="370">92.6%</text></g><text x="835" y="140" textLength="370">92.6%</text></g></g></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="108" height="20" role="img" aria-label="coverage: 93.1%"><title>coverage: 93.1%</title><filter id="blur"><feGaussianBlur stdDeviation="16"/></filter><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="108" height="20" rx="3"/></clipPath><g clip-path="url(#r)"><rect width="61" height="20" fill="#555"/><rect x="61" width="47" height="20" fill="#4b0"/><rect width="108" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><g transform="scale(.1)"><g aria-hidden="true" fill="#010101"><text x="315" y="150" fill-opacity=".8" filter="url(#blur)" textLength="510">coverage</text><text x="315" y="150" fill-opacity=".3" textLength="510">coverage</text></g><text x="315" y="140" textLength="510">coverage</text></g><g transform="scale(.1)"><g aria-hidden="true" fill="#010101"><text x="835" y="150" fill-opacity=".8" filter="url(#blur)" textLength="370">93.1%</text><text x="835" y="150" fill-opacity=".3" textLength="370">93.1%</text></g><text x="835" y="140" textLength="370">93.1%</text></g></g></svg>
@@ -53,7 +53,7 @@ Owns standalone text and color state or edits the shared value when nested in `C
53
53
  | --- | --- | --- | --- |
54
54
  | `className?` | `string` | — | — |
55
55
  | `children?` | `ReactNode` | — | — |
56
- | `variant?` | `'outline' \| null` | — | — |
56
+ | `variant?` | `'outline'` | — | — |
57
57
  | `size?` | `'default' \| 'small' \| null` | — | — |
58
58
  | `value?` | `Color` | — | — |
59
59
  | `defaultValue?` | `Color` | — | — |
@@ -79,7 +79,7 @@ Provides the styled input shell and optional slots.
79
79
  | --- | --- | --- | --- |
80
80
  | `className?` | `string` | — | — |
81
81
  | `children?` | `ReactNode` | — | — |
82
- | `variant?` | `'outline' \| null` | — | — |
82
+ | `variant?` | `'outline'` | — | — |
83
83
  | `size?` | `'default' \| 'small' \| null` | — | — |
84
84
  | `asChild?` | `boolean` | — | — |
85
85
  | `fullWidth?` | `boolean` | — | — |
@@ -14,12 +14,12 @@
14
14
  - [Currency Input](https://design.candescent.com/docs/components/currency-input/content.md) — A calculator-style monetary input that formats digits as currency while the user types.
15
15
  - [Field](https://design.candescent.com/docs/components/field/content.md) — A form-control wrapper that coordinates labels, supporting text, validation messages, and shared state.
16
16
  - [Form](https://design.candescent.com/docs/components/form/content.md) — A container that spaces related fields vertically and renders a form on web or a view on native.
17
- - [Input Field](https://design.candescent.com/docs/components/input/content.md) — A single-line text entry with optional label, helper text, and adornments.
17
+ - [Input](https://design.candescent.com/docs/components/input/content.md) — A single-line text entry with optional label, helper text, and adornments.
18
18
  - [Menu](https://design.candescent.com/docs/components/menu/content.md) — Menus present actions or selectable options in an anchored overlay or a standalone list surface.
19
- - [OTP Input Field](https://design.candescent.com/docs/components/otp-input/content.md) — A controlled multi-cell input for one-time passwords and verification codes.
19
+ - [OTP Input](https://design.candescent.com/docs/components/otp-input/content.md) — A controlled multi-cell input for one-time passwords and verification codes.
20
20
  - [Radio](https://design.candescent.com/docs/components/radio/content.md) — A radio group is an input control that allows the user to select a single option from a set of mutually exclusive options.
21
21
  - [Range Calendar](https://design.candescent.com/docs/components/range-calendar/content.md) — A two-tap day grid for selecting a start and end date, with a continuous range band, month navigation, and a year picker.
22
- - [Select](https://design.candescent.com/docs/components/select/content.md) — A form control that allows users to choose one option from a dropdown list.
22
+ - [Select](https://design.candescent.com/docs/components/select/content.md) — A form control that allows users to choose one or more options from a dropdown list.
23
23
  - [Textarea](https://design.candescent.com/docs/components/textarea/content.md) — A multi-line text entry for longer free-form content.
24
24
  - [Slider](https://design.candescent.com/docs/components/slider/content.md) — A control for selecting a numeric value along a track.
25
25
  - [Color Picker](https://design.candescent.com/docs/components/color-picker/content.md) — A compound color picker that coordinates an opaque color value with a trigger and popover.
@@ -58,7 +58,7 @@
58
58
  - [Avatar](https://design.candescent.com/docs/components/avatar/content.md) — A visual representation of a user or entity, displayed as an image, initials, or fallback icon.
59
59
  - [Carousel](https://design.candescent.com/docs/components/carousel/content.md) — A swipeable, paginated carousel for promotional banners, onboarding, and card browsing. Wraps react-native-reanimated-carousel with token-styled Pagination and Prev/Next nav button compounds plus useCarousel hook.
60
60
  - [Divider](https://design.candescent.com/docs/components/divider/content.md) — A horizontal or vertical separator for grouping related content, with an optional inline label.
61
- - [FDIC Digital Sign](https://design.candescent.com/docs/components/insurance-disclosure/content.md) — Domain-specific regulatory disclosure — official FDIC lockup with optional copy for account footers, deposit screens, and onboarding.
61
+ - [Insurance Disclosure](https://design.candescent.com/docs/components/insurance-disclosure/content.md) — Domain-specific regulatory disclosure — official FDIC lockup with optional copy for account footers, deposit screens, and onboarding.
62
62
  - [Icon](https://design.candescent.com/docs/components/icon/content.md) — A cross-platform SVG icon wrapper with semantic color, sizing, filled variants, and accessibility support.
63
63
  - [Image](https://design.candescent.com/docs/components/image/content.md) — Displays local or remote images across native and web platforms.
64
64
  - [List Item](https://design.candescent.com/docs/components/list-item/content.md) — A composable row for display and navigation — accounts, transactions, alerts, settings, and nav rows.
@@ -82,6 +82,8 @@
82
82
  - [Box](https://design.candescent.com/docs/components/box/content.md) — The layout container for building screens, with semantic web elements through role and an asChild escape hatch.
83
83
  - [Card](https://design.candescent.com/docs/components/card/content.md) — A composable surface for grouping related content, with optional brand stripe, header, content, and footer regions.
84
84
  - [Drawer](https://design.candescent.com/docs/components/drawer/content.md) — A panel attached to an edge of the viewport or container, with modal and permanent presentations.
85
+ - [Insight](https://design.candescent.com/docs/components/insight/content.md) — A bordered card for a personalised, often AI-generated, insight, shown as a pressable summary or a detail card.
86
+ - [Insight Stack](https://design.candescent.com/docs/components/insight-stack/content.md) — Draws decorative cards behind a summary Insight to show that more insights are waiting.
85
87
  - [Scoped Theme](https://design.candescent.com/docs/components/scoped-theme/content.md) — Forces a specific theme on a component subtree, regardless of the application's global theme.
86
88
  - [Scroll Shadow](https://design.candescent.com/docs/components/scroll-shadow/content.md) — Fades the edges of a scroll view so overflowing content reads as scrollable on iOS, Android, and web.
87
89
  - [Stack](https://design.candescent.com/docs/components/stack/content.md) — Horizontal and vertical layout primitives with token-based spacing and optional reversed order.
@@ -5,7 +5,16 @@ Resources: [Storybook](https://victorious-wave-0daadf00f.6.azurestaticapps.net/?
5
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`.
6
6
 
7
7
  ```tsx
8
- import { Avatar, Chip, IconButton, Menu, ProgressBar, Text, VStack } from '@cdx-ui/components';
8
+ import {
9
+ Avatar,
10
+ Checkbox,
11
+ Chip,
12
+ IconButton,
13
+ Menu,
14
+ ProgressBar,
15
+ Text,
16
+ VStack,
17
+ } from '@cdx-ui/components';
9
18
  import { DataGrid } from '@cdx-ui/data-grid';
10
19
  ```
11
20
 
@@ -332,6 +341,121 @@ export default function DataGridSelectionDemo() {
332
341
  }
333
342
  ```
334
343
 
344
+ ## Checkbox cells
345
+
346
+ To edit boolean fields in place, render a `Checkbox` from `renderCell`. This is separate from `checkboxSelection`: the checkbox reflects a row field, not row selection. Keep `rows` in state and update the matching row in `onChange` so the grid re-renders with the new value.
347
+
348
+ Give each checkbox an accessible label that names both the column and the row, such as "View — Accounts", so every control keeps a distinct name when reached outside the table context. Set `isDisabled` where an action does not apply, and turn off `sortable` and `filterable` on checkbox columns. Build columns that close over the change handler with `useMemo` so they stay stable between renders.
349
+
350
+ ```tsx
351
+ import { useCallback, useMemo, useState } from 'react';
352
+ import { Checkbox, Text, VStack } from '@cdx-ui/components';
353
+ import { DataGrid, type GridColDef } from '@cdx-ui/data-grid';
354
+ import { permissions, type PermissionAction, type PermissionRow } from './_data';
355
+
356
+ type ToggleField = PermissionAction | 'additional';
357
+
358
+ const actionColumns: { field: PermissionAction; headerName: string }[] = [
359
+ { field: 'view', headerName: 'View' },
360
+ { field: 'create', headerName: 'Create' },
361
+ { field: 'modify', headerName: 'Modify' },
362
+ { field: 'delete', headerName: 'Delete' },
363
+ ];
364
+
365
+ function createColumns(
366
+ onToggle: (id: string, field: ToggleField, checked: boolean) => void,
367
+ ): GridColDef<PermissionRow>[] {
368
+ return [
369
+ {
370
+ field: 'name',
371
+ headerName: 'Permission',
372
+ minWidth: 240,
373
+ flex: 1,
374
+ renderCell: ({ row }) => (
375
+ <VStack>
376
+ <Text numberOfLines={1} weight="medium">
377
+ {row.name}
378
+ </Text>
379
+ <Text numberOfLines={1} color="secondary" size="sm">
380
+ {row.description}
381
+ </Text>
382
+ </VStack>
383
+ ),
384
+ },
385
+ ...actionColumns.map(
386
+ ({ field, headerName }): GridColDef<PermissionRow> => ({
387
+ field,
388
+ headerName,
389
+ width: 96,
390
+ align: 'center',
391
+ headerAlign: 'center',
392
+ sortable: false,
393
+ filterable: false,
394
+ renderCell: ({ row }) => (
395
+ <Checkbox
396
+ value={`${row.id}-${field}`}
397
+ isChecked={row[field] === true}
398
+ isDisabled={row[field] === null}
399
+ onChange={(checked) => onToggle(row.id, field, checked)}
400
+ accessibilityLabel={`${headerName} — ${row.name}`}
401
+ aria-label={`${headerName} — ${row.name}`}
402
+ />
403
+ ),
404
+ }),
405
+ ),
406
+ {
407
+ field: 'additional',
408
+ headerName: 'Additional',
409
+ width: 140,
410
+ sortable: false,
411
+ filterable: false,
412
+ renderCell: ({ row }) =>
413
+ row.additional ? (
414
+ <Checkbox
415
+ value={`${row.id}-additional`}
416
+ isChecked={row.additional.checked}
417
+ onChange={(checked) => onToggle(row.id, 'additional', checked)}
418
+ accessibilityLabel={`${row.additional.label} — ${row.name}`}
419
+ aria-label={`${row.additional.label} — ${row.name}`}
420
+ >
421
+ <Checkbox.Label>{row.additional.label}</Checkbox.Label>
422
+ </Checkbox>
423
+ ) : null,
424
+ },
425
+ ];
426
+ }
427
+
428
+ export default function DataGridCheckboxCellsDemo() {
429
+ const [rows, setRows] = useState(permissions);
430
+
431
+ const handleToggle = useCallback((id: string, field: ToggleField, checked: boolean) => {
432
+ setRows((current) =>
433
+ current.map((row) => {
434
+ if (row.id !== id) {
435
+ return row;
436
+ }
437
+ if (field === 'additional') {
438
+ return row.additional ? { ...row, additional: { ...row.additional, checked } } : row;
439
+ }
440
+ return { ...row, [field]: checked };
441
+ }),
442
+ );
443
+ }, []);
444
+
445
+ const columns = useMemo(() => createColumns(handleToggle), [handleToggle]);
446
+
447
+ return (
448
+ <DataGrid
449
+ rows={rows}
450
+ columns={columns}
451
+ hideFooter
452
+ aria-label="Set permissions"
453
+ className="h-85"
454
+ />
455
+ );
456
+ }
457
+ ```
458
+
335
459
  ## Server data
336
460
 
337
461
  Set `paginationMode="server"` and `sortingMode="server"` to let your data source own those operations. `filterMode` follows `paginationMode` unless you set it, so server pagination also means server filtering. Keep the models controlled, pass the current page in `rows`, and provide the full `rowCount` of matching rows.
@@ -74,7 +74,7 @@ Root of the compound. Owns the value, `mode`, and `locale`, and provides `varian
74
74
  | --- | --- | --- | --- |
75
75
  | `className?` | `string` | — | — |
76
76
  | `children?` | `ReactNode` | — | — |
77
- | `variant?` | `'outline' \| null` | — | — |
77
+ | `variant?` | `'outline'` | — | — |
78
78
  | `size?` | `'default' \| 'small' \| null` | — | — |
79
79
  | `fullWidth?` | `boolean` | — | When true (the default), the group stretches to fill its container; when false, it hugs the segments. |
80
80
  | `labels?` | `Partial<DateComponentLabels>` | — | Overrides the accessible labels announced for each segment. |
@@ -101,7 +101,7 @@ Input chrome that surrounds the segments, sharing `Input`'s outline styling. Add
101
101
  | --- | --- | --- | --- |
102
102
  | `className?` | `string` | — | — |
103
103
  | `children?` | `ReactNode` | — | — |
104
- | `variant?` | `'outline' \| null` | — | — |
104
+ | `variant?` | `'outline'` | — | — |
105
105
  | `size?` | `'default' \| 'small' \| null` | — | — |
106
106
  | `fullWidth?` | `boolean` | — | — |
107
107
 
@@ -80,7 +80,7 @@ Root of the compound. Owns the value, `granularity`, `hour12`, and `locale`, and
80
80
  | --- | --- | --- | --- |
81
81
  | `className?` | `string` | — | — |
82
82
  | `children?` | `ReactNode` | — | — |
83
- | `variant?` | `'outline' \| null` | — | — |
83
+ | `variant?` | `'outline'` | — | — |
84
84
  | `size?` | `'default' \| 'small' \| null` | — | — |
85
85
  | `fullWidth?` | `boolean` | — | When true (the default), the group stretches to fill its container; when false, it hugs the segments. |
86
86
  | `asChild?` | `boolean` | — | — |
@@ -109,7 +109,7 @@ Input chrome that surrounds the segments, shared with [`DateField.Group`](https:
109
109
  | `className?` | `string` | — | — |
110
110
  | `children?` | `ReactNode` | — | — |
111
111
  | `ref?` | `React.Ref<View>` | — | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). |
112
- | `variant?` | `'outline' \| null` | — | — |
112
+ | `variant?` | `'outline'` | — | — |
113
113
  | `size?` | `'default' \| 'small' \| null` | — | — |
114
114
  | `fullWidth?` | `boolean` | — | — |
115
115
  | `key?` | `React.Key \| null` | — | — |
@@ -1,4 +1,4 @@
1
- # Input Field (https://design.candescent.com/docs/components/input)
1
+ # Input (https://design.candescent.com/docs/components/input)
2
2
 
3
3
  Resources: [Figma](https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-CDS-V2--React-Native?node-id=159-22), [Storybook](https://victorious-wave-0daadf00f.6.azurestaticapps.net/?path=/story/inputs-input--default)
4
4
 
@@ -22,6 +22,24 @@ export default function InputBasicDemo() {
22
22
  }
23
23
  ```
24
24
 
25
+ ## Subtle
26
+
27
+ Use `variant="subtle"` for a filled, borderless field on a surface that already frames it, such as a search field at the top of a popover or sheet. Focus, invalid, disabled, and read-only states stay visible in both variants.
28
+
29
+ ```tsx
30
+ import { Input } from '@cdx-ui/components';
31
+ import { Search } from '@cdx-ui/icons';
32
+
33
+ export default function InputSubtleDemo() {
34
+ return (
35
+ <Input variant="subtle">
36
+ <Input.Icon as={Search} />
37
+ <Input.Field accessibilityLabel="Search teams" placeholder="Search teams" />
38
+ </Input>
39
+ );
40
+ }
41
+ ```
42
+
25
43
  ## Sizes
26
44
 
27
45
  ```tsx
@@ -266,7 +284,7 @@ The root shell that lays out the field alongside optional slots and icons, and p
266
284
  | `className?` | `string` | — | Additional Uniwind/Tailwind classes, merged after the shell's own styles. |
267
285
  | `children?` | `ReactNode` | — | Shell content — typically `Input.Field` plus optional `Input.Slot`/`Input.Icon`. |
268
286
  | `asChild?` | `boolean` | — | Render the consumer's child element in place of the default `View` host. |
269
- | `variant?` | `'outline'` | `'outline'` | Visual style variant. |
287
+ | `variant?` | `'outline' \| 'subtle'` | `'outline'` | Visual style variant. `outline` is a bordered field on the page surface; `subtle` is a filled, borderless field for dense or nested surfaces such as a search field in a popup. |
270
288
  | `size?` | `'default' \| 'small'` | `'default'` | Height, padding, and field font size. |
271
289
  | `isInvalid?` | `boolean` | — | If true, the input will indicate an error. |
272
290
  | `isDisabled?` | `boolean` | — | If true, the input will be disabled. |
@@ -1,4 +1,4 @@
1
- # Input Field — Design (https://design.candescent.com/docs/components/input)
1
+ # Input — Design (https://design.candescent.com/docs/components/input)
2
2
 
3
3
  ## Usage
4
4