twenty-ui 2.62.0 → 2.63.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 (43) hide show
  1. package/dist/{Dropdown-C63OU_S6.js → Dropdown-JYMUj9qB.js} +35 -35
  2. package/dist/{ListItem-CLyf0SKI.js → ListItem-CgWvufdY.js} +1 -1
  3. package/dist/{ProgressBar-DLSx-Vbf.js → ProgressBar-48Fl4ACY.js} +5 -5
  4. package/dist/{Radio-DYFBIqGX.js → Radio-9E_TdAKs.js} +1 -1
  5. package/dist/{TablerIcons-C9XA-vxC.js → TablerIcons-BV-cFVcj.js} +135 -134
  6. package/dist/components/data-display.mjs +1 -1
  7. package/dist/components/feedback.mjs +1 -1
  8. package/dist/components/input.mjs +2 -2
  9. package/dist/components/navigation.mjs +2 -2
  10. package/dist/components/settings.mjs +1 -1
  11. package/dist/components.mjs +6 -6
  12. package/dist/{data-display-DYTRUIPj.js → data-display-BvJc941y.js} +38 -38
  13. package/dist/data-display-CnFlqxE4.js +253 -0
  14. package/dist/data-display-DOt0HHhj.cjs +1 -0
  15. package/dist/{feedback-DAy-YtWF.js → feedback-B3nntZww.js} +63 -63
  16. package/dist/icon/components/TablerIcons.d.ts +1 -1
  17. package/dist/icon/index.d.ts +1 -1
  18. package/dist/icon/provider.mjs +1 -1
  19. package/dist/{icon-BNFRYgWo.js → icon-Bpig2k9u.js} +1 -1
  20. package/dist/icon.cjs +1 -1
  21. package/dist/icon.mjs +478 -477
  22. package/dist/index.cjs +1 -1
  23. package/dist/index.mjs +622 -621
  24. package/dist/{input-DlnFdlyP.js → input-D2w6b3g-.js} +22 -22
  25. package/dist/{input-DpOc15uJ.cjs → input-Dzq6SVPC.cjs} +1 -1
  26. package/dist/{input-DbqZOk3B.js → input-LQh9SI5w.js} +10 -10
  27. package/dist/{navigation-BYAaQcFv.js → navigation-B-Jd5YLs.js} +3 -3
  28. package/dist/primitives/data-display/Chip/Chip.d.ts +1 -1
  29. package/dist/primitives/data-display/Chip/types/ChipProps.d.ts +1 -0
  30. package/dist/primitives/data-display.cjs +1 -1
  31. package/dist/primitives/data-display.mjs +1 -1
  32. package/dist/primitives/feedback.mjs +1 -1
  33. package/dist/primitives/input/types/SelectOption.d.ts +1 -0
  34. package/dist/primitives/input.cjs +1 -1
  35. package/dist/primitives/input.mjs +2 -2
  36. package/dist/primitives/navigation.mjs +1 -1
  37. package/dist/primitives.cjs +1 -1
  38. package/dist/primitives.mjs +5 -5
  39. package/dist/{settings-DO8iTxTf.js → settings-CQj4y3HO.js} +1 -1
  40. package/dist/style.css +1 -1
  41. package/package.json +1 -1
  42. package/dist/data-display-1knPFjFb.js +0 -252
  43. package/dist/data-display-DSsYNdOB.cjs +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "twenty-ui",
3
- "version": "2.62.0",
3
+ "version": "2.63.0",
4
4
  "description": "Twenty's shared React UI component library.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,252 +0,0 @@
1
- import { g as b, r as H } from "./theme-B1jMC8En.js";
2
- import { t as v } from "./isDefined-fMi6eQ4r.js";
3
- import { t as D } from "./doNotTranslate-BSVT8Xyd.js";
4
- import { t as E } from "./mergeClassNames-ClFMR1v0.js";
5
- import { c as A, l as J, r as I } from "./utilities-IyA_ho0H.js";
6
- import { t as K } from "./Loader-9tUcz6Y9.js";
7
- import { t as j } from "./OverflowingTextWithTooltip-aPLt9O1-.js";
8
- import { isBoolean as L, isFunction as Q, isNonEmptyString as W, isString as P } from "@sniptt/guards";
9
- import { clsx as x } from "clsx";
10
- import { Fragment as N, jsx as l, jsxs as h } from "react/jsx-runtime";
11
- import { useRender as k } from "@base-ui/react/use-render";
12
- import { Avatar as z } from "@base-ui/react/avatar";
13
- var X = "_root_1bbob_1", aa = "_avatarPulsing_1bbob_1", ta = "_image_1bbob_95", ra = "_fallback_1bbob_107", B = {
14
- root: X,
15
- avatarPulsing: aa,
16
- image: ta,
17
- fallback: ra
18
- }, $ = ({ className: a, ...t }) => /* @__PURE__ */ l(z.Fallback, {
19
- ...t,
20
- className: E(B.fallback, a)
21
- }), O = ({ className: a, ...t }) => /* @__PURE__ */ l(z.Image, {
22
- ...t,
23
- className: E(B.image, a)
24
- }), q = ({ name: a, colorSeed: t = a, size: r = "md", shape: i = "square", variant: e = "soft", color: o, backgroundColor: s, borderColor: c, pulsing: d = !1, ring: n = !1, className: _, style: m, ...g }) => {
25
- const p = H(), u = I(a), T = u ? o ?? A({
26
- string: t ?? "",
27
- variant: 12,
28
- theme: p
29
- }) : o ?? p.font.color.tertiary, S = u ? s ?? A({
30
- string: t ?? "",
31
- variant: e === "outline" ? 5 : 4,
32
- theme: p
33
- }) : s ?? p.background.transparent.light, y = c ?? (u ? A({
34
- string: t ?? "",
35
- variant: 6,
36
- theme: p
37
- }) : void 0);
38
- return /* @__PURE__ */ l(z.Root, {
39
- ...g,
40
- "data-size": r,
41
- "data-shape": i,
42
- "data-pulsing": d || void 0,
43
- "data-ring": n || void 0,
44
- className: E(B.root, _),
45
- style: (f) => ({
46
- "--tw-avatar-color": T,
47
- "--tw-avatar-background": f.imageLoadingStatus === "loaded" ? "none" : S,
48
- "--tw-avatar-border": e === "outline" && f.imageLoadingStatus !== "loaded" && y ? D(`1px solid ${y}`) : "none",
49
- ...Q(m) ? m(f) : m
50
- })
51
- });
52
- }, ea = ({ src: a, name: t, icon: r, imageProps: i, fallbackProps: e, backgroundColor: o, ...s }) => {
53
- const c = I(t), d = v(r) && !L(r) && r !== "", n = i?.alt ?? "", _ = !d && W(n), { children: m = d ? r : c || "-", ...g } = e ?? {}, p = v(g.role) || v(g["aria-label"]) || v(g["aria-labelledby"]), u = !_ && !p && !v(g.render);
54
- return /* @__PURE__ */ h(q, {
55
- ...s,
56
- name: t,
57
- backgroundColor: d ? "inherit" : o,
58
- children: [!d && /* @__PURE__ */ l(O, {
59
- src: a ?? void 0,
60
- ...i,
61
- alt: n
62
- }), /* @__PURE__ */ l($, {
63
- role: _ ? "img" : void 0,
64
- "aria-label": _ ? n : void 0,
65
- "aria-hidden": u || void 0,
66
- ...g,
67
- children: m
68
- })]
69
- });
70
- }, La = Object.assign(ea, {
71
- Root: q,
72
- Image: O,
73
- Fallback: $
74
- }), za = {
75
- xxl: {
76
- fontSize: "16px",
77
- width: "40px"
78
- },
79
- xl: {
80
- fontSize: "16px",
81
- width: "32px"
82
- },
83
- lg: {
84
- fontSize: "13px",
85
- width: "24px"
86
- },
87
- md: {
88
- fontSize: "12px",
89
- width: "16px"
90
- },
91
- sm: {
92
- fontSize: "10px",
93
- width: "14px"
94
- },
95
- xs: {
96
- fontSize: "8px",
97
- width: "12px"
98
- }
99
- }, oa = "_badge_eakxs_1", sa = { badge: oa }, Ba = ({ size: a = "sm", color: t = "tertiary", shape: r = "pill", className: i, render: e, ref: o, ...s }) => k({
100
- defaultTagName: "span",
101
- render: e,
102
- ref: o,
103
- props: {
104
- ...s,
105
- className: x(sa.badge, i),
106
- "data-badge-size": a,
107
- "data-badge-color": t,
108
- "data-badge-shape": r
109
- }
110
- }), la = "_chip_i928o_1", ia = "_label_i928o_29", na = "_endElementDivider_i928o_90", C = {
111
- chip: la,
112
- label: ia,
113
- endElementDivider: na
114
- }, da = { height: "var(--t-spacing-4)" }, Fa = ({ children: a, size: t = "sm", variant: r = "ghost", color: i = "primary", shape: e = "square", weight: o = "regular", onClick: s, clickable: c = v(s), startElement: d, endElement: n, endElementDivider: _ = !1, maxWidth: m, truncate: g = !0, tooltipContent: p, tooltipDelay: u, isTooltipMultiline: T, tooltipPlace: S, alwaysShowTooltip: y = !1, className: f, style: M, render: V, ref: Y, ...U }) => {
115
- const Z = v(a) && !L(a) && a !== "", G = P(a) ? {
116
- text: a,
117
- tooltipContent: p
118
- } : {
119
- text: a ?? !1,
120
- tooltipContent: p ?? ""
121
- };
122
- return k({
123
- render: V,
124
- ref: Y,
125
- state: {
126
- size: t,
127
- variant: r,
128
- color: i,
129
- shape: e,
130
- weight: o,
131
- clickable: c,
132
- truncate: g
133
- },
134
- props: {
135
- ...U,
136
- onClick: s,
137
- className: x(C.chip, f),
138
- style: {
139
- ...v(m) ? { "--tw-chip-max-width": D(`${m}px`) } : {},
140
- ...M
141
- },
142
- children: /* @__PURE__ */ h(N, { children: [
143
- d,
144
- Z && /* @__PURE__ */ l(j, {
145
- ...G,
146
- render: /* @__PURE__ */ l("span", {}),
147
- className: C.label,
148
- style: t === "md" ? da : void 0,
149
- truncate: g,
150
- tooltipDelay: u,
151
- isTooltipMultiline: T,
152
- tooltipPlace: S,
153
- alwaysShowTooltip: y
154
- }),
155
- v(n) && n !== !1 && /* @__PURE__ */ h(N, { children: [_ && /* @__PURE__ */ l("span", { className: C.endElementDivider }), n] })
156
- ] })
157
- }
158
- });
159
- }, ca = "_root_6bfj6_1", ma = "_circle_6bfj6_13", F = {
160
- root: ca,
161
- circle: ma
162
- }, Ra = ({ colorName: a, color: t, variant: r, className: i, style: e, render: o, ref: s, ...c }) => k({
163
- defaultTagName: "div",
164
- render: o,
165
- ref: s,
166
- props: {
167
- ...c,
168
- className: x(F.root, r === "circle" && F.circle, i),
169
- style: {
170
- "--color-sample-color": t ?? b.tag.background[a],
171
- "--color-sample-border-color": b.tag.text[a],
172
- ...e
173
- }
174
- }
175
- }), ga = "_status_y5v42_1", pa = "_content_y5v42_49", R = {
176
- status: ga,
177
- content: pa
178
- }, Da = ({ children: a, color: t, loading: r = !1, weight: i = "regular", className: e, style: o, render: s, ref: c, ...d }) => {
179
- const n = J(t);
180
- return k({
181
- defaultTagName: "span",
182
- render: s,
183
- ref: c,
184
- state: {
185
- loading: r,
186
- weight: i
187
- },
188
- props: {
189
- "aria-busy": r || void 0,
190
- ...d,
191
- className: x(R.status, e),
192
- style: {
193
- "--tw-status-background": b.tag.background[n],
194
- "--tw-status-text-color": b.tag.text[n],
195
- ...o
196
- },
197
- children: /* @__PURE__ */ h(N, { children: [/* @__PURE__ */ l("span", {
198
- className: R.content,
199
- children: a
200
- }), r && /* @__PURE__ */ l(K, {
201
- color: t,
202
- "aria-hidden": "true",
203
- render: /* @__PURE__ */ l("span", {})
204
- })] })
205
- }
206
- });
207
- }, va = "_tag_1ot0y_1", _a = "_content_1ot0y_49", ba = "_overflowingText_1ot0y_58", ua = "_iconContainer_1ot0y_62", w = {
208
- tag: va,
209
- content: _a,
210
- overflowingText: ba,
211
- iconContainer: ua
212
- }, Ia = ({ children: a, color: t, weight: r = "regular", variant: i = "soft", startIcon: e, truncate: o = !0, borderStyle: s = "solid", className: c, style: d, render: n, ref: _, ...m }) => k({
213
- defaultTagName: "span",
214
- render: n,
215
- ref: _,
216
- state: {
217
- variant: i,
218
- weight: r,
219
- truncate: o
220
- },
221
- props: {
222
- ...m,
223
- className: x(w.tag, c),
224
- style: {
225
- "--tw-tag-background": t === "transparent" ? "transparent" : b.tag.background[t] ?? b.tag.background.gray,
226
- "--tw-tag-text": t === "transparent" ? b.font.color.secondary : b.tag.text[t] ?? b.font.color.secondary,
227
- "--tw-tag-border-style": s,
228
- ...d
229
- },
230
- children: /* @__PURE__ */ h(N, { children: [v(e) && !L(e) && e !== "" && /* @__PURE__ */ l("span", {
231
- className: w.iconContainer,
232
- "aria-hidden": !0,
233
- children: e
234
- }), /* @__PURE__ */ l("span", {
235
- className: w.content,
236
- children: P(a) && o ? /* @__PURE__ */ l(j, {
237
- text: a,
238
- render: /* @__PURE__ */ l("span", {}),
239
- className: w.overflowingText
240
- }) : a
241
- })] })
242
- }
243
- });
244
- export {
245
- Ba as a,
246
- Fa as i,
247
- Da as n,
248
- za as o,
249
- Ra as r,
250
- La as s,
251
- Ia as t
252
- };
@@ -1 +0,0 @@
1
- const m=require("./theme-CeIzO6UU.cjs"),b=require("./isDefined-DS2Q42p5.cjs"),R=require("./doNotTranslate-CHE7WmRS.cjs"),k=require("./mergeClassNames-D4lshrT6.cjs"),x=require("./utilities-9ARl_uku.cjs"),M=require("./Loader-r-OAVzF_.cjs"),O=require("./OverflowingTextWithTooltip-B21zZWP6.cjs");let f=require("@sniptt/guards"),T=require("clsx"),t=require("react/jsx-runtime"),j=require("@base-ui/react/use-render"),q=require("@base-ui/react/avatar");var W="_root_1bbob_1",Z="_avatarPulsing_1bbob_1",U="_image_1bbob_95",G="_fallback_1bbob_107",A={root:W,avatarPulsing:Z,image:U,fallback:G},B=({className:e,...a})=>(0,t.jsx)(q.Avatar.Fallback,{...a,className:k.mergeClassNames(A.fallback,e)}),E=({className:e,...a})=>(0,t.jsx)(q.Avatar.Image,{...a,className:k.mergeClassNames(A.image,e)}),V=({name:e,colorSeed:a=e,size:r="md",shape:o="square",variant:s="soft",color:i,backgroundColor:n,borderColor:u,pulsing:d=!1,ring:l=!1,className:v,style:c,...g})=>{const _=m.useTheme(),p=x.getAvatarInitial(e),N=p?i??x.stringToThemeColorP3String({string:a??"",variant:12,theme:_}):i??_.font.color.tertiary,S=p?n??x.stringToThemeColorP3String({string:a??"",variant:s==="outline"?5:4,theme:_}):n??_.background.transparent.light,y=u??(p?x.stringToThemeColorP3String({string:a??"",variant:6,theme:_}):void 0);return(0,t.jsx)(q.Avatar.Root,{...g,"data-size":r,"data-shape":o,"data-pulsing":d||void 0,"data-ring":l||void 0,className:k.mergeClassNames(A.root,v),style:h=>({"--tw-avatar-color":N,"--tw-avatar-background":h.imageLoadingStatus==="loaded"?"none":S,"--tw-avatar-border":s==="outline"&&h.imageLoadingStatus!=="loaded"&&y?R.doNotTranslate(`1px solid ${y}`):"none",...(0,f.isFunction)(c)?c(h):c})})},H=({src:e,name:a,icon:r,imageProps:o,fallbackProps:s,backgroundColor:i,...n})=>{const u=x.getAvatarInitial(a),d=b.isDefined(r)&&!(0,f.isBoolean)(r)&&r!=="",l=o?.alt??"",v=!d&&(0,f.isNonEmptyString)(l),{children:c=d?r:u||"-",...g}=s??{},_=b.isDefined(g.role)||b.isDefined(g["aria-label"])||b.isDefined(g["aria-labelledby"]),p=!v&&!_&&!b.isDefined(g.render);return(0,t.jsxs)(V,{...n,name:a,backgroundColor:d?"inherit":i,children:[!d&&(0,t.jsx)(E,{src:e??void 0,...o,alt:l}),(0,t.jsx)(B,{role:v?"img":void 0,"aria-label":v?l:void 0,"aria-hidden":p||void 0,...g,children:c})]})},J=Object.assign(H,{Root:V,Image:E,Fallback:B}),K={xxl:{fontSize:"16px",width:"40px"},xl:{fontSize:"16px",width:"32px"},lg:{fontSize:"13px",width:"24px"},md:{fontSize:"12px",width:"16px"},sm:{fontSize:"10px",width:"14px"},xs:{fontSize:"8px",width:"12px"}},Q="_badge_eakxs_1",X={badge:Q},ee=({size:e="sm",color:a="tertiary",shape:r="pill",className:o,render:s,ref:i,...n})=>(0,j.useRender)({defaultTagName:"span",render:s,ref:i,props:{...n,className:(0,T.clsx)(X.badge,o),"data-badge-size":e,"data-badge-color":a,"data-badge-shape":r}}),ae="_chip_i928o_1",te="_label_i928o_29",re="_endElementDivider_i928o_90",w={chip:ae,label:te,endElementDivider:re},se={height:"var(--t-spacing-4)"},ie=({children:e,size:a="sm",variant:r="ghost",color:o="primary",shape:s="square",weight:i="regular",onClick:n,clickable:u=b.isDefined(n),startElement:d,endElement:l,endElementDivider:v=!1,maxWidth:c,truncate:g=!0,tooltipContent:_,tooltipDelay:p,isTooltipMultiline:N,tooltipPlace:S,alwaysShowTooltip:y=!1,className:h,style:F,render:I,ref:L,...z})=>{const $=b.isDefined(e)&&!(0,f.isBoolean)(e)&&e!=="",Y=(0,f.isString)(e)?{text:e,tooltipContent:_}:{text:e??!1,tooltipContent:_??""};return(0,j.useRender)({render:I,ref:L,state:{size:a,variant:r,color:o,shape:s,weight:i,clickable:u,truncate:g},props:{...z,onClick:n,className:(0,T.clsx)(w.chip,h),style:{...b.isDefined(c)?{"--tw-chip-max-width":R.doNotTranslate(`${c}px`)}:{},...F},children:(0,t.jsxs)(t.Fragment,{children:[d,$&&(0,t.jsx)(O.OverflowingTextWithTooltip,{...Y,render:(0,t.jsx)("span",{}),className:w.label,style:a==="md"?se:void 0,truncate:g,tooltipDelay:p,isTooltipMultiline:N,tooltipPlace:S,alwaysShowTooltip:y}),b.isDefined(l)&&l!==!1&&(0,t.jsxs)(t.Fragment,{children:[v&&(0,t.jsx)("span",{className:w.endElementDivider}),l]})]})}})},ne="_root_6bfj6_1",oe="_circle_6bfj6_13",D={root:ne,circle:oe},le=({colorName:e,color:a,variant:r,className:o,style:s,render:i,ref:n,...u})=>(0,j.useRender)({defaultTagName:"div",render:i,ref:n,props:{...u,className:(0,T.clsx)(D.root,r==="circle"&&D.circle,o),style:{"--color-sample-color":a??m.themeCssVariables.tag.background[e],"--color-sample-border-color":m.themeCssVariables.tag.text[e],...s}}}),de="_status_y5v42_1",ue="_content_y5v42_49",P={status:de,content:ue},ce=({children:e,color:a,loading:r=!1,weight:o="regular",className:s,style:i,render:n,ref:u,...d})=>{const l=x.parseThemeColor(a);return(0,j.useRender)({defaultTagName:"span",render:n,ref:u,state:{loading:r,weight:o},props:{"aria-busy":r||void 0,...d,className:(0,T.clsx)(P.status,s),style:{"--tw-status-background":m.themeCssVariables.tag.background[l],"--tw-status-text-color":m.themeCssVariables.tag.text[l],...i},children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:P.content,children:e}),r&&(0,t.jsx)(M.Loader,{color:a,"aria-hidden":"true",render:(0,t.jsx)("span",{})})]})}})},ge="_tag_1ot0y_1",_e="_content_1ot0y_49",me="_overflowingText_1ot0y_58",be="_iconContainer_1ot0y_62",C={tag:ge,content:_e,overflowingText:me,iconContainer:be},ve=({children:e,color:a,weight:r="regular",variant:o="soft",startIcon:s,truncate:i=!0,borderStyle:n="solid",className:u,style:d,render:l,ref:v,...c})=>(0,j.useRender)({defaultTagName:"span",render:l,ref:v,state:{variant:o,weight:r,truncate:i},props:{...c,className:(0,T.clsx)(C.tag,u),style:{"--tw-tag-background":a==="transparent"?"transparent":m.themeCssVariables.tag.background[a]??m.themeCssVariables.tag.background.gray,"--tw-tag-text":a==="transparent"?m.themeCssVariables.font.color.secondary:m.themeCssVariables.tag.text[a]??m.themeCssVariables.font.color.secondary,"--tw-tag-border-style":n,...d},children:(0,t.jsxs)(t.Fragment,{children:[b.isDefined(s)&&!(0,f.isBoolean)(s)&&s!==""&&(0,t.jsx)("span",{className:C.iconContainer,"aria-hidden":!0,children:s}),(0,t.jsx)("span",{className:C.content,children:(0,f.isString)(e)&&i?(0,t.jsx)(O.OverflowingTextWithTooltip,{text:e,render:(0,t.jsx)("span",{}),className:C.overflowingText}):e})]})}});Object.defineProperty(exports,"AVATAR_PROPERTIES_BY_SIZE",{enumerable:!0,get:function(){return K}});Object.defineProperty(exports,"Avatar",{enumerable:!0,get:function(){return J}});Object.defineProperty(exports,"Badge",{enumerable:!0,get:function(){return ee}});Object.defineProperty(exports,"Chip",{enumerable:!0,get:function(){return ie}});Object.defineProperty(exports,"ColorSample",{enumerable:!0,get:function(){return le}});Object.defineProperty(exports,"Status",{enumerable:!0,get:function(){return ce}});Object.defineProperty(exports,"Tag",{enumerable:!0,get:function(){return ve}});