twenty-ui 2.59.0 → 2.61.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.
- package/dist/{Button-wpJzTy9O.js → Button-BVp1tP3u.js} +1 -1
- package/dist/{Button-CbJ3qEQ9.cjs → Button-CYgpR3Jw.cjs} +1 -1
- package/dist/{Dropdown-CV8O8IPo.js → Dropdown-C63OU_S6.js} +178 -178
- package/dist/{Dropdown-CTTQTn7B.cjs → Dropdown-qnoxYnTy.cjs} +1 -1
- package/dist/{ListItem-D6FYdx6v.cjs → ListItem-CL7Ccboe.cjs} +1 -1
- package/dist/{ListItem-C9yyYuIT.js → ListItem-CLyf0SKI.js} +1 -1
- package/dist/{ProgressBar-CSCAWfHW.cjs → ProgressBar-B77cH6E4.cjs} +1 -1
- package/dist/{ProgressBar-BTEZiRUL.js → ProgressBar-DLSx-Vbf.js} +1 -1
- package/dist/{Radio-CjaEN7Bt.cjs → Radio-Bc3suBSH.cjs} +1 -1
- package/dist/{Radio-DdZ07JJK.js → Radio-DYFBIqGX.js} +1 -1
- package/dist/Shortcut-DW3f3shu.js +73 -0
- package/dist/Shortcut-DdVgROMz.cjs +1 -0
- package/dist/components/feedback.cjs +1 -1
- package/dist/components/feedback.mjs +1 -1
- package/dist/components/input.cjs +1 -1
- package/dist/components/input.mjs +2 -2
- package/dist/components/navigation.cjs +1 -1
- package/dist/components/navigation.mjs +2 -2
- package/dist/components/settings.cjs +1 -1
- package/dist/components/settings.mjs +1 -1
- package/dist/components.cjs +1 -1
- package/dist/components.mjs +5 -5
- package/dist/{feedback-DUoCvdM-.cjs → feedback-CvdYiUtl.cjs} +1 -1
- package/dist/{feedback-BuqRtaQX.js → feedback-DAy-YtWF.js} +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +12 -12
- package/dist/{input-B9zsrdsB.cjs → input-CJeJRJEE.cjs} +1 -1
- package/dist/{input-CpFhHo1F.js → input-DbqZOk3B.js} +3 -3
- package/dist/{input-Dwk_oei3.js → input-DlnFdlyP.js} +2 -2
- package/dist/{input-DQfXFl5C.cjs → input-DpOc15uJ.cjs} +1 -1
- package/dist/{navigation-D65GGk3w.js → navigation-BYAaQcFv.js} +3 -3
- package/dist/{navigation-C_MdtheL.cjs → navigation-DNeW09sP.cjs} +1 -1
- package/dist/primitives/feedback.cjs +1 -1
- package/dist/primitives/feedback.mjs +1 -1
- package/dist/primitives/input.cjs +1 -1
- package/dist/primitives/input.mjs +3 -3
- package/dist/primitives/navigation.cjs +1 -1
- package/dist/primitives/navigation.mjs +1 -1
- package/dist/primitives/typography.cjs +1 -1
- package/dist/primitives/typography.mjs +2 -2
- package/dist/primitives.cjs +1 -1
- package/dist/primitives.mjs +7 -7
- package/dist/{settings-DWFRds1d.js → settings-DO8iTxTf.js} +1 -1
- package/dist/{settings-gd-ps3zs.cjs → settings-Drg5Dh7x.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{typography-DvK5mDnG.js → typography-2FnTtHn5.js} +1 -1
- package/dist/{typography-BQbeIT60.cjs → typography-sp0v9uF_.cjs} +1 -1
- package/package.json +2 -1
- package/dist/Shortcut-04Wkuy0i.js +0 -77
- package/dist/Shortcut-Gp5Ix8K2.cjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as r } from "./Shortcut-
|
|
1
|
+
import { n as r } from "./Shortcut-DW3f3shu.js";
|
|
2
2
|
import { n as e } from "./OverflowingTextWithTooltip-aPLt9O1-.js";
|
|
3
3
|
import { jsx as i } from "react/jsx-runtime";
|
|
4
4
|
var v = ({ mode: o, children: t }) => /* @__PURE__ */ i(e.Provider, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const t=require("./Shortcut-
|
|
1
|
+
const t=require("./Shortcut-DdVgROMz.cjs"),o=require("./OverflowingTextWithTooltip-B21zZWP6.cjs");let i=require("react/jsx-runtime");var n=({mode:e,children:r})=>(0,i.jsx)(o.OverflowingTextTooltipModeContext.Provider,{value:e,children:r}),u=e=>t.getShortcutPresentation(e).text;Object.defineProperty(exports,"OverflowingTextTooltipModeProvider",{enumerable:!0,get:function(){return n}});Object.defineProperty(exports,"formatShortcut",{enumerable:!0,get:function(){return u}});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "twenty-ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.61.0",
|
|
4
4
|
"description": "Twenty's shared React UI component library.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
"storybook-addon-pseudo-states": "^10.3.3",
|
|
70
70
|
"tsx": "^4.19.3",
|
|
71
71
|
"typescript": "^5.9.3",
|
|
72
|
+
"vite": "^8.0.0",
|
|
72
73
|
"vite-plugin-checker": "^0.10.2",
|
|
73
74
|
"vite-plugin-dts": "^4.5.4",
|
|
74
75
|
"vite-plugin-sass-dts": "^1.3.31",
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { t as q } from "./isDefined-fMi6eQ4r.js";
|
|
2
|
-
import { t as e } from "./doNotTranslate-BSVT8Xyd.js";
|
|
3
|
-
import { i as A, t as E } from "./useIsMobile-B0P21Ov9.js";
|
|
4
|
-
import { isNonEmptyArray as g, isString as w } from "@sniptt/guards";
|
|
5
|
-
import { clsx as L } from "clsx";
|
|
6
|
-
import { jsx as i, jsxs as v } from "react/jsx-runtime";
|
|
7
|
-
import { Fragment as f } from "react";
|
|
8
|
-
var y = new Map(e([
|
|
9
|
-
["⌘", "Command"],
|
|
10
|
-
["⌥", "Option"],
|
|
11
|
-
["⇧", "Shift"],
|
|
12
|
-
["⌃", "Control"],
|
|
13
|
-
["Ctrl", "Control"],
|
|
14
|
-
["⏎", "Enter"],
|
|
15
|
-
["↵", "Enter"],
|
|
16
|
-
["⌫", "Backspace"],
|
|
17
|
-
["↑", "Arrow up"],
|
|
18
|
-
["↓", "Arrow down"],
|
|
19
|
-
["←", "Arrow left"],
|
|
20
|
-
["→", "Arrow right"],
|
|
21
|
-
["esc", "Escape"]
|
|
22
|
-
])), N = (o) => o.every(w), j = ({ shortcut: o, platform: l, sequenceJoinLabel: m = "then", combinationSeparator: b, accessibleKeyLabels: d }) => {
|
|
23
|
-
const n = A(), t = l === "mac" || !q(l) && (n === "mac" || n === "ios"), _ = new Map([
|
|
24
|
-
[e("Mod"), t ? "⌘" : e("Ctrl")],
|
|
25
|
-
[e("CommandOrControl"), t ? "⌘" : e("Ctrl")],
|
|
26
|
-
[e("Command"), "⌘"],
|
|
27
|
-
e(["Control", "Ctrl"]),
|
|
28
|
-
[e("Alt"), t ? "⌥" : e("Alt")],
|
|
29
|
-
[e("Enter"), "⏎"]
|
|
30
|
-
]), s = (N(o) ? [o] : o).filter(g).map((r) => r.map((a) => _.get(a) ?? a)), p = b ?? (t ? "" : " "), u = ` ${m} `;
|
|
31
|
-
return {
|
|
32
|
-
groups: s,
|
|
33
|
-
separator: p,
|
|
34
|
-
sequenceJoinLabel: m,
|
|
35
|
-
text: s.map((r) => r.join(p)).join(u),
|
|
36
|
-
accessibleLabel: s.map((r) => r.map((a) => d?.[a] ?? y.get(a) ?? a).join(" + ")).join(u)
|
|
37
|
-
};
|
|
38
|
-
}, M = "_root_3buq7_1", k = "_content_3buq7_28", x = "_combination_3buq7_29", B = "_sequenceJoinLabel_3buq7_35", J = "_key_3buq7_39", c = {
|
|
39
|
-
root: M,
|
|
40
|
-
content: k,
|
|
41
|
-
combination: x,
|
|
42
|
-
sequenceJoinLabel: B,
|
|
43
|
-
key: J
|
|
44
|
-
}, U = ({ shortcut: o, platform: l, sequenceJoinLabel: m, combinationSeparator: b, accessibleKeyLabels: d, variant: n = "keys", visibility: t = "always", className: _, "aria-label": s, ...p }) => {
|
|
45
|
-
const u = E(), r = j({
|
|
46
|
-
shortcut: o,
|
|
47
|
-
platform: l,
|
|
48
|
-
sequenceJoinLabel: m,
|
|
49
|
-
combinationSeparator: b,
|
|
50
|
-
accessibleKeyLabels: d
|
|
51
|
-
});
|
|
52
|
-
return !g(r.groups) || t === "desktop" && u ? null : /* @__PURE__ */ i("span", {
|
|
53
|
-
...p,
|
|
54
|
-
className: L(c.root, _),
|
|
55
|
-
"data-variant": n,
|
|
56
|
-
role: "img",
|
|
57
|
-
"aria-label": s ?? r.accessibleLabel,
|
|
58
|
-
children: /* @__PURE__ */ i("span", {
|
|
59
|
-
className: c.content,
|
|
60
|
-
"aria-hidden": !0,
|
|
61
|
-
children: n !== "keys" ? r.text : r.groups.map((a, C) => /* @__PURE__ */ v(f, { children: [C > 0 && /* @__PURE__ */ i("span", {
|
|
62
|
-
className: c.sequenceJoinLabel,
|
|
63
|
-
children: ` ${r.sequenceJoinLabel} `
|
|
64
|
-
}), /* @__PURE__ */ i("span", {
|
|
65
|
-
className: c.combination,
|
|
66
|
-
children: a.map((S, h) => /* @__PURE__ */ v(f, { children: [h > 0 && r.separator, /* @__PURE__ */ i("kbd", {
|
|
67
|
-
className: c.key,
|
|
68
|
-
children: S
|
|
69
|
-
})] }, h))
|
|
70
|
-
})] }, C))
|
|
71
|
-
})
|
|
72
|
-
});
|
|
73
|
-
};
|
|
74
|
-
export {
|
|
75
|
-
j as n,
|
|
76
|
-
U as t
|
|
77
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const S=require("./isDefined-DS2Q42p5.cjs"),r=require("./doNotTranslate-CHE7WmRS.cjs"),j=require("./useIsMobile-BnW-j5Bq.cjs");let q=require("@sniptt/guards"),y=require("clsx"),n=require("react/jsx-runtime"),h=require("react");var T=new Map(r.doNotTranslate([["⌘","Command"],["⌥","Option"],["⇧","Shift"],["⌃","Control"],["Ctrl","Control"],["⏎","Enter"],["↵","Enter"],["⌫","Backspace"],["↑","Arrow up"],["↓","Arrow down"],["←","Arrow left"],["→","Arrow right"],["esc","Escape"]])),f=a=>a.every(q.isString),C=({shortcut:a,platform:c,sequenceJoinLabel:u="then",combinationSeparator:p,accessibleKeyLabels:b})=>{const s=j.getUserDevice(),o=c==="mac"||!S.isDefined(c)&&(s==="mac"||s==="ios"),_=new Map([[r.doNotTranslate("Mod"),o?"⌘":r.doNotTranslate("Ctrl")],[r.doNotTranslate("CommandOrControl"),o?"⌘":r.doNotTranslate("Ctrl")],[r.doNotTranslate("Command"),"⌘"],r.doNotTranslate(["Control","Ctrl"]),[r.doNotTranslate("Alt"),o?"⌥":r.doNotTranslate("Alt")],[r.doNotTranslate("Enter"),"⏎"]]),i=(f(a)?[a]:a).filter(q.isNonEmptyArray).map(e=>e.map(t=>_.get(t)??t)),d=p??(o?"":" "),m=` ${u} `;return{groups:i,separator:d,sequenceJoinLabel:u,text:i.map(e=>e.join(d)).join(m),accessibleLabel:i.map(e=>e.map(t=>b?.[t]??T.get(t)??t).join(" + ")).join(m)}},x="_root_3buq7_1",A="_content_3buq7_28",E="_combination_3buq7_29",w="_sequenceJoinLabel_3buq7_35",L="_key_3buq7_39",l={root:x,content:A,combination:E,sequenceJoinLabel:w,key:L},M=({shortcut:a,platform:c,sequenceJoinLabel:u,combinationSeparator:p,accessibleKeyLabels:b,variant:s="keys",visibility:o="always",className:_,"aria-label":i,...d})=>{const m=j.useIsMobile(),e=C({shortcut:a,platform:c,sequenceJoinLabel:u,combinationSeparator:p,accessibleKeyLabels:b});return!(0,q.isNonEmptyArray)(e.groups)||o==="desktop"&&m?null:(0,n.jsx)("span",{...d,className:(0,y.clsx)(l.root,_),"data-variant":s,role:"img","aria-label":i??e.accessibleLabel,children:(0,n.jsx)("span",{className:l.content,"aria-hidden":!0,children:s!=="keys"?e.text:e.groups.map((t,N)=>(0,n.jsxs)(h.Fragment,{children:[N>0&&(0,n.jsx)("span",{className:l.sequenceJoinLabel,children:` ${e.sequenceJoinLabel} `}),(0,n.jsx)("span",{className:l.combination,children:t.map((v,g)=>(0,n.jsxs)(h.Fragment,{children:[g>0&&e.separator,(0,n.jsx)("kbd",{className:l.key,children:v})]},g))})]},N))})})};Object.defineProperty(exports,"Shortcut",{enumerable:!0,get:function(){return M}});Object.defineProperty(exports,"getShortcutPresentation",{enumerable:!0,get:function(){return C}});
|