Created
August 24, 2021 15:16
-
-
Save ladifire/54bbaf686f450d0b21587557a784b684 to your computer and use it in GitHub Desktop.
WorkGalahadUIChannelItem Component raw from Facbook code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| __d("WorkGalahadUIChannelItem.react", ["CometPressableOverlay.react", "Locale", "URI", | |
| "WIGInteractiveElementContext.react", "WIGPressable.react", "WIGTextPairing.react", | |
| "WorkGalahadChannelFocusableTable.react", "gkx", "react", "stylex", "useCometPreloader", "useHoverAndFocusState"], (function(a, b, c, d, e, f, g) { | |
| "use strict"; | |
| var h = d("react"); | |
| b = d("react"); | |
| var i = b.useCallback, | |
| j = b.useMemo, | |
| k = b.useState, | |
| l = c("gkx")("1919265"), | |
| m = c("gkx")("875"), | |
| n = { | |
| root: { | |
| boxSizing: "tdgv6ycz", | |
| position: "hal92y33", | |
| flexGrow: "ftjbd6cl", | |
| flexShrink: "kqlegusg", | |
| minHeight: "eg3o40xf", | |
| minWidth: "f0w9ysip", | |
| display: "mu99tzkh", | |
| justifyContent: "oitujibm", | |
| alignItems: "t36ehdhz", | |
| flexDirection: "sulwup3a", | |
| borderTop: "nplqc3z5", | |
| borderEnd: "llwpk7e4", | |
| borderBottom: "fqnkz0nq", | |
| borderStart: "jga1arsn", | |
| paddingEnd: "g1w82w5r" | |
| }, | |
| tetraLikeRoot: { | |
| paddingEnd: "q8ag7aew", | |
| marginStart: "q877oug0", | |
| marginEnd: "ewe7nd7x", | |
| borderTopStartRadius: "qcplsvq8", | |
| borderTopEndRadius: "lbj7a7zq", | |
| borderBottomEndRadius: "qd9vfp32", | |
| borderBottomStartRadius: "ex16komz" | |
| }, | |
| focused: { | |
| outline: "d3fls08n" | |
| }, | |
| selected: { | |
| backgroundColor: "p9m48beo" | |
| }, | |
| tetraLikeSelected: { | |
| backgroundColor: "gzqalh9h" | |
| }, | |
| contentContainer: { | |
| borderStyle: "olwqhsk7", | |
| borderWidth: "j6ngj7h7", | |
| boxSizing: "tdgv6ycz", | |
| display: "mu99tzkh", | |
| flexGrow: "ftjbd6cl", | |
| flexShrink: "kqlegusg", | |
| marginBottom: "jgcuv4po", | |
| marginEnd: "ouhd256r", | |
| marginStart: "mq32vg4l", | |
| marginTop: "kyu6y8np", | |
| minHeight: "eg3o40xf", | |
| minWidth: "f0w9ysip", | |
| paddingBottom: "a3m408la", | |
| paddingEnd: "m3p3afjb", | |
| paddingStart: "eimatuwp", | |
| paddingTop: "zfmvpfxx", | |
| position: "hal92y33", | |
| zIndex: "rpt3ley2", | |
| justifyContent: "oitujibm", | |
| alignItems: "t36ehdhz", | |
| flexDirection: "sulwup3a" | |
| }, | |
| tetraLikeContentContainer: { | |
| position: "s7aa97hv" | |
| }, | |
| content: { | |
| borderStyle: "olwqhsk7", | |
| borderWidth: "j6ngj7h7", | |
| boxSizing: "tdgv6ycz", | |
| display: "mu99tzkh", | |
| flexGrow: "ftjbd6cl", | |
| flexShrink: "kqlegusg", | |
| marginBottom: "jgcuv4po", | |
| marginEnd: "ouhd256r", | |
| marginStart: "mq32vg4l", | |
| marginTop: "kyu6y8np", | |
| minHeight: "eg3o40xf", | |
| minWidth: "f0w9ysip", | |
| paddingBottom: "a3m408la", | |
| paddingEnd: "m3p3afjb", | |
| paddingStart: "eimatuwp", | |
| paddingTop: "zfmvpfxx", | |
| position: "hal92y33", | |
| zIndex: "rpt3ley2", | |
| justifyContent: "oitujibm", | |
| alignItems: "t36ehdhz", | |
| flexDirection: "sulwup3a", | |
| outline: "mvskt0vx", | |
| ":hover": { | |
| textDecoration: "b69vs25w" | |
| } | |
| }, | |
| textPairing: { | |
| flexGrow: "ftjbd6cl", | |
| flexBasis: "trztskah", | |
| minWidth: "f0w9ysip", | |
| paddingTop: "s9o98cno", | |
| paddingBottom: "sgyxnsb9", | |
| overflowX: "ib0kwflm", | |
| overflowY: "qbbcxcfp", | |
| textOverflow: "oecdyzpx" | |
| }, | |
| addOnPrimary: { | |
| borderStyle: "olwqhsk7", | |
| borderWidth: "j6ngj7h7", | |
| boxSizing: "tdgv6ycz", | |
| display: "mu99tzkh", | |
| flexDirection: "tv52aht6", | |
| flexShrink: "kqlegusg", | |
| justifyContent: "akl1aaa0", | |
| marginStart: "mq32vg4l", | |
| minHeight: "eg3o40xf", | |
| minWidth: "f0w9ysip", | |
| paddingBottom: "a3m408la", | |
| paddingEnd: "m3p3afjb", | |
| paddingStart: "eimatuwp", | |
| paddingTop: "zfmvpfxx", | |
| zIndex: "rpt3ley2", | |
| alignItems: "t36ehdhz", | |
| flexGrow: "aeqptlwn", | |
| marginBottom: "kl295ud9", | |
| marginEnd: "oypfxdan", | |
| marginTop: "q7fxw9qh", | |
| position: "hal92y33" | |
| }, | |
| addOnSecondary: { | |
| borderStyle: "olwqhsk7", | |
| borderWidth: "j6ngj7h7", | |
| boxSizing: "tdgv6ycz", | |
| display: "mu99tzkh", | |
| flexDirection: "tv52aht6", | |
| flexShrink: "kqlegusg", | |
| marginBottom: "jgcuv4po", | |
| marginEnd: "ouhd256r", | |
| marginStart: "mq32vg4l", | |
| marginTop: "kyu6y8np", | |
| minHeight: "eg3o40xf", | |
| minWidth: "f0w9ysip", | |
| paddingBottom: "a3m408la", | |
| paddingEnd: "m3p3afjb", | |
| paddingStart: "eimatuwp", | |
| paddingTop: "zfmvpfxx", | |
| zIndex: "rpt3ley2", | |
| position: "i8ovu4tj", | |
| start: "qgbafi3f", | |
| top: "xdo5vwd7", | |
| bottom: "qf3vbteg", | |
| alignItems: "t36ehdhz", | |
| justifyContent: "lhmcu1i6", | |
| flexGrow: "aeqptlwn" | |
| }, | |
| tetraLikeAddOnSecondary: { | |
| display: "mu99tzkh", | |
| justifyContent: "lhmcu1i6", | |
| alignItems: "t36ehdhz" | |
| }, | |
| addOnSecondaryOffset: { | |
| transform: "s5apgkp2" | |
| }, | |
| addOnSecondaryOffsetRTL: { | |
| transform: "xd99s5we" | |
| }, | |
| indentationLevel1: { | |
| paddingStart: "hmw2pi96" | |
| }, | |
| indentationLevel2: { | |
| paddingStart: "dxs9yoch" | |
| }, | |
| indentationLevel3: { | |
| paddingStart: "den1hhl9" | |
| }, | |
| tetraLikeIndentationLevel1: { | |
| paddingStart: "spg5mz9m" | |
| }, | |
| tetraLikeIndentationLevel2: { | |
| paddingStart: "spg5mz9m" | |
| }, | |
| tetraLikeIndentationLevel3: { | |
| paddingStart: "l2da8jwz" | |
| }, | |
| addOnTertiary: { | |
| borderStyle: "olwqhsk7", | |
| borderWidth: "j6ngj7h7", | |
| boxSizing: "tdgv6ycz", | |
| display: "mu99tzkh", | |
| marginBottom: "jgcuv4po", | |
| marginEnd: "ouhd256r", | |
| marginTop: "kyu6y8np", | |
| minHeight: "eg3o40xf", | |
| paddingBottom: "a3m408la", | |
| paddingEnd: "m3p3afjb", | |
| paddingStart: "eimatuwp", | |
| paddingTop: "zfmvpfxx", | |
| position: "hal92y33", | |
| zIndex: "rpt3ley2", | |
| flexGrow: "aeqptlwn", | |
| flexShrink: "o0foh442", | |
| minWidth: "eia6fg53", | |
| alignItems: "t36ehdhz", | |
| justifyContent: "gyidwt2h", | |
| flexDirection: "sulwup3a", | |
| marginStart: "se2r61z1" | |
| }, | |
| tetraLikeFocusRing: { | |
| position: "s7aa97hv", | |
| ":focus-visible::after": { | |
| borderTop: "rgpia63b", | |
| borderEnd: "huuw6m2v", | |
| borderBottom: "hqewcwm1", | |
| borderStart: "r5zcmuo9", | |
| borderTopStartRadius: "aan1z257", | |
| borderTopEndRadius: "rmkk0o94", | |
| borderBottomEndRadius: "bvcj7vt8", | |
| borderBottomStartRadius: "nws9alp2", | |
| bottom: "sncuyhja", | |
| content: "pxpirlfn", | |
| start: "p2xhvvah", | |
| position: "ic2s0i06", | |
| end: "pqnt06nn", | |
| top: "mtx6zocd" | |
| } | |
| } | |
| }; | |
| function o(a) { | |
| a = a.indentationLevel; | |
| if (l && a === 1) return n.tetraLikeIndentationLevel1; | |
| else if (l && a === 2) return n.tetraLikeIndentationLevel2; | |
| else if (l && a === 3) return n.tetraLikeIndentationLevel3; | |
| else if (a === 1) return n.indentationLevel1; | |
| else if (a === 2) return n.indentationLevel2; | |
| else if (a === 3) return n.indentationLevel3 | |
| } | |
| function a(a, b) { | |
| var e = a.addOnPrimary, | |
| f = a.addOnSecondary, | |
| g = a.addOnTertiary, | |
| p = a.disabled; | |
| p = p === void 0 ? !1 : p; | |
| var q = a.emphasized; | |
| q = q === void 0 ? !1 : q; | |
| var r = a.selected; | |
| r = r === void 0 ? !1 : r; | |
| var s = a.indentationLevel; | |
| s = s === void 0 ? 2 : s; | |
| var t = a.linkProps; | |
| t = t === void 0 ? {} : t; | |
| var u = t.url; | |
| t = babelHelpers.objectWithoutPropertiesLoose(t, ["url"]); | |
| var v = a.body, | |
| w = a.bodyColor, | |
| x = a.bodyLineLimit; | |
| x = x === void 0 ? 1 : x; | |
| var y = a.headline, | |
| z = a.headlineAddOn, | |
| A = a.headlineColor, | |
| B = a.headlineLineLimit; | |
| B = B === void 0 ? 1 : B; | |
| var C = a.meta, | |
| D = a.metaColor, | |
| E = a.metaLineLimit, | |
| F = a.metaLocation, | |
| G = a.onPress, | |
| H = a.onPressIn, | |
| I = a.onHoverIn, | |
| J = a.onHoverOut, | |
| K = a.onFocusIn, | |
| L = a.onFocusOut, | |
| M = a.isSemanticListItem; | |
| M = M === void 0 ? !0 : M; | |
| var N = a.testid; | |
| N = a.wrapperRef; | |
| var O = a.onPreload; | |
| a = babelHelpers.objectWithoutPropertiesLoose(a, ["addOnPrimary", "addOnSecondary", "addOnTertiary", "disabled", "emphasized", "selected", "indentationLevel", "linkProps", "body", "bodyColor", "bodyLineLimit", "headline", "headlineAddOn", "headlineColor", "headlineLineLimit", "meta", "metaColor", "metaLineLimit", "metaLocation", "onPress", "onPressIn", "onHoverIn", "onHoverOut", "onFocusIn", "onFocusOut", "isSemanticListItem", "testid", "wrapperRef", "onPreload"]); | |
| var P = k(!1), | |
| Q = P[0], | |
| R = P[1]; | |
| P = c("useHoverAndFocusState")(); | |
| var S = P.focused, | |
| T = P.hovered, | |
| U = P.onFocusIn, | |
| V = P.onFocusOut, | |
| W = P.onHoverIn; | |
| P = P.onHoverOut; | |
| var X = j(function() { | |
| return { | |
| hovered: T, | |
| focused: S, | |
| pressed: Q | |
| } | |
| }, [T, S, Q]), | |
| Y = i(function() { | |
| O && m && O() | |
| }, [O]); | |
| Y = c("useCometPreloader")("button_aggressive", void 0, Y); | |
| var Z = Y[0], | |
| $ = Y[1]; | |
| Y = i(function(a) { | |
| Z(a), I && I(a) | |
| }, [I, Z]); | |
| var aa = i(function(a) { | |
| $(), J && J(a) | |
| }, [J, $]), | |
| ba = i(function(a) { | |
| U(a), K && K(a) | |
| }, [K, U]), | |
| ca = i(function(a) { | |
| V(a), L && L(a) | |
| }, [L, V]), | |
| da = i(function(a) { | |
| R(!0), H && H(a) | |
| }, [H]), | |
| ea = i(function() { | |
| return R(!1) | |
| }, []); | |
| e = h.jsxs(h.Fragment, { | |
| children: [e != null && h.jsx("div", { | |
| className: c("stylex")(n.addOnPrimary), | |
| children: e | |
| }), h.jsx("div", { | |
| "data-testid": void 0, | |
| className: c("stylex")(n.textPairing), | |
| children: h.jsx(c("WIGTextPairing.react"), { | |
| body: v, | |
| bodyColor: w, | |
| bodyLineLimit: x, | |
| headline: y, | |
| headlineAddOn: z, | |
| headlineColor: A, | |
| headlineLineLimit: B, | |
| level: 4, | |
| meta: C, | |
| metaColor: D, | |
| metaLineLimit: E, | |
| metaLocation: F, | |
| reduceEmphasis: q === !1 | |
| }) | |
| })] | |
| }); | |
| v = M ? "li" : "div"; | |
| w = G || u != null; | |
| return h.jsx(d("WorkGalahadChannelFocusableTable.react").WorkGalahadChannelFocusableTableRow, { | |
| children: h.jsx(c("WIGInteractiveElementContext.react").Provider, { | |
| value: X, | |
| children: h.jsxs(v, { | |
| ref: N, | |
| role: w && M ? "row" : void 0, | |
| onMouseEnter: W, | |
| onMouseLeave: P, | |
| className: c("stylex")(n.root, l && n.tetraLikeRoot, o({ | |
| indentationLevel: s | |
| }), S && !l && n.focused, r && !l && n.selected, r && l && n.tetraLikeSelected), | |
| children: [w && h.jsx(c("CometPressableOverlay.react"), { | |
| focusVisible: S, | |
| useHoverAndFocusState: T, | |
| pressed: Q | |
| }), w ? h.jsx(d("WorkGalahadChannelFocusableTable.react").WorkGalahadChannelFocusableTableCell, { | |
| children: h.jsx("div", { | |
| className: c("stylex")([n.contentContainer, l && n.tetraLikeContentContainer]), | |
| role: M ? "gridcell" : void 0, | |
| children: h.jsx(c("WIGPressable.react"), babelHelpers["extends"]({}, a, { | |
| display: "block", | |
| disabled: p, | |
| linkProps: u ? babelHelpers["extends"]({}, t, { | |
| url: c("URI").normalize(u), | |
| prefetchQueries: m | |
| }) : void 0, | |
| onHoverIn: Y, | |
| onHoverOut: aa, | |
| onFocusIn: ba, | |
| onFocusOut: ca, | |
| onPress: G, | |
| onPressIn: da, | |
| onPressOut: ea, | |
| overlayDisabled: !0, | |
| ref: b, | |
| xstyle: [n.content, l && n.tetraLikeFocusRing], | |
| children: e | |
| })) | |
| }) | |
| }) : h.jsx("div", { | |
| className: c("stylex")(n.contentContainer), | |
| children: e | |
| }), g != null && l && h.jsx("div", { | |
| className: c("stylex")(n.addOnTertiary), | |
| children: g | |
| }), f != null && h.jsx("div", { | |
| className: c("stylex")(l ? n.tetraLikeAddOnSecondary : n.addOnSecondary, l ? null : d("Locale").isRTL() ? n.addOnSecondaryOffsetRTL : n.addOnSecondaryOffset), | |
| children: f | |
| }), g != null && !l && h.jsx("div", { | |
| className: c("stylex")(n.addOnTertiary), | |
| children: g | |
| })] | |
| }) | |
| }) | |
| }) | |
| } | |
| a.displayName = a.name + " [from " + f.id + "]"; | |
| e = h.forwardRef(a); | |
| g["default"] = e | |
| }), 98); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment