@sevenfold/setto-client 0.18.0 → 0.20.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/index.d.ts CHANGED
@@ -27,7 +27,7 @@ export { SettoAdminApp } from './admin/App';
27
27
  export { SettoContext } from './provider';
28
28
  export type { SettoContextValue } from './provider';
29
29
  export { AuthGate } from './edit-mode/auth-gate';
30
- export type { SettoConfig, BrandColor, DeploymentRow, SiteRow, ContentFile, PublishFile, PublishResult, } from './types';
30
+ export type { SettoConfig, BrandColor, DeploymentRow, SiteRow, ContentFile, PublishFile, PublishResult, PublishTranslation, } from './types';
31
31
  export type { SectionSchema, SectionColorField } from './section-schema';
32
32
  export { SettoBlockTree } from './block-tree/SettoBlockTree';
33
33
  export type { SettoBlockTreeProps } from './block-tree/SettoBlockTree';
@@ -174,9 +174,9 @@ function SettoLanguages({ languages, inline = false }) {
174
174
  "aria-expanded": open,
175
175
  "aria-haspopup": "listbox",
176
176
  "aria-label": `Språk: ${languageName(current)}`,
177
- style: triggerStyle,
177
+ style: inline ? inlineTriggerStyle : floatingTriggerStyle,
178
178
  children: [
179
- /* @__PURE__ */ jsx(GlobeIcon, {}),
179
+ /* @__PURE__ */ jsx(LanguagesIcon, {}),
180
180
  languageName(current)
181
181
  ]
182
182
  }
@@ -212,22 +212,26 @@ function AutoLanguageSwitcher({ languages }) {
212
212
  if (inlineElsewhere || languages.length < 2) return null;
213
213
  return /* @__PURE__ */ jsx(SettoLanguages, { languages });
214
214
  }
215
- function GlobeIcon() {
215
+ function LanguagesIcon() {
216
216
  return /* @__PURE__ */ jsxs(
217
217
  "svg",
218
218
  {
219
- width: "15",
220
- height: "15",
219
+ width: "16",
220
+ height: "16",
221
221
  viewBox: "0 0 24 24",
222
222
  fill: "none",
223
223
  stroke: "currentColor",
224
- strokeWidth: "1.8",
224
+ strokeWidth: "1.7",
225
225
  strokeLinecap: "round",
226
226
  strokeLinejoin: "round",
227
227
  "aria-hidden": "true",
228
228
  children: [
229
- /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "9" }),
230
- /* @__PURE__ */ jsx("path", { d: "M3 12h18M12 3c2.4 2.6 3.6 5.6 3.6 9s-1.2 6.4-3.6 9c-2.4-2.6-3.6-5.6-3.6-9S9.6 5.6 12 3z" })
229
+ /* @__PURE__ */ jsx("path", { d: "M2.2 17.8 6.5 6.8l4.3 11" }),
230
+ /* @__PURE__ */ jsx("path", { d: "M3.7 14.2h5.6" }),
231
+ /* @__PURE__ */ jsx("path", { d: "M17.3 3.4 16.2 5.6" }),
232
+ /* @__PURE__ */ jsx("path", { d: "M12.8 8.2h9" }),
233
+ /* @__PURE__ */ jsx("path", { d: "M13.6 18.8 21 10.9" }),
234
+ /* @__PURE__ */ jsx("path", { d: "M14.7 10.9l7.1 7.9" })
231
235
  ]
232
236
  }
233
237
  );
@@ -244,25 +248,36 @@ const inlineWrapStyle = {
244
248
  display: "inline-block",
245
249
  fontFamily: "inherit"
246
250
  };
247
- const triggerStyle = {
251
+ const triggerBase = {
248
252
  display: "inline-flex",
249
253
  alignItems: "center",
250
254
  gap: 7,
251
255
  minHeight: 40,
256
+ fontSize: 13.5,
257
+ fontWeight: 500,
258
+ lineHeight: 1,
259
+ cursor: "pointer"
260
+ };
261
+ const floatingTriggerStyle = {
262
+ ...triggerBase,
252
263
  padding: "8px 14px",
253
264
  borderRadius: 999,
254
265
  border: "1px solid rgba(127, 127, 127, 0.32)",
255
- // Translucent over whatever the site put behind it, and legible either way.
256
266
  background: "rgba(255, 255, 255, 0.82)",
257
267
  backdropFilter: "blur(8px)",
258
268
  WebkitBackdropFilter: "blur(8px)",
259
269
  color: "#1a1a1a",
260
- fontSize: 13.5,
261
- fontWeight: 500,
262
- lineHeight: 1,
263
- cursor: "pointer",
264
270
  boxShadow: "0 4px 14px rgba(0, 0, 0, 0.12)"
265
271
  };
272
+ const inlineTriggerStyle = {
273
+ ...triggerBase,
274
+ padding: "8px 6px",
275
+ border: 0,
276
+ borderRadius: 8,
277
+ background: "transparent",
278
+ color: "inherit",
279
+ opacity: 0.75
280
+ };
266
281
  const listBase = {
267
282
  position: "absolute",
268
283
  margin: 0,