@yamada-ui/highlight 0.1.11 → 0.2.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/highlight.d.ts +14 -0
- package/package.json +4 -4
package/dist/highlight.d.ts
CHANGED
@@ -13,9 +13,23 @@ type Chunk = {
|
|
13
13
|
};
|
14
14
|
declare const useHighlight: ({ text, query }: Options) => Chunk[];
|
15
15
|
type HighlightProps = TextProps & {
|
16
|
+
/**
|
17
|
+
* If `true`, `Fragment` is used for rendering.
|
18
|
+
*
|
19
|
+
* @default false
|
20
|
+
*/
|
16
21
|
isFragment?: boolean;
|
22
|
+
/**
|
23
|
+
* Can be a single string or an array of strings. These are the terms that are highlighted in the text.
|
24
|
+
*/
|
17
25
|
query: string | string[];
|
26
|
+
/**
|
27
|
+
* Accepts a string or a function. If it's a function, it should return a `ReactNode` and accept an array of `Chunk` objects as its argument.
|
28
|
+
*/
|
18
29
|
children: string | ((props: Chunk[]) => ReactNode);
|
30
|
+
/**
|
31
|
+
* Properties passed to the Mark component which is used to highlight the matched terms.
|
32
|
+
*/
|
19
33
|
markProps?: MarkProps;
|
20
34
|
};
|
21
35
|
declare const Highlight: FC<HighlightProps>;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@yamada-ui/highlight",
|
3
|
-
"version": "0.1
|
3
|
+
"version": "0.2.1",
|
4
4
|
"description": "Yamada UI highlight component",
|
5
5
|
"keywords": [
|
6
6
|
"yamada",
|
@@ -35,9 +35,9 @@
|
|
35
35
|
"url": "https://github.com/hirotomoyamada/yamada-ui/issues"
|
36
36
|
},
|
37
37
|
"dependencies": {
|
38
|
-
"@yamada-ui/core": "0.
|
38
|
+
"@yamada-ui/core": "0.4.0",
|
39
39
|
"@yamada-ui/utils": "0.1.1",
|
40
|
-
"@yamada-ui/typography": "0.1
|
40
|
+
"@yamada-ui/typography": "0.2.1"
|
41
41
|
},
|
42
42
|
"devDependencies": {
|
43
43
|
"react": "^18.0.0",
|
@@ -71,6 +71,6 @@
|
|
71
71
|
"build:fast": "tsup src",
|
72
72
|
"clean": "rimraf dist .turbo",
|
73
73
|
"typecheck": "tsc --noEmit",
|
74
|
-
"gen:
|
74
|
+
"gen:docs": "tsx ../../../scripts/generate-docs"
|
75
75
|
}
|
76
76
|
}
|