@r2digisolutions/components 0.19.19 → 0.19.20
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.
|
@@ -1133,31 +1133,42 @@
|
|
|
1133
1133
|
</IconButton>
|
|
1134
1134
|
</div>
|
|
1135
1135
|
|
|
1136
|
-
<div class="flex items-center
|
|
1136
|
+
<div class="flex items-center rounded-lg border border-border bg-surface p-0.5">
|
|
1137
1137
|
<Tooltip content="Toggle grid">
|
|
1138
1138
|
<IconButton
|
|
1139
1139
|
label="Toggle grid"
|
|
1140
1140
|
size="sm"
|
|
1141
|
-
|
|
1141
|
+
aria-pressed={showGrid}
|
|
1142
|
+
onclick={(e) => {
|
|
1143
|
+
showGrid = !showGrid;
|
|
1144
|
+
(e.currentTarget as HTMLButtonElement).blur();
|
|
1145
|
+
}}
|
|
1142
1146
|
class={showGrid ? 'bg-brand-500/10 text-brand-600' : undefined}
|
|
1143
1147
|
>
|
|
1144
1148
|
<Grid3x3 class="h-3.5 w-3.5" />
|
|
1145
1149
|
</IconButton>
|
|
1146
1150
|
</Tooltip>
|
|
1147
1151
|
{#if showGrid}
|
|
1148
|
-
<
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
options={gridSizeOptions}
|
|
1152
|
+
<select
|
|
1153
|
+
class="h-8 min-w-0 shrink-0 rounded-md border-0 bg-transparent px-1 font-mono text-[11px] tabular-nums text-secondary outline-none hover:bg-surface-overlay focus-visible:bg-surface-overlay"
|
|
1154
|
+
aria-label="Grid cell size"
|
|
1152
1155
|
value={String(cellSize)}
|
|
1153
|
-
onchange={(
|
|
1154
|
-
|
|
1156
|
+
onchange={(e) => (cellSize = Number(e.currentTarget.value))}
|
|
1157
|
+
>
|
|
1158
|
+
{#each gridSizeOptions as opt (opt.value)}
|
|
1159
|
+
<option value={opt.value}>{opt.label}</option>
|
|
1160
|
+
{/each}
|
|
1161
|
+
</select>
|
|
1155
1162
|
{/if}
|
|
1156
1163
|
<Tooltip content="Snap to grid & guides">
|
|
1157
1164
|
<IconButton
|
|
1158
1165
|
label="Toggle snap"
|
|
1159
1166
|
size="sm"
|
|
1160
|
-
|
|
1167
|
+
aria-pressed={snap}
|
|
1168
|
+
onclick={(e) => {
|
|
1169
|
+
snap = !snap;
|
|
1170
|
+
(e.currentTarget as HTMLButtonElement).blur();
|
|
1171
|
+
}}
|
|
1161
1172
|
class={snap ? 'bg-brand-500/10 text-brand-600' : undefined}
|
|
1162
1173
|
>
|
|
1163
1174
|
<Magnet class="h-3.5 w-3.5" />
|