@rogieking/figui3 2.15.0 → 2.17.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/components.css +10 -0
- package/fig.js +102 -4
- package/index.html +157 -19
- package/package.json +1 -1
package/components.css
CHANGED
|
@@ -2522,6 +2522,16 @@ fig-segmented-control {
|
|
|
2522
2522
|
}
|
|
2523
2523
|
}
|
|
2524
2524
|
}
|
|
2525
|
+
|
|
2526
|
+
&[disabled]:not([disabled="false"]) {
|
|
2527
|
+
pointer-events: none;
|
|
2528
|
+
|
|
2529
|
+
fig-segment {
|
|
2530
|
+
color: var(--figma-color-text-disabled);
|
|
2531
|
+
background-color: transparent;
|
|
2532
|
+
box-shadow: none;
|
|
2533
|
+
}
|
|
2534
|
+
}
|
|
2525
2535
|
}
|
|
2526
2536
|
|
|
2527
2537
|
fig-input-joystick {
|
package/fig.js
CHANGED
|
@@ -167,6 +167,8 @@ customElements.define("fig-button", FigButton);
|
|
|
167
167
|
class FigDropdown extends HTMLElement {
|
|
168
168
|
#label = "Menu";
|
|
169
169
|
#selectedValue = null; // Stores last selected value for dropdown type
|
|
170
|
+
#boundHandleSelectInput;
|
|
171
|
+
#boundHandleSelectChange;
|
|
170
172
|
|
|
171
173
|
get label() {
|
|
172
174
|
return this.#label;
|
|
@@ -179,11 +181,33 @@ class FigDropdown extends HTMLElement {
|
|
|
179
181
|
this.select = document.createElement("select");
|
|
180
182
|
this.optionsSlot = document.createElement("slot");
|
|
181
183
|
this.attachShadow({ mode: "open" });
|
|
184
|
+
this.#boundHandleSelectInput = this.#handleSelectInput.bind(this);
|
|
185
|
+
this.#boundHandleSelectChange = this.#handleSelectChange.bind(this);
|
|
182
186
|
}
|
|
183
187
|
|
|
184
188
|
#addEventListeners() {
|
|
185
|
-
this.select.addEventListener("input", this.#
|
|
186
|
-
this.select.addEventListener("change", this.#
|
|
189
|
+
this.select.addEventListener("input", this.#boundHandleSelectInput);
|
|
190
|
+
this.select.addEventListener("change", this.#boundHandleSelectChange);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
#hasPersistentControl(optionEl) {
|
|
194
|
+
if (!optionEl || !(optionEl instanceof Element)) return false;
|
|
195
|
+
return !!optionEl.querySelector(
|
|
196
|
+
'fig-checkbox, fig-switch, input[type="checkbox"]'
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
#keepPickerOpen() {
|
|
201
|
+
// Keep menu open for interactive controls inside option content.
|
|
202
|
+
if (typeof this.select.showPicker === "function") {
|
|
203
|
+
requestAnimationFrame(() => {
|
|
204
|
+
try {
|
|
205
|
+
this.select.showPicker();
|
|
206
|
+
} catch {
|
|
207
|
+
// Ignore if browser blocks reopening picker
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
}
|
|
187
211
|
}
|
|
188
212
|
|
|
189
213
|
connectedCallback() {
|
|
@@ -224,6 +248,15 @@ class FigDropdown extends HTMLElement {
|
|
|
224
248
|
}
|
|
225
249
|
|
|
226
250
|
#handleSelectInput(e) {
|
|
251
|
+
const selectedOption = e.target.selectedOptions?.[0];
|
|
252
|
+
if (this.#hasPersistentControl(selectedOption)) {
|
|
253
|
+
if (this.type === "dropdown") {
|
|
254
|
+
this.select.selectedIndex = -1;
|
|
255
|
+
}
|
|
256
|
+
this.#keepPickerOpen();
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
|
|
227
260
|
const selectedValue = e.target.value;
|
|
228
261
|
// Store the selected value for dropdown type (before select gets reset)
|
|
229
262
|
if (this.type === "dropdown") {
|
|
@@ -240,6 +273,15 @@ class FigDropdown extends HTMLElement {
|
|
|
240
273
|
}
|
|
241
274
|
|
|
242
275
|
#handleSelectChange(e) {
|
|
276
|
+
const selectedOption = e.target.selectedOptions?.[0];
|
|
277
|
+
if (this.#hasPersistentControl(selectedOption)) {
|
|
278
|
+
if (this.type === "dropdown") {
|
|
279
|
+
this.select.selectedIndex = -1;
|
|
280
|
+
}
|
|
281
|
+
this.#keepPickerOpen();
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
|
|
243
285
|
// Get the value before resetting (use stored value for dropdown type)
|
|
244
286
|
const selectedValue =
|
|
245
287
|
this.type === "dropdown" ? this.#selectedValue : this.select.value;
|
|
@@ -1292,6 +1334,14 @@ class FigSegment extends HTMLElement {
|
|
|
1292
1334
|
this.removeEventListener("click", this.handleClick);
|
|
1293
1335
|
}
|
|
1294
1336
|
handleClick() {
|
|
1337
|
+
const parentControl = this.closest("fig-segmented-control");
|
|
1338
|
+
if (
|
|
1339
|
+
parentControl &&
|
|
1340
|
+
parentControl.hasAttribute("disabled") &&
|
|
1341
|
+
parentControl.getAttribute("disabled") !== "false"
|
|
1342
|
+
) {
|
|
1343
|
+
return;
|
|
1344
|
+
}
|
|
1295
1345
|
this.setAttribute("selected", "true");
|
|
1296
1346
|
}
|
|
1297
1347
|
get value() {
|
|
@@ -1335,9 +1385,16 @@ class FigSegmentedControl extends HTMLElement {
|
|
|
1335
1385
|
super();
|
|
1336
1386
|
}
|
|
1337
1387
|
|
|
1388
|
+
static get observedAttributes() {
|
|
1389
|
+
return ["disabled"];
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1338
1392
|
connectedCallback() {
|
|
1339
1393
|
this.name = this.getAttribute("name") || "segmented-control";
|
|
1340
1394
|
this.addEventListener("click", this.handleClick.bind(this));
|
|
1395
|
+
this.#applyDisabled(
|
|
1396
|
+
this.hasAttribute("disabled") && this.getAttribute("disabled") !== "false"
|
|
1397
|
+
);
|
|
1341
1398
|
|
|
1342
1399
|
// Ensure at least one segment is selected (default to first)
|
|
1343
1400
|
requestAnimationFrame(() => {
|
|
@@ -1368,6 +1425,12 @@ class FigSegmentedControl extends HTMLElement {
|
|
|
1368
1425
|
}
|
|
1369
1426
|
|
|
1370
1427
|
handleClick(event) {
|
|
1428
|
+
if (
|
|
1429
|
+
this.hasAttribute("disabled") &&
|
|
1430
|
+
this.getAttribute("disabled") !== "false"
|
|
1431
|
+
) {
|
|
1432
|
+
return;
|
|
1433
|
+
}
|
|
1371
1434
|
const segment = event.target.closest("fig-segment");
|
|
1372
1435
|
if (segment) {
|
|
1373
1436
|
const segments = this.querySelectorAll("fig-segment");
|
|
@@ -1380,6 +1443,25 @@ class FigSegmentedControl extends HTMLElement {
|
|
|
1380
1443
|
}
|
|
1381
1444
|
}
|
|
1382
1445
|
}
|
|
1446
|
+
|
|
1447
|
+
#applyDisabled(disabled) {
|
|
1448
|
+
this.setAttribute("aria-disabled", disabled ? "true" : "false");
|
|
1449
|
+
this.querySelectorAll("fig-segment").forEach((segment) => {
|
|
1450
|
+
if (disabled) {
|
|
1451
|
+
segment.setAttribute("disabled", "");
|
|
1452
|
+
segment.setAttribute("aria-disabled", "true");
|
|
1453
|
+
} else {
|
|
1454
|
+
segment.removeAttribute("disabled");
|
|
1455
|
+
segment.removeAttribute("aria-disabled");
|
|
1456
|
+
}
|
|
1457
|
+
});
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1460
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
1461
|
+
if (name === "disabled" && oldValue !== newValue) {
|
|
1462
|
+
this.#applyDisabled(newValue !== null && newValue !== "false");
|
|
1463
|
+
}
|
|
1464
|
+
}
|
|
1383
1465
|
}
|
|
1384
1466
|
customElements.define("fig-segmented-control", FigSegmentedControl);
|
|
1385
1467
|
|
|
@@ -3581,6 +3663,7 @@ customElements.define("fig-input-fill", FigInputFill);
|
|
|
3581
3663
|
*/
|
|
3582
3664
|
class FigCheckbox extends HTMLElement {
|
|
3583
3665
|
#labelElement = null;
|
|
3666
|
+
#boundHandleInput;
|
|
3584
3667
|
|
|
3585
3668
|
constructor() {
|
|
3586
3669
|
super();
|
|
@@ -3591,11 +3674,21 @@ class FigCheckbox extends HTMLElement {
|
|
|
3591
3674
|
this.input.setAttribute("name", this.name);
|
|
3592
3675
|
this.input.setAttribute("type", "checkbox");
|
|
3593
3676
|
this.input.setAttribute("role", "checkbox");
|
|
3677
|
+
this.#boundHandleInput = this.handleInput.bind(this);
|
|
3594
3678
|
}
|
|
3595
3679
|
connectedCallback() {
|
|
3680
|
+
// Reuse cloned internals when this element is duplicated via option.cloneNode(true).
|
|
3681
|
+
const existingInput = this.querySelector(":scope > input");
|
|
3682
|
+
if (existingInput) {
|
|
3683
|
+
this.input = existingInput;
|
|
3684
|
+
} else if (!this.input.parentNode) {
|
|
3685
|
+
this.append(this.input);
|
|
3686
|
+
}
|
|
3687
|
+
|
|
3596
3688
|
this.input.checked =
|
|
3597
3689
|
this.hasAttribute("checked") && this.getAttribute("checked") !== "false";
|
|
3598
|
-
this.input.
|
|
3690
|
+
this.input.removeEventListener("change", this.#boundHandleInput);
|
|
3691
|
+
this.input.addEventListener("change", this.#boundHandleInput);
|
|
3599
3692
|
|
|
3600
3693
|
if (this.hasAttribute("disabled")) {
|
|
3601
3694
|
this.input.disabled = true;
|
|
@@ -3605,7 +3698,11 @@ class FigCheckbox extends HTMLElement {
|
|
|
3605
3698
|
this.input.setAttribute("indeterminate", "true");
|
|
3606
3699
|
}
|
|
3607
3700
|
|
|
3608
|
-
this.
|
|
3701
|
+
const existingLabel = this.querySelector(":scope > label");
|
|
3702
|
+
if (existingLabel) {
|
|
3703
|
+
this.#labelElement = existingLabel;
|
|
3704
|
+
this.#labelElement.setAttribute("for", this.input.id);
|
|
3705
|
+
}
|
|
3609
3706
|
|
|
3610
3707
|
// Only create label if label attribute is present
|
|
3611
3708
|
if (this.hasAttribute("label")) {
|
|
@@ -3663,6 +3760,7 @@ class FigCheckbox extends HTMLElement {
|
|
|
3663
3760
|
}
|
|
3664
3761
|
|
|
3665
3762
|
disconnectedCallback() {
|
|
3763
|
+
this.input.removeEventListener("change", this.#boundHandleInput);
|
|
3666
3764
|
this.input.remove();
|
|
3667
3765
|
}
|
|
3668
3766
|
|
package/index.html
CHANGED
|
@@ -107,8 +107,10 @@
|
|
|
107
107
|
main {
|
|
108
108
|
margin-left: 180px;
|
|
109
109
|
padding: 24px 32px;
|
|
110
|
-
overflow-y: auto;
|
|
111
110
|
max-width: 800px;
|
|
111
|
+
min-height: 100vh;
|
|
112
|
+
display: flex;
|
|
113
|
+
flex-direction: column;
|
|
112
114
|
}
|
|
113
115
|
|
|
114
116
|
section {
|
|
@@ -156,6 +158,23 @@
|
|
|
156
158
|
border-radius: 4px;
|
|
157
159
|
color: var(--figma-color-text);
|
|
158
160
|
}
|
|
161
|
+
|
|
162
|
+
fig-footer {
|
|
163
|
+
display: flex;
|
|
164
|
+
align-items: center;
|
|
165
|
+
justify-content: flex-end;
|
|
166
|
+
gap: var(--spacer-2);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
fig-footer[sticky="true"] {
|
|
170
|
+
position: sticky;
|
|
171
|
+
bottom: 0;
|
|
172
|
+
z-index: 10;
|
|
173
|
+
margin-top: auto;
|
|
174
|
+
padding: var(--spacer-2) 0;
|
|
175
|
+
background: var(--figma-color-bg);
|
|
176
|
+
border-top: 1px solid var(--figma-color-border);
|
|
177
|
+
}
|
|
159
178
|
</style>
|
|
160
179
|
</head>
|
|
161
180
|
|
|
@@ -1168,29 +1187,70 @@
|
|
|
1168
1187
|
</p>
|
|
1169
1188
|
<fig-dropdown experimental="modern">
|
|
1170
1189
|
<option value="home">
|
|
1171
|
-
<svg width="16"
|
|
1172
|
-
|
|
1190
|
+
<svg width="16"
|
|
1191
|
+
height="16"
|
|
1192
|
+
viewBox="0 0 16 16"
|
|
1193
|
+
fill="none"
|
|
1194
|
+
xmlns="http://www.w3.org/2000/svg">
|
|
1195
|
+
<path d="M2 6.5L8 2L14 6.5V13.5C14 14 13.5 14.5 13 14.5H3C2.5 14.5 2 14 2 13.5V6.5Z"
|
|
1196
|
+
stroke="currentColor"
|
|
1197
|
+
stroke-opacity="0.9"
|
|
1198
|
+
fill="none" />
|
|
1173
1199
|
</svg>
|
|
1174
1200
|
<label>Home</label>
|
|
1175
1201
|
</option>
|
|
1176
1202
|
<option value="settings">
|
|
1177
|
-
<svg width="16"
|
|
1178
|
-
|
|
1179
|
-
|
|
1203
|
+
<svg width="16"
|
|
1204
|
+
height="16"
|
|
1205
|
+
viewBox="0 0 16 16"
|
|
1206
|
+
fill="none"
|
|
1207
|
+
xmlns="http://www.w3.org/2000/svg">
|
|
1208
|
+
<circle cx="8"
|
|
1209
|
+
cy="8"
|
|
1210
|
+
r="2"
|
|
1211
|
+
stroke="currentColor"
|
|
1212
|
+
stroke-opacity="0.9"
|
|
1213
|
+
fill="none" />
|
|
1214
|
+
<path d="M8 1V3M8 13V15M1 8H3M13 8H15M2.5 2.5L4 4M12 12L13.5 13.5M2.5 13.5L4 12M12 4L13.5 2.5"
|
|
1215
|
+
stroke="currentColor"
|
|
1216
|
+
stroke-opacity="0.9" />
|
|
1180
1217
|
</svg>
|
|
1181
1218
|
<label>Settings</label>
|
|
1182
1219
|
</option>
|
|
1183
1220
|
<option value="user">
|
|
1184
|
-
<svg width="16"
|
|
1185
|
-
|
|
1186
|
-
|
|
1221
|
+
<svg width="16"
|
|
1222
|
+
height="16"
|
|
1223
|
+
viewBox="0 0 16 16"
|
|
1224
|
+
fill="none"
|
|
1225
|
+
xmlns="http://www.w3.org/2000/svg">
|
|
1226
|
+
<circle cx="8"
|
|
1227
|
+
cy="5"
|
|
1228
|
+
r="3"
|
|
1229
|
+
stroke="currentColor"
|
|
1230
|
+
stroke-opacity="0.9"
|
|
1231
|
+
fill="none" />
|
|
1232
|
+
<path d="M2 14C2 11 4.5 9 8 9C11.5 9 14 11 14 14"
|
|
1233
|
+
stroke="currentColor"
|
|
1234
|
+
stroke-opacity="0.9"
|
|
1235
|
+
fill="none" />
|
|
1187
1236
|
</svg>
|
|
1188
1237
|
<label>User Profile</label>
|
|
1189
1238
|
</option>
|
|
1190
1239
|
<option value="search">
|
|
1191
|
-
<svg width="16"
|
|
1192
|
-
|
|
1193
|
-
|
|
1240
|
+
<svg width="16"
|
|
1241
|
+
height="16"
|
|
1242
|
+
viewBox="0 0 16 16"
|
|
1243
|
+
fill="none"
|
|
1244
|
+
xmlns="http://www.w3.org/2000/svg">
|
|
1245
|
+
<circle cx="6.5"
|
|
1246
|
+
cy="6.5"
|
|
1247
|
+
r="4"
|
|
1248
|
+
stroke="currentColor"
|
|
1249
|
+
stroke-opacity="0.9"
|
|
1250
|
+
fill="none" />
|
|
1251
|
+
<path d="M10 10L14 14"
|
|
1252
|
+
stroke="currentColor"
|
|
1253
|
+
stroke-opacity="0.9" />
|
|
1194
1254
|
</svg>
|
|
1195
1255
|
<label>Search</label>
|
|
1196
1256
|
</option>
|
|
@@ -1337,7 +1397,8 @@
|
|
|
1337
1397
|
<fig-fill-picker mode="image"></fig-fill-picker>
|
|
1338
1398
|
|
|
1339
1399
|
<h3>Limited Mode Selection</h3>
|
|
1340
|
-
<p class="description">Use comma-separated values in the <code>mode</code> attribute to limit available
|
|
1400
|
+
<p class="description">Use comma-separated values in the <code>mode</code> attribute to limit available
|
|
1401
|
+
modes
|
|
1341
1402
|
while still allowing switching between them.</p>
|
|
1342
1403
|
|
|
1343
1404
|
<h4>Solid and Gradient Only</h4>
|
|
@@ -1347,7 +1408,8 @@
|
|
|
1347
1408
|
<fig-fill-picker mode="solid,gradient,image"></fig-fill-picker>
|
|
1348
1409
|
|
|
1349
1410
|
<h4>With fig-input-fill (mode passed through)</h4>
|
|
1350
|
-
<fig-input-fill mode="solid,gradient"
|
|
1411
|
+
<fig-input-fill mode="solid,gradient"
|
|
1412
|
+
value='{"type":"solid","color":"#667eea"}'></fig-input-fill>
|
|
1351
1413
|
|
|
1352
1414
|
<h3>Event Listening</h3>
|
|
1353
1415
|
<fig-fill-picker id="fill-picker-events"
|
|
@@ -2651,13 +2713,25 @@
|
|
|
2651
2713
|
<h3>With Icons</h3>
|
|
2652
2714
|
<fig-segmented-control>
|
|
2653
2715
|
<fig-segment selected>
|
|
2654
|
-
<svg width="24"
|
|
2655
|
-
|
|
2716
|
+
<svg width="24"
|
|
2717
|
+
height="24"
|
|
2718
|
+
viewBox="0 0 24 24"
|
|
2719
|
+
fill="none"
|
|
2720
|
+
xmlns="http://www.w3.org/2000/svg">
|
|
2721
|
+
<path d="M8.5 5.59686C8.80936 5.41829 9.19064 5.41829 9.5 5.59686L15 8.77264C15.6185 9.12984 15.9998 9.78984 16 10.5041V16.8557C15.9999 17.2128 15.8093 17.5433 15.5 17.7219C15.1907 17.9003 14.8093 17.9003 14.5 17.7219L14.2988 17.6057L14.1025 17.4924L13.9111 17.381L13.7236 17.2736L13.541 17.1672L13.3613 17.0637L13.1846 16.9621L13.0117 16.8625L12.8418 16.7639L12.6738 16.6672L12.5078 16.5715L12.3438 16.4767L12.1816 16.383L12.0205 16.2902L11.8613 16.1974L11.7012 16.1057L11.543 16.0139L11.0654 15.7385L10.9053 15.6457L10.7432 15.5519L10.5801 15.4582L10.416 15.3635L10.249 15.2668L10.0801 15.1691L9.9082 15.0705L9.73438 14.9699L9.55664 14.8674L9.375 14.7619L9.18945 14.6555L9.00098 14.5461C8.38287 14.1892 8.00002 13.5289 8 12.8137V6.46307C8 6.10581 8.1906 5.7755 8.5 5.59686ZM9 12.8137C9.00001 13.1709 9.1916 13.5012 9.50098 13.6799C11.542 14.8584 12.8291 15.6022 15 16.8557V10.5051C15 10.1925 14.8541 9.89983 14.6104 9.7121L14.5 9.63885L9 6.46307V12.8137Z"
|
|
2722
|
+
fill="black"
|
|
2723
|
+
fill-opacity="0.9" />
|
|
2656
2724
|
</svg>
|
|
2657
2725
|
</fig-segment>
|
|
2658
2726
|
<fig-segment>
|
|
2659
|
-
<svg width="24"
|
|
2660
|
-
|
|
2727
|
+
<svg width="24"
|
|
2728
|
+
height="24"
|
|
2729
|
+
viewBox="0 0 24 24"
|
|
2730
|
+
fill="none"
|
|
2731
|
+
xmlns="http://www.w3.org/2000/svg">
|
|
2732
|
+
<path d="M14.4998 5.5968C14.8091 5.41823 15.1904 5.41823 15.4998 5.5968C15.8092 5.77543 15.9998 6.10575 15.9998 6.46301V12.8136C15.9997 13.5281 15.6185 14.1888 14.9998 14.546L9.49976 17.7218C9.19046 17.9003 8.80905 17.9003 8.49976 17.7218C8.19043 17.5432 7.99986 17.2127 7.99976 16.8556V10.504C7.99995 9.78978 8.38122 9.12978 8.99976 8.77258L14.4998 5.5968ZM9.49976 9.63879L9.3894 9.71204C9.14564 9.89977 8.99977 10.1924 8.99976 10.505V16.8556L14.4998 13.6798C14.7704 13.5235 14.9502 13.2513 14.991 12.9464L14.9998 12.8136V6.46301L9.49976 9.63879Z"
|
|
2733
|
+
fill="black"
|
|
2734
|
+
fill-opacity="0.9" />
|
|
2661
2735
|
</svg>
|
|
2662
2736
|
</fig-segment>
|
|
2663
2737
|
</fig-segmented-control>
|
|
@@ -2670,6 +2744,39 @@
|
|
|
2670
2744
|
<fig-segment>L</fig-segment>
|
|
2671
2745
|
<fig-segment>XL</fig-segment>
|
|
2672
2746
|
</fig-segmented-control>
|
|
2747
|
+
|
|
2748
|
+
<h3>Disabled (Text)</h3>
|
|
2749
|
+
<fig-segmented-control disabled>
|
|
2750
|
+
<fig-segment>List</fig-segment>
|
|
2751
|
+
<fig-segment selected>Grid</fig-segment>
|
|
2752
|
+
<fig-segment>Board</fig-segment>
|
|
2753
|
+
</fig-segmented-control>
|
|
2754
|
+
|
|
2755
|
+
<h3>Disabled (Icons)</h3>
|
|
2756
|
+
<fig-segmented-control disabled>
|
|
2757
|
+
<fig-segment selected>
|
|
2758
|
+
<svg width="24"
|
|
2759
|
+
height="24"
|
|
2760
|
+
viewBox="0 0 24 24"
|
|
2761
|
+
fill="none"
|
|
2762
|
+
xmlns="http://www.w3.org/2000/svg">
|
|
2763
|
+
<path d="M8.5 5.59686C8.80936 5.41829 9.19064 5.41829 9.5 5.59686L15 8.77264C15.6185 9.12984 15.9998 9.78984 16 10.5041V16.8557C15.9999 17.2128 15.8093 17.5433 15.5 17.7219C15.1907 17.9003 14.8093 17.9003 14.5 17.7219L14.2988 17.6057L14.1025 17.4924L13.9111 17.381L13.7236 17.2736L13.541 17.1672L13.3613 17.0637L13.1846 16.9621L13.0117 16.8625L12.8418 16.7639L12.6738 16.6672L12.5078 16.5715L12.3438 16.4767L12.1816 16.383L12.0205 16.2902L11.8613 16.1974L11.7012 16.1057L11.543 16.0139L11.0654 15.7385L10.9053 15.6457L10.7432 15.5519L10.5801 15.4582L10.416 15.3635L10.249 15.2668L10.0801 15.1691L9.9082 15.0705L9.73438 14.9699L9.55664 14.8674L9.375 14.7619L9.18945 14.6555L9.00098 14.5461C8.38287 14.1892 8.00002 13.5289 8 12.8137V6.46307C8 6.10581 8.1906 5.7755 8.5 5.59686ZM9 12.8137C9.00001 13.1709 9.1916 13.5012 9.50098 13.6799C11.542 14.8584 12.8291 15.6022 15 16.8557V10.5051C15 10.1925 14.8541 9.89983 14.6104 9.7121L14.5 9.63885L9 6.46307V12.8137Z"
|
|
2764
|
+
fill="black"
|
|
2765
|
+
fill-opacity="0.9" />
|
|
2766
|
+
</svg>
|
|
2767
|
+
</fig-segment>
|
|
2768
|
+
<fig-segment>
|
|
2769
|
+
<svg width="24"
|
|
2770
|
+
height="24"
|
|
2771
|
+
viewBox="0 0 24 24"
|
|
2772
|
+
fill="none"
|
|
2773
|
+
xmlns="http://www.w3.org/2000/svg">
|
|
2774
|
+
<path d="M14.4998 5.5968C14.8091 5.41823 15.1904 5.41823 15.4998 5.5968C15.8092 5.77543 15.9998 6.10575 15.9998 6.46301V12.8136C15.9997 13.5281 15.6185 14.1888 14.9998 14.546L9.49976 17.7218C9.19046 17.9003 8.80905 17.9003 8.49976 17.7218C8.19043 17.5432 7.99986 17.2127 7.99976 16.8556V10.504C7.99995 9.78978 8.38122 9.12978 8.99976 8.77258L14.4998 5.5968ZM9.49976 9.63879L9.3894 9.71204C9.14564 9.89977 8.99977 10.1924 8.99976 10.505V16.8556L14.4998 13.6798C14.7704 13.5235 14.9502 13.2513 14.991 12.9464L14.9998 12.8136V6.46301L9.49976 9.63879Z"
|
|
2775
|
+
fill="black"
|
|
2776
|
+
fill-opacity="0.9" />
|
|
2777
|
+
</svg>
|
|
2778
|
+
</fig-segment>
|
|
2779
|
+
</fig-segmented-control>
|
|
2673
2780
|
</section>
|
|
2674
2781
|
<hr>
|
|
2675
2782
|
|
|
@@ -2729,7 +2836,8 @@
|
|
|
2729
2836
|
units="%"></fig-slider>
|
|
2730
2837
|
|
|
2731
2838
|
<h3>With Precision</h3>
|
|
2732
|
-
<p class="description">Control decimal places in the text input with the <code>precision</code> attribute
|
|
2839
|
+
<p class="description">Control decimal places in the text input with the <code>precision</code> attribute.
|
|
2840
|
+
</p>
|
|
2733
2841
|
<fig-field direction="horizontal">
|
|
2734
2842
|
<label>Precision 0</label>
|
|
2735
2843
|
<fig-slider min="0"
|
|
@@ -3649,6 +3757,36 @@ button.addEventListener('click', () => {
|
|
|
3649
3757
|
</vstack>
|
|
3650
3758
|
</details>
|
|
3651
3759
|
</section>
|
|
3760
|
+
<fig-footer sticky="true">
|
|
3761
|
+
<fig-button icon="true"
|
|
3762
|
+
type="select"
|
|
3763
|
+
variant="ghost"
|
|
3764
|
+
title="Fill settings">
|
|
3765
|
+
<svg width="16"
|
|
3766
|
+
height="16"
|
|
3767
|
+
viewBox="0 0 16 16"
|
|
3768
|
+
fill="none"
|
|
3769
|
+
xmlns="http://www.w3.org/2000/svg">
|
|
3770
|
+
<path d="M8 3.5A4.5 4.5 0 1 0 8 12.5A4.5 4.5 0 1 0 8 3.5Z"
|
|
3771
|
+
stroke="currentColor"
|
|
3772
|
+
stroke-opacity="0.9" />
|
|
3773
|
+
<path d="M8 1V2.25M8 13.75V15M15 8H13.75M2.25 8H1M12.95 3.05L12.06 3.94M3.94 12.06L3.05 12.95M12.95 12.95L12.06 12.06M3.94 3.94L3.05 3.05"
|
|
3774
|
+
stroke="currentColor"
|
|
3775
|
+
stroke-opacity="0.9"
|
|
3776
|
+
stroke-linecap="round" />
|
|
3777
|
+
</svg>
|
|
3778
|
+
<fig-dropdown experimental="modern"
|
|
3779
|
+
type="dropdown">
|
|
3780
|
+
<option value="existing-strokes">
|
|
3781
|
+
<fig-checkbox checked
|
|
3782
|
+
label="Apply to existing strokes"></fig-checkbox>
|
|
3783
|
+
</option>
|
|
3784
|
+
<option value="shapes-with-fills">
|
|
3785
|
+
<fig-checkbox label="Apply to shapes with fills"></fig-checkbox>
|
|
3786
|
+
</option>
|
|
3787
|
+
</fig-dropdown>
|
|
3788
|
+
</fig-button>
|
|
3789
|
+
</fig-footer>
|
|
3652
3790
|
</main>
|
|
3653
3791
|
|
|
3654
3792
|
<script>
|
package/package.json
CHANGED