@sevenfold/setto-client 0.19.0 → 0.20.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.
- package/dist/setto-client.js +18 -7
- package/dist/setto-client.js.map +1 -1
- package/package.json +1 -1
package/dist/setto-client.js
CHANGED
|
@@ -174,7 +174,7 @@ 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:
|
|
177
|
+
style: inline ? inlineTriggerStyle : floatingTriggerStyle,
|
|
178
178
|
children: [
|
|
179
179
|
/* @__PURE__ */ jsx(GlobeIcon, {}),
|
|
180
180
|
languageName(current)
|
|
@@ -244,25 +244,36 @@ const inlineWrapStyle = {
|
|
|
244
244
|
display: "inline-block",
|
|
245
245
|
fontFamily: "inherit"
|
|
246
246
|
};
|
|
247
|
-
const
|
|
247
|
+
const triggerBase = {
|
|
248
248
|
display: "inline-flex",
|
|
249
249
|
alignItems: "center",
|
|
250
250
|
gap: 7,
|
|
251
251
|
minHeight: 40,
|
|
252
|
+
fontSize: 13.5,
|
|
253
|
+
fontWeight: 500,
|
|
254
|
+
lineHeight: 1,
|
|
255
|
+
cursor: "pointer"
|
|
256
|
+
};
|
|
257
|
+
const floatingTriggerStyle = {
|
|
258
|
+
...triggerBase,
|
|
252
259
|
padding: "8px 14px",
|
|
253
260
|
borderRadius: 999,
|
|
254
261
|
border: "1px solid rgba(127, 127, 127, 0.32)",
|
|
255
|
-
// Translucent over whatever the site put behind it, and legible either way.
|
|
256
262
|
background: "rgba(255, 255, 255, 0.82)",
|
|
257
263
|
backdropFilter: "blur(8px)",
|
|
258
264
|
WebkitBackdropFilter: "blur(8px)",
|
|
259
265
|
color: "#1a1a1a",
|
|
260
|
-
fontSize: 13.5,
|
|
261
|
-
fontWeight: 500,
|
|
262
|
-
lineHeight: 1,
|
|
263
|
-
cursor: "pointer",
|
|
264
266
|
boxShadow: "0 4px 14px rgba(0, 0, 0, 0.12)"
|
|
265
267
|
};
|
|
268
|
+
const inlineTriggerStyle = {
|
|
269
|
+
...triggerBase,
|
|
270
|
+
padding: "8px 6px",
|
|
271
|
+
border: 0,
|
|
272
|
+
borderRadius: 8,
|
|
273
|
+
background: "transparent",
|
|
274
|
+
color: "inherit",
|
|
275
|
+
opacity: 0.75
|
|
276
|
+
};
|
|
266
277
|
const listBase = {
|
|
267
278
|
position: "absolute",
|
|
268
279
|
margin: 0,
|