twenty-ui 2.49.0 → 2.51.1
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/CHANGELOG.md +23 -0
- package/README.md +36 -32
- package/dist/{AllIcons-Cyd7721G.cjs → AllIcons-1tBWXXrE.cjs} +1 -1
- package/dist/{AllIcons-D132B8_i.js → AllIcons-ayl8BCtV.js} +1 -1
- package/dist/Button-CU8BS-Yd.js +75 -0
- package/dist/Button-iVyxlrwO.cjs +1 -0
- package/dist/Dropdown-D_hFndP5.cjs +1 -0
- package/dist/Dropdown-xXsGBv57.js +1056 -0
- package/dist/Heading-CHvEXL6n.cjs +1 -0
- package/dist/{Heading-pXllCJCO.js → Heading-Nj5BlPqB.js} +3 -3
- package/dist/Input-D1sIHUZ5.js +25 -0
- package/dist/Input-D69M4UwD.cjs +1 -0
- package/dist/ListItem-B-SFWJZb.cjs +1 -0
- package/dist/ListItem-WLONJMo5.js +91 -0
- package/dist/ListItem.module-B31VK9XZ.js +34 -0
- package/dist/ListItem.module-DiUK6-0Z.cjs +1 -0
- package/dist/OverflowingTextWithTooltip-ClpPsdpP.cjs +1 -0
- package/dist/OverflowingTextWithTooltip-D4eZc-7P.js +96 -0
- package/dist/ProgressBar-8pjpGrmZ.js +99 -0
- package/dist/ProgressBar-goqxS9NE.cjs +1 -0
- package/dist/Radio-CpQPRHXa.cjs +1 -0
- package/dist/Radio-VTjpEz8M.js +175 -0
- package/dist/Skeleton-BbIF780H.js +31 -0
- package/dist/Skeleton-tXeIy4qq.cjs +1 -0
- package/dist/TablerIcons-B-5Ua_Ne.js +460 -0
- package/dist/TabsTabContent-6rkARU9F.cjs +1 -0
- package/dist/TabsTabContent-DPkLTBi2.js +39 -0
- package/dist/Tooltip-08dDawT_.cjs +1 -0
- package/dist/Tooltip-C7zc16gI.js +132 -0
- package/dist/components/data-display/DetailsRow/DetailsRow.d.ts +2 -0
- package/dist/components/data-display/DetailsRow/types/DetailsRowProps.d.ts +9 -0
- package/dist/components/data-display/index.d.ts +2 -0
- package/dist/components/data-display.cjs +1 -1
- package/dist/components/data-display.mjs +9 -9
- package/dist/components/feedback/InlineBanner/InlineBanner.d.ts +2 -2
- package/dist/components/feedback/InlineBanner/internal/InlineBannerComponent.d.ts +1 -1
- package/dist/components/feedback/InlineBanner/types/InlineBannerProps.d.ts +2 -1
- package/dist/components/feedback.cjs +1 -1
- package/dist/components/feedback.mjs +1 -1
- package/dist/components/input/DatePicker/DatePicker.d.ts +2 -0
- package/dist/components/input/DatePicker/__stories__/DatePickerCssVariableThemeExample.d.ts +1 -0
- package/dist/components/input/DatePicker/__stories__/DatePickerExample.d.ts +5 -0
- package/dist/components/input/DatePicker/__stories__/DatePickerExternalMonthExample.d.ts +4 -0
- package/dist/components/input/DatePicker/__stories__/DatePickerNavigationUnmountExample.d.ts +2 -0
- package/dist/components/input/DatePicker/__stories__/datePickerWeekdayLabels.d.ts +1 -0
- package/dist/components/input/DatePicker/internal/DatePickerException.d.ts +5 -0
- package/dist/components/input/DatePicker/internal/DatePickerHeader.d.ts +3 -0
- package/dist/components/input/DatePicker/internal/DatePickerSelect.d.ts +15 -0
- package/dist/components/input/DatePicker/internal/DatePickerSelectLifecycleEffect.d.ts +7 -0
- package/dist/components/input/DatePicker/internal/DatePickerViewedMonthEffect.d.ts +9 -0
- package/dist/components/input/DatePicker/internal/ReactDatePickerLibrary.d.ts +2 -0
- package/dist/components/input/DatePicker/internal/datePickerConstants.d.ts +6 -0
- package/dist/components/input/DatePicker/internal/formatDatePickerLocalDate.d.ts +1 -0
- package/dist/components/input/DatePicker/internal/parseDatePickerDateOrThrow.d.ts +1 -0
- package/dist/components/input/DatePicker/internal/parseDatePickerLocalDateOrThrow.d.ts +1 -0
- package/dist/components/input/DatePicker/internal/validateDatePickerHighlightedRangeOrThrow.d.ts +4 -0
- package/dist/components/input/DatePicker/types/DatePickerHeaderProps.d.ts +9 -0
- package/dist/components/input/DatePicker/types/DatePickerProps.d.ts +42 -0
- package/dist/components/input/EmojiPicker/EmojiPicker.d.ts +2 -0
- package/dist/components/input/EmojiPicker/__stories__/EmojiPickerExample.d.ts +4 -0
- package/dist/components/input/EmojiPicker/__stories__/emojiPickerStoryData.d.ts +30 -0
- package/dist/components/input/EmojiPicker/__stories__/emojiPickerStoryEmojibaseUrl.d.ts +1 -0
- package/dist/components/input/EmojiPicker/__stories__/mockEmojiPickerStoryData.d.ts +5 -0
- package/dist/components/input/EmojiPicker/internal/EmojiPickerEmoji.d.ts +2 -0
- package/dist/components/input/EmojiPicker/internal/EmojiPickerRow.d.ts +2 -0
- package/dist/components/input/EmojiPicker/internal/EmojiPickerScrollEffect.d.ts +6 -0
- package/dist/components/input/EmojiPicker/internal/scrollActiveEmojiIntoView.d.ts +1 -0
- package/dist/components/input/EmojiPicker/types/EmojiPickerProps.d.ts +11 -0
- package/dist/components/input/FormFieldRow/FormFieldRow.d.ts +2 -0
- package/dist/components/input/FormFieldRow/types/FormFieldRowProps.d.ts +12 -0
- package/dist/components/input/ReactionButton/ReactionButton.d.ts +2 -0
- package/dist/components/input/ReactionButton/__stories__/ReactionButtonExample.d.ts +2 -0
- package/dist/components/input/ReactionButton/types/ReactionButtonProps.d.ts +14 -0
- package/dist/components/input/SearchInput/SearchInput.d.ts +1 -1
- package/dist/components/input/SearchInput/types/SearchInputProps.d.ts +1 -1
- package/dist/components/input/SegmentedControl/SegmentedControl.d.ts +1 -1
- package/dist/components/input/SegmentedControl/types/SegmentedControlProps.d.ts +3 -1
- package/dist/components/input/SegmentedControl/types/SegmentedControlVariant.d.ts +1 -0
- package/dist/components/input/index.d.ts +10 -0
- package/dist/components/input.cjs +1 -1
- package/dist/components/input.mjs +17 -13
- package/dist/components/layout/LabeledSeparator/LabeledSeparator.d.ts +2 -0
- package/dist/components/layout/LabeledSeparator/types/LabeledSeparatorProps.d.ts +7 -0
- package/dist/components/layout/index.d.ts +2 -0
- package/dist/components/layout.cjs +1 -1
- package/dist/components/layout.mjs +5 -4
- package/dist/components/navigation/CountPager/CountPager.d.ts +2 -0
- package/dist/components/navigation/CountPager/__stories__/CountPagerCollectionExample.d.ts +3 -0
- package/dist/components/navigation/CountPager/__stories__/CountPagerExample.d.ts +2 -0
- package/dist/components/navigation/CountPager/types/CountPagerProps.d.ts +11 -0
- package/dist/components/navigation/Dropdown/Dropdown.d.ts +4 -4
- package/dist/components/navigation/Dropdown/__stories__/DropdownControlledPageSessionExample.d.ts +1 -0
- package/dist/components/navigation/Dropdown/__stories__/DropdownNestedPageSessionExample.d.ts +6 -0
- package/dist/components/navigation/Dropdown/__stories__/DropdownPageActivityExample.d.ts +1 -0
- package/dist/components/navigation/Dropdown/__stories__/DropdownPageSessionExample.d.ts +5 -0
- package/dist/components/navigation/Dropdown/__stories__/DropdownPickerPageSessionExample.d.ts +1 -0
- package/dist/components/navigation/Dropdown/hooks/useDropdownPage.d.ts +1 -0
- package/dist/components/navigation/Dropdown/internal/DropdownContent.d.ts +1 -1
- package/dist/components/navigation/Dropdown/internal/DropdownContextValue.d.ts +3 -0
- package/dist/components/navigation/Dropdown/internal/DropdownEmpty.d.ts +1 -1
- package/dist/components/navigation/Dropdown/internal/DropdownLoading.d.ts +1 -1
- package/dist/components/navigation/Dropdown/internal/DropdownPageEffect.d.ts +8 -0
- package/dist/components/navigation/Dropdown/internal/DropdownSearch.d.ts +1 -1
- package/dist/components/navigation/Dropdown/internal/DropdownSearchEffect.d.ts +8 -0
- package/dist/components/navigation/Dropdown/internal/isActiveDropdownElement.d.ts +1 -0
- package/dist/components/navigation/Dropdown/types/DropdownSearchProps.d.ts +1 -1
- package/dist/components/navigation/ListItemButton/ListItemButton.d.ts +1 -1
- package/dist/components/navigation/ListItemButton/types/ListItemButtonProps.d.ts +1 -1
- package/dist/components/navigation/index.d.ts +2 -11
- package/dist/components/navigation.cjs +1 -1
- package/dist/components/navigation.mjs +7 -11
- package/dist/components/settings.cjs +1 -1
- package/dist/components/settings.mjs +1 -1
- package/dist/components.cjs +1 -1
- package/dist/components.mjs +42 -41
- package/dist/data-display-DUMj_z1t.js +252 -0
- package/dist/data-display-D_kbXJJd.cjs +2 -0
- package/dist/data-display-DzHM5j7j.cjs +1 -0
- package/dist/data-display-b-9s0RTe.js +422 -0
- package/dist/feedback-B50I0C35.cjs +1 -0
- package/dist/feedback-BQFSnMjh.js +10 -0
- package/dist/feedback-BzR4ggrP.cjs +1 -0
- package/dist/{feedback-DTyVVcTb.js → feedback-EaZszoXf.js} +225 -224
- package/dist/icon/components/TablerIcons.d.ts +1 -1
- package/dist/icon/constants/TwentyIconDictionary.d.ts +9 -0
- package/dist/icon/index.d.ts +1 -1
- package/dist/{icon-CUE-QGQK.js → icon-ICz2_dVB.js} +550 -944
- package/dist/icon-TSBamkxk.cjs +1 -0
- package/dist/icon.cjs +1 -1
- package/dist/icon.mjs +510 -504
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +666 -658
- package/dist/input-BQABEELu.cjs +1 -0
- package/dist/input-CuySKbhm.js +2356 -0
- package/dist/input-DxoXgI5-.js +373 -0
- package/dist/input-ExCbk62Y.cjs +1 -0
- package/dist/layout-B1Iwc9ku.cjs +1 -0
- package/dist/layout-B2KvJ900.js +479 -0
- package/dist/{navigation-CIVYqPc5.js → navigation-BY8X2w04.js} +31 -31
- package/dist/navigation-ByYN6NgX.cjs +1 -0
- package/dist/navigation-DP5Edsq_.cjs +1 -0
- package/dist/navigation-DXMjQMPm.js +134 -0
- package/dist/normalizeSearchText-DLmPiBUZ.js +19 -0
- package/dist/normalizeSearchText-Do0MELpQ.cjs +1 -0
- package/dist/preventDismissingClickActivation-BEBrL9aB.cjs +1 -0
- package/dist/preventDismissingClickActivation-BQFMKRey.js +29 -0
- package/dist/primitives/accessibility.cjs +1 -1
- package/dist/primitives/accessibility.mjs +1 -1
- package/dist/primitives/data-display/Avatar/constants/AvatarPropertiesBySize.d.ts +4 -0
- package/dist/primitives/data-display/Avatar/types/AvatarSize.d.ts +1 -1
- package/dist/primitives/data-display/Badge/types/BadgeColor.d.ts +1 -1
- package/dist/primitives/data-display/Chip/types/ChipVariant.d.ts +1 -1
- package/dist/primitives/data-display.cjs +1 -1
- package/dist/primitives/data-display.mjs +7 -8
- package/dist/primitives/feedback/Banner/Banner.d.ts +2 -2
- package/dist/primitives/feedback/Banner/internal/BannerAction.d.ts +1 -1
- package/dist/primitives/feedback/Banner/internal/BannerComponent.d.ts +1 -1
- package/dist/primitives/feedback/Banner/types/BannerProps.d.ts +2 -0
- package/dist/primitives/feedback.cjs +1 -1
- package/dist/primitives/feedback.mjs +9 -8
- package/dist/primitives/input/Autocomplete/Autocomplete.d.ts +1 -1
- package/dist/primitives/input/Autocomplete/internal/AutocompleteInput.d.ts +1 -1
- package/dist/primitives/input/Autocomplete/types/AutocompleteInputProps.d.ts +8 -1
- package/dist/primitives/input/Autocomplete/types/AutocompleteItemProps.d.ts +3 -1
- package/dist/primitives/input/Button/types/ButtonColor.d.ts +1 -1
- package/dist/primitives/input/Input/Input.d.ts +1 -1
- package/dist/primitives/input/Input/types/InputProps.d.ts +3 -0
- package/dist/primitives/input/InputGroup/InputGroup.d.ts +1 -1
- package/dist/primitives/input/InputGroup/types/InputGroupProps.d.ts +1 -0
- package/dist/primitives/input/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/primitives/input/RadioGroup/types/RadioGroupProps.d.ts +3 -1
- package/dist/primitives/input/Textarea/Textarea.d.ts +1 -1
- package/dist/primitives/input/Textarea/internal/TextareaAutoResizeEffect.d.ts +8 -0
- package/dist/primitives/input/Textarea/types/TextareaProps.d.ts +2 -0
- package/dist/primitives/input/index.d.ts +1 -0
- package/dist/primitives/input/types/InputVariant.d.ts +1 -0
- package/dist/primitives/input.cjs +1 -1
- package/dist/primitives/input.mjs +15 -15
- package/dist/primitives/navigation/ListItem/ListItem.d.ts +1 -1
- package/dist/primitives/navigation/ListItem/__stories__/ListItemMultilineExample.d.ts +7 -0
- package/dist/primitives/navigation/ListItem/types/ListItemDescriptionPlacement.d.ts +1 -1
- package/dist/primitives/navigation/ListItem/types/ListItemProps.d.ts +3 -0
- package/dist/primitives/navigation/ListItem/types/ListItemState.d.ts +1 -0
- package/dist/primitives/navigation/Tabs/types/TabsSize.d.ts +1 -1
- package/dist/primitives/navigation.cjs +1 -1
- package/dist/primitives/navigation.mjs +2 -2
- package/dist/primitives/surfaces/Card/Card.d.ts +3 -1
- package/dist/primitives/surfaces/Card/internal/CardAction.d.ts +2 -0
- package/dist/primitives/surfaces/Card/internal/CardControl.d.ts +2 -0
- package/dist/primitives/surfaces/Card/internal/CardRoot.d.ts +1 -1
- package/dist/primitives/surfaces/Card/types/CardActionProps.d.ts +2 -0
- package/dist/primitives/surfaces/Card/types/CardControlProps.d.ts +2 -0
- package/dist/primitives/surfaces/Card/types/CardRootProps.d.ts +0 -1
- package/dist/primitives/surfaces/Tooltip/Tooltip.d.ts +1 -0
- package/dist/primitives/surfaces/Tooltip/__stories__/findTooltip.d.ts +1 -0
- package/dist/primitives/surfaces/Tooltip/internal/TooltipBody.d.ts +2 -8
- package/dist/primitives/surfaces/Tooltip/types/TooltipBodyProps.d.ts +6 -0
- package/dist/primitives/surfaces/index.d.ts +3 -0
- package/dist/primitives/surfaces.cjs +1 -1
- package/dist/primitives/surfaces.mjs +2 -2
- package/dist/primitives/typography/Heading/types/HeadingProps.d.ts +4 -2
- package/dist/primitives/typography/OverflowingTextWithTooltip/types/OverflowingTextWithTooltipProps.d.ts +2 -1
- package/dist/primitives/typography/Text/Text.d.ts +1 -1
- package/dist/primitives/typography/Text/internal/TextTypographyProps.d.ts +7 -0
- package/dist/primitives/typography/Text/types/TextProps.d.ts +2 -1
- package/dist/primitives/typography/internal/TypographyColor.d.ts +2 -0
- package/dist/primitives/typography/internal/TypographyFontSize.d.ts +2 -0
- package/dist/primitives/typography.cjs +1 -1
- package/dist/primitives/typography.mjs +3 -3
- package/dist/primitives.cjs +1 -1
- package/dist/primitives.mjs +40 -40
- package/dist/{settings-BgVuLpg9.js → settings-BTFAqYrD.js} +1 -1
- package/dist/{settings-CPXhrmbK.cjs → settings-D_iT1ngl.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/surfaces-DtZwsfms.cjs +1 -0
- package/dist/surfaces-v0kQLZYO.js +224 -0
- package/dist/testing/index.d.ts +1 -0
- package/dist/testing/utils/waitForStorybookFontsLoaded.d.ts +1 -0
- package/dist/testing.cjs +1 -1
- package/dist/testing.mjs +87 -77
- package/dist/{typography-bKeSMuJd.cjs → typography-B05olPwL.cjs} +1 -1
- package/dist/{typography-DT2eKLvd.js → typography-BwyZEDDi.js} +1 -1
- package/dist/utilities/color/utils/themeColorSchema.d.ts +15 -15
- package/dist/utilities.cjs +1 -1
- package/dist/utilities.mjs +11 -10
- package/package.json +3 -1
- package/dist/Avatar-C6WxBgjS.cjs +0 -1
- package/dist/Avatar-ifVlxbx_.js +0 -73
- package/dist/Button-DIw804CX.js +0 -72
- package/dist/Button-DTm1WDzp.cjs +0 -1
- package/dist/Dropdown-1OAJvS1f.js +0 -1000
- package/dist/Dropdown-Bl4OXCf9.cjs +0 -1
- package/dist/Heading-CTRYClCO.cjs +0 -1
- package/dist/Input-DZWl81G_.js +0 -23
- package/dist/Input-DvL77rvu.cjs +0 -1
- package/dist/ListItem-DizNUBT8.js +0 -86
- package/dist/ListItem-DwBb-I1D.cjs +0 -1
- package/dist/ListItem.module-BJ9Ttjrc.js +0 -34
- package/dist/ListItem.module-CO4u2oeF.cjs +0 -1
- package/dist/OverflowingTextWithTooltip-BmUROIah.js +0 -90
- package/dist/OverflowingTextWithTooltip-Z2daM0_x.cjs +0 -1
- package/dist/ProgressBar-B3xACTV2.js +0 -84
- package/dist/ProgressBar-OpSMnDBz.cjs +0 -1
- package/dist/Radio-BEAztmPu.js +0 -103
- package/dist/Radio-Dx6b4SYZ.cjs +0 -1
- package/dist/TabsTabContent-Co27Y2TU.cjs +0 -1
- package/dist/TabsTabContent-DVcObDp6.js +0 -39
- package/dist/TintedIconTile-B1XDtGrF.js +0 -40
- package/dist/TintedIconTile-DO1XJXCQ.cjs +0 -1
- package/dist/Tooltip-Bg9Uk01p.cjs +0 -1
- package/dist/Tooltip-cLCgtFBF.js +0 -124
- package/dist/components/navigation/MenuItem/MenuItem.d.ts +0 -2
- package/dist/components/navigation/MenuItem/parts/MenuItemIcon.d.ts +0 -9
- package/dist/components/navigation/MenuItem/parts/MenuItemIconBoxContainer.d.ts +0 -7
- package/dist/components/navigation/MenuItem/parts/MenuItemIconWithGripSwap.d.ts +0 -8
- package/dist/components/navigation/MenuItem/parts/MenuItemLeftContent.d.ts +0 -19
- package/dist/components/navigation/MenuItem/parts/StyledMenuItemBase.d.ts +0 -25
- package/dist/components/navigation/MenuItem/types/MenuItemDraggableGripMode.d.ts +0 -1
- package/dist/components/navigation/MenuItem/types/MenuItemProps.d.ts +0 -33
- package/dist/components/navigation/MenuItemAvatar/MenuItemAvatar.d.ts +0 -2
- package/dist/components/navigation/MenuItemAvatar/types/MenuItemAvatarProps.d.ts +0 -18
- package/dist/components/navigation/MenuItemDraggable/MenuItemDraggable.d.ts +0 -2
- package/dist/components/navigation/MenuItemDraggable/types/MenuItemDraggableProps.d.ts +0 -20
- package/dist/components/navigation/MenuItemSuggestion/MenuItemSuggestion.d.ts +0 -2
- package/dist/components/navigation/MenuItemSuggestion/types/MenuItemSuggestionProps.d.ts +0 -12
- package/dist/components/navigation/MenuPicker/MenuPicker.d.ts +0 -2
- package/dist/components/navigation/MenuPicker/types/MenuPickerProps.d.ts +0 -15
- package/dist/data-display-BSKGlijb.cjs +0 -1
- package/dist/data-display-BtXCGOGw.js +0 -345
- package/dist/data-display-DtXIhJ4B.js +0 -184
- package/dist/data-display-XV3ht1rC.cjs +0 -2
- package/dist/feedback-Cs-38OH4.cjs +0 -1
- package/dist/feedback-DA-AU5z5.js +0 -38
- package/dist/feedback-DNLERYY9.cjs +0 -1
- package/dist/icon-BNcdwwdl.cjs +0 -1
- package/dist/input-B_rBplmn.cjs +0 -1
- package/dist/input-BrjD91wv.js +0 -785
- package/dist/input-ChlFcqIS.cjs +0 -1
- package/dist/input-D1oyk0tD.js +0 -421
- package/dist/layout-CthYckvl.cjs +0 -1
- package/dist/layout-DQcjBu08.js +0 -439
- package/dist/navigation-B6nka3bW.js +0 -400
- package/dist/navigation-CflGBYv-.cjs +0 -1
- package/dist/navigation-DoInK0Sp.cjs +0 -1
- package/dist/preventDismissingClickActivation-AaqHBLnW.js +0 -45
- package/dist/preventDismissingClickActivation-CIhWvKCu.cjs +0 -1
- package/dist/primitives/typography/internal/Label/Label.d.ts +0 -8
- package/dist/surfaces-0rL5DoHt.cjs +0 -1
- package/dist/surfaces-BLsR5ka0.js +0 -202
- /package/dist/{handleClickableElementKeyDown-C8Uz61XJ.js → accessibility-C8Uz61XJ.js} +0 -0
- /package/dist/{handleClickableElementKeyDown-CByqtBhO.cjs → accessibility-CByqtBhO.cjs} +0 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
### Breaking changes
|
|
6
|
+
|
|
7
|
+
`Text` and `OverflowingTextWithTooltip` now offer optional theme `size`, `weight` and `color` props. Omitted props preserve inherited typography. Native `color` strings must move to `style={{ color: customColor }}`; `color` accepts `primary`, `secondary`, `tertiary` and `light`.
|
|
8
|
+
|
|
9
|
+
`OverflowingTextWithTooltip.size` now means font size (`xxs` through `xxl`). The previously removed `small`/`large` height options are not aliases; replace the old `large` 16px height with a native style when needed.
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
Removed `MenuItem`, `MenuItemAvatar`, `MenuItemDraggable`, `MenuItemSuggestion` and `MenuPicker` from `twenty-ui/components/navigation` and the aggregate exports. Their props types and `MenuItemDraggableGripMode` are also removed. Applications must migrate these imports before upgrading.
|
|
13
|
+
|
|
14
|
+
| Removed API | Replacement |
|
|
15
|
+
| -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
16
|
+
| `MenuItem` and `MenuItemProps` | Use `Dropdown.ActionItem` for menu commands, `Dropdown.OptionItem` for menu choices, `ListItemButton` for standalone actions, or `ListItem` for passive content. |
|
|
17
|
+
| `MenuItemAvatar` and `MenuItemAvatarProps` | Compose `Avatar` inside the appropriate canonical row. |
|
|
18
|
+
| `MenuItemDraggable` and `MenuItemDraggableProps` | Compose `ListItem` from `twenty-ui/primitives/navigation` inside the application's drag host. The host owns drag handles and reordering. Keep independent action buttons in `ListItem.actions`. |
|
|
19
|
+
| `MenuItemSuggestion` and `MenuItemSuggestionProps` | Use `Dropdown.ActionItem` or `Dropdown.OptionItem` in a Dropdown page. For editor suggestions, compose `ListItem` or `ListItemButton` with the editor's option IDs and active-descendant state, keeping keyboard navigation in the editor. |
|
|
20
|
+
| `MenuPicker` and `MenuPickerProps` | Use `Button` from `twenty-ui/primitives/input` for standalone actions or pressed toggles. Use a selection owner such as `Dropdown.SelectionGroup` or `RadioGroup` when the workflow requires grouped choice navigation. |
|
|
21
|
+
| `MenuItemDraggableGripMode` | Choose grip presentation in the application's drag host. |
|
|
22
|
+
|
|
23
|
+
The package remains in alpha and follows the Twenty SDK release version.
|
package/README.md
CHANGED
|
@@ -8,11 +8,9 @@ Twenty's open-source React UI library provides foundational primitives, shared c
|
|
|
8
8
|
|
|
9
9
|
Read the [twenty-ui documentation](https://docs.twenty.com/ui/getting-started) for setup, theming, and component guides.
|
|
10
10
|
|
|
11
|
-
> **Alpha:** `twenty-ui` is still in alpha. Its version number follows the Twenty SDK release cycle. APIs and component behavior may change between releases.
|
|
12
|
-
|
|
13
11
|
## Installation
|
|
14
12
|
|
|
15
|
-
For
|
|
13
|
+
For an existing React application, install the library. React 19 is required.
|
|
16
14
|
|
|
17
15
|
```bash
|
|
18
16
|
npm install twenty-ui
|
|
@@ -31,7 +29,7 @@ For Twenty apps, follow [Using Twenty UI components](https://docs.twenty.com/dev
|
|
|
31
29
|
For a standalone React application, import the base styles once, pick a theme stylesheet, and wrap your app in `ThemeProvider`:
|
|
32
30
|
|
|
33
31
|
```tsx
|
|
34
|
-
import {
|
|
32
|
+
import { Field, Input } from 'twenty-ui/primitives/input';
|
|
35
33
|
import { ThemeProvider } from 'twenty-ui/theme';
|
|
36
34
|
|
|
37
35
|
import 'twenty-ui/style.css';
|
|
@@ -39,43 +37,49 @@ import 'twenty-ui/theme-light.css';
|
|
|
39
37
|
|
|
40
38
|
export const App = () => (
|
|
41
39
|
<ThemeProvider colorScheme="light">
|
|
42
|
-
<
|
|
40
|
+
<Field.Root>
|
|
41
|
+
<Field.Label>Email</Field.Label>
|
|
42
|
+
<Input name="email" type="email" placeholder="you@example.com" />
|
|
43
|
+
<Field.Description>Use your work email address.</Field.Description>
|
|
44
|
+
</Field.Root>
|
|
43
45
|
</ThemeProvider>
|
|
44
46
|
);
|
|
45
47
|
```
|
|
46
48
|
|
|
47
49
|
The component stylesheet includes a global reset. Load it once at your application entry point.
|
|
48
50
|
|
|
51
|
+
Component styles and the reset use the `twenty-ui` cascade layer. Unlayered application styles override those layered rules. Put application resets in an earlier layer; see [style overrides](https://docs.twenty.com/ui/getting-started#override-styles) for the layer order and Tailwind setup.
|
|
52
|
+
|
|
49
53
|
## Entry points
|
|
50
54
|
|
|
51
|
-
Primitives provide foundational controls, including compound controls such as Select,
|
|
55
|
+
Primitives provide foundational controls, including compound controls such as Select, Popover, and Dialog. Shared components compose them into presets such as `MainButton`, `LightButton`, `Dropdown`, and `Toaster`. Both layers receive data, labels, and callbacks from the application.
|
|
52
56
|
|
|
53
57
|
Prefer the matching public subpath for focused imports. The root entry point also re-exports primitives, shared components, icons, theme tokens, and utilities. Assets, testing helpers, and the optional code editor have separate entry points.
|
|
54
58
|
|
|
55
|
-
| Subpath | Contents
|
|
56
|
-
| ------------------------------------ |
|
|
57
|
-
| `twenty-ui/assets` | Logos and static assets
|
|
58
|
-
| `twenty-ui/components` | All shared component families except the optional editor
|
|
59
|
-
| `twenty-ui/components/data-display` | Avatar groups, JSON trees, metrics,
|
|
60
|
-
| `twenty-ui/components/feedback` | Callouts, inline banners, and notifications
|
|
61
|
-
| `twenty-ui/components/input` | Button presets,
|
|
62
|
-
| `twenty-ui/components/layout` | Sections, overflowing lists, and icon transitions
|
|
63
|
-
| `twenty-ui/components/navigation` | Dropdowns, menu compositions, and tab actions
|
|
64
|
-
| `twenty-ui/components/settings` | Settings rows
|
|
65
|
-
| `twenty-ui/components/code-editor` | Code editor, editor header, and editor theme helpers
|
|
66
|
-
| `twenty-ui/icon` | Icon components and the icon provider
|
|
67
|
-
| `twenty-ui/primitives` | All primitive families
|
|
68
|
-
| `twenty-ui/primitives/accessibility` | Hidden elements and keyboard interaction helpers
|
|
69
|
-
| `twenty-ui/primitives/data-display` | Avatars, chips, tags, color samples, and status indicators
|
|
70
|
-
| `twenty-ui/primitives/feedback` | Banners, progress
|
|
71
|
-
| `twenty-ui/primitives/input` | Buttons and form controls
|
|
72
|
-
| `twenty-ui/primitives/layout` | Expansion, separators, direction, and resizing
|
|
73
|
-
| `twenty-ui/primitives/navigation` |
|
|
74
|
-
| `twenty-ui/primitives/surfaces` | Cards, dialogs,
|
|
75
|
-
| `twenty-ui/primitives/typography` | Text and
|
|
76
|
-
| `twenty-ui/testing` | Storybook and test decorators and helpers
|
|
77
|
-
| `twenty-ui/theme` | Theme provider, hooks, types, and tokens
|
|
78
|
-
| `twenty-ui/utilities` | Hooks and shared utilities
|
|
59
|
+
| Subpath | Contents |
|
|
60
|
+
| ------------------------------------ | ------------------------------------------------------------------- |
|
|
61
|
+
| `twenty-ui/assets` | Logos and static assets |
|
|
62
|
+
| `twenty-ui/components` | All shared component families except the optional editor |
|
|
63
|
+
| `twenty-ui/components/data-display` | Avatar groups, command blocks, JSON trees, metrics, and icon tiles |
|
|
64
|
+
| `twenty-ui/components/feedback` | Callouts, inline banners, and notifications |
|
|
65
|
+
| `twenty-ui/components/input` | Button presets, specialized inputs, pickers, and segmented controls |
|
|
66
|
+
| `twenty-ui/components/layout` | Sections, overflowing lists, and icon transitions |
|
|
67
|
+
| `twenty-ui/components/navigation` | Dropdowns, menu compositions, and tab actions |
|
|
68
|
+
| `twenty-ui/components/settings` | Settings rows with labeled controls |
|
|
69
|
+
| `twenty-ui/components/code-editor` | Code editor, editor header, and editor theme helpers |
|
|
70
|
+
| `twenty-ui/icon` | Icon components and the icon provider |
|
|
71
|
+
| `twenty-ui/primitives` | All primitive families |
|
|
72
|
+
| `twenty-ui/primitives/accessibility` | Hidden elements and keyboard interaction helpers |
|
|
73
|
+
| `twenty-ui/primitives/data-display` | Avatars, badges, chips, tags, color samples, and status indicators |
|
|
74
|
+
| `twenty-ui/primitives/feedback` | Banners, progress indicators, loaders, and skeletons |
|
|
75
|
+
| `twenty-ui/primitives/input` | Buttons and form controls |
|
|
76
|
+
| `twenty-ui/primitives/layout` | Expansion, separators, direction, and resizing |
|
|
77
|
+
| `twenty-ui/primitives/navigation` | Breadcrumbs, list items, and tabs |
|
|
78
|
+
| `twenty-ui/primitives/surfaces` | Cards, dialogs, popovers, and tooltips |
|
|
79
|
+
| `twenty-ui/primitives/typography` | Text, headings, shortcuts, and overflowing text |
|
|
80
|
+
| `twenty-ui/testing` | Storybook and test decorators and helpers |
|
|
81
|
+
| `twenty-ui/theme` | Theme provider, hooks, types, and tokens |
|
|
82
|
+
| `twenty-ui/utilities` | Hooks and shared utilities |
|
|
79
83
|
|
|
80
84
|
Import icons such as `IconCheck` from `twenty-ui/icon`. The dynamic icon provider includes the full catalog, so use it when icons need to be looked up at runtime.
|
|
81
85
|
|
|
@@ -164,7 +168,7 @@ Explain state ownership before advanced behavior such as indeterminate selection
|
|
|
164
168
|
|
|
165
169
|
For compound components, include an anatomy tree and identify required parts, optional parts, and elements supplied internally. Show supported composition with complete examples, use Twenty UI components for supporting controls, and explain how custom wrappers preserve props and refs. Use `text` fences for structural diagrams and `tsx` fences for runnable examples so the documentation checker validates the examples.
|
|
166
170
|
|
|
167
|
-
Run `npx nx check:ui twenty-docs` to validate generated references and documentation examples. Run `npx nx check:ui-stories twenty-docs` to validate preview titles, story references, the required first `Display`, and the absence of automated interactions in embedded stories.
|
|
171
|
+
Run `npx nx generate:ui twenty-docs` after changing documented component props or theme tokens, then review the generated data in `packages/twenty-ui/generated` and snippets in `packages/twenty-docs/snippets/ui/generated`. Run `npx nx check:ui twenty-docs` to validate generated references and documentation examples. Run `npx nx check:ui-stories twenty-docs` to validate preview titles, story references, the required first `Display`, and the absence of automated interactions in embedded stories.
|
|
168
172
|
|
|
169
173
|
### Testing
|
|
170
174
|
|
|
@@ -175,7 +179,7 @@ npx vitest run --root packages/twenty-ui --project unit <file>
|
|
|
175
179
|
npx vitest run --root packages/twenty-ui --project storybook <file>
|
|
176
180
|
```
|
|
177
181
|
|
|
178
|
-
The unit project runs in jsdom. The Storybook project runs in headless Chromium through Playwright, including story interactions and accessibility checks.
|
|
182
|
+
The unit project runs in jsdom. The Storybook project runs in headless Chromium through Playwright, including story interactions and accessibility checks. `npx nx storybook:test twenty-ui` also runs the `reduced-motion` browser project for reduced-motion checks.
|
|
179
183
|
|
|
180
184
|
## License
|
|
181
185
|
|