@cdx-ui/components 0.2.2 → 0.2.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.
- package/AGENTS.md +24 -0
- package/README.md +6 -2
- package/coverage.svg +1 -1
- package/docs/components/accordion/content.md +538 -0
- package/docs/components/alert/content.md +203 -0
- package/docs/components/alert-dialog/content.md +319 -0
- package/docs/components/avatar/content.md +368 -0
- package/docs/components/avatar/design.md +202 -0
- package/docs/components/badge/content.md +235 -0
- package/docs/components/bottom-sheet/content.md +351 -0
- package/docs/components/bottom-sheet/design.md +249 -0
- package/docs/components/breadcrumbs/content.md +169 -0
- package/docs/components/button/content.md +398 -0
- package/docs/components/button/design.md +258 -0
- package/docs/components/calendar/content.md +137 -0
- package/docs/components/card/content.md +283 -0
- package/docs/components/carousel/content.md +416 -0
- package/docs/components/checkbox/content.md +236 -0
- package/docs/components/checkbox/design.md +214 -0
- package/docs/components/chip/content.md +439 -0
- package/docs/components/chip/design.md +418 -0
- package/docs/components/color-area/content.md +86 -0
- package/docs/components/color-field/content.md +134 -0
- package/docs/components/color-picker/content.md +208 -0
- package/docs/components/color-slider/content.md +120 -0
- package/docs/components/color-swatch/content.md +64 -0
- package/docs/components/color-swatch-picker/content.md +126 -0
- package/docs/components/content.md +97 -0
- package/docs/components/currency-input/content.md +205 -0
- package/docs/components/data-grid/content.md +522 -0
- package/docs/components/date-field/content.md +147 -0
- package/docs/components/date-picker/content.md +360 -0
- package/docs/components/date-range-picker/content.md +301 -0
- package/docs/components/date-time-field/content.md +157 -0
- package/docs/components/date-time-list/content.md +105 -0
- package/docs/components/date-time-picker/content.md +272 -0
- package/docs/components/dialog/content.md +436 -0
- package/docs/components/dialog/design.md +192 -0
- package/docs/components/divider/content.md +112 -0
- package/docs/components/drawer/content.md +436 -0
- package/docs/components/field/content.md +277 -0
- package/docs/components/form/content.md +62 -0
- package/docs/components/full-screen-dialog/content.md +881 -0
- package/docs/components/heading/content.md +55 -0
- package/docs/components/icon/content.md +190 -0
- package/docs/components/icon-button/content.md +200 -0
- package/docs/components/icon-button/design.md +165 -0
- package/docs/components/image/content.md +104 -0
- package/docs/components/input/content.md +281 -0
- package/docs/components/input/design.md +389 -0
- package/docs/components/insurance-disclosure/content.md +103 -0
- package/docs/components/link/content.md +180 -0
- package/docs/components/link/design.md +160 -0
- package/docs/components/list-item/content.md +695 -0
- package/docs/components/menu/content.md +1247 -0
- package/docs/components/month-calendar/content.md +84 -0
- package/docs/components/month-picker/content.md +273 -0
- package/docs/components/otp-input/content.md +327 -0
- package/docs/components/progress-bar/content.md +87 -0
- package/docs/components/progress-circle/content.md +176 -0
- package/docs/components/progress-segmented/content.md +119 -0
- package/docs/components/quick-action-button/content.md +154 -0
- package/docs/components/quick-action-button/design.md +170 -0
- package/docs/components/radio/content.md +224 -0
- package/docs/components/range-calendar/content.md +123 -0
- package/docs/components/reorderable-list/content.md +309 -0
- package/docs/components/scoped-theme/content.md +47 -0
- package/docs/components/scroll-shadow/content.md +686 -0
- package/docs/components/select/content.md +400 -0
- package/docs/components/select/design.md +301 -0
- package/docs/components/skeleton/content.md +103 -0
- package/docs/components/slider/content.md +423 -0
- package/docs/components/stack/content.md +161 -0
- package/docs/components/switch/content.md +150 -0
- package/docs/components/switch/design.md +208 -0
- package/docs/components/table/content.md +548 -0
- package/docs/components/table-pagination/content.md +177 -0
- package/docs/components/tabs/content.md +292 -0
- package/docs/components/text/content.md +142 -0
- package/docs/components/textarea/content.md +222 -0
- package/docs/components/tile/content.md +703 -0
- package/docs/components/toast/content.md +456 -0
- package/docs/components/toggle-button/content.md +505 -0
- package/docs/components/tooltip/content.md +350 -0
- package/docs/components/virtualized-list/content.md +250 -0
- package/docs/foundations/content.md +9 -0
- package/docs/foundations/expressions/icons/content.md +19 -0
- package/docs/foundations/styles/tokens/all-tokens/content.md +192 -0
- package/docs/foundations/styles/tokens/what-are-tokens/content.md +33 -0
- package/docs/foundations/styles/tokens/what-are-tokens/design.md +33 -0
- package/docs/getting-started/content.md +4 -0
- package/docs/getting-started/designers/content.md +13 -0
- package/docs/getting-started/designers/design.md +13 -0
- package/docs/getting-started/developers/accessibility/content.md +31 -0
- package/docs/getting-started/developers/content.md +612 -0
- package/docs/getting-started/developers/styling/content.md +193 -0
- package/docs/llms.txt +193 -0
- package/docs/patterns/account-management/content.md +75 -0
- package/docs/patterns/authentication/content.md +52 -0
- package/docs/patterns/content.md +10 -0
- package/docs/patterns/dashboard/content.md +39 -0
- package/docs/patterns/empty-states/content.md +31 -0
- package/docs/patterns/forms/content.md +109 -0
- package/docs/patterns/onboarding/content.md +69 -0
- package/docs/patterns/payments/content.md +35 -0
- package/docs/patterns/settings/content.md +72 -0
- package/docs/resources/content.md +9 -0
- package/docs/resources/figma-libraries/content.md +42 -0
- package/docs/resources/release-notes/0.0.1-beta.118/content.md +27 -0
- package/docs/resources/release-notes/0.0.1-beta.122/content.md +21 -0
- package/docs/resources/release-notes/0.0.1-beta.124/content.md +16 -0
- package/docs/resources/release-notes/0.0.1-beta.126/content.md +10 -0
- package/docs/resources/release-notes/0.0.1-beta.127/content.md +14 -0
- package/docs/resources/release-notes/0.0.1-beta.128/content.md +9 -0
- package/docs/resources/release-notes/0.0.1-beta.129/content.md +18 -0
- package/docs/resources/release-notes/0.0.1-beta.130/content.md +18 -0
- package/docs/resources/release-notes/0.0.1-beta.133/content.md +7 -0
- package/docs/resources/release-notes/0.0.1-beta.134/content.md +17 -0
- package/docs/resources/release-notes/0.0.1-beta.136/content.md +7 -0
- package/docs/resources/release-notes/0.0.1-beta.137/content.md +10 -0
- package/docs/resources/release-notes/0.0.1-beta.138/content.md +7 -0
- package/docs/resources/release-notes/0.0.1-beta.139/content.md +13 -0
- package/docs/resources/release-notes/0.0.1-beta.140/content.md +26 -0
- package/docs/resources/release-notes/0.0.1-beta.141/content.md +63 -0
- package/docs/resources/release-notes/0.0.1-beta.142/content.md +7 -0
- package/docs/resources/release-notes/0.0.1-beta.143/content.md +12 -0
- package/docs/resources/release-notes/0.0.1-beta.144/content.md +7 -0
- package/docs/resources/release-notes/0.0.1-beta.145/content.md +7 -0
- package/docs/resources/release-notes/0.0.1-beta.147/content.md +10 -0
- package/docs/resources/release-notes/0.0.1-beta.149/content.md +10 -0
- package/docs/resources/release-notes/0.0.1-beta.150/content.md +13 -0
- package/docs/resources/release-notes/0.0.1-beta.152/content.md +7 -0
- package/docs/resources/release-notes/0.0.1-beta.154/content.md +15 -0
- package/docs/resources/release-notes/0.0.1-beta.156/content.md +7 -0
- package/docs/resources/release-notes/0.0.1-beta.158/content.md +9 -0
- package/docs/resources/release-notes/0.0.1-beta.159/content.md +11 -0
- package/docs/resources/release-notes/0.0.1-beta.160/content.md +7 -0
- package/docs/resources/release-notes/0.0.1-beta.161/content.md +7 -0
- package/docs/resources/release-notes/0.0.1-beta.163/content.md +7 -0
- package/docs/resources/release-notes/0.0.1-beta.164/content.md +9 -0
- package/docs/resources/release-notes/0.0.1-beta.166/content.md +17 -0
- package/docs/resources/release-notes/0.0.1-beta.167/content.md +7 -0
- package/docs/resources/release-notes/0.0.1-beta.168/content.md +7 -0
- package/docs/resources/release-notes/0.0.1-beta.169/content.md +7 -0
- package/docs/resources/release-notes/0.0.1-beta.171/content.md +16 -0
- package/docs/resources/release-notes/0.0.1-beta.172/content.md +24 -0
- package/docs/resources/release-notes/0.0.1-beta.173/content.md +15 -0
- package/docs/resources/release-notes/0.0.1-beta.174/content.md +7 -0
- package/docs/resources/release-notes/0.0.1-beta.176/content.md +32 -0
- package/docs/resources/release-notes/0.0.1-beta.179/content.md +11 -0
- package/docs/resources/release-notes/0.0.1-beta.182/content.md +13 -0
- package/docs/resources/release-notes/0.0.1-beta.185/content.md +7 -0
- package/docs/resources/release-notes/0.0.1-beta.187/content.md +27 -0
- package/docs/resources/release-notes/0.1.1/content.md +23 -0
- package/docs/resources/release-notes/0.1.2/content.md +7 -0
- package/docs/resources/release-notes/0.1.4/content.md +19 -0
- package/docs/resources/release-notes/0.1.5/content.md +7 -0
- package/docs/resources/release-notes/0.1.6/content.md +7 -0
- package/docs/resources/release-notes/0.2.0/content.md +31 -0
- package/docs/resources/release-notes/0.2.1/content.md +17 -0
- package/docs/resources/release-notes/0.2.2/content.md +11 -0
- package/docs/resources/release-notes/0.2.3/content.md +15 -0
- package/docs/resources/release-notes/content.md +64 -0
- package/lib/commonjs/components/Checkbox/index.js.map +1 -1
- package/lib/commonjs/components/DateTimeList/index.js +11 -26
- package/lib/commonjs/components/DateTimeList/index.js.map +1 -1
- package/lib/commonjs/components/DateTimeList/styles.js +2 -12
- package/lib/commonjs/components/DateTimeList/styles.js.map +1 -1
- package/lib/commonjs/components/Heading/index.js.map +1 -1
- package/lib/commonjs/components/Icon/index.js.map +1 -1
- package/lib/commonjs/components/ListItem/index.js +170 -9
- package/lib/commonjs/components/ListItem/index.js.map +1 -1
- package/lib/commonjs/components/ListItem/styles.js +38 -2
- package/lib/commonjs/components/ListItem/styles.js.map +1 -1
- package/lib/commonjs/components/Menu/index.js +11 -5
- package/lib/commonjs/components/Menu/index.js.map +1 -1
- package/lib/commonjs/components/RangeCalendar/index.js.map +1 -1
- package/lib/commonjs/components/ReorderableList/ReorderableListShared.js +91 -0
- package/lib/commonjs/components/ReorderableList/ReorderableListShared.js.map +1 -0
- package/lib/commonjs/components/ReorderableList/index.js +135 -0
- package/lib/commonjs/components/ReorderableList/index.js.map +1 -0
- package/lib/commonjs/components/ReorderableList/index.web.js +233 -0
- package/lib/commonjs/components/ReorderableList/index.web.js.map +1 -0
- package/lib/commonjs/components/ReorderableList/labels.js +47 -0
- package/lib/commonjs/components/ReorderableList/labels.js.map +1 -0
- package/lib/commonjs/components/ReorderableList/reorderItems.js +16 -0
- package/lib/commonjs/components/ReorderableList/reorderItems.js.map +1 -0
- package/lib/commonjs/components/ReorderableList/rowContext.js +42 -0
- package/lib/commonjs/components/ReorderableList/rowContext.js.map +1 -0
- package/lib/commonjs/components/ReorderableList/types.js +6 -0
- package/lib/commonjs/components/ReorderableList/types.js.map +1 -0
- package/lib/commonjs/components/ReorderableList/useReorder.js +131 -0
- package/lib/commonjs/components/ReorderableList/useReorder.js.map +1 -0
- package/lib/commonjs/components/ReorderableList/webDnd.js +64 -0
- package/lib/commonjs/components/ReorderableList/webDnd.js.map +1 -0
- package/lib/commonjs/components/ScopedTheme/index.js.map +1 -1
- package/lib/commonjs/components/ScrollShadow/gradient.js +29 -0
- package/lib/commonjs/components/ScrollShadow/gradient.js.map +1 -0
- package/lib/commonjs/components/ScrollShadow/index.js +171 -44
- package/lib/commonjs/components/ScrollShadow/index.js.map +1 -1
- package/lib/commonjs/components/ScrollShadow/styles.js +58 -14
- package/lib/commonjs/components/ScrollShadow/styles.js.map +1 -1
- package/lib/commonjs/components/ScrollShadow/useComposedScrollHandler.js +63 -0
- package/lib/commonjs/components/ScrollShadow/useComposedScrollHandler.js.map +1 -0
- package/lib/commonjs/components/ScrollShadow/useScrollShadow.js +48 -8
- package/lib/commonjs/components/ScrollShadow/useScrollShadow.js.map +1 -1
- package/lib/commonjs/components/Skeleton/index.js.map +1 -1
- package/lib/commonjs/components/TablePagination/index.js.map +1 -1
- package/lib/commonjs/components/Tabs/index.js +16 -23
- package/lib/commonjs/components/Tabs/index.js.map +1 -1
- package/lib/commonjs/components/Tabs/styles.js +1 -10
- package/lib/commonjs/components/Tabs/styles.js.map +1 -1
- package/lib/commonjs/components/Text/index.js.map +1 -1
- package/lib/commonjs/components/Tile/styles.js +1 -1
- package/lib/commonjs/components/Tile/styles.js.map +1 -1
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/figma/ListItem.SectionHeader.figma.js +20 -5
- package/lib/commonjs/figma/ListItem.SectionHeader.figma.js.map +1 -1
- package/lib/commonjs/reorderable-list.js +17 -0
- package/lib/commonjs/reorderable-list.js.map +1 -0
- package/lib/module/components/Checkbox/index.js.map +1 -1
- package/lib/module/components/DateTimeList/index.js +12 -27
- package/lib/module/components/DateTimeList/index.js.map +1 -1
- package/lib/module/components/DateTimeList/styles.js +1 -11
- package/lib/module/components/DateTimeList/styles.js.map +1 -1
- package/lib/module/components/Heading/index.js.map +1 -1
- package/lib/module/components/Icon/index.js.map +1 -1
- package/lib/module/components/ListItem/index.js +163 -14
- package/lib/module/components/ListItem/index.js.map +1 -1
- package/lib/module/components/ListItem/styles.js +37 -1
- package/lib/module/components/ListItem/styles.js.map +1 -1
- package/lib/module/components/Menu/index.js +11 -5
- package/lib/module/components/Menu/index.js.map +1 -1
- package/lib/module/components/RangeCalendar/index.js.map +1 -1
- package/lib/module/components/ReorderableList/ReorderableListShared.js +86 -0
- package/lib/module/components/ReorderableList/ReorderableListShared.js.map +1 -0
- package/lib/module/components/ReorderableList/index.js +130 -0
- package/lib/module/components/ReorderableList/index.js.map +1 -0
- package/lib/module/components/ReorderableList/index.web.js +229 -0
- package/lib/module/components/ReorderableList/index.web.js.map +1 -0
- package/lib/module/components/ReorderableList/labels.js +41 -0
- package/lib/module/components/ReorderableList/labels.js.map +1 -0
- package/lib/module/components/ReorderableList/reorderItems.js +12 -0
- package/lib/module/components/ReorderableList/reorderItems.js.map +1 -0
- package/lib/module/components/ReorderableList/rowContext.js +38 -0
- package/lib/module/components/ReorderableList/rowContext.js.map +1 -0
- package/lib/module/components/ReorderableList/types.js +4 -0
- package/lib/module/components/ReorderableList/types.js.map +1 -0
- package/lib/module/components/ReorderableList/useReorder.js +123 -0
- package/lib/module/components/ReorderableList/useReorder.js.map +1 -0
- package/lib/module/components/ReorderableList/webDnd.js +59 -0
- package/lib/module/components/ReorderableList/webDnd.js.map +1 -0
- package/lib/module/components/ScopedTheme/index.js.map +1 -1
- package/lib/module/components/ScrollShadow/gradient.js +24 -0
- package/lib/module/components/ScrollShadow/gradient.js.map +1 -0
- package/lib/module/components/ScrollShadow/index.js +170 -48
- package/lib/module/components/ScrollShadow/index.js.map +1 -1
- package/lib/module/components/ScrollShadow/styles.js +57 -13
- package/lib/module/components/ScrollShadow/styles.js.map +1 -1
- package/lib/module/components/ScrollShadow/useComposedScrollHandler.js +57 -0
- package/lib/module/components/ScrollShadow/useComposedScrollHandler.js.map +1 -0
- package/lib/module/components/ScrollShadow/useScrollShadow.js +46 -8
- package/lib/module/components/ScrollShadow/useScrollShadow.js.map +1 -1
- package/lib/module/components/Skeleton/index.js.map +1 -1
- package/lib/module/components/TablePagination/index.js.map +1 -1
- package/lib/module/components/Tabs/index.js +17 -24
- package/lib/module/components/Tabs/index.js.map +1 -1
- package/lib/module/components/Tabs/styles.js +0 -9
- package/lib/module/components/Tabs/styles.js.map +1 -1
- package/lib/module/components/Text/index.js.map +1 -1
- package/lib/module/components/Tile/styles.js +1 -1
- package/lib/module/components/Tile/styles.js.map +1 -1
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/figma/ListItem.SectionHeader.figma.js +20 -5
- package/lib/module/figma/ListItem.SectionHeader.figma.js.map +1 -1
- package/lib/module/reorderable-list.js +4 -0
- package/lib/module/reorderable-list.js.map +1 -0
- package/lib/typescript/components/Checkbox/index.d.ts +22 -0
- package/lib/typescript/components/Checkbox/index.d.ts.map +1 -1
- package/lib/typescript/components/DateTimeList/index.d.ts.map +1 -1
- package/lib/typescript/components/DateTimeList/styles.d.ts +1 -4
- package/lib/typescript/components/DateTimeList/styles.d.ts.map +1 -1
- package/lib/typescript/components/Heading/index.d.ts +20 -2
- package/lib/typescript/components/Heading/index.d.ts.map +1 -1
- package/lib/typescript/components/Icon/index.d.ts +2 -0
- package/lib/typescript/components/Icon/index.d.ts.map +1 -1
- package/lib/typescript/components/ListItem/index.d.ts +28 -5
- package/lib/typescript/components/ListItem/index.d.ts.map +1 -1
- package/lib/typescript/components/ListItem/styles.d.ts +6 -1
- package/lib/typescript/components/ListItem/styles.d.ts.map +1 -1
- package/lib/typescript/components/Menu/index.d.ts +116 -4
- package/lib/typescript/components/Menu/index.d.ts.map +1 -1
- package/lib/typescript/components/RangeCalendar/index.d.ts +2 -0
- package/lib/typescript/components/RangeCalendar/index.d.ts.map +1 -1
- package/lib/typescript/components/ReorderableList/ReorderableListShared.d.ts +31 -0
- package/lib/typescript/components/ReorderableList/ReorderableListShared.d.ts.map +1 -0
- package/lib/typescript/components/ReorderableList/index.d.ts +8 -0
- package/lib/typescript/components/ReorderableList/index.d.ts.map +1 -0
- package/lib/typescript/components/ReorderableList/index.web.d.ts +8 -0
- package/lib/typescript/components/ReorderableList/index.web.d.ts.map +1 -0
- package/lib/typescript/components/ReorderableList/labels.d.ts +16 -0
- package/lib/typescript/components/ReorderableList/labels.d.ts.map +1 -0
- package/lib/typescript/components/ReorderableList/reorderItems.d.ts +3 -0
- package/lib/typescript/components/ReorderableList/reorderItems.d.ts.map +1 -0
- package/lib/typescript/components/ReorderableList/rowContext.d.ts +57 -0
- package/lib/typescript/components/ReorderableList/rowContext.d.ts.map +1 -0
- package/lib/typescript/components/ReorderableList/types.d.ts +75 -0
- package/lib/typescript/components/ReorderableList/types.d.ts.map +1 -0
- package/lib/typescript/components/ReorderableList/useReorder.d.ts +31 -0
- package/lib/typescript/components/ReorderableList/useReorder.d.ts.map +1 -0
- package/lib/typescript/components/ReorderableList/webDnd.d.ts +27 -0
- package/lib/typescript/components/ReorderableList/webDnd.d.ts.map +1 -0
- package/lib/typescript/components/ScopedTheme/index.d.ts +6 -1
- package/lib/typescript/components/ScopedTheme/index.d.ts.map +1 -1
- package/lib/typescript/components/ScrollShadow/gradient.d.ts +7 -0
- package/lib/typescript/components/ScrollShadow/gradient.d.ts.map +1 -0
- package/lib/typescript/components/ScrollShadow/index.d.ts +57 -15
- package/lib/typescript/components/ScrollShadow/index.d.ts.map +1 -1
- package/lib/typescript/components/ScrollShadow/styles.d.ts +8 -2
- package/lib/typescript/components/ScrollShadow/styles.d.ts.map +1 -1
- package/lib/typescript/components/ScrollShadow/useComposedScrollHandler.d.ts +13 -0
- package/lib/typescript/components/ScrollShadow/useComposedScrollHandler.d.ts.map +1 -0
- package/lib/typescript/components/ScrollShadow/useScrollShadow.d.ts +15 -2
- package/lib/typescript/components/ScrollShadow/useScrollShadow.d.ts.map +1 -1
- package/lib/typescript/components/Skeleton/index.d.ts +3 -0
- package/lib/typescript/components/Skeleton/index.d.ts.map +1 -1
- package/lib/typescript/components/TablePagination/index.d.ts +54 -0
- package/lib/typescript/components/TablePagination/index.d.ts.map +1 -1
- package/lib/typescript/components/Tabs/index.d.ts.map +1 -1
- package/lib/typescript/components/Tabs/styles.d.ts +0 -7
- package/lib/typescript/components/Tabs/styles.d.ts.map +1 -1
- package/lib/typescript/components/Text/index.d.ts +12 -2
- package/lib/typescript/components/Text/index.d.ts.map +1 -1
- package/lib/typescript/components/Tile/styles.d.ts.map +1 -1
- package/lib/typescript/components/ToggleButton/styles.d.ts +1 -1
- package/lib/typescript/components/index.d.ts +1 -0
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/figma/ListItem.SectionHeader.figma.d.ts.map +1 -1
- package/lib/typescript/reorderable-list.d.ts +2 -0
- package/lib/typescript/reorderable-list.d.ts.map +1 -0
- package/package.json +37 -8
- package/src/components/Checkbox/index.tsx +22 -0
- package/src/components/DateTimeList/index.tsx +13 -26
- package/src/components/DateTimeList/styles.ts +1 -10
- package/src/components/Heading/index.tsx +10 -1
- package/src/components/Icon/index.tsx +2 -0
- package/src/components/ListItem/index.tsx +232 -15
- package/src/components/ListItem/styles.ts +41 -0
- package/src/components/Menu/index.tsx +128 -12
- package/src/components/RangeCalendar/index.tsx +2 -0
- package/src/components/ReorderableList/ReorderableListShared.tsx +113 -0
- package/src/components/ReorderableList/index.tsx +162 -0
- package/src/components/ReorderableList/index.web.tsx +254 -0
- package/src/components/ReorderableList/labels.ts +52 -0
- package/src/components/ReorderableList/reorderItems.ts +16 -0
- package/src/components/ReorderableList/rowContext.tsx +72 -0
- package/src/components/ReorderableList/types.ts +80 -0
- package/src/components/ReorderableList/useReorder.ts +159 -0
- package/src/components/ReorderableList/webDnd.ts +60 -0
- package/src/components/ScopedTheme/index.tsx +6 -1
- package/src/components/ScrollShadow/gradient.ts +48 -0
- package/src/components/ScrollShadow/index.tsx +300 -69
- package/src/components/ScrollShadow/styles.ts +45 -28
- package/src/components/ScrollShadow/useComposedScrollHandler.ts +58 -0
- package/src/components/ScrollShadow/useScrollShadow.ts +72 -10
- package/src/components/Skeleton/index.tsx +3 -0
- package/src/components/TablePagination/index.tsx +54 -0
- package/src/components/Tabs/index.tsx +25 -35
- package/src/components/Tabs/styles.ts +0 -9
- package/src/components/Text/index.tsx +6 -1
- package/src/components/Tile/styles.ts +4 -1
- package/src/components/index.ts +5 -0
- package/src/reorderable-list.ts +1 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# 0.2.1 (https://design.candescent.com/docs/resources/release-notes/0.2.1)
|
|
2
|
+
|
|
3
|
+
Calendar and DatePicker add isDateUnavailable and shared typed-entry validation integrated with Field and @cdx-ui/formatters.
|
|
4
|
+
|
|
5
|
+
## What's new
|
|
6
|
+
|
|
7
|
+
**[Calendar](https://design.candescent.com/docs/components/calendar/content.md)** — Pass `isDateUnavailable(date)` to disable specific days in the month grid alongside `minValue` and `maxValue`. Unavailable and out-of-range days share one validation path, and presses on disabled days are ignored. Memoize a stable predicate when you define it inline so the grid does not relayout on every render ([#769](https://github.com/dfh-candescent/forge-design-system/pull/769)).
|
|
8
|
+
|
|
9
|
+
**[DatePicker](https://design.candescent.com/docs/components/date-picker/content.md)** — Accepts the same `isDateUnavailable` predicate and forwards it to the popover calendar. Typed entry is validated with the shared date rules: a complete date before `minValue` or after `maxValue`, or marked unavailable, stays in the field and still flows through `onValueChange`, but now shows invalid styling, sets `aria-invalid` on segments, and surfaces **`Field.Error`** when the picker sits inside a **[Field](https://design.candescent.com/docs/components/field/content.md)**. Listen to `onValidationChange(reason | undefined)` for the current **`DateValidationReason`**, and combine your own `isInvalid` with the picker’s internal result. Bound dates in error copy use the picker locale ([#769](https://github.com/dfh-candescent/forge-design-system/pull/769)).
|
|
10
|
+
|
|
11
|
+
**[Field](https://design.candescent.com/docs/components/field/content.md)** — Self-validating controls can report invalid state and a message to the enclosing field via `useReportFormControlValidation` from `@cdx-ui/utils`, so **`Field.Error`** and **`Field.Helper`** reflect control-driven validation even when they are not nested inside the control. DatePicker uses this when a Field ancestor is present ([#769](https://github.com/dfh-candescent/forge-design-system/pull/769)).
|
|
12
|
+
|
|
13
|
+
**@cdx-ui/formatters** — `getDateValidationReason(date, { minValue, maxValue, isDateUnavailable })` is the single bounds-and-unavailable check for Calendar, DatePicker, and custom UIs. Default labels (`validationBeforeMin`, `validationAfterMax` with a `{date}` placeholder, and `validationUnavailable`) and `formatDateValidationMessage` resolve overridable copy for each reason ([#769](https://github.com/dfh-candescent/forge-design-system/pull/769)).
|
|
14
|
+
|
|
15
|
+
## Dependencies
|
|
16
|
+
|
|
17
|
+
**@cdx-ui/\*** — Align `@cdx-ui/components`, `@cdx-ui/primitives`, `@cdx-ui/utils`, and `@cdx-ui/formatters` to `0.2.1` when you upgrade this release.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# 0.2.2 (https://design.candescent.com/docs/resources/release-notes/0.2.2)
|
|
2
|
+
|
|
3
|
+
Fixes web Text layout in production, Button solid edges on native, and Field required labels on web.
|
|
4
|
+
|
|
5
|
+
This release corrects web and native rendering for **Button**, **Field**, and root **Text** when you use the shipped component styles.
|
|
6
|
+
|
|
7
|
+
## Bug fixes
|
|
8
|
+
|
|
9
|
+
- **[Button](https://design.candescent.com/docs/components/button/content.md)** — On iOS and Android, the solid variant’s bottom edge follows rounded corners instead of drawing a flat line through the curve ([#779](https://github.com/dfh-candescent/forge-design-system/pull/779)).
|
|
10
|
+
- **[Field](https://design.candescent.com/docs/components/field/content.md)** — The required asterisk stays on the same line as the label on web ([#776](https://github.com/dfh-candescent/forge-design-system/pull/776)).
|
|
11
|
+
- **Text** — Production web builds no longer force every root `Text` node to `display: inline`, so `textAlign` and Tailwind display utilities work when you import `@cdx-ui/components/styles.css`; remove any manual `[class*='css-text-']` override from your app ([#776](https://github.com/dfh-candescent/forge-design-system/pull/776)).
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# 0.2.3 (https://design.candescent.com/docs/resources/release-notes/0.2.3)
|
|
2
|
+
|
|
3
|
+
ReorderableList brings drag-and-drop list reordering on web and native; Tile flat rows show the selected background again.
|
|
4
|
+
|
|
5
|
+
This release adds **[ReorderableList](https://design.candescent.com/docs/components/reorderable-list/content.md)** for sortable rows on iOS, Android, and web, extends **[ListItem](https://design.candescent.com/docs/components/list-item/content.md)** for drag handles alongside pressable rows, and fixes selected styling on flat **[Tile](https://design.candescent.com/docs/components/tile/content.md)** rows.
|
|
6
|
+
|
|
7
|
+
## What's new
|
|
8
|
+
|
|
9
|
+
**[ReorderableList](https://design.candescent.com/docs/components/reorderable-list/content.md)** — Renders a vertically reorderable list with pointer and keyboard sorting on web and touch reordering on native. Import it from `@cdx-ui/components/reorderable-list` so the main `@cdx-ui/components` entry does not pull in drag-and-drop engines. Pass your row data and `onReorder` (or `onReorderIndices`) to update order; use **`ListItem.DragHandle`** on each row for the grab target, or rely on the default handle. Optional peers are **`@dnd-kit/core`**, **`@dnd-kit/sortable`**, and **`@dnd-kit/utilities`** on web and **`react-native-sortables`** on native—install the set for the platforms you ship. Row context exposes `isDragging`, move helpers, and screen-reader announcements for pick-up, move, drop, and cancel ([#743](https://github.com/dfh-candescent/forge-design-system/pull/743)).
|
|
10
|
+
|
|
11
|
+
**[ListItem](https://design.candescent.com/docs/components/list-item/content.md)** — When a row sits inside `ReorderableList`, **`ListItem.DragHandle`** binds to the list’s drag activator and can sit beside a pressable row (`onPress` or `asChild`) without blocking presses. `ListItem` reads `isDragging` from list row context instead of a `dragging` prop ([#743](https://github.com/dfh-candescent/forge-design-system/pull/743)).
|
|
12
|
+
|
|
13
|
+
## Bug fixes
|
|
14
|
+
|
|
15
|
+
- **[Tile](https://design.candescent.com/docs/components/tile/content.md)** — Flat-shape tiles show the selected background when `selected` is true ([#781](https://github.com/dfh-candescent/forge-design-system/pull/781)).
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Release notes (https://design.candescent.com/docs/resources/release-notes)
|
|
2
|
+
|
|
3
|
+
Every release of the `@cdx-ui/*` packages, newest first. Open a version to read what
|
|
4
|
+
shipped in it, grouped into breaking changes, new components, utilities, fixes, internal
|
|
5
|
+
work, and documentation.
|
|
6
|
+
|
|
7
|
+
Notes are generated from the release commit itself, so the versions and commit range behind
|
|
8
|
+
each entry are exact. Releases that contained nothing but backlog or dependency bookkeeping
|
|
9
|
+
are omitted.
|
|
10
|
+
|
|
11
|
+
- [0.2.3](https://design.candescent.com/docs/resources/release-notes/0.2.3/content.md) — 2026-10-08 — ReorderableList brings drag-and-drop list reordering on web and native; Tile flat rows show the selected background again.
|
|
12
|
+
- [0.2.2](https://design.candescent.com/docs/resources/release-notes/0.2.2/content.md) — 2026-10-07 — Fixes web Text layout in production, Button solid edges on native, and Field required labels on web.
|
|
13
|
+
- [0.2.1](https://design.candescent.com/docs/resources/release-notes/0.2.1/content.md) — 2026-10-07 — Calendar and DatePicker add isDateUnavailable and shared typed-entry validation integrated with Field and @cdx-ui/formatters.
|
|
14
|
+
- [0.2.0](https://design.candescent.com/docs/resources/release-notes/0.2.0/content.md) — 2026-10-06 — Breaking change — Native font embedding and per-face utilities removed; adds color picker family, semantic Text/Icon colors, and ToggleButton.Group compound API.
|
|
15
|
+
- [0.1.6](https://design.candescent.com/docs/resources/release-notes/0.1.6/content.md) — 2026-09-30 — Adds ToggleButton and ToggleButtonGroup for persistent pressed states and single- or multi-select toolbar controls on web and native.
|
|
16
|
+
- [0.1.5](https://design.candescent.com/docs/resources/release-notes/0.1.5/content.md) — 2026-09-29 — Figma Code Connect templates now cover Switch, progress, tabs, tiles, dates, toasts, sliders, and other components for Dev Mode snippets.
|
|
17
|
+
- [0.1.4](https://design.candescent.com/docs/resources/release-notes/0.1.4/content.md) — 2026-09-24 — Breaking change — Per-face font utilities are removed on web—use typography composites with font-weight. Adds Drawer, Menu filter rows, Avatar variants, and banking icons.
|
|
18
|
+
- [0.1.2](https://design.candescent.com/docs/resources/release-notes/0.1.2/content.md) — 2026-09-15 — Radio supports a read-only state for showing a selected option without allowing changes.
|
|
19
|
+
- [0.1.1](https://design.candescent.com/docs/resources/release-notes/0.1.1/content.md) — 2026-09-11 — Forge UI moves from 0.0.1-beta.188 to 0.1.1 on the 0.x line; update every @cdx-ui/\* package to the new version together.
|
|
20
|
+
- [0.0.1-beta.187](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.187/content.md) — 2026-09-10 — Adds @cdx-ui/data-grid for web tabular data, plus Table and TablePagination components for data-heavy screens.
|
|
21
|
+
- [0.0.1-beta.185](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.185/content.md) — 2026-09-09 — New Table compound component for presenting tabular data with header, body, footer, and cell sub-components on web and native.
|
|
22
|
+
- [0.0.1-beta.182](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.182/content.md) — 2026-09-07 — CurrencyInput now accepts returnKeyType to control the keyboard return key on mobile.
|
|
23
|
+
- [0.0.1-beta.179](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.179/content.md) — 2026-08-29 — Theme customization now uses explicit ThemeOverride inputs, selections, and token overrides instead of bundled preset themes.
|
|
24
|
+
- [0.0.1-beta.176](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.176/content.md) — 2026-08-28 — Finalizes Accordion composition with a single Content slot and fixes Form web data-attribute warnings and Accordion focus rings.
|
|
25
|
+
- [0.0.1-beta.174](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.174/content.md) — 2026-08-27 — Icons and checkbox selection groups no longer trigger web accessibility console warnings.
|
|
26
|
+
- [0.0.1-beta.173](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.173/content.md) — 2026-08-27 — Theme editor adopts Forge UI instead of MUI, Select shares Menu surface behavior, and ForgeDesignProvider no longer loops on safe-area updates.
|
|
27
|
+
- [0.0.1-beta.172](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.172/content.md) — 2026-08-27 — Adds Accordion for expandable single- or multi-select disclosure sections with compound trigger and content slots.
|
|
28
|
+
- [0.0.1-beta.171](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.171/content.md) — 2026-08-27 — Slider supports two-thumb range selection with array value, per-thumb labels, and vertical orientation.
|
|
29
|
+
- [0.0.1-beta.169](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.169/content.md) — 2026-08-26 — @cdx-ui/styles adds MUI and CDS CSS bridges and a ./theming entry point so Forge UI and MUI can share FI theme overrides.
|
|
30
|
+
- [0.0.1-beta.168](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.168/content.md) — 2026-08-25 — Breaking change — ProgressSegmented removes the deprecated total prop; use segments to set the segment count.
|
|
31
|
+
- [0.0.1-beta.167](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.167/content.md) — 2026-08-25 — Select.Content adds placement, offset, and crossOffset props to reposition dropdown overlays, with improved anchored overlay positioning near viewport edges.
|
|
32
|
+
- [0.0.1-beta.166](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.166/content.md) — 2026-08-25 — Theme overrides expand through a catalog-driven model in @cdx-ui/styles, with Theme Editor persistence fixes and a Chip font token correction.
|
|
33
|
+
- [0.0.1-beta.164](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.164/content.md) — 2026-08-24 — Breaking change — The deprecated Button strong variant is removed; replace it with solid before upgrading.
|
|
34
|
+
- [0.0.1-beta.163](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.163/content.md) — 2026-08-24 — Button hover and pressed states now use the correct surface design tokens.
|
|
35
|
+
- [0.0.1-beta.161](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.161/content.md) — 2026-08-23 — Style Dictionary updates to v5 for a security fix in @cdx-ui/styles token generation.
|
|
36
|
+
- [0.0.1-beta.160](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.160/content.md) — 2026-08-21 — Menu adds anchored overlay lists for actions and selections, with checkbox, radio, and placement options.
|
|
37
|
+
- [0.0.1-beta.159](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.159/content.md) — 2026-08-21 — Palette generation uses OKLCH with designer contrast ratios; theme override types and getting-started guidance are updated.
|
|
38
|
+
- [0.0.1-beta.158](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.158/content.md) — 2026-08-21 — Theme overrides resolve DTCG token-reference aliases at runtime, and Theme Editor preserves custom override fields on round-trip.
|
|
39
|
+
- [0.0.1-beta.156](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.156/content.md) — 2026-08-19 — BottomSheet now scrolls correctly on Android when content includes a VirtualizedList.
|
|
40
|
+
- [0.0.1-beta.154](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.154/content.md) — 2026-08-19 — Adds @cdx-ui/native for Expo font loading and Metro config; useForgeFonts and withForgeMetroConfig move out of @cdx-ui/styles and @cdx-ui/components.
|
|
41
|
+
- [0.0.1-beta.152](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.152/content.md) — 2026-08-19 — Radio draws the focus ring on the indicator only, suppressing the browser default outline around the entire control.
|
|
42
|
+
- [0.0.1-beta.150](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.150/content.md) — 2026-08-18 — Dialog and Alert render above Bottom Sheet overlays, fixing stacked modal layering.
|
|
43
|
+
- [0.0.1-beta.149](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.149/content.md) — 2026-08-17 — Sparkle custom icon joins @cdx-ui/icons with outlined and filled variants.
|
|
44
|
+
- [0.0.1-beta.147](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.147/content.md) — 2026-08-17 — Design token values update for poise, prestige, and pulse presets — review theme overrides if you customize specific tokens.
|
|
45
|
+
- [0.0.1-beta.145](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.145/content.md) — 2026-08-13 — Adds Tooltip for short contextual hints with hover, focus, and click triggers, placement control, and an optional arrow on web and native.
|
|
46
|
+
- [0.0.1-beta.144](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.144/content.md) — 2026-08-12 — Checkbox isReadOnly now renders with correct read-only styling so the control displays its state without allowing interaction.
|
|
47
|
+
- [0.0.1-beta.143](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.143/content.md) — 2026-08-12 — ProgressCircle adds a circular progress indicator with determinate values, indeterminate loading, and small or large sizes.
|
|
48
|
+
- [0.0.1-beta.142](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.142/content.md) — 2026-08-12 — Checkbox and Radio keyboard navigation on web keeps tab order through disabled items and focuses the selected radio.
|
|
49
|
+
- [0.0.1-beta.141](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.141/content.md) — 2026-08-11 — Breaking change — Date and time pickers join Forge UI with DatePicker, DateRangePicker, DateTimePicker, MonthPicker, and a new @cdx-ui/formatters package.
|
|
50
|
+
- [0.0.1-beta.140](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.140/content.md) — 2026-08-08 — @cdx-ui/utils re-exports cva and VariantProps; Select documentation consolidates on the docs site with live demos.
|
|
51
|
+
- [0.0.1-beta.139](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.139/content.md) — 2026-08-06 — Carousel adds PrevButton and NextButton for ghost icon prev/next navigation, nested in Carousel or composed via useCarousel().
|
|
52
|
+
- [0.0.1-beta.138](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.138/content.md) — 2026-08-06 — WhatsApp icon is themeable again after reverting a premature fixed-color brand-icon carve-out and package license files.
|
|
53
|
+
- [0.0.1-beta.137](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.137/content.md) — 2026-08-05 — Tabs indicator animation now completes in 150ms for snappier tab switching.
|
|
54
|
+
- [0.0.1-beta.136](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.136/content.md) — 2026-08-05 — Font overrides applied with applyThemeOverride now persist inside ScopedTheme scopes instead of being shadowed.
|
|
55
|
+
- [0.0.1-beta.134](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.134/content.md) — 2026-08-04 — Published @cdx-ui packages declare MIT license metadata; versions published before this release are unchanged.
|
|
56
|
+
- [0.0.1-beta.133](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.133/content.md) — 2026-08-04 — Button asChild no longer overrides child role and event handlers when composing with Link or other interactive elements.
|
|
57
|
+
- [0.0.1-beta.130](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.130/content.md) — 2026-07-30 — Import ForgeDesignProvider directly from @cdx-ui/components.
|
|
58
|
+
- [0.0.1-beta.129](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.129/content.md) — 2026-07-30 — Tabs and Breadcrumbs documentation ships; Tabs.Tab interaction props are now internal-only.
|
|
59
|
+
- [0.0.1-beta.128](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.128/content.md) — 2026-07-30 — Design token values update from the design system source for poise, prestige, and pulse presets.
|
|
60
|
+
- [0.0.1-beta.127](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.127/content.md) — 2026-07-30 — Internal release — docs demo drift guard and a CI coverage-threshold gate.
|
|
61
|
+
- [0.0.1-beta.126](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.126/content.md) — 2026-07-29 — ThemeEditor no longer fires onChange on mount before the user edits a control.
|
|
62
|
+
- [0.0.1-beta.124](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.124/content.md) — 2026-07-29 — Breadcrumbs joins the component set for hierarchical navigation trails.
|
|
63
|
+
- [0.0.1-beta.122](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.122/content.md) — 2026-07-29 — Tabs arrives with a scroll-shadow affordance for overflowing tab strips.
|
|
64
|
+
- [0.0.1-beta.118](https://design.candescent.com/docs/resources/release-notes/0.0.1-beta.118/content.md) — 2026-07-22 — Breaking change — Color and variant props are standardised across components; tint and default are renamed.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_icons","_primitives","_utils","_Icon","_styles","_jsxRuntime","CheckboxRoot","forwardRef","className","isIndeterminate","children","style","props","ref","computedClassName","cn","checkboxRootVariants","jsxs","mergeDataAttributes","dataAttributes","slot","jsx","CheckboxIndicator","CheckboxIconSlot","displayName","INDICATOR_STATES","asChild","isChecked","isDisabled","isHovered","isInvalid","isReadOnly","isPressed","isFocused","isFocusVisible","useCheckboxContext","checkState","fieldState","checkboxIndicatorVariants","Comp","Slot","View","hover","checked","disabled","focusVisible","invalid","readonly","active","focused","indeterminate","CheckboxIcon","checkboxIconVariants","Icon","isIndeterminateProp","showIcon","as","CheckIndeterminateSmall","Check","CheckboxLabel","checkboxLabelVariants","Text","CheckboxGroup","direction","value","onChange","viewProps","checkboxGroupVariants","Checkbox","exports","Object","assign","Indicator","Label","Group"],"sourceRoot":"../../../../src","sources":["components/Checkbox/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AASA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAMkB,IAAAO,WAAA,GAAAP,OAAA;AAElB;AACA;AACA;;
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_icons","_primitives","_utils","_Icon","_styles","_jsxRuntime","CheckboxRoot","forwardRef","className","isIndeterminate","children","style","props","ref","computedClassName","cn","checkboxRootVariants","jsxs","mergeDataAttributes","dataAttributes","slot","jsx","CheckboxIndicator","CheckboxIconSlot","displayName","INDICATOR_STATES","asChild","isChecked","isDisabled","isHovered","isInvalid","isReadOnly","isPressed","isFocused","isFocusVisible","useCheckboxContext","checkState","fieldState","checkboxIndicatorVariants","Comp","Slot","View","hover","checked","disabled","focusVisible","invalid","readonly","active","focused","indeterminate","CheckboxIcon","checkboxIconVariants","Icon","isIndeterminateProp","showIcon","as","CheckIndeterminateSmall","Check","CheckboxLabel","checkboxLabelVariants","Text","CheckboxGroup","direction","value","onChange","viewProps","checkboxGroupVariants","Checkbox","exports","Object","assign","Indicator","Label","Group"],"sourceRoot":"../../../../src","sources":["components/Checkbox/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AASA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAMkB,IAAAO,WAAA,GAAAP,OAAA;AAElB;AACA;AACA;;AASA,MAAMQ,YAAY,gBAAG,IAAAC,iBAAU,EAC7B,CAAC;EAAEC,SAAS;EAAEC,eAAe;EAAEC,QAAQ;EAAEC,KAAK;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EAClE,MAAMC,iBAAiB,GAAG,IAAAC,SAAE,EAAC,IAAAC,4BAAoB,EAAC,CAAC,EAAER,SAAS,CAAC;EAE/D,oBACE,IAAAH,WAAA,CAAAY,IAAA,EAAChB,WAAA,CAAAK,YAAqB;IACpBO,GAAG,EAAEA,GAAW;IAChBL,SAAS,EAAEM,iBAAkB;IAC7BL,eAAe,EAAEA,eAAgB;IACjCE,KAAK,EAAEA,KAAM;IAAA,GACTC,KAAK;IAAA,GACL,IAAAM,+BAAmB,EAACN,KAAK,EAAE,IAAAO,0BAAc,EAAC;MAAEC,IAAI,EAAE;IAAW,CAAC,CAAC,CAAC;IAAAV,QAAA,gBAEpE,IAAAL,WAAA,CAAAgB,GAAA,EAACC,iBAAiB;MAAAZ,QAAA,eAChB,IAAAL,WAAA,CAAAgB,GAAA,EAACE,gBAAgB;QAACd,eAAe,EAAEA;MAAgB,CAAE;IAAC,CACrC,CAAC,EACnBC,QAAQ;EAAA,CACY,CAAC;AAE5B,CACF,CAAC;AAEDJ,YAAY,CAACkB,WAAW,GAAG,UAAU;;AAErC;AACA;AACA;;AAEA;AACA,MAAMC,gB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gBAAG,IAAAvD,iBAAU,EAC9B,CACE;EACEC,SAAS;EACTE,QAAQ;EACRC,KAAK;EACLoD,SAAS,GAAG,QAAQ;EACpBC,KAAK;EACLC,QAAQ;EACRrC,UAAU;EACVE,SAAS;EACTC,UAAU;EACV,GAAGmC;AACL,CAAC,EACDrD,GAAG,KACA;EACH,MAAMC,iBAAiB,GAAG,IAAAC,SAAE,EAAC,IAAAoD,6BAAqB,EAAC;IAAEJ;EAAU,CAAC,CAAC,EAAEvD,SAAS,CAAC;EAE7E,oBACE,IAAAH,WAAA,CAAAgB,GAAA,EAACpB,WAAA,CAAA6D,aAAsB;IACrBjD,GAAG,EAAEA,GAAI;IACTL,SAAS,EAAEM,iBAAkB;IAC7BH,KAAK,EAAEA,KAAM;IACbqD,KAAK,EAAEA,KAAK,IAAI,EAAG;IACnBC,QAAQ,EAAEA,QAAS;IACnBrC,UAAU,EAAEA,UAAW;IACvBE,SAAS,EAAEA,SAAU;IACrBC,UAAU,EAAEA,UAAW;IAAA,GACnBmC,SAAS;IAAA,GACT,IAAAhD,+BAAmB,EAACgD,SAAS,EAAE,IAAA/C,0BAAc,EAAC;MAAEC,IAAI,EAAE;IAAiB,CAAC,CAAC,CAAC;IAAAV,QAAA,EAE7EA;EAAQ,CACa,CAAC;AAE7B,CACF,CAAC;AAEDoD,aAAa,CAACtC,WAAW,GAAG,gBAAgB;;AAE5C;AACA;AACA;;AASO,MAAM4C,QAAQ,GAAAC,OAAA,CAAAD,QAAA,GAAGE,MAAM,CAACC,MAAM,CAACjE,YAAY,EAAE;EAClDkE,SAAS,EAAElD,iBAAiB;EAC5B+B,IAAI,EAAEF,YAAY;EAClBsB,KAAK,EAAEd,aAAa;EACpBe,KAAK,EAAEZ;AACT,CAAC,CAA8B","ignoreList":[]}
|
|
@@ -6,10 +6,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.DateTimeList = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
-
var _uniwind = require("uniwind");
|
|
10
9
|
var _primitives = require("@cdx-ui/primitives");
|
|
11
10
|
var _formatters = require("@cdx-ui/formatters");
|
|
12
11
|
var _utils = require("@cdx-ui/utils");
|
|
12
|
+
var _ScrollShadow = require("../ScrollShadow");
|
|
13
13
|
var _styles = require("./styles");
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
15
|
function DateTimeListDefaultBody() {
|
|
@@ -28,24 +28,6 @@ function DateTimeListDefaultBody() {
|
|
|
28
28
|
}) : null]
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
-
|
|
32
|
-
/** Cross-platform edge fade (Uniwind gradients are unreliable on native). */
|
|
33
|
-
function EdgeFade({
|
|
34
|
-
edge
|
|
35
|
-
}) {
|
|
36
|
-
const surface = (0, _uniwind.useCSSVariable)('--color-surface-primary') || 'transparent';
|
|
37
|
-
const isTop = edge === 'top';
|
|
38
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
39
|
-
pointerEvents: "none",
|
|
40
|
-
className: (0, _styles.dateTimeListEdgeFadeVariants)({
|
|
41
|
-
edge
|
|
42
|
-
}),
|
|
43
|
-
style: {
|
|
44
|
-
height: _primitives.DATE_TIME_LIST_ITEM_HEIGHT * 1.75,
|
|
45
|
-
experimental_backgroundImage: isTop ? `linear-gradient(to bottom, ${surface}, transparent)` : `linear-gradient(to top, ${surface}, transparent)`
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
31
|
const DateTimeListRoot = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
50
32
|
className,
|
|
51
33
|
children,
|
|
@@ -68,13 +50,16 @@ const DateTimeListRoot = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
68
50
|
top: (_primitives.DATE_TIME_LIST_HEIGHT - _primitives.DATE_TIME_LIST_ITEM_HEIGHT) / 2,
|
|
69
51
|
height: _primitives.DATE_TIME_LIST_ITEM_HEIGHT
|
|
70
52
|
}
|
|
71
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
72
|
-
className: (0, _styles.
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
53
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScrollShadow.ScrollShadow, {
|
|
54
|
+
className: (0, _styles.dateTimeListFadeLayerVariants)(),
|
|
55
|
+
orientation: "vertical",
|
|
56
|
+
size: "large",
|
|
57
|
+
surface: "primary",
|
|
58
|
+
visibility: "both",
|
|
59
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
60
|
+
className: (0, _styles.dateTimeListColumnsVariants)(),
|
|
61
|
+
children: children ?? /*#__PURE__*/(0, _jsxRuntime.jsx)(DateTimeListDefaultBody, {})
|
|
62
|
+
})
|
|
78
63
|
})]
|
|
79
64
|
}));
|
|
80
65
|
DateTimeListRoot.displayName = 'DateTimeList';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_primitives","_formatters","_utils","_ScrollShadow","_styles","_jsxRuntime","DateTimeListDefaultBody","granularity","hour12","useDateTimeListContext","showTime","showMinute","showSecond","getDateTimeSegmentVisibility","jsxs","Fragment","children","jsx","DateTimeListDateColumn","DateTimeListHourColumn","DateTimeListMinuteColumn","DateTimeListSecondColumn","DateTimeListPeriodColumn","DateTimeListRoot","forwardRef","className","style","props","ref","cn","dateTimeListRootVariants","height","DATE_TIME_LIST_HEIGHT","mergeDataAttributes","dataAttributes","slot","View","pointerEvents","dateTimeListHighlightVariants","top","DATE_TIME_LIST_ITEM_HEIGHT","ScrollShadow","dateTimeListFadeLayerVariants","orientation","size","surface","visibility","dateTimeListColumnsVariants","displayName","ColumnOption","option","onSelect","column","useDateTimeListColumnContext","Pressable","accessibilityRole","accessibilityLabel","label","accessibilityState","selected","onPress","value","dateTimeListOptionVariants","Text","dateTimeListOptionTextVariants","numberOfLines","ColumnShell","DateTimeListColumn","dateTimeListColumnVariants","DateTimeListTimeColumn","DateTimeList","exports","Object","assign","DateColumn","TimeColumn","PeriodColumn"],"sourceRoot":"../../../../src","sources":["components/DateTimeList/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAYA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAQkB,IAAAO,WAAA,GAAAP,OAAA;AAQlB,SAASQ,uBAAuBA,CAAA,EAAG;EACjC,MAAM;IAAEC,WAAW;IAAEC;EAAO,CAAC,GAAG,IAAAC,kCAAsB,EAAC,CAAC;EACxD,MAAM;IAAEC,QAAQ;IAAEC,UAAU;IAAEC;EAAW,CAAC,GAAG,IAAAC,wCAA4B,EAACN,WAAW,CAAC;EAEtF,oBACE,IAAAF,WAAA,CAAAS,IAAA,EAAAT,WAAA,CAAAU,QAAA;IAAAC,QAAA,gBACE,IAAAX,WAAA,CAAAY,GAAA,EAACC,sBAAsB,IAAE,CAAC,EACzBR,QAAQ,gBACP,IAAAL,WAAA,CAAAS,IAAA,EAAAT,WAAA,CAAAU,QAAA;MAAAC,QAAA,gBACE,IAAAX,WAAA,CAAAY,GAAA,EAACE,sBAAsB,IAAE,CAAC,EACzBR,UAAU,gBAAG,IAAAN,WAAA,CAAAY,GAAA,EAACG,wBAAwB,IAAE,CAAC,GAAG,IAAI,EAChDR,UAAU,gBAAG,IAAAP,WAAA,CAAAY,GAAA,EAACI,wBAAwB,IAAE,CAAC,GAAG,IAAI,EAChDb,MAAM,gBAAG,IAAAH,WAAA,CAAAY,GAAA,EAACK,wBAAwB,IAAE,CAAC,GAAG,IAAI;IAAA,CAC7C,CAAC,GACD,IAAI;E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AA,GAAKO;IAAK,CAAG,CAAC,GAAG,IAAI,EAC3Df,UAAU,gBAAG,IAAAP,WAAA,CAAAY,GAAA,EAACI,wBAAwB;MAAA,GAAKM;IAAK,CAAG,CAAC,GAAG,IAAI;EAAA,CAC5D,CAAC;AAEP;AAEA,SAASL,wBAAwBA,CAACK,KAAgB,EAAE;EAClD,oBAAO,IAAAtB,WAAA,CAAAY,GAAA,EAACiD,WAAW;IAACd,MAAM,EAAC,QAAQ;IAAA,GAAKzB;EAAK,CAAG,CAAC;AACnD;AAQO,MAAM2C,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAGE,MAAM,CAACC,MAAM,CAAClD,gBAAgB,EAAE;EAC1DmD,UAAU,EAAExD,sBAAsB;EAClCyD,UAAU,EAAEN,sBAAsB;EAClCO,YAAY,EAAEtD;AAChB,CAAC,CAAyB","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.dateTimeListRootVariants = exports.dateTimeListOptionVariants = exports.dateTimeListOptionTextVariants = exports.dateTimeListHighlightVariants = exports.
|
|
6
|
+
exports.dateTimeListRootVariants = exports.dateTimeListOptionVariants = exports.dateTimeListOptionTextVariants = exports.dateTimeListHighlightVariants = exports.dateTimeListFadeLayerVariants = exports.dateTimeListColumnsVariants = exports.dateTimeListColumnVariants = void 0;
|
|
7
7
|
var _utils = require("@cdx-ui/utils");
|
|
8
8
|
// Stacking order inside the DateTimeList root: the highlight band sits behind
|
|
9
9
|
// the option columns, and the edge fades sit above both. Uniwind requires
|
|
@@ -41,15 +41,5 @@ const dateTimeListOptionTextVariants = exports.dateTimeListOptionTextVariants =
|
|
|
41
41
|
selected: false
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
|
-
const
|
|
45
|
-
variants: {
|
|
46
|
-
edge: {
|
|
47
|
-
top: 'top-0',
|
|
48
|
-
bottom: 'bottom-0'
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
defaultVariants: {
|
|
52
|
-
edge: 'top'
|
|
53
|
-
}
|
|
54
|
-
});
|
|
44
|
+
const dateTimeListFadeLayerVariants = exports.dateTimeListFadeLayerVariants = (0, _utils.cva)(['h-full', LAYER_EDGE_FADE]);
|
|
55
45
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_utils","require","LAYER_HIGHLIGHT","LAYER_COLUMNS","LAYER_EDGE_FADE","dateTimeListRootVariants","exports","cva","dateTimeListHighlightVariants","dateTimeListColumnsVariants","dateTimeListColumnVariants","variants","column","date","hour","minute","second","period","defaultVariants","dateTimeListOptionVariants","dateTimeListOptionTextVariants","selected","true","false","
|
|
1
|
+
{"version":3,"names":["_utils","require","LAYER_HIGHLIGHT","LAYER_COLUMNS","LAYER_EDGE_FADE","dateTimeListRootVariants","exports","cva","dateTimeListHighlightVariants","dateTimeListColumnsVariants","dateTimeListColumnVariants","variants","column","date","hour","minute","second","period","defaultVariants","dateTimeListOptionVariants","dateTimeListOptionTextVariants","selected","true","false","dateTimeListFadeLayerVariants"],"sourceRoot":"../../../../src","sources":["components/DateTimeList/styles.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA,MAAMC,eAAe,GAAG,OAAO;AAC/B,MAAMC,aAAa,GAAG,OAAO;AAC7B,MAAMC,eAAe,GAAG,OAAO;AAExB,MAAMC,wBAAwB,GAAAC,OAAA,CAAAD,wBAAA,GAAG,IAAAE,UAAG,EACzC,yFACF,CAAC;AAEM,MAAMC,6BAA6B,GAAAF,OAAA,CAAAE,6BAAA,GAAG,IAAAD,UAAG,EAAC,CAC/C,yBAAyB,EACzBL,eAAe,EACf,6DAA6D,CAC9D,CAAC;AAEK,MAAMO,2BAA2B,GAAAH,OAAA,CAAAG,2BAAA,GAAG,IAAAF,UAAG,EAAC,CAACJ,aAAa,EAAE,iBAAiB,CAAC,CAAC;AAE3E,MAAMO,0BAA0B,GAAAJ,OAAA,CAAAI,0BAAA,GAAG,IAAAH,UAAG,EAAC,SAAS,EAAE;EACvDI,QAAQ,EAAE;IACRC,MAAM,EAAE;MACNC,IAAI,EAAE,YAAY;MAClBC,IAAI,EAAE,QAAQ;MACdC,MAAM,EAAE,QAAQ;MAChBC,MAAM,EAAE,QAAQ;MAChBC,MAAM,EAAE;IACV;EACF,CAAC;EACDC,eAAe,EAAE;IAAEN,MAAM,EAAE;EAAO;AACpC,CAAC,CAAC;AAEK,MAAMO,0BAA0B,GAAAb,OAAA,CAAAa,0BAAA,GAAG,IAAAZ,UAAG,EAAC,yCAAyC,CAAC;AAEjF,MAAMa,8BAA8B,GAAAd,OAAA,CAAAc,8BAAA,GAAG,IAAAb,UAAG,EAAC,sBAAsB,EAAE;EACxEI,QAAQ,EAAE;IACRU,QAAQ,EAAE;MACRC,IAAI,EAAE,oCAAoC;MAC1CC,KAAK,EAAE;IACT;EACF,CAAC;EACDL,eAAe,EAAE;IAAEG,QAAQ,EAAE;EAAM;AACrC,CAAC,CAAC;AAEK,MAAMG,6BAA6B,GAAAlB,OAAA,CAAAkB,6BAAA,GAAG,IAAAjB,UAAG,EAAC,CAAC,QAAQ,EAAEH,eAAe,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_utils","_styles","_jsxRuntime","sizeToLevel","xl","lg","md","sm","xs","Heading","exports","memo","forwardRef","className","size","props","ref","jsx","Text","role","cn","headingStyle","displayName"],"sourceRoot":"../../../../src","sources":["components/Heading/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAAkE,IAAAI,WAAA,GAAAJ,OAAA;AAElE,MAAMK,WAAW,GAAG;EAClBC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE;AACN,CAAU;
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_utils","_styles","_jsxRuntime","sizeToLevel","xl","lg","md","sm","xs","Heading","exports","memo","forwardRef","className","size","props","ref","jsx","Text","role","cn","headingStyle","displayName"],"sourceRoot":"../../../../src","sources":["components/Heading/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAAkE,IAAAI,WAAA,GAAAJ,OAAA;AAElE,MAAMK,WAAW,GAAG;EAClBC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE;AACN,CAAU;AAgBH,MAAMC,OAAO,GAAAC,OAAA,CAAAD,OAAA,gBAAG,IAAAE,WAAI,eACzB,IAAAC,iBAAU,EAA0C,SAASH,OAAOA,CAClE;EAAEI,SAAS;EAAEC,IAAI,GAAG,IAAI;EAAE,GAAGC;AAAM,CAAC,EACpCC,GAAG,EACH;EACA,oBACE,IAAAd,WAAA,CAAAe,GAAA,EAAClB,YAAA,CAAAmB,IAAI;IACHC,IAAI,EAAC,SAAS;IACd,cAAYhB,WAAW,CAACW,IAAI,IAAI,IAAI,CAAE;IACtCD,SAAS,EAAE,IAAAO,SAAE,EAAC,IAAAC,oBAAY,EAAC;MAAEP;IAAK,CAAC,CAAC,EAAED,SAAS,CAAE;IAAA,GAC7CE,KAAK;IACTC,GAAG,EAAEA;EAAI,CACV,CAAC;AAEN,CAAC,CACH,CAAC;AAEDP,OAAO,CAACa,WAAW,GAAG,SAAS","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_uniwind","_utils","_constants","_styles","_jsxRuntime","IconImpl","as","IconComponent","props","jsx","StyledIcon","withUniwind","size","fromClassName","styleProperty","color","hasWarnedIconRawColor","isIconColor","Object","prototype","hasOwnProperty","call","CONTENT_COLOR","Icon","className","isSemantic","semanticColor","rawColor","undefined","useEffect","__DEV__","console","warn","keys","join","cn","iconStyle"],"sourceRoot":"../../../../src","sources":["components/Icon/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAEA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAA4D,IAAAK,WAAA,GAAAL,OAAA;
|
|
1
|
+
{"version":3,"names":["_react","require","_uniwind","_utils","_constants","_styles","_jsxRuntime","IconImpl","as","IconComponent","props","jsx","StyledIcon","withUniwind","size","fromClassName","styleProperty","color","hasWarnedIconRawColor","isIconColor","Object","prototype","hasOwnProperty","call","CONTENT_COLOR","Icon","className","isSemantic","semanticColor","rawColor","undefined","useEffect","__DEV__","console","warn","keys","join","cn","iconStyle"],"sourceRoot":"../../../../src","sources":["components/Icon/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAEA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAA4D,IAAAK,WAAA,GAAAL,OAAA;AAuB5D,SAASM,QAAQA,CAAC;EAAEC,EAAE,EAAEC,aAAa;EAAE,GAAGC;AAAqB,CAAC,EAAE;EAChE,oBAAO,IAAAJ,WAAA,CAAAK,GAAA,EAACF,aAAa;IAAA,GAAKC;EAAK,CAAG,CAAC;AACrC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAME,UAAU,GAAG,IAAAC,oBAAW,EAAC,IAAAA,oBA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,iBAAS,EAAC;MAAErB,KAAK,EAAEW;IAAc,CAAC,CAAC,EAAEF,SAAS,CAAE;IAC9DT,KAAK,EAAEY,QAAS;IAAA,GACZnB;EAAK,CACV,CAAC;AAEN","ignoreList":[]}
|
|
@@ -16,6 +16,12 @@ Object.defineProperty(exports, "listItemDescriptionVariants", {
|
|
|
16
16
|
return _styles.listItemDescriptionVariants;
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
+
Object.defineProperty(exports, "listItemDragHandleVariants", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () {
|
|
22
|
+
return _styles.listItemDragHandleVariants;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
19
25
|
Object.defineProperty(exports, "listItemLeadingSlotVariants", {
|
|
20
26
|
enumerable: true,
|
|
21
27
|
get: function () {
|
|
@@ -28,6 +34,12 @@ Object.defineProperty(exports, "listItemMetaVariants", {
|
|
|
28
34
|
return _styles.listItemMetaVariants;
|
|
29
35
|
}
|
|
30
36
|
});
|
|
37
|
+
Object.defineProperty(exports, "listItemPressableRegionVariants", {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
get: function () {
|
|
40
|
+
return _styles.listItemPressableRegionVariants;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
31
43
|
Object.defineProperty(exports, "listItemRootVariants", {
|
|
32
44
|
enumerable: true,
|
|
33
45
|
get: function () {
|
|
@@ -60,8 +72,11 @@ Object.defineProperty(exports, "listItemTrailingSlotVariants", {
|
|
|
60
72
|
});
|
|
61
73
|
var _react = require("react");
|
|
62
74
|
var _reactNative = require("react-native");
|
|
75
|
+
var _icons = require("@cdx-ui/icons");
|
|
63
76
|
var _primitives = require("@cdx-ui/primitives");
|
|
64
77
|
var _utils = require("@cdx-ui/utils");
|
|
78
|
+
var _Icon = require("../Icon");
|
|
79
|
+
var _rowContext = require("../ReorderableList/rowContext");
|
|
65
80
|
var _styles = require("./styles");
|
|
66
81
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
67
82
|
const SCOPE = 'LIST_ITEM';
|
|
@@ -76,12 +91,43 @@ const useListItemStyleContext = () => {
|
|
|
76
91
|
// ROOT
|
|
77
92
|
// =============================================================================
|
|
78
93
|
|
|
94
|
+
/**
|
|
95
|
+
* `true` inside a pressable row's interactive element. `ListItem.DragHandle` reads it to warn when it
|
|
96
|
+
* is nested there instead of being a direct child of the row.
|
|
97
|
+
*/
|
|
98
|
+
const ListItemPressableContext = /*#__PURE__*/(0, _react.createContext)(false);
|
|
99
|
+
/** Finds a direct-child `ListItem.DragHandle` (matched by identity) of a pressable row. */
|
|
100
|
+
function partitionDragHandle(children) {
|
|
101
|
+
const items = _react.Children.toArray(children);
|
|
102
|
+
const handleIndexes = [];
|
|
103
|
+
items.forEach((child, index) => {
|
|
104
|
+
if (/*#__PURE__*/(0, _react.isValidElement)(child) && child.type === ListItemDragHandle) handleIndexes.push(index);
|
|
105
|
+
});
|
|
106
|
+
if (handleIndexes.length === 0) return undefined;
|
|
107
|
+
const [first] = handleIndexes;
|
|
108
|
+
return {
|
|
109
|
+
handle: items[first],
|
|
110
|
+
position: first === 0 ? 'start' : 'end',
|
|
111
|
+
rest: items.filter((_, index) => !handleIndexes.includes(index)),
|
|
112
|
+
misplaced: first !== 0 && first !== items.length - 1,
|
|
113
|
+
extra: handleIndexes.length > 1
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
let hasWarnedDragHandlePlacement = false;
|
|
117
|
+
/**
|
|
118
|
+
* A pressable row (`onPress`, or `asChild`) with a `ListItem.DragHandle` as its first or last
|
|
119
|
+
* direct child renders the handle beside the pressable element instead of inside it. The handle
|
|
120
|
+
* is matched by identity, so a `memo()` or wrapper component around it is not recognized. Under
|
|
121
|
+
* `asChild`, pass the handle and the single interactive element as siblings:
|
|
122
|
+
* `<ListItem asChild><ListItem.DragHandle /><Link>…</Link></ListItem>`.
|
|
123
|
+
*/
|
|
79
124
|
const ListItemRoot = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
80
125
|
size = 'default',
|
|
81
126
|
showSeparator = true,
|
|
82
127
|
crossAlign: crossAlignProp = 'center',
|
|
83
128
|
className,
|
|
84
129
|
style,
|
|
130
|
+
children,
|
|
85
131
|
...props
|
|
86
132
|
}, ref) => {
|
|
87
133
|
const crossAlign = crossAlignProp ?? 'center';
|
|
@@ -92,22 +138,50 @@ const ListItemRoot = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
92
138
|
crossAlign
|
|
93
139
|
}
|
|
94
140
|
}), [parent, crossAlign]);
|
|
141
|
+
const isDragging = (0, _rowContext.useReorderableRow)()?.isDragging ?? false;
|
|
142
|
+
const isPressable = props.onPress != null || !!props.asChild;
|
|
143
|
+
const partition = isPressable ? partitionDragHandle(children) : undefined;
|
|
144
|
+
const misplacedHandle = !!partition && (partition.misplaced || partition.extra);
|
|
145
|
+
(0, _react.useEffect)(() => {
|
|
146
|
+
if (__DEV__ && misplacedHandle && !hasWarnedDragHandlePlacement) {
|
|
147
|
+
hasWarnedDragHandlePlacement = true;
|
|
148
|
+
console.warn('[ListItem] Place one ListItem.DragHandle as the first or last child of a pressable ListItem. A handle elsewhere is moved to the end, and extra handles are dropped.');
|
|
149
|
+
}
|
|
150
|
+
}, [misplacedHandle]);
|
|
95
151
|
const computedClassName = (0, _utils.cn)((0, _styles.listItemRootVariants)({
|
|
96
152
|
size,
|
|
97
153
|
showSeparator,
|
|
98
154
|
crossAlign
|
|
99
155
|
}), className);
|
|
156
|
+
const splitProps = partition && {
|
|
157
|
+
accessory: /*#__PURE__*/(0, _jsxRuntime.jsx)(ListItemPressableContext.Provider, {
|
|
158
|
+
value: false,
|
|
159
|
+
children: partition.handle
|
|
160
|
+
}),
|
|
161
|
+
accessoryPosition: partition.position,
|
|
162
|
+
pressableClassName: (0, _styles.listItemPressableRegionVariants)({
|
|
163
|
+
size: size ?? 'default',
|
|
164
|
+
handlePosition: partition.position
|
|
165
|
+
})
|
|
166
|
+
};
|
|
167
|
+
const regionChildren = partition && props.asChild && partition.rest.length === 1 ? partition.rest[0] : partition?.rest;
|
|
100
168
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_utils.ParentContext.Provider, {
|
|
101
169
|
value: ctx,
|
|
102
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
170
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ListItemPressableContext.Provider, {
|
|
171
|
+
value: isPressable,
|
|
172
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.ListItemRoot, {
|
|
173
|
+
ref: ref,
|
|
174
|
+
className: computedClassName,
|
|
175
|
+
crossAlign: crossAlign,
|
|
176
|
+
style: style,
|
|
177
|
+
...props,
|
|
178
|
+
...splitProps,
|
|
179
|
+
...(0, _primitives.mergeDataAttributes)(props, (0, _primitives.dataAttributes)({
|
|
180
|
+
slot: 'list-item',
|
|
181
|
+
dragging: isDragging
|
|
182
|
+
})),
|
|
183
|
+
children: partition ? regionChildren : children
|
|
184
|
+
})
|
|
111
185
|
})
|
|
112
186
|
});
|
|
113
187
|
});
|
|
@@ -253,6 +327,92 @@ const ListItemTrailingSlot = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
253
327
|
});
|
|
254
328
|
});
|
|
255
329
|
ListItemTrailingSlot.displayName = 'ListItem.TrailingSlot';
|
|
330
|
+
function DefaultDragHandleGrip() {
|
|
331
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
332
|
+
as: _icons.DragIndicator,
|
|
333
|
+
className: "size-5 text-content-secondary"
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* Screen reader hint for the default handle. Web omits it: react-native-web drops
|
|
339
|
+
* `accessibilityHint`, and dnd-kit describes the keyboard controls through `aria-describedby`.
|
|
340
|
+
*/
|
|
341
|
+
const DEFAULT_DRAG_HANDLE_HINT = _reactNative.Platform.select({
|
|
342
|
+
ios: 'Drag to reorder, or swipe up or down to choose a move action.',
|
|
343
|
+
android: 'Drag to reorder, or open the actions menu to move this item.',
|
|
344
|
+
default: undefined
|
|
345
|
+
});
|
|
346
|
+
const dragHandleOuterStyle = {
|
|
347
|
+
flexShrink: 0
|
|
348
|
+
};
|
|
349
|
+
let hasWarnedDragHandleOutsideList = false;
|
|
350
|
+
let hasWarnedNestedDragHandle = false;
|
|
351
|
+
/**
|
|
352
|
+
* Drag activator for a row rendered by `ReorderableList`. Renders `null` outside a list. On a
|
|
353
|
+
* pressable `ListItem`, place it as the first or last direct child so it sits beside the row's
|
|
354
|
+
* pressable element rather than inside it.
|
|
355
|
+
*/
|
|
356
|
+
const ListItemDragHandle = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
357
|
+
asChild,
|
|
358
|
+
className,
|
|
359
|
+
style,
|
|
360
|
+
children,
|
|
361
|
+
accessibilityLabel = 'Reorder',
|
|
362
|
+
accessibilityHint,
|
|
363
|
+
accessibilityActions,
|
|
364
|
+
onAccessibilityAction,
|
|
365
|
+
...props
|
|
366
|
+
}, ref) => {
|
|
367
|
+
const row = (0, _rowContext.useReorderableRow)();
|
|
368
|
+
const insidePressable = (0, _react.useContext)(ListItemPressableContext);
|
|
369
|
+
const isOutsideList = row === null;
|
|
370
|
+
(0, _react.useEffect)(() => {
|
|
371
|
+
if (!__DEV__) return;
|
|
372
|
+
if (isOutsideList && !hasWarnedDragHandleOutsideList) {
|
|
373
|
+
hasWarnedDragHandleOutsideList = true;
|
|
374
|
+
console.warn('[ListItem.DragHandle] Rendered outside a ReorderableList row, so it renders nothing. Use it inside ReorderableList renderItem.');
|
|
375
|
+
}
|
|
376
|
+
if (insidePressable && !hasWarnedNestedDragHandle) {
|
|
377
|
+
hasWarnedNestedDragHandle = true;
|
|
378
|
+
console.warn("[ListItem.DragHandle] Nested inside a pressable ListItem, so it is part of the row's pressable element. Make it the first or last direct child of ListItem so it renders beside it.");
|
|
379
|
+
}
|
|
380
|
+
}, [isOutsideList, insidePressable]);
|
|
381
|
+
const handleRef = row?.handle.ref;
|
|
382
|
+
const hostRef = (0, _react.useMemo)(() => (0, _utils.mergeRefs)(ref, handleRef), [ref, handleRef]);
|
|
383
|
+
if (!row) return null;
|
|
384
|
+
const {
|
|
385
|
+
handle
|
|
386
|
+
} = row;
|
|
387
|
+
const handleProps = {
|
|
388
|
+
...handle.props,
|
|
389
|
+
accessible: true,
|
|
390
|
+
accessibilityRole: 'button',
|
|
391
|
+
accessibilityLabel,
|
|
392
|
+
accessibilityHint: accessibilityHint ?? (row.accessibilityActions.length > 0 ? DEFAULT_DRAG_HANDLE_HINT : undefined),
|
|
393
|
+
accessibilityActions: [...row.accessibilityActions, ...(accessibilityActions ?? [])],
|
|
394
|
+
onAccessibilityAction: (0, _utils.composeEventHandlers)(onAccessibilityAction, row.onAccessibilityAction),
|
|
395
|
+
className: (0, _utils.cn)((0, _styles.listItemDragHandleVariants)(), className),
|
|
396
|
+
...props,
|
|
397
|
+
...(0, _primitives.mergeDataAttributes)(props, (0, _primitives.dataAttributes)({
|
|
398
|
+
slot: 'list-item-drag-handle'
|
|
399
|
+
})),
|
|
400
|
+
style: [handle.props.style, style]
|
|
401
|
+
};
|
|
402
|
+
if (asChild) {
|
|
403
|
+
return handle.wrap(/*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.Slot, {
|
|
404
|
+
ref: hostRef,
|
|
405
|
+
...handleProps,
|
|
406
|
+
children: children
|
|
407
|
+
}), dragHandleOuterStyle);
|
|
408
|
+
}
|
|
409
|
+
return handle.wrap(/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
410
|
+
ref: hostRef,
|
|
411
|
+
...handleProps,
|
|
412
|
+
children: children ?? /*#__PURE__*/(0, _jsxRuntime.jsx)(DefaultDragHandleGrip, {})
|
|
413
|
+
}), dragHandleOuterStyle);
|
|
414
|
+
});
|
|
415
|
+
ListItemDragHandle.displayName = 'ListItem.DragHandle';
|
|
256
416
|
const wrapSectionHeaderLabel = children => {
|
|
257
417
|
if (typeof children === 'string' || typeof children === 'number') {
|
|
258
418
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
@@ -328,6 +488,7 @@ ListItemSectionHeader.displayName = 'ListItem.SectionHeader';
|
|
|
328
488
|
|
|
329
489
|
const ListItem = exports.ListItem = Object.assign(ListItemRoot, {
|
|
330
490
|
LeadingSlot: ListItemLeadingSlot,
|
|
491
|
+
DragHandle: ListItemDragHandle,
|
|
331
492
|
Content: ListItemContent,
|
|
332
493
|
Title: ListItemTitle,
|
|
333
494
|
Description: ListItemDescription,
|