twenty-ui 2.48.0 → 2.49.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/README.md +27 -2
  2. package/dist/Avatar-C6WxBgjS.cjs +1 -0
  3. package/dist/{Avatar-D-QA0RE5.js → Avatar-ifVlxbx_.js} +18 -17
  4. package/dist/{Button-D5enZ0Qz.js → Button-DIw804CX.js} +1 -1
  5. package/dist/{Button-Dbi5P05r.cjs → Button-DTm1WDzp.cjs} +1 -1
  6. package/dist/Dropdown-1OAJvS1f.js +1000 -0
  7. package/dist/Dropdown-Bl4OXCf9.cjs +1 -0
  8. package/dist/{ListItem-CjnrSbka.js → ListItem-DizNUBT8.js} +1 -1
  9. package/dist/{ListItem-CHTR-GLd.cjs → ListItem-DwBb-I1D.cjs} +1 -1
  10. package/dist/{ProgressBar-BvT1dyFo.js → ProgressBar-B3xACTV2.js} +1 -1
  11. package/dist/{ProgressBar-DfFz0fFB.cjs → ProgressBar-OpSMnDBz.cjs} +1 -1
  12. package/dist/{Radio-DMI1B7o5.js → Radio-BEAztmPu.js} +1 -1
  13. package/dist/{Radio-xmHgGHQO.cjs → Radio-Dx6b4SYZ.cjs} +1 -1
  14. package/dist/ResizeHandle-B1MuHTNA.cjs +1 -0
  15. package/dist/{ResizeHandle-C1kQ3MYR.js → ResizeHandle-B30OYZxS.js} +56 -55
  16. package/dist/Shortcut-Bp9iDdQg.js +73 -0
  17. package/dist/Shortcut-N8TELGPI.cjs +1 -0
  18. package/dist/{TintedIconTile-4BGa8g8n.js → TintedIconTile-B1XDtGrF.js} +1 -1
  19. package/dist/{TintedIconTile-CU2hCerq.cjs → TintedIconTile-DO1XJXCQ.cjs} +1 -1
  20. package/dist/components/__stories__/reading-direction/DirectionalLayoutExample.d.ts +3 -1
  21. package/dist/components/code-editor.cjs +1 -1
  22. package/dist/components/code-editor.mjs +52 -51
  23. package/dist/components/data-display.cjs +1 -1
  24. package/dist/components/data-display.mjs +2 -2
  25. package/dist/components/feedback.cjs +1 -1
  26. package/dist/components/feedback.mjs +1 -1
  27. package/dist/components/input/CountrySelect/CountrySelect.d.ts +5 -2
  28. package/dist/components/input/CountrySelect/__stories__/CountrySelectPartsExample.d.ts +11 -0
  29. package/dist/components/input/CountrySelect/internal/CountrySelectComponent.d.ts +2 -0
  30. package/dist/components/input/CountrySelect/internal/CountrySelectContext.d.ts +2 -0
  31. package/dist/components/input/CountrySelect/internal/CountrySelectContextValue.d.ts +11 -0
  32. package/dist/components/input/CountrySelect/internal/CountrySelectDropdown.d.ts +4 -0
  33. package/dist/components/input/CountrySelect/internal/CountrySelectOptions.d.ts +2 -11
  34. package/dist/components/input/CountrySelect/internal/CountrySelectOptionsContent.d.ts +2 -0
  35. package/dist/components/input/CountrySelect/internal/CountrySelectRoot.d.ts +2 -0
  36. package/dist/components/input/CountrySelect/internal/CountrySelectTrigger.d.ts +2 -0
  37. package/dist/components/input/CountrySelect/internal/NO_COUNTRY_SELECTION_VALUE.d.ts +1 -0
  38. package/dist/components/input/CountrySelect/internal/PreparedCountryChoice.d.ts +5 -0
  39. package/dist/components/input/CountrySelect/internal/getCountrySelectionValue.d.ts +1 -0
  40. package/dist/components/input/CountrySelect/internal/useCountrySelectContextOrThrow.d.ts +1 -0
  41. package/dist/components/input/CountrySelect/types/CountryChoice.d.ts +1 -0
  42. package/dist/components/input/CountrySelect/types/CountrySelectOptionsProps.d.ts +10 -0
  43. package/dist/components/input/CountrySelect/types/CountrySelectOptionsState.d.ts +4 -0
  44. package/dist/components/input/CountrySelect/types/CountrySelectProps.d.ts +7 -13
  45. package/dist/components/input/CountrySelect/types/CountrySelectRootProps.d.ts +12 -0
  46. package/dist/components/input/CountrySelect/types/CountrySelectTriggerProps.d.ts +6 -0
  47. package/dist/components/input/CurrencyPicker/CurrencyPicker.d.ts +4 -3
  48. package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerChangingDefaultExample.d.ts +5 -0
  49. package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerControlledExample.d.ts +5 -0
  50. package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerControlledSearchExample.d.ts +5 -0
  51. package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerExample.d.ts +3 -4
  52. package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerListLabelExample.d.ts +1 -0
  53. package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerRootStateExample.d.ts +1 -0
  54. package/dist/components/input/CurrencyPicker/internal/CurrencyPickerContext.d.ts +11 -0
  55. package/dist/components/input/CurrencyPicker/internal/CurrencyPickerOptions.d.ts +1 -1
  56. package/dist/components/input/CurrencyPicker/internal/CurrencyPickerRoot.d.ts +2 -0
  57. package/dist/components/input/CurrencyPicker/internal/CurrencyPickerShorthand.d.ts +2 -0
  58. package/dist/components/input/CurrencyPicker/internal/CurrencyPickerTrigger.d.ts +1 -1
  59. package/dist/components/input/CurrencyPicker/internal/PreparedCurrencyPickerOption.d.ts +7 -0
  60. package/dist/components/input/CurrencyPicker/internal/getCurrencyPickerSearchText.d.ts +2 -0
  61. package/dist/components/input/CurrencyPicker/internal/useCurrencyPickerContextOrThrow.d.ts +7 -0
  62. package/dist/components/input/CurrencyPicker/types/CurrencyPickerChangeEventDetails.d.ts +2 -0
  63. package/dist/components/input/CurrencyPicker/types/CurrencyPickerOption.d.ts +1 -0
  64. package/dist/components/input/CurrencyPicker/types/CurrencyPickerOptionsProps.d.ts +6 -5
  65. package/dist/components/input/CurrencyPicker/types/CurrencyPickerProps.d.ts +10 -0
  66. package/dist/components/input/CurrencyPicker/types/CurrencyPickerRootProps.d.ts +17 -0
  67. package/dist/components/input/CurrencyPicker/types/CurrencyPickerState.d.ts +6 -0
  68. package/dist/components/input/CurrencyPicker/types/CurrencyPickerTriggerProps.d.ts +3 -2
  69. package/dist/components/input/IconButton/__stories__/IconButtonExample.d.ts +7 -0
  70. package/dist/components/input/PhoneCountryPicker/PhoneCountryPicker.d.ts +5 -3
  71. package/dist/components/input/PhoneCountryPicker/__stories__/PhoneCountryPickerExample.d.ts +7 -3
  72. package/dist/components/input/PhoneCountryPicker/__stories__/testDisabledPhoneCountryPicker.d.ts +5 -0
  73. package/dist/components/input/PhoneCountryPicker/__stories__/testPhoneCountryCallingCodeDirection.d.ts +3 -0
  74. package/dist/components/input/PhoneCountryPicker/__stories__/testPhoneCountryNullSelection.d.ts +5 -0
  75. package/dist/components/input/PhoneCountryPicker/__stories__/testPhoneCountrySelection.d.ts +5 -0
  76. package/dist/components/input/PhoneCountryPicker/internal/PhoneCountryPickerContext.d.ts +9 -0
  77. package/dist/components/input/PhoneCountryPicker/internal/PhoneCountryPickerOptions.d.ts +1 -1
  78. package/dist/components/input/PhoneCountryPicker/internal/PhoneCountryPickerRoot.d.ts +2 -0
  79. package/dist/components/input/PhoneCountryPicker/internal/PhoneCountryPickerTrigger.d.ts +1 -1
  80. package/dist/components/input/PhoneCountryPicker/internal/PreparedPhoneCountryOption.d.ts +5 -0
  81. package/dist/components/input/PhoneCountryPicker/internal/getPhoneCountryOptionTooltipLabel.d.ts +2 -0
  82. package/dist/components/input/PhoneCountryPicker/internal/matchesPhoneCountrySearch.d.ts +6 -0
  83. package/dist/components/input/PhoneCountryPicker/internal/usePhoneCountryPickerContextOrThrow.d.ts +7 -0
  84. package/dist/components/input/PhoneCountryPicker/types/PhoneCountryOption.d.ts +1 -0
  85. package/dist/components/input/PhoneCountryPicker/types/PhoneCountryPickerOptionsProps.d.ts +4 -5
  86. package/dist/components/input/PhoneCountryPicker/types/PhoneCountryPickerProps.d.ts +10 -0
  87. package/dist/components/input/PhoneCountryPicker/types/PhoneCountryPickerRootProps.d.ts +12 -0
  88. package/dist/components/input/PhoneCountryPicker/types/PhoneCountryPickerTriggerProps.d.ts +1 -3
  89. package/dist/components/input/index.d.ts +10 -0
  90. package/dist/components/input.cjs +1 -1
  91. package/dist/components/input.mjs +13 -13
  92. package/dist/components/layout/OverflowingList/internal/measureItemWidths.d.ts +1 -2
  93. package/dist/components/layout/OverflowingList/internal/measureOverflowingListLayout.d.ts +1 -2
  94. package/dist/components/layout.cjs +1 -1
  95. package/dist/components/layout.mjs +1 -1
  96. package/dist/components/navigation/Dropdown/Dropdown.d.ts +2 -1
  97. package/dist/components/navigation/Dropdown/__stories__/DropdownIconGridExample.d.ts +3 -0
  98. package/dist/components/navigation/Dropdown/__stories__/DropdownSelectionGroupsExample.d.ts +1 -0
  99. package/dist/components/navigation/Dropdown/internal/DropdownContextValue.d.ts +6 -1
  100. package/dist/components/navigation/Dropdown/internal/DropdownOptionItem.d.ts +1 -1
  101. package/dist/components/navigation/Dropdown/internal/DropdownOptionItemOwner.d.ts +7 -0
  102. package/dist/components/navigation/Dropdown/internal/DropdownSelectionContext.d.ts +2 -0
  103. package/dist/components/navigation/Dropdown/internal/DropdownSelectionContextValue.d.ts +9 -0
  104. package/dist/components/navigation/Dropdown/internal/DropdownSelectionGroup.d.ts +2 -0
  105. package/dist/components/navigation/Dropdown/internal/DropdownSelectionGroupEffect.d.ts +11 -0
  106. package/dist/components/navigation/Dropdown/internal/createDropdownSelectionEventDetails.d.ts +5 -0
  107. package/dist/components/navigation/Dropdown/internal/dropdownItemActivation.d.ts +11 -0
  108. package/dist/components/navigation/Dropdown/internal/getDropdownItemExplicitId.d.ts +2 -2
  109. package/dist/components/navigation/Dropdown/internal/getDropdownOptionItemRole.d.ts +9 -0
  110. package/dist/components/navigation/Dropdown/internal/getDropdownSelectionGroupState.d.ts +6 -0
  111. package/dist/components/navigation/Dropdown/internal/getTrailingFocusGuard.d.ts +1 -0
  112. package/dist/components/navigation/Dropdown/internal/isDropdownOptionItemSelected.d.ts +6 -0
  113. package/dist/components/navigation/Dropdown/internal/useDropdownSelections.d.ts +12 -0
  114. package/dist/components/navigation/Dropdown/types/DropdownOptionItemProps.d.ts +7 -2
  115. package/dist/components/navigation/Dropdown/types/DropdownOptionItemSelectEventDetails.d.ts +2 -0
  116. package/dist/components/navigation/Dropdown/types/DropdownOptionItemState.d.ts +5 -0
  117. package/dist/components/navigation/Dropdown/types/DropdownSelectionGroupChangeEventDetails.d.ts +7 -0
  118. package/dist/components/navigation/Dropdown/types/DropdownSelectionGroupProps.d.ts +21 -0
  119. package/dist/components/navigation/Dropdown/types/DropdownSelectionGroupState.d.ts +7 -0
  120. package/dist/components/navigation/index.d.ts +5 -0
  121. package/dist/components/navigation.cjs +1 -1
  122. package/dist/components/navigation.mjs +2 -2
  123. package/dist/components/settings.cjs +1 -1
  124. package/dist/components/settings.mjs +1 -1
  125. package/dist/components.cjs +1 -1
  126. package/dist/components.mjs +22 -22
  127. package/dist/data-display-BSKGlijb.cjs +1 -0
  128. package/dist/{data-display-KyZbLLy-.js → data-display-BtXCGOGw.js} +81 -80
  129. package/dist/{data-display-0QO_WDSs.js → data-display-DtXIhJ4B.js} +45 -44
  130. package/dist/data-display-XV3ht1rC.cjs +2 -0
  131. package/dist/doNotTranslate-BSVT8Xyd.js +4 -0
  132. package/dist/doNotTranslate-CHE7WmRS.cjs +1 -0
  133. package/dist/feedback-Cs-38OH4.cjs +1 -0
  134. package/dist/{feedback-CM6fatE8.js → feedback-DTyVVcTb.js} +198 -197
  135. package/dist/index.cjs +1 -1
  136. package/dist/index.mjs +42 -42
  137. package/dist/{input-CJDYNwoO.cjs → input-B_rBplmn.cjs} +1 -1
  138. package/dist/input-BrjD91wv.js +785 -0
  139. package/dist/input-ChlFcqIS.cjs +1 -0
  140. package/dist/{input-DRpDiMRi.js → input-D1oyk0tD.js} +2 -2
  141. package/dist/layout-CthYckvl.cjs +1 -0
  142. package/dist/layout-DQcjBu08.js +439 -0
  143. package/dist/{navigation-B1SRvzKK.js → navigation-B6nka3bW.js} +125 -128
  144. package/dist/navigation-CIVYqPc5.js +132 -0
  145. package/dist/navigation-CflGBYv-.cjs +1 -0
  146. package/dist/navigation-DoInK0Sp.cjs +1 -0
  147. package/dist/preventDismissingClickActivation-AaqHBLnW.js +45 -0
  148. package/dist/preventDismissingClickActivation-CIhWvKCu.cjs +1 -0
  149. package/dist/primitives/data-display.cjs +1 -1
  150. package/dist/primitives/data-display.mjs +2 -2
  151. package/dist/primitives/feedback.cjs +1 -1
  152. package/dist/primitives/feedback.mjs +1 -1
  153. package/dist/primitives/input/Radio/__stories__/RadioCardContent.d.ts +8 -0
  154. package/dist/primitives/input.cjs +1 -1
  155. package/dist/primitives/input.mjs +3 -3
  156. package/dist/primitives/layout/ResizeHandle/__stories__/ResizableNotesExample.d.ts +2 -0
  157. package/dist/primitives/layout.cjs +1 -1
  158. package/dist/primitives/layout.mjs +1 -1
  159. package/dist/primitives/navigation.cjs +1 -1
  160. package/dist/primitives/navigation.mjs +2 -2
  161. package/dist/primitives/typography.cjs +1 -1
  162. package/dist/primitives/typography.mjs +2 -2
  163. package/dist/primitives.cjs +1 -1
  164. package/dist/primitives.mjs +11 -11
  165. package/dist/{settings-BjEZiHXE.js → settings-BgVuLpg9.js} +1 -1
  166. package/dist/{settings-BAYsnlZJ.cjs → settings-CPXhrmbK.cjs} +1 -1
  167. package/dist/style.css +1 -1
  168. package/dist/testing/GroupedCatalog.d.ts +14 -0
  169. package/dist/testing/index.d.ts +1 -0
  170. package/dist/testing.cjs +1 -1
  171. package/dist/testing.mjs +96 -66
  172. package/dist/{typography-fOTFr0jS.js → typography-DT2eKLvd.js} +1 -1
  173. package/dist/{typography-B5QEuPaL.cjs → typography-bKeSMuJd.cjs} +1 -1
  174. package/dist/useIsMobile-Byp9AIq-.cjs +1 -0
  175. package/dist/useIsMobile-D1ImfQnE.js +38 -0
  176. package/dist/utilities/internal/doNotTranslate.d.ts +1 -0
  177. package/dist/utilities-BKCMZyqZ.js +53 -0
  178. package/dist/utilities-xZh8D2gd.cjs +1 -0
  179. package/dist/utilities.cjs +1 -1
  180. package/dist/utilities.mjs +3 -3
  181. package/package.json +3 -3
  182. package/dist/Avatar-CQhIEazb.cjs +0 -1
  183. package/dist/Dropdown-BKjAaZS0.cjs +0 -1
  184. package/dist/Dropdown-C2hXrjvD.js +0 -820
  185. package/dist/ResizeHandle-DI4LHIQm.cjs +0 -1
  186. package/dist/Shortcut-BvWUZ3pb.js +0 -72
  187. package/dist/Shortcut-CgrdLv_L.cjs +0 -1
  188. package/dist/data-display-CPmTJAWJ.cjs +0 -1
  189. package/dist/data-display-DjhAHvj1.cjs +0 -2
  190. package/dist/feedback-ybO4n69s.cjs +0 -1
  191. package/dist/input-3D2lXywH.cjs +0 -1
  192. package/dist/input-TM3nUdu6.js +0 -554
  193. package/dist/layout-BszCDxAO.js +0 -441
  194. package/dist/layout-VaIq7Sjr.cjs +0 -1
  195. package/dist/navigation-CYAs2LnR.js +0 -131
  196. package/dist/navigation-CthkGHJ8.cjs +0 -1
  197. package/dist/navigation-DrOV5E67.cjs +0 -1
  198. package/dist/preventDismissingClickActivation-CzWqpjiX.js +0 -44
  199. package/dist/preventDismissingClickActivation-DZxTSLV3.cjs +0 -1
  200. package/dist/useIsMobile-DxOPI2_E.cjs +0 -1
  201. package/dist/useIsMobile-nrufFzMb.js +0 -37
  202. package/dist/utilities-BeLfNQ0Q.cjs +0 -1
  203. package/dist/utilities-CEi9I09B.js +0 -52
package/README.md CHANGED
@@ -133,13 +133,38 @@ Record formatting, routing, product illustrations, and feature-specific animatio
133
133
 
134
134
  ### Documentation
135
135
 
136
- Primitive guides belong in `packages/twenty-docs/ui/primitives`. Shared component guides belong in `packages/twenty-docs/ui/components`. For each stateful API that supports both modes, include separate **Uncontrolled state** and **Controlled state** examples with the same scenario, labels, and initial state. Keep each example complete, with public imports and one exported example component.
136
+ Primitive guides belong in `packages/twenty-docs/ui/primitives`. Shared component guides belong in `packages/twenty-docs/ui/components`.
137
+
138
+ Every component guide starts with its purpose and a `Display` story, followed by **Usage** with complete code matching that preview. Use realistic content and the public API. Compound components share one complete display across their parts; providers and accessibility helpers demonstrate their effect in context. Keep useful Storybook controls available on the display.
139
+
140
+ Make previews look like usable UI. Align controls with their labels, separate actions from supporting text, and give panels and cards enough padding. Constrain long text to a readable width, use theme colors for secondary content, and check that examples fit the documentation frame in both light and dark themes. Keep these layout choices in the example and its matching code snippet.
141
+
142
+ Preserve the component's existing appearance in its Display story. Improve the surrounding layout without changing the control's shape, size, variant, or focus styling for decoration. Show alternative appearances in named stories or catalogs.
143
+
144
+ Use these story roles consistently:
145
+
146
+ | Story | Purpose | When to include it |
147
+ | ------------------- | ------------------------------------- | ------------------------------------------------- |
148
+ | `Display` | One representative, usable example | Every component guide |
149
+ | `Catalog` | Labeled comparisons of visual options | When seeing options together helps readers choose |
150
+ | Named examples | A specific behavior or composition | When the component supports distinct workflows |
151
+ | Interaction stories | Verify behavior with `play` functions | Keep these separate from embedded previews |
152
+
153
+ After Usage, document visual options, anatomy where relevant, behavior and composition, accessibility, and the generated API reference. Omit sections that add no useful information. Put migration guidance before the API reference.
154
+
155
+ Catalogs should group variants, sizes, colors, and states separately. Use a matrix only when two dimensions need to be compared together. Avoid multiplying every prop combination. Use `GroupedCatalog` from `twenty-ui/testing` for a consistent grouped layout. Simple components can use a focused alternative example; interactive components usually need working workflow examples. Use the preview's light and dark tabs for theme comparison.
156
+
157
+ Keep comprehensive visual checks in separate `VisualRegression` stories using `CatalogDecorator`, including the existing dark-theme and variant matrices. Tag them with `!autodocs` and do not embed them in the guides. Simplifying a documentation catalog must preserve its existing visual regression coverage.
158
+
159
+ Embed stories with a descriptive `title` and a height that closely fits their content, including the preview's padding. Check wrapping at narrow documentation widths. Reserve additional height only for dropdowns, popups, validation messages, resizing, or other expanding content, and verify those states fit. Embedded stories can respond to the reader, but must not define or inherit a `play` function. Share a presentational example with its interaction story instead of copying automated interactions into the documentation.
160
+
161
+ For each stateful API that supports both modes, include separate **Uncontrolled state** and **Controlled state** examples with the same scenario, labels, and initial state. Keep each example complete, with public imports and one exported example component.
137
162
 
138
163
  Explain state ownership before advanced behavior such as indeterminate selection or manual tab activation. Document independent states, such as selection and popup visibility, separately. For components that delegate state to a parent or group, explain that ownership and link to the relevant examples.
139
164
 
140
165
  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.
141
166
 
142
- Run `npx nx check:ui twenty-docs` to validate generated references and documentation examples.
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.
143
168
 
144
169
  ### Testing
145
170
 
@@ -0,0 +1 @@
1
+ const I=require("./theme-1XkFz8Qu.cjs"),u=require("./isDefined-DS2Q42p5.cjs"),P=require("./doNotTranslate-CHE7WmRS.cjs"),q=require("./mergeClassNames-D4lshrT6.cjs"),h=require("./utilities-xZh8D2gd.cjs");let k=require("@sniptt/guards"),n=require("react/jsx-runtime"),A=require("@base-ui/react/avatar");var S="_root_14f7e_1",y="_avatarPulsing_14f7e_1",L="_image_14f7e_89",w="_fallback_14f7e_101",N={root:S,avatarPulsing:y,image:L,fallback:w},C=({className:a,...e})=>(0,n.jsx)(A.Avatar.Fallback,{...e,className:q.mergeClassNames(N.fallback,a)}),T=({className:a,...e})=>(0,n.jsx)(A.Avatar.Image,{...e,className:q.mergeClassNames(N.image,a)}),p=a=>a?.trim().charAt(0).toUpperCase(),x=({name:a,colorSeed:e=a,size:i="md",shape:g="square",variant:v="soft",color:m,backgroundColor:b,borderColor:_,pulsing:s=!1,ring:l=!1,className:o,style:c,...r})=>{const t=I.useTheme(),d=p(a),D=d?m??h.stringToThemeColorP3String({string:e??"",variant:12,theme:t}):m??t.font.color.tertiary,F=d?b??h.stringToThemeColorP3String({string:e??"",variant:v==="outline"?5:4,theme:t}):b??t.background.transparent.light,j=_??(d?h.stringToThemeColorP3String({string:e??"",variant:6,theme:t}):void 0);return(0,n.jsx)(A.Avatar.Root,{...r,"data-size":i,"data-shape":g,"data-pulsing":s||void 0,"data-ring":l||void 0,className:q.mergeClassNames(N.root,o),style:f=>({"--tw-avatar-color":D,"--tw-avatar-background":f.imageLoadingStatus==="loaded"?"none":F,"--tw-avatar-border":v==="outline"&&f.imageLoadingStatus!=="loaded"&&j?P.doNotTranslate(`1px solid ${j}`):"none",...(0,k.isFunction)(c)?c(f):c})})},B=({src:a,name:e,icon:i,imageProps:g,fallbackProps:v,backgroundColor:m,...b})=>{const _=p(e),s=u.isDefined(i)&&!(0,k.isBoolean)(i)&&i!=="",l=g?.alt??"",o=!s&&(0,k.isNonEmptyString)(l),{children:c=s?i:_||"-",...r}=v??{},t=u.isDefined(r.role)||u.isDefined(r["aria-label"])||u.isDefined(r["aria-labelledby"]),d=!o&&!t&&!u.isDefined(r.render);return(0,n.jsxs)(x,{...b,name:e,backgroundColor:s?"inherit":m,children:[!s&&(0,n.jsx)(T,{src:a??void 0,...g,alt:l}),(0,n.jsx)(C,{role:o?"img":void 0,"aria-label":o?l:void 0,"aria-hidden":d||void 0,...r,children:c})]})},R=Object.assign(B,{Root:x,Image:T,Fallback:C});Object.defineProperty(exports,"Avatar",{enumerable:!0,get:function(){return R}});
@@ -1,31 +1,32 @@
1
1
  import { t as c } from "./isDefined-fMi6eQ4r.js";
2
+ import { t as j } from "./doNotTranslate-BSVT8Xyd.js";
2
3
  import { r as w } from "./theme-B2EaXhye.js";
3
4
  import { t as _ } from "./mergeClassNames-ClFMR1v0.js";
4
- import { o as p } from "./utilities-CEi9I09B.js";
5
+ import { o as p } from "./utilities-BKCMZyqZ.js";
5
6
  import { isBoolean as y, isFunction as B, isNonEmptyString as R } from "@sniptt/guards";
6
7
  import { jsx as v, jsxs as S } from "react/jsx-runtime";
7
8
  import { Avatar as h } from "@base-ui/react/avatar";
8
- var T = "_root_14f7e_1", D = "_avatarPulsing_14f7e_1", P = "_image_14f7e_89", $ = "_fallback_14f7e_101", A = {
9
- root: T,
10
- avatarPulsing: D,
11
- image: P,
12
- fallback: $
9
+ var D = "_root_14f7e_1", P = "_avatarPulsing_14f7e_1", $ = "_image_14f7e_89", q = "_fallback_14f7e_101", A = {
10
+ root: D,
11
+ avatarPulsing: P,
12
+ image: $,
13
+ fallback: q
13
14
  }, I = ({ className: a, ...t }) => /* @__PURE__ */ v(h.Fallback, {
14
15
  ...t,
15
16
  className: _(A.fallback, a)
16
17
  }), N = ({ className: a, ...t }) => /* @__PURE__ */ v(h.Image, {
17
18
  ...t,
18
19
  className: _(A.image, a)
19
- }), x = (a) => a?.trim().charAt(0).toUpperCase(), C = ({ name: a, colorSeed: t = a, size: i = "md", shape: d = "square", variant: g = "soft", color: b, backgroundColor: f, borderColor: u, pulsing: e = !1, ring: l = !1, className: s, style: n, ...r }) => {
20
- const o = w(), m = x(a), L = m ? b ?? p({
20
+ }), x = (a) => a?.trim().charAt(0).toUpperCase(), C = ({ name: a, colorSeed: t = a, size: i = "md", shape: d = "square", variant: g = "soft", color: f, backgroundColor: b, borderColor: u, pulsing: e = !1, ring: l = !1, className: s, style: n, ...r }) => {
21
+ const o = w(), m = x(a), L = m ? f ?? p({
21
22
  string: t ?? "",
22
23
  variant: 12,
23
24
  theme: o
24
- }) : b ?? o.font.color.tertiary, j = m ? f ?? p({
25
+ }) : f ?? o.font.color.tertiary, T = m ? b ?? p({
25
26
  string: t ?? "",
26
27
  variant: g === "outline" ? 5 : 4,
27
28
  theme: o
28
- }) : f ?? o.background.transparent.light, F = u ?? (m ? p({
29
+ }) : b ?? o.background.transparent.light, F = u ?? (m ? p({
29
30
  string: t ?? "",
30
31
  variant: 6,
31
32
  theme: o
@@ -39,17 +40,17 @@ var T = "_root_14f7e_1", D = "_avatarPulsing_14f7e_1", P = "_image_14f7e_89", $
39
40
  className: _(A.root, s),
40
41
  style: (k) => ({
41
42
  "--tw-avatar-color": L,
42
- "--tw-avatar-background": k.imageLoadingStatus === "loaded" ? "none" : j,
43
- "--tw-avatar-border": g === "outline" && k.imageLoadingStatus !== "loaded" && F ? `1px solid ${F}` : "none",
43
+ "--tw-avatar-background": k.imageLoadingStatus === "loaded" ? "none" : T,
44
+ "--tw-avatar-border": g === "outline" && k.imageLoadingStatus !== "loaded" && F ? j(`1px solid ${F}`) : "none",
44
45
  ...B(n) ? n(k) : n
45
46
  })
46
47
  });
47
- }, q = ({ src: a, name: t, icon: i, imageProps: d, fallbackProps: g, backgroundColor: b, ...f }) => {
48
+ }, z = ({ src: a, name: t, icon: i, imageProps: d, fallbackProps: g, backgroundColor: f, ...b }) => {
48
49
  const u = x(t), e = c(i) && !y(i) && i !== "", l = d?.alt ?? "", s = !e && R(l), { children: n = e ? i : u || "-", ...r } = g ?? {}, o = c(r.role) || c(r["aria-label"]) || c(r["aria-labelledby"]), m = !s && !o && !c(r.render);
49
50
  return /* @__PURE__ */ S(C, {
50
- ...f,
51
+ ...b,
51
52
  name: t,
52
- backgroundColor: e ? "inherit" : b,
53
+ backgroundColor: e ? "inherit" : f,
53
54
  children: [!e && /* @__PURE__ */ v(N, {
54
55
  src: a ?? void 0,
55
56
  ...d,
@@ -62,11 +63,11 @@ var T = "_root_14f7e_1", D = "_avatarPulsing_14f7e_1", P = "_image_14f7e_89", $
62
63
  children: n
63
64
  })]
64
65
  });
65
- }, K = Object.assign(q, {
66
+ }, Q = Object.assign(z, {
66
67
  Root: C,
67
68
  Image: N,
68
69
  Fallback: I
69
70
  });
70
71
  export {
71
- K as t
72
+ Q as t
72
73
  };
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "./isDefined-fMi6eQ4r.js";
2
2
  import { t as D } from "./mergeClassNames-ClFMR1v0.js";
3
3
  import { t as l } from "./Loader-DtHWQH8w.js";
4
- import { t as E } from "./Shortcut-BvWUZ3pb.js";
4
+ import { t as E } from "./Shortcut-Bp9iDdQg.js";
5
5
  import { clsx as J } from "clsx";
6
6
  import { createContext as R, useContext as V } from "react";
7
7
  import { jsx as t, jsxs as h } from "react/jsx-runtime";
@@ -1 +1 @@
1
- const t=require("./isDefined-DS2Q42p5.cjs"),w=require("./mergeClassNames-D4lshrT6.cjs"),d=require("./Loader-Bb72CUQ9.cjs"),A=require("./Shortcut-CgrdLv_L.cjs");let E=require("clsx"),x=require("react"),e=require("react/jsx-runtime"),J=require("@base-ui/react/button");var q=(0,x.createContext)(null),R="_button_vtbjg_1",V="_content_vtbjg_181",F="_label_vtbjg_190",H="_icon_vtbjg_196",K="_hidden_vtbjg_206",M="_loader_vtbjg_210",r={button:R,content:V,label:F,icon:H,hidden:K,loader:M},Q=({variant:p,color:h,size:D,fullWidth:C=!1,loading:n=!1,loadingPosition:s="center",elevated:N=!1,startIcon:B,endIcon:L,shortcut:l,shortcutJoinLabel:g,disabled:y=!1,href:a,render:c,nativeButton:v,role:k,className:S,children:o,..._})=>{const i=(0,x.useContext)(q),z=p??i?.variant??"outline",G=h??i?.color??"neutral",O=D??i?.size??"md",u=t.isDefined(a)&&!t.isDefined(c)&&v!==!0,P=t.isDefined(a)?{href:a}:void 0,b=k??(u?"link":void 0),I=t.isDefined(b)?{role:b}:void 0,j=n&&s==="center",f=n&&s==="start"?(0,e.jsx)(d.Loader,{}):B,m=n&&s==="end"?(0,e.jsx)(d.Loader,{}):L;return(0,e.jsxs)(J.Button,{..._,...P,className:w.mergeClassNames(r.button,S),"data-variant":z,"data-color":G,"data-size":O,"data-full-width":C||void 0,"data-loading":n||void 0,"data-elevated":N||void 0,"aria-busy":n?"true":_["aria-busy"],disabled:y||n,...I,nativeButton:v??!u,render:c??(u?(0,e.jsx)("a",{href:a,children:o}):void 0),children:[(0,e.jsxs)("span",{className:(0,E.clsx)(r.content,j&&r.hidden),children:[t.isDefined(f)&&(0,e.jsx)("span",{className:r.icon,"aria-hidden":!0,children:f}),t.isDefined(o)&&(0,e.jsx)("span",{className:r.label,children:o}),t.isDefined(m)&&(0,e.jsx)("span",{className:r.icon,"aria-hidden":!0,children:m}),t.isDefined(l)&&(0,e.jsx)(A.Shortcut,{shortcut:l,sequenceJoinLabel:g,variant:"button",visibility:"desktop","aria-hidden":!0})]}),j&&(0,e.jsx)("span",{className:r.loader,"aria-hidden":!0,children:(0,e.jsx)(d.Loader,{})})]})};Object.defineProperty(exports,"Button",{enumerable:!0,get:function(){return Q}});Object.defineProperty(exports,"ButtonGroupContext",{enumerable:!0,get:function(){return q}});Object.defineProperty(exports,"Button_module_default",{enumerable:!0,get:function(){return r}});
1
+ const t=require("./isDefined-DS2Q42p5.cjs"),w=require("./mergeClassNames-D4lshrT6.cjs"),d=require("./Loader-Bb72CUQ9.cjs"),A=require("./Shortcut-N8TELGPI.cjs");let E=require("clsx"),x=require("react"),e=require("react/jsx-runtime"),J=require("@base-ui/react/button");var q=(0,x.createContext)(null),R="_button_vtbjg_1",V="_content_vtbjg_181",F="_label_vtbjg_190",H="_icon_vtbjg_196",K="_hidden_vtbjg_206",M="_loader_vtbjg_210",r={button:R,content:V,label:F,icon:H,hidden:K,loader:M},Q=({variant:p,color:h,size:D,fullWidth:C=!1,loading:n=!1,loadingPosition:s="center",elevated:N=!1,startIcon:B,endIcon:L,shortcut:l,shortcutJoinLabel:g,disabled:y=!1,href:a,render:c,nativeButton:v,role:k,className:S,children:o,..._})=>{const i=(0,x.useContext)(q),z=p??i?.variant??"outline",G=h??i?.color??"neutral",O=D??i?.size??"md",u=t.isDefined(a)&&!t.isDefined(c)&&v!==!0,P=t.isDefined(a)?{href:a}:void 0,b=k??(u?"link":void 0),I=t.isDefined(b)?{role:b}:void 0,j=n&&s==="center",f=n&&s==="start"?(0,e.jsx)(d.Loader,{}):B,m=n&&s==="end"?(0,e.jsx)(d.Loader,{}):L;return(0,e.jsxs)(J.Button,{..._,...P,className:w.mergeClassNames(r.button,S),"data-variant":z,"data-color":G,"data-size":O,"data-full-width":C||void 0,"data-loading":n||void 0,"data-elevated":N||void 0,"aria-busy":n?"true":_["aria-busy"],disabled:y||n,...I,nativeButton:v??!u,render:c??(u?(0,e.jsx)("a",{href:a,children:o}):void 0),children:[(0,e.jsxs)("span",{className:(0,E.clsx)(r.content,j&&r.hidden),children:[t.isDefined(f)&&(0,e.jsx)("span",{className:r.icon,"aria-hidden":!0,children:f}),t.isDefined(o)&&(0,e.jsx)("span",{className:r.label,children:o}),t.isDefined(m)&&(0,e.jsx)("span",{className:r.icon,"aria-hidden":!0,children:m}),t.isDefined(l)&&(0,e.jsx)(A.Shortcut,{shortcut:l,sequenceJoinLabel:g,variant:"button",visibility:"desktop","aria-hidden":!0})]}),j&&(0,e.jsx)("span",{className:r.loader,"aria-hidden":!0,children:(0,e.jsx)(d.Loader,{})})]})};Object.defineProperty(exports,"Button",{enumerable:!0,get:function(){return Q}});Object.defineProperty(exports,"ButtonGroupContext",{enumerable:!0,get:function(){return q}});Object.defineProperty(exports,"Button_module_default",{enumerable:!0,get:function(){return r}});