@prom-ui/core 0.1.1 → 0.2.0
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/Avatar/package.json +1 -1
- package/Backdrop/package.json +1 -1
- package/Body/package.json +1 -1
- package/BodyProvider/package.json +1 -1
- package/Box/package.json +1 -1
- package/Button/package.json +1 -1
- package/ButtonPageUp/package.json +1 -1
- package/Checkbox/package.json +1 -1
- package/Flex/package.json +1 -1
- package/Grid/package.json +1 -1
- package/Icon/package.json +1 -1
- package/Image/package.json +1 -1
- package/ImageEmoji/package.json +1 -1
- package/Input/package.json +1 -1
- package/InputField/package.json +1 -1
- package/KeyPress/package.json +1 -1
- package/Line/package.json +1 -1
- package/Link/package.json +1 -1
- package/List/package.json +1 -1
- package/Media/package.json +1 -1
- package/OutsideClick/package.json +1 -1
- package/Overlay/package.json +1 -1
- package/Picture/package.json +1 -1
- package/PortableOverlay/package.json +1 -1
- package/Portal/package.json +1 -1
- package/QRCode/package.json +1 -1
- package/Rating/package.json +1 -1
- package/SafeQuery/package.json +1 -1
- package/Scroll/package.json +1 -1
- package/ScrollControls/package.json +1 -1
- package/SideOverlay/package.json +1 -1
- package/SimpleSlider/package.json +1 -1
- package/Skeleton/package.json +1 -1
- package/Spinner/package.json +1 -1
- package/Text/package.json +1 -1
- package/TextEmoji/package.json +1 -1
- package/Tooltip/cjs/index.development.js +5 -4
- package/Tooltip/cjs/index.development.v2.js +5 -4
- package/Tooltip/cjs/index.production.js +1 -1
- package/Tooltip/cjs/index.production.v2.js +1 -1
- package/Tooltip/index.d.ts +7 -0
- package/Tooltip/package.json +1 -1
- package/Tumbler/package.json +1 -1
- package/base/colors-dark.css +83 -37
- package/package.json +2 -2
package/Avatar/package.json
CHANGED
package/Backdrop/package.json
CHANGED
package/Body/package.json
CHANGED
package/Box/package.json
CHANGED
package/Button/package.json
CHANGED
package/Checkbox/package.json
CHANGED
package/Flex/package.json
CHANGED
package/Grid/package.json
CHANGED
package/Icon/package.json
CHANGED
package/Image/package.json
CHANGED
package/ImageEmoji/package.json
CHANGED
package/Input/package.json
CHANGED
package/InputField/package.json
CHANGED
package/KeyPress/package.json
CHANGED
package/Line/package.json
CHANGED
package/Link/package.json
CHANGED
package/List/package.json
CHANGED
package/Media/package.json
CHANGED
package/Overlay/package.json
CHANGED
package/Picture/package.json
CHANGED
package/Portal/package.json
CHANGED
package/QRCode/package.json
CHANGED
package/Rating/package.json
CHANGED
package/SafeQuery/package.json
CHANGED
package/Scroll/package.json
CHANGED
package/SideOverlay/package.json
CHANGED
package/Skeleton/package.json
CHANGED
package/Spinner/package.json
CHANGED
package/Text/package.json
CHANGED
package/TextEmoji/package.json
CHANGED
|
@@ -64,6 +64,7 @@ var Tooltip = function (_a) {
|
|
|
64
64
|
content = _a.content,
|
|
65
65
|
isVisible = _a.isVisible,
|
|
66
66
|
onVisibleChange = _a.onVisibleChange,
|
|
67
|
+
classes = _a.classes,
|
|
67
68
|
_b = _a.isRenderPortal,
|
|
68
69
|
isRenderPortal = _b === void 0 ? true : _b,
|
|
69
70
|
_c = _a.isCloseOnOutsideClick,
|
|
@@ -127,17 +128,17 @@ var Tooltip = function (_a) {
|
|
|
127
128
|
}, React__namespace.createElement("div", __assign({
|
|
128
129
|
ref: setTooltipRef
|
|
129
130
|
}, getTooltipProps({
|
|
130
|
-
className: classNames__default.default(css.root, css[theme]),
|
|
131
|
+
className: classNames__default.default(css.root, css[theme], classes === null || classes === void 0 ? void 0 : classes.root),
|
|
131
132
|
style: {
|
|
132
133
|
width: width,
|
|
133
134
|
zIndex: zIndex
|
|
134
135
|
}
|
|
135
136
|
})), React__namespace.createElement("div", {
|
|
136
|
-
className: classNames__default.default(css.animation)
|
|
137
|
+
className: classNames__default.default(css.animation, classes === null || classes === void 0 ? void 0 : classes.animation)
|
|
137
138
|
}, isShowArrow && React__namespace.createElement("div", __assign({}, getArrowProps({
|
|
138
|
-
className: css.arrow
|
|
139
|
+
className: classNames__default.default(css.arrow, classes === null || classes === void 0 ? void 0 : classes.arrow)
|
|
139
140
|
}))), React__namespace.createElement("div", {
|
|
140
|
-
className: css.content,
|
|
141
|
+
className: classNames__default.default(css.content, classes === null || classes === void 0 ? void 0 : classes.content),
|
|
141
142
|
style: {
|
|
142
143
|
padding: padding
|
|
143
144
|
}
|
|
@@ -64,6 +64,7 @@ var Tooltip = function (_a) {
|
|
|
64
64
|
content = _a.content,
|
|
65
65
|
isVisible = _a.isVisible,
|
|
66
66
|
onVisibleChange = _a.onVisibleChange,
|
|
67
|
+
classes = _a.classes,
|
|
67
68
|
_b = _a.isRenderPortal,
|
|
68
69
|
isRenderPortal = _b === void 0 ? true : _b,
|
|
69
70
|
_c = _a.isCloseOnOutsideClick,
|
|
@@ -127,17 +128,17 @@ var Tooltip = function (_a) {
|
|
|
127
128
|
}, React__namespace.createElement("div", __assign({
|
|
128
129
|
ref: setTooltipRef
|
|
129
130
|
}, getTooltipProps({
|
|
130
|
-
className: classNames__default.default(css.root, css[theme]),
|
|
131
|
+
className: classNames__default.default(css.root, css[theme], classes === null || classes === void 0 ? void 0 : classes.root),
|
|
131
132
|
style: {
|
|
132
133
|
width: width,
|
|
133
134
|
zIndex: zIndex
|
|
134
135
|
}
|
|
135
136
|
})), React__namespace.createElement("div", {
|
|
136
|
-
className: classNames__default.default(css.animation)
|
|
137
|
+
className: classNames__default.default(css.animation, classes === null || classes === void 0 ? void 0 : classes.animation)
|
|
137
138
|
}, isShowArrow && React__namespace.createElement("div", __assign({}, getArrowProps({
|
|
138
|
-
className: css.arrow
|
|
139
|
+
className: classNames__default.default(css.arrow, classes === null || classes === void 0 ? void 0 : classes.arrow)
|
|
139
140
|
}))), React__namespace.createElement("div", {
|
|
140
|
-
className: css.content,
|
|
141
|
+
className: classNames__default.default(css.content, classes === null || classes === void 0 ? void 0 : classes.content),
|
|
141
142
|
style: {
|
|
142
143
|
padding: padding
|
|
143
144
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("classnames"),i=require("react-popper-tooltip"),r=require("react-transition-group"),o=require("@prom-ui/core/Portal");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("classnames"),i=require("react-popper-tooltip"),r=require("react-transition-group"),o=require("@prom-ui/core/Portal");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function l(e){if(e&&"object"==typeof e&&"default"in e)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(i){if("default"!==i){var r=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,r.get?r:{enumerable:!0,get:function(){return e[i]}})}})),t.default=e,Object.freeze(t)}var a=l(e),s=n(t),d=function(){return d=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},d.apply(this,arguments)},c={content:"M5WYU",arrow:"sHrj0",animation:"DYqdH",root:"Xkx-7",white:"_6gvS7",black:"e8sBo",enter:"amIjy",enterActive:"oLDm5",enterDone:"aZSAB",exit:"FtdvP",exitActive:"Vnj23",exitDone:"er4Mu"};exports.Tooltip=function(e){var t=e.children,n=e.content,l=e.isVisible,u=e.onVisibleChange,v=e.classes,f=e.isRenderPortal,p=void 0===f||f,m=e.isCloseOnOutsideClick,g=void 0===m||m,b=e.isCloseOnTriggerHidden,y=void 0===b||b,O=e.isDefaultVisible,h=void 0!==O&&O,w=e.isFollowCursor,j=void 0!==w&&w,P=e.isInteractive,E=void 0!==P&&P,x=e.isShowArrow,C=void 0===x||x,T=e.delayHide,q=void 0===T?0:T,S=e.delayShow,A=void 0===S?0:S,D=e.trigger,H=void 0===D?"hover":D,V=e.placement,k=void 0===V?"auto":V,N=e.theme,I=void 0===N?"white":N,z=e.offset,F=void 0===z?[0,12]:z,M=e.padding,R=void 0===M?16:M,_=e.width,B=void 0===_?"auto":_,Y=e.zIndex,L=void 0===Y?900:Y,U=i.usePopperTooltip({trigger:H,placement:k,delayHide:q,delayShow:A,onVisibleChange:u,offset:F,defaultVisible:h,closeOnOutsideClick:g,closeOnTriggerHidden:y,visible:l,followCursor:j,interactive:E}),W=U.getArrowProps,X=U.getTooltipProps,Z=U.setTooltipRef,G=U.setTriggerRef,J=U.visible;return a.createElement(a.Fragment,null,a.cloneElement(t,{ref:G}),a.createElement(r.CSSTransition,{classNames:c,timeout:166,in:J,unmountOnExit:!0},a.createElement(o.Portal,{isActive:p},a.createElement("div",d({ref:Z},X({className:s.default(c.root,c[I],null==v?void 0:v.root),style:{width:B,zIndex:L}})),a.createElement("div",{className:s.default(c.animation,null==v?void 0:v.animation)},C&&a.createElement("div",d({},W({className:s.default(c.arrow,null==v?void 0:v.arrow)}))),a.createElement("div",{className:s.default(c.content,null==v?void 0:v.content),style:{padding:R}},n))))))},require("./style.production.css");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("classnames"),i=require("react-popper-tooltip"),r=require("react-transition-group"),o=require("@prom-ui/core/Portal");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("classnames"),i=require("react-popper-tooltip"),r=require("react-transition-group"),o=require("@prom-ui/core/Portal");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function l(e){if(e&&"object"==typeof e&&"default"in e)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(i){if("default"!==i){var r=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,r.get?r:{enumerable:!0,get:function(){return e[i]}})}})),t.default=e,Object.freeze(t)}var a=l(e),s=n(t),d=function(){return d=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},d.apply(this,arguments)},c={content:"OAIu0",arrow:"zAGk6",animation:"N9MJt",root:"Wl-Xm",white:"oB2Pd",black:"kSaUV",enter:"t5jYJ",enterActive:"A3Dwj",enterDone:"-J0vk",exit:"mHKey",exitActive:"UibNa",exitDone:"MIlrs"};exports.Tooltip=function(e){var t=e.children,n=e.content,l=e.isVisible,u=e.onVisibleChange,v=e.classes,f=e.isRenderPortal,p=void 0===f||f,m=e.isCloseOnOutsideClick,g=void 0===m||m,b=e.isCloseOnTriggerHidden,O=void 0===b||b,w=e.isDefaultVisible,y=void 0!==w&&w,h=e.isFollowCursor,j=void 0!==h&&h,P=e.isInteractive,E=void 0!==P&&P,C=e.isShowArrow,x=void 0===C||C,A=e.delayHide,T=void 0===A?0:A,k=e.delayShow,N=void 0===k?0:k,q=e.trigger,S=void 0===q?"hover":q,V=e.placement,D=void 0===V?"auto":V,H=e.theme,I=void 0===H?"white":H,z=e.offset,J=void 0===z?[0,12]:z,M=e.padding,R=void 0===M?16:M,F=e.width,U=void 0===F?"auto":F,_=e.zIndex,B=void 0===_?900:_,G=i.usePopperTooltip({trigger:S,placement:D,delayHide:T,delayShow:N,onVisibleChange:u,offset:J,defaultVisible:y,closeOnOutsideClick:g,closeOnTriggerHidden:O,visible:l,followCursor:j,interactive:E}),K=G.getArrowProps,W=G.getTooltipProps,X=G.setTooltipRef,Y=G.setTriggerRef,L=G.visible;return a.createElement(a.Fragment,null,a.cloneElement(t,{ref:Y}),a.createElement(r.CSSTransition,{classNames:c,timeout:166,in:L,unmountOnExit:!0},a.createElement(o.Portal,{isActive:p},a.createElement("div",d({ref:X},W({className:s.default(c.root,c[I],null==v?void 0:v.root),style:{width:U,zIndex:B}})),a.createElement("div",{className:s.default(c.animation,null==v?void 0:v.animation)},x&&a.createElement("div",d({},K({className:s.default(c.arrow,null==v?void 0:v.arrow)}))),a.createElement("div",{className:s.default(c.content,null==v?void 0:v.content),style:{padding:R}},n))))))},require("./style.production.v2.css");
|
package/Tooltip/index.d.ts
CHANGED
|
@@ -24,6 +24,13 @@ export type TooltipProps = {
|
|
|
24
24
|
width?: string | number;
|
|
25
25
|
/** CSS-свойство z-index */
|
|
26
26
|
zIndex?: string | number;
|
|
27
|
+
/** Дополнительные классы */
|
|
28
|
+
classes?: {
|
|
29
|
+
root?: string;
|
|
30
|
+
arrow?: string;
|
|
31
|
+
animation?: string;
|
|
32
|
+
content?: string;
|
|
33
|
+
};
|
|
27
34
|
/**
|
|
28
35
|
* Если `true`, при наведении на всплывающую подсказку она останется открытой.
|
|
29
36
|
* <br>
|
package/Tooltip/package.json
CHANGED
package/Tumbler/package.json
CHANGED
package/base/colors-dark.css
CHANGED
|
@@ -1,40 +1,3 @@
|
|
|
1
|
-
/*
|
|
2
|
-
https://www.hsluv.org/
|
|
3
|
-
|
|
4
|
-
--black-900: 92.7;
|
|
5
|
-
--black-800: 82.7;
|
|
6
|
-
--black-700: 72.7;
|
|
7
|
-
--black-600: 62.7;
|
|
8
|
-
--black-500: 52.7;
|
|
9
|
-
--black-400: 42.7;
|
|
10
|
-
--black-300: 32.7;
|
|
11
|
-
--black-200: 22.7;
|
|
12
|
-
--black-100: 12.7; // #202123
|
|
13
|
-
--black-50: 2.7;
|
|
14
|
-
|
|
15
|
-
--blue-900: 90;
|
|
16
|
-
--blue-800: 84;
|
|
17
|
-
--blue-700: 78;
|
|
18
|
-
--blue-600: 72;
|
|
19
|
-
--blue-500: 66; // #5ea2ff
|
|
20
|
-
--blue-400: 60;
|
|
21
|
-
--blue-300: 54;
|
|
22
|
-
--blue-200: 48;
|
|
23
|
-
--blue-100: 42;
|
|
24
|
-
--blue-50: 36;
|
|
25
|
-
|
|
26
|
-
--red-900: 86;
|
|
27
|
-
--red-800: 80;
|
|
28
|
-
--red-700: 74;
|
|
29
|
-
--red-600: 68;
|
|
30
|
-
--red-500: 62;
|
|
31
|
-
--red-400: 56;
|
|
32
|
-
--red-300: 50;
|
|
33
|
-
--red-200: 44;
|
|
34
|
-
--red-100: 38;
|
|
35
|
-
--red-50: 32; // #8e2514
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
1
|
[data-pds-color-scheme='dark'] {
|
|
39
2
|
--black-900: #e9eaeb;
|
|
40
3
|
--black-800: #ccced1;
|
|
@@ -115,3 +78,86 @@
|
|
|
115
78
|
--orange-100: #d86f18;
|
|
116
79
|
--orange-50: #cd5915;
|
|
117
80
|
}
|
|
81
|
+
|
|
82
|
+
@media (prefers-color-scheme: dark) {
|
|
83
|
+
[data-pds-color-scheme='auto'] {
|
|
84
|
+
--black-900: #e9eaeb;
|
|
85
|
+
--black-800: #ccced1;
|
|
86
|
+
--black-700: #b0b2b8;
|
|
87
|
+
--black-600: #94989f;
|
|
88
|
+
--black-500: #7b7e84;
|
|
89
|
+
--black-400: #62656a;
|
|
90
|
+
--black-300: #4b4d51;
|
|
91
|
+
--black-200: #353639;
|
|
92
|
+
--black-100: #202123;
|
|
93
|
+
--black-50: #1c1d1e;
|
|
94
|
+
|
|
95
|
+
--white: #272a2b;
|
|
96
|
+
|
|
97
|
+
--blue-900: #d6e3ff;
|
|
98
|
+
--blue-800: #bdd2ff;
|
|
99
|
+
--blue-700: #a1c2ff;
|
|
100
|
+
--blue-600: #83b1ff;
|
|
101
|
+
--blue-500: #5ea2ff;
|
|
102
|
+
--blue-400: #1e92ff;
|
|
103
|
+
--blue-300: #0083e8;
|
|
104
|
+
--blue-200: #0073ce;
|
|
105
|
+
--blue-100: #0064b5;
|
|
106
|
+
--blue-50: #00569c;
|
|
107
|
+
|
|
108
|
+
--violet-900: #e9ddfe;
|
|
109
|
+
--violet-800: #ddc8fe;
|
|
110
|
+
--violet-700: #d1b4fe;
|
|
111
|
+
--violet-600: #c69efd;
|
|
112
|
+
--violet-500: #bc88fd;
|
|
113
|
+
--violet-400: #b270fd;
|
|
114
|
+
--violet-300: #a955fc;
|
|
115
|
+
--violet-200: #a131fc;
|
|
116
|
+
--violet-100: #930fea;
|
|
117
|
+
--violet-50: #7e0ccb;
|
|
118
|
+
|
|
119
|
+
--yellow-900: #ffdf93;
|
|
120
|
+
--yellow-800: #fbcd00;
|
|
121
|
+
--yellow-700: #e7bd00;
|
|
122
|
+
--yellow-600: #d4ac00;
|
|
123
|
+
--yellow-500: #c19d00;
|
|
124
|
+
--yellow-400: #ae8d00;
|
|
125
|
+
--yellow-300: #9c7e00;
|
|
126
|
+
--yellow-200: #8a6f00;
|
|
127
|
+
--yellow-100: #786100;
|
|
128
|
+
--yellow-50: #675300;
|
|
129
|
+
|
|
130
|
+
--green-900: #91fa8a;
|
|
131
|
+
--green-800: #69ec5e;
|
|
132
|
+
--green-700: #61da56;
|
|
133
|
+
--green-600: #58c74e;
|
|
134
|
+
--green-500: #4fb546;
|
|
135
|
+
--green-400: #47a43f;
|
|
136
|
+
--green-300: #3e9237;
|
|
137
|
+
--green-200: #368130;
|
|
138
|
+
--green-100: #2e7129;
|
|
139
|
+
--green-50: #276122;
|
|
140
|
+
|
|
141
|
+
--red-900: #fbccca;
|
|
142
|
+
--red-800: #fab5b1;
|
|
143
|
+
--red-700: #f99e98;
|
|
144
|
+
--red-600: #f8847c;
|
|
145
|
+
--red-500: #f7685a;
|
|
146
|
+
--red-400: #f4462a;
|
|
147
|
+
--red-300: #da3e25;
|
|
148
|
+
--red-200: #c0351f;
|
|
149
|
+
--red-100: #a62d19;
|
|
150
|
+
--red-50: #8e2514;
|
|
151
|
+
|
|
152
|
+
--orange-900: #fcf2e1;
|
|
153
|
+
--orange-800: #f8deb5;
|
|
154
|
+
--orange-700: #f3ca85;
|
|
155
|
+
--orange-600: #efb456;
|
|
156
|
+
--orange-500: #eca537;
|
|
157
|
+
--orange-400: #e99623;
|
|
158
|
+
--orange-300: #e58b1f;
|
|
159
|
+
--orange-200: #df7d1c;
|
|
160
|
+
--orange-100: #d86f18;
|
|
161
|
+
--orange-50: #cd5915;
|
|
162
|
+
}
|
|
163
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prom-ui/core",
|
|
3
3
|
"author": "e.marchenko",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.0",
|
|
5
5
|
"description": "core ui blocks",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "jest --verbose ./src",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"optional": true
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "2515656fea6a3229a6554b5469978b45cc79dbdb"
|
|
73
73
|
}
|