@htmlbricks/hb-tooltip 0.62.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/manifest.json ADDED
@@ -0,0 +1,239 @@
1
+ {
2
+ "definitions": {
3
+ "events": {
4
+ "$ref": "#/definitions/Events",
5
+ "$schema": "http://json-schema.org/draft-07/schema#",
6
+ "definitions": {
7
+ "Events": {
8
+ "additionalProperties": false,
9
+ "type": "object"
10
+ }
11
+ }
12
+ },
13
+ "component": {
14
+ "$ref": "#/definitions/Component",
15
+ "$schema": "http://json-schema.org/draft-07/schema#",
16
+ "definitions": {
17
+ "Component": {
18
+ "additionalProperties": false,
19
+ "properties": {
20
+ "id": {
21
+ "type": "string"
22
+ },
23
+ "style": {
24
+ "type": "string"
25
+ },
26
+ "tooltip": {
27
+ "anyOf": [
28
+ {
29
+ "$ref": "#/definitions/Tooltip"
30
+ },
31
+ {
32
+ "type": "string"
33
+ }
34
+ ]
35
+ }
36
+ },
37
+ "type": "object"
38
+ },
39
+ "Tooltip": {
40
+ "additionalProperties": false,
41
+ "properties": {
42
+ "animation": {
43
+ "type": "boolean"
44
+ },
45
+ "customClass": {
46
+ "type": "string"
47
+ },
48
+ "delay": {
49
+ "anyOf": [
50
+ {
51
+ "type": "number"
52
+ },
53
+ {
54
+ "additionalProperties": false,
55
+ "properties": {
56
+ "hide": {
57
+ "type": "number"
58
+ },
59
+ "show": {
60
+ "type": "number"
61
+ }
62
+ },
63
+ "required": [
64
+ "show",
65
+ "hide"
66
+ ],
67
+ "type": "object"
68
+ }
69
+ ]
70
+ },
71
+ "html": {
72
+ "type": "boolean"
73
+ },
74
+ "offset": {
75
+ "anyOf": [
76
+ {
77
+ "items": {
78
+ "type": "number"
79
+ },
80
+ "maxItems": 2,
81
+ "minItems": 2,
82
+ "type": "array"
83
+ },
84
+ {
85
+ "type": "string"
86
+ }
87
+ ]
88
+ },
89
+ "placement": {
90
+ "enum": [
91
+ "auto",
92
+ "top",
93
+ "bottom",
94
+ "left",
95
+ "right"
96
+ ],
97
+ "type": "string"
98
+ },
99
+ "style": {
100
+ "$ref": "#/definitions/TooltipStyle"
101
+ },
102
+ "title": {
103
+ "type": "string"
104
+ },
105
+ "trigger": {
106
+ "enum": [
107
+ "click",
108
+ "hover",
109
+ "focus",
110
+ "manual",
111
+ "click hover",
112
+ "click focus",
113
+ "hover focus",
114
+ "click hover focus"
115
+ ],
116
+ "type": "string"
117
+ }
118
+ },
119
+ "required": [
120
+ "title"
121
+ ],
122
+ "type": "object"
123
+ },
124
+ "TooltipStyle": {
125
+ "additionalProperties": false,
126
+ "properties": {
127
+ "backgroundColor": {
128
+ "type": "string"
129
+ },
130
+ "borderRadius": {
131
+ "type": "string"
132
+ },
133
+ "color": {
134
+ "type": "string"
135
+ },
136
+ "disableDefaultStyle": {
137
+ "type": "boolean"
138
+ },
139
+ "fontSize": {
140
+ "type": "string"
141
+ },
142
+ "opacity": {
143
+ "type": "number"
144
+ },
145
+ "padding": {
146
+ "type": "string"
147
+ },
148
+ "transitionDuration": {
149
+ "type": "string"
150
+ }
151
+ },
152
+ "type": "object"
153
+ }
154
+ }
155
+ }
156
+ },
157
+ "description": "A wrapper component that adds a Bootstrap tooltip to its content",
158
+ "storybookArgs": {
159
+ "tooltip": {
160
+ "control": {
161
+ "type": "object"
162
+ }
163
+ }
164
+ },
165
+ "styleSetup": {
166
+ "vars": [],
167
+ "parts": []
168
+ },
169
+ "contributors": [],
170
+ "htmlSlots": [
171
+ {
172
+ "name": "default",
173
+ "description": "Element to wrap with tooltip"
174
+ }
175
+ ],
176
+ "i18n": [],
177
+ "examples": [
178
+ {
179
+ "name": "Default",
180
+ "data": {
181
+ "tooltip": {
182
+ "title": "Default tooltip"
183
+ }
184
+ }
185
+ },
186
+ {
187
+ "name": "BottomPlacement",
188
+ "data": {
189
+ "tooltip": {
190
+ "title": "Tooltip on bottom",
191
+ "placement": "bottom"
192
+ }
193
+ }
194
+ },
195
+ {
196
+ "name": "HtmlContent",
197
+ "data": {
198
+ "tooltip": {
199
+ "title": "<b>Bold</b> tooltip",
200
+ "html": true
201
+ }
202
+ }
203
+ },
204
+ {
205
+ "name": "Styled",
206
+ "data": {
207
+ "tooltip": {
208
+ "title": "Styled tooltip",
209
+ "style": {
210
+ "backgroundColor": "#6f42c1",
211
+ "color": "#ffffff",
212
+ "fontSize": "1rem",
213
+ "padding": "0.5rem 1rem",
214
+ "borderRadius": "0.5rem"
215
+ }
216
+ }
217
+ }
218
+ }
219
+ ],
220
+ "screenshots": [],
221
+ "licenses": [
222
+ {
223
+ "type": "Apache-2.0",
224
+ "path": "LICENSE.md",
225
+ "cost": 0,
226
+ "currency": "EUR"
227
+ }
228
+ ],
229
+ "readmePath": "README.md",
230
+ "name": "hb-tooltip",
231
+ "category": "dev",
232
+ "tags": [
233
+ "dev"
234
+ ],
235
+ "size": {},
236
+ "iifePath": "main.iife.js",
237
+ "repoName": "@htmlbricks/hb-tooltip",
238
+ "version": "0.62.1"
239
+ }
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@htmlbricks/hb-tooltip",
3
+ "version": "0.62.1",
4
+ "contributors": [],
5
+ "description": "A wrapper component that adds a Bootstrap tooltip to its content",
6
+ "licenses": [
7
+ {
8
+ "type": "Apache-2.0",
9
+ "path": "LICENSE.md",
10
+ "cost": 0,
11
+ "currency": "EUR"
12
+ }
13
+ ],
14
+ "main": "main.iife.js",
15
+ "dependencies": {},
16
+ "publishConfig": {
17
+ "access": "public"
18
+ },
19
+ "private": false
20
+ }
@@ -0,0 +1,144 @@
1
+ {
2
+ "$ref": "#/definitions/Component",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "definitions": {
5
+ "Component": {
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "id": {
9
+ "type": "string"
10
+ },
11
+ "style": {
12
+ "type": "string"
13
+ },
14
+ "tooltip": {
15
+ "anyOf": [
16
+ {
17
+ "$ref": "#/definitions/Tooltip"
18
+ },
19
+ {
20
+ "type": "string"
21
+ }
22
+ ]
23
+ }
24
+ },
25
+ "type": "object"
26
+ },
27
+ "Tooltip": {
28
+ "additionalProperties": false,
29
+ "properties": {
30
+ "animation": {
31
+ "type": "boolean"
32
+ },
33
+ "customClass": {
34
+ "type": "string"
35
+ },
36
+ "delay": {
37
+ "anyOf": [
38
+ {
39
+ "type": "number"
40
+ },
41
+ {
42
+ "additionalProperties": false,
43
+ "properties": {
44
+ "hide": {
45
+ "type": "number"
46
+ },
47
+ "show": {
48
+ "type": "number"
49
+ }
50
+ },
51
+ "required": [
52
+ "show",
53
+ "hide"
54
+ ],
55
+ "type": "object"
56
+ }
57
+ ]
58
+ },
59
+ "html": {
60
+ "type": "boolean"
61
+ },
62
+ "offset": {
63
+ "anyOf": [
64
+ {
65
+ "items": {
66
+ "type": "number"
67
+ },
68
+ "maxItems": 2,
69
+ "minItems": 2,
70
+ "type": "array"
71
+ },
72
+ {
73
+ "type": "string"
74
+ }
75
+ ]
76
+ },
77
+ "placement": {
78
+ "enum": [
79
+ "auto",
80
+ "top",
81
+ "bottom",
82
+ "left",
83
+ "right"
84
+ ],
85
+ "type": "string"
86
+ },
87
+ "style": {
88
+ "$ref": "#/definitions/TooltipStyle"
89
+ },
90
+ "title": {
91
+ "type": "string"
92
+ },
93
+ "trigger": {
94
+ "enum": [
95
+ "click",
96
+ "hover",
97
+ "focus",
98
+ "manual",
99
+ "click hover",
100
+ "click focus",
101
+ "hover focus",
102
+ "click hover focus"
103
+ ],
104
+ "type": "string"
105
+ }
106
+ },
107
+ "required": [
108
+ "title"
109
+ ],
110
+ "type": "object"
111
+ },
112
+ "TooltipStyle": {
113
+ "additionalProperties": false,
114
+ "properties": {
115
+ "backgroundColor": {
116
+ "type": "string"
117
+ },
118
+ "borderRadius": {
119
+ "type": "string"
120
+ },
121
+ "color": {
122
+ "type": "string"
123
+ },
124
+ "disableDefaultStyle": {
125
+ "type": "boolean"
126
+ },
127
+ "fontSize": {
128
+ "type": "string"
129
+ },
130
+ "opacity": {
131
+ "type": "number"
132
+ },
133
+ "padding": {
134
+ "type": "string"
135
+ },
136
+ "transitionDuration": {
137
+ "type": "string"
138
+ }
139
+ },
140
+ "type": "object"
141
+ }
142
+ }
143
+ }
144
+
@@ -0,0 +1,38 @@
1
+ export interface TooltipStyle {
2
+ backgroundColor?: string;
3
+ color?: string;
4
+ fontSize?: string;
5
+ padding?: string;
6
+ borderRadius?: string;
7
+ opacity?: number;
8
+ transitionDuration?: string;
9
+ disableDefaultStyle?: boolean;
10
+ }
11
+
12
+ export interface Tooltip {
13
+ title: string;
14
+ placement?: "auto" | "top" | "bottom" | "left" | "right";
15
+ animation?: boolean;
16
+ delay?: number | { show: number; hide: number };
17
+ html?: boolean;
18
+ trigger?:
19
+ | "click"
20
+ | "hover"
21
+ | "focus"
22
+ | "manual"
23
+ | "click hover"
24
+ | "click focus"
25
+ | "hover focus"
26
+ | "click hover focus";
27
+ customClass?: string;
28
+ offset?: [number, number] | string;
29
+ style?: TooltipStyle;
30
+ }
31
+
32
+ export type Component = {
33
+ id?: string;
34
+ style?: string;
35
+ tooltip?: Tooltip | string;
36
+ };
37
+
38
+ export type Events = {};
@@ -0,0 +1,11 @@
1
+ {
2
+ "$ref": "#/definitions/Events",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "definitions": {
5
+ "Events": {
6
+ "additionalProperties": false,
7
+ "type": "object"
8
+ }
9
+ }
10
+ }
11
+