@sillsdev/config-r 1.0.0-alpha.37 → 1.0.0-alpha.38
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/README.md +13 -13
- package/dist/ConfigrAppBar.d.ts +1 -0
- package/dist/ConfigrPane.d.ts +2 -0
- package/dist/ConfigrTheme.d.ts +8 -0
- package/dist/configr.cjs.js +28 -28
- package/dist/configr.cjs.js.map +1 -1
- package/dist/configr.es.js +155 -119
- package/dist/configr.es.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -75,19 +75,19 @@ To provide languages other than English for the small set of built-in strings, p
|
|
|
75
75
|
|
|
76
76
|
`showAppBar={true}` together with `showSearch={true}` puts a search box in the pane's app bar. While it holds text, the pane shows every setting, on any enabled page or sub-page, whose label, description, `searchTerms`, or select option (its label, or its value when it has no label, and its description) contains that text, ignoring case, and highlights the matches. A page or group whose own label, description or `searchTerms` match shows all of its settings. The search ignores pages that are disabled or in a disabled area. When nothing matches, the pane says so (`noSearchMatchesLabel`). Clearing the search returns to the first enabled page, and clicking a page ends the search and opens that page.
|
|
77
77
|
|
|
78
|
-
To show the search box somewhere of your own, such as your dialog's title bar, pass that element as `searchBoxContainer`. The pane then needs no app bar.
|
|
79
|
-
|
|
80
|
-
The search box takes its border color, corner radius and text color from the MUI theme. To style
|
|
81
|
-
|
|
82
|
-
| Class name | Element
|
|
83
|
-
| --------------------------- |
|
|
84
|
-
| `configr-search-box` | the search box, around the next three
|
|
85
|
-
| `configr-search-icon` | the wrapper around the magnifying glass
|
|
86
|
-
| `configr-search-input` | the `<input>` itself (its width, font and padding)
|
|
87
|
-
| `configr-search-clear` | the wrapper around the clear button, present only while the box holds text
|
|
88
|
-
| `configr-search-match` | each `<mark>` around matching text in the pane (the browser draws it yellow unless you style it) |
|
|
89
|
-
| `configr-subpage-back` | the button at the top of a sub-page that goes back, holding the arrow and the sub-page's label
|
|
90
|
-
| `configr-subpage-back-icon` | the arrow in that button
|
|
78
|
+
To show the search box somewhere of your own, such as your dialog's title bar, pass that element as `searchBoxContainer`. The pane then needs no app bar. `searchBoxSize="small"` makes the box small enough for a title bar.
|
|
79
|
+
|
|
80
|
+
The search box takes its border color, corner radius and text color from the MUI theme. Set `palette.searchMatch` in `themeOverrides` to color the highlight behind each match, e.g. `{ palette: { searchMatch: '#feeb5a' } }`. The arrow on a sub-page's back button is the theme's primary color. To style the search box and other parts of the pane further, target these class names, which config-r keeps stable:
|
|
81
|
+
|
|
82
|
+
| Class name | Element |
|
|
83
|
+
| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
|
|
84
|
+
| `configr-search-box` | the search box, around the next three |
|
|
85
|
+
| `configr-search-icon` | the wrapper around the magnifying glass |
|
|
86
|
+
| `configr-search-input` | the `<input>` itself (its width, font and padding) |
|
|
87
|
+
| `configr-search-clear` | the wrapper around the clear button, present only while the box holds text |
|
|
88
|
+
| `configr-search-match` | each `<mark>` around matching text in the pane (the browser draws it yellow unless you set `palette.searchMatch` or style it) |
|
|
89
|
+
| `configr-subpage-back` | the button at the top of a sub-page that goes back, holding the arrow and the sub-page's label |
|
|
90
|
+
| `configr-subpage-back-icon` | the arrow in that button |
|
|
91
91
|
|
|
92
92
|
Config-R's own rules use two class selectors, so a host rule needs at least three to win, e.g. `.my-title .configr-search-box .configr-search-input`.
|
|
93
93
|
|
package/dist/ConfigrAppBar.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
export declare const ConfigrSearchBox: React.FunctionComponent<{
|
|
3
3
|
searchValue: string | null;
|
|
4
4
|
setSearchString: (s: string) => void;
|
|
5
|
+
size?: 'small' | 'medium';
|
|
5
6
|
}>;
|
|
6
7
|
export declare const ConfigrAppBar: React.FunctionComponent<React.PropsWithChildren<{
|
|
7
8
|
label: string;
|
package/dist/ConfigrPane.d.ts
CHANGED
|
@@ -23,6 +23,8 @@ export declare const ConfigrPane: React.ForwardRefExoticComponent<{
|
|
|
23
23
|
* in. The pane then needs neither showAppBar nor showSearch to offer search.
|
|
24
24
|
*/
|
|
25
25
|
searchBoxContainer?: HTMLElement | null;
|
|
26
|
+
/** 'small' makes the search box small enough for a title bar. */
|
|
27
|
+
searchBoxSize?: "small" | "medium";
|
|
26
28
|
themeOverrides?: ThemeOptions;
|
|
27
29
|
showJson?: boolean;
|
|
28
30
|
showRequiredMessage?: boolean;
|
package/dist/ConfigrTheme.d.ts
CHANGED