@estiva-app/ui 0.114.0 → 0.115.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.
@@ -25,8 +25,12 @@ export interface FollowSwitchProps {
25
25
  readOnlyReason?: string;
26
26
  /** People rather than circles, as `LevelIcon`'s `people`. */
27
27
  people?: boolean;
28
- /** The line under Not following. */
29
- offDescription?: string;
28
+ /**
29
+ * Whether the place lists files (a topic, a space): each level then says what of
30
+ * them it shows. `false` for a place with none (a team's chat): the levels say only
31
+ * what lights.
32
+ */
33
+ files?: boolean;
30
34
  /**
31
35
  * The name of the group whose default reaches the viewer, when they chose
32
36
  * against it: offers "Back to <name>’s default". Leave it out otherwise.
@@ -35,8 +39,9 @@ export interface FollowSwitchProps {
35
39
  }
36
40
  /**
37
41
  * The one switch on a place: Not following, Important or All, each with what
38
- * it lights, and "Back to <name>’s default" when the viewer chose against a
39
- * group's default. It sits before the place's title, drawn as `LevelIcon`.
42
+ * the place shows at it and what lights, and "Back to <name>’s default" when
43
+ * the viewer chose against a group's default. It sits before the place's
44
+ * title, drawn as `LevelIcon`.
40
45
  */
41
- export declare function FollowSwitch({ level, label, onChoose, readOnlyReason, people, offDescription, backTo }: FollowSwitchProps): import("react").JSX.Element;
46
+ export declare function FollowSwitch({ level, label, onChoose, readOnlyReason, people, files, backTo }: FollowSwitchProps): import("react").JSX.Element;
42
47
  //# sourceMappingURL=FollowSwitch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FollowSwitch.d.ts","sourceRoot":"","sources":["../src/FollowSwitch.tsx"],"names":[],"mappings":"AAKA,wEAAwE;AACxE,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,WAAW,CAAA;AAE7C,4FAA4F;AAC5F,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG,KAAK,GAAG,SAAS,CAAA;AAgB1D,MAAM,WAAW,cAAc;IAC7B,oEAAoE;IACpE,KAAK,EAAE,WAAW,GAAG,SAAS,CAAA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M,WAAW,iBAAiB;IAChC,iFAAiF;IACjF,KAAK,EAAE,WAAW,GAAG,SAAS,CAAA;IAC9B,0DAA0D;IAC1D,KAAK,EAAE,MAAM,CAAA;IACb,8JAA8J;IAC9J,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IAC5D,sGAAsG;IACtG,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,6DAA6D;IAC7D,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IACf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAc,EAAE,KAAY,EAAE,MAAM,EAAE,EAAE,iBAAiB,+BAiD/H"}
package/dist/index.js CHANGED
@@ -2130,13 +2130,23 @@ function LevelIcon({ level, people = false }) {
2130
2130
  if (level === "important") return /* @__PURE__ */ jsx29(IconCircleDashed, { ...ICON, "aria-hidden": true });
2131
2131
  return /* @__PURE__ */ jsx29(IconCircleDashedPlus, { ...ICON, "aria-hidden": true, className: "text-text-muted" });
2132
2132
  }
2133
+ var LABEL = { important: "Important", all: "All" };
2133
2134
  var WORDS = {
2134
- important: { label: "Important", description: "New conversations, and replies in the ones you are in" },
2135
- all: { label: "All", description: "Every new conversation and every reply" }
2135
+ files: {
2136
+ off: "Shows its own conversation. Lights only when someone names you.",
2137
+ important: "Shows its own conversation. Lights for new conversations, replies in yours, and what names you on its files.",
2138
+ all: "Shows its files\u2019 threads too. Lights for all of it."
2139
+ },
2140
+ noFiles: {
2141
+ off: "Lights only when someone names you.",
2142
+ important: "Lights for new conversations and replies in yours.",
2143
+ all: "Lights for every message."
2144
+ }
2136
2145
  };
2137
- function FollowSwitch({ level, label, onChoose, readOnlyReason, people = false, offDescription = "Nothing here lights for you", backTo }) {
2146
+ function FollowSwitch({ level, label, onChoose, readOnlyReason, people = false, files = true, backTo }) {
2138
2147
  const [busy, setBusy] = useState6(false);
2139
- const now = level ? `You follow it at ${WORDS[level].label}` : "Not following";
2148
+ const words = WORDS[files ? "files" : "noFiles"];
2149
+ const now = level ? `You follow it at ${LABEL[level]}` : "Not following";
2140
2150
  const button = /* @__PURE__ */ jsx29(IconButton, { "aria-label": `${now}: change how you follow ${label}`, tooltip: now, disabled: !onChoose || busy, disabledReason: onChoose ? void 0 : readOnlyReason, children: /* @__PURE__ */ jsx29(LevelIcon, { level, people }) });
2141
2151
  if (!onChoose) return button;
2142
2152
  const choose = async (choice) => {
@@ -2165,9 +2175,9 @@ function FollowSwitch({ level, label, onChoose, readOnlyReason, people = false,
2165
2175
  };
2166
2176
  return /* @__PURE__ */ jsxs21(Menu, { trigger: button, children: [
2167
2177
  /* @__PURE__ */ jsxs21(MenuSection, { label: "How you follow it", children: [
2168
- item("off", "Not following", offDescription, void 0),
2169
- item("important", WORDS.important.label, WORDS.important.description, "important"),
2170
- item("all", WORDS.all.label, WORDS.all.description, "all")
2178
+ item("off", "Not following", words.off, void 0),
2179
+ item("important", LABEL.important, words.important, "important"),
2180
+ item("all", LABEL.all, words.all, "all")
2171
2181
  ] }),
2172
2182
  backTo && /* @__PURE__ */ jsx29(MenuSection, { label: `${backTo} gives you Important`, children: /* @__PURE__ */ jsx29(MenuItem, { label: `Back to ${backTo}\u2019s default`, description: level ? "Your choice no longer applies" : "Your choice no longer applies; only you see that you changed it", onClick: () => void choose("default") }) })
2173
2183
  ] });