@inshapardaz/likhari-react 0.1.18-dev.171 → 0.1.18-dev.175
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FindReplaceBar.d.ts","sourceRoot":"","sources":["../../src/components/FindReplaceBar.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAG/C;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,KAAK,GAAG,KAAK,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,+
|
|
1
|
+
{"version":3,"file":"FindReplaceBar.d.ts","sourceRoot":"","sources":["../../src/components/FindReplaceBar.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAG/C;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,KAAK,GAAG,KAAK,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,+BA0HtH"}
|
|
@@ -64,8 +64,8 @@ export function FindReplaceBar({ strings, dir, onClose }) {
|
|
|
64
64
|
step(e.shiftKey ? -1 : 1);
|
|
65
65
|
if (e.key === 'Escape')
|
|
66
66
|
onClose();
|
|
67
|
-
}, autoFocus: true }), _jsx("span", { className: "likhari-find-status", "aria-live": "polite", children: status }), _jsx("button", { type: "button", className: "likhari-find-icon", onClick: () => step(-1), disabled: count === 0, "aria-label": t.previous, title: t.previous, children: _jsx(IconChevronDown, { size: 14, stroke: 1.75, style: { transform: 'rotate(180deg)' } }) }), _jsx("button", { type: "button", className: "likhari-find-icon", onClick: () => step(1), disabled: count === 0, "aria-label": t.next, title: t.next, children: _jsx(IconChevronDown, { size: 14, stroke: 1.75 }) }), _jsx("button", { type: "button", className: "likhari-find-icon", onClick: onClose, "aria-label": t.close, title: t.close, children: _jsx(IconX, { size: 14, stroke: 1.75 }) })] }), showReplace && (_jsxs("div", { className: "likhari-find-row", children: [_jsx("span", { className: "likhari-find-icon-spacer", "aria-hidden": "true" }), _jsx("input", { "aria-label": t.replace, placeholder: t.replacePlaceholder, value: replacement, onChange: (e) => setReplacement(e.target.value), onKeyDown: (e) => {
|
|
67
|
+
}, autoFocus: true }), _jsx("span", { className: "likhari-find-status", "aria-live": "polite", children: status }), _jsx("button", { type: "button", className: "likhari-find-icon", onClick: () => step(-1), disabled: count === 0, "aria-label": t.previous, title: t.previous, children: _jsx(IconChevronDown, { size: 14, stroke: 1.75, style: { transform: 'rotate(180deg)' } }) }), _jsx("button", { type: "button", className: "likhari-find-icon", onClick: () => step(1), disabled: count === 0, "aria-label": t.next, title: t.next, children: _jsx(IconChevronDown, { size: 14, stroke: 1.75 }) }), _jsx("button", { type: "button", className: "likhari-find-icon", onClick: onClose, "aria-label": t.close, title: t.close, children: _jsx(IconX, { size: 14, stroke: 1.75 }) })] }), showReplace && (_jsxs("div", { className: "likhari-find-row", children: [_jsx("span", { className: "likhari-find-icon-spacer", "aria-hidden": "true" }), _jsx("input", { className: "likhari-find-replace-input", "aria-label": t.replace, placeholder: t.replacePlaceholder, value: replacement, onChange: (e) => setReplacement(e.target.value), onKeyDown: (e) => {
|
|
68
68
|
if (e.key === 'Enter' && count > 0)
|
|
69
69
|
replaceCurrent();
|
|
70
|
-
} }), _jsx("button", { type: "button", className: "likhari-find-icon", onClick: replaceCurrent, disabled: count === 0, "aria-label": t.replaceOne, title: t.replaceOne, children: _jsx(IconReplace, { size: 14, stroke: 1.75 }) }), _jsx("button", { type: "button", className: "likhari-find-icon", onClick: replaceEverything, disabled: count === 0, "aria-label": t.replaceAll, title: t.replaceAll, children: _jsx(IconRepeat, { size: 14, stroke: 1.75 }) })] }))] }));
|
|
70
|
+
} }), _jsx("button", { type: "button", className: "likhari-find-icon likhari-find-replace-one", onClick: replaceCurrent, disabled: count === 0, "aria-label": t.replaceOne, title: t.replaceOne, children: _jsx(IconReplace, { size: 14, stroke: 1.75 }) }), _jsx("button", { type: "button", className: "likhari-find-icon likhari-find-replace-all", onClick: replaceEverything, disabled: count === 0, "aria-label": t.replaceAll, title: t.replaceAll, children: _jsx(IconRepeat, { size: 14, stroke: 1.75 }) })] }))] }));
|
|
71
71
|
}
|
package/dist/theme/editor.css
CHANGED
|
@@ -783,11 +783,28 @@
|
|
|
783
783
|
font-size: 13px;
|
|
784
784
|
}
|
|
785
785
|
|
|
786
|
+
/* Both rows share one grid. The replace input sits under the search input and
|
|
787
|
+
its two buttons follow it directly. Columns are chevron, input, status, prev,
|
|
788
|
+
next, close. */
|
|
786
789
|
.likhari-find-row {
|
|
787
|
-
display:
|
|
790
|
+
display: grid;
|
|
791
|
+
grid-template-columns: 24px 180px 56px 24px 24px 24px;
|
|
788
792
|
align-items: center;
|
|
789
|
-
|
|
790
|
-
|
|
793
|
+
column-gap: 4px;
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
.likhari-find-replace-input {
|
|
797
|
+
grid-column: 2;
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
.likhari-find-replace-one {
|
|
801
|
+
grid-column: 3;
|
|
802
|
+
justify-self: start;
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
.likhari-find-replace-all {
|
|
806
|
+
grid-column: 4;
|
|
807
|
+
justify-self: start;
|
|
791
808
|
}
|
|
792
809
|
|
|
793
810
|
.likhari-find-widget[dir='rtl'] {
|
|
@@ -796,7 +813,8 @@
|
|
|
796
813
|
}
|
|
797
814
|
|
|
798
815
|
.likhari-find-widget input {
|
|
799
|
-
width:
|
|
816
|
+
width: 100%;
|
|
817
|
+
min-width: 0;
|
|
800
818
|
padding: 3px 6px;
|
|
801
819
|
border: 1px solid var(--editor-line);
|
|
802
820
|
border-radius: 4px;
|
|
@@ -830,9 +848,7 @@
|
|
|
830
848
|
}
|
|
831
849
|
|
|
832
850
|
.likhari-find-icon-spacer {
|
|
833
|
-
display:
|
|
834
|
-
width: 24px;
|
|
835
|
-
flex: 0 0 24px;
|
|
851
|
+
display: block;
|
|
836
852
|
}
|
|
837
853
|
|
|
838
854
|
.likhari-find-status {
|