@qoretechnologies/reqore 0.37.2 → 0.37.4
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/components/Button/index.d.ts +1 -0
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index.js +3 -3
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/InternalPopover/index.d.ts.map +1 -1
- package/dist/components/InternalPopover/index.js +8 -7
- package/dist/components/InternalPopover/index.js.map +1 -1
- package/dist/components/KeyValueTable/index.d.ts +4 -1
- package/dist/components/KeyValueTable/index.d.ts.map +1 -1
- package/dist/components/KeyValueTable/index.js +3 -7
- package/dist/components/KeyValueTable/index.js.map +1 -1
- package/dist/components/Notifications/notification.d.ts.map +1 -1
- package/dist/components/Notifications/notification.js +3 -1
- package/dist/components/Notifications/notification.js.map +1 -1
- package/dist/components/Panel/index.d.ts +1 -0
- package/dist/components/Panel/index.d.ts.map +1 -1
- package/dist/components/Panel/index.js +2 -2
- package/dist/components/Panel/index.js.map +1 -1
- package/dist/components/Tag/index.d.ts +2 -2
- package/dist/components/Tag/index.d.ts.map +1 -1
- package/dist/components/Tag/index.js +6 -6
- package/dist/components/Tag/index.js.map +1 -1
- package/dist/hooks/usePopover.d.ts +2 -0
- package/dist/hooks/usePopover.d.ts.map +1 -1
- package/dist/hooks/usePopover.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Button/index.tsx +5 -3
- package/src/components/InternalPopover/index.tsx +10 -6
- package/src/components/KeyValueTable/index.tsx +7 -6
- package/src/components/Notifications/notification.tsx +3 -1
- package/src/components/Panel/index.tsx +11 -3
- package/src/components/Tag/index.tsx +10 -6
- package/src/hooks/usePopover.tsx +2 -0
- package/src/stories/KeyValueTable/KeyValueTable.stories.tsx +29 -0
- package/src/stories/Panel/Panel.stories.tsx +8 -28
- package/src/stories/Tag/Tag.stories.tsx +6 -0
- package/src/stories/utils.ts +1 -0
- package/tests.json +1 -1
|
@@ -100,10 +100,10 @@ exports.StyledTag = (0, styled_components_1["default"])(Effect_1.StyledEffect)(t
|
|
|
100
100
|
}, function (_a) {
|
|
101
101
|
var theme = _a.theme, color = _a.color, labelKey = _a.labelKey, minimal = _a.minimal;
|
|
102
102
|
return (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n\n ", " {\n background-color: ", ";\n }\n "], ["\n background-color: ", ";\n color: ", ";\n\n ", " {\n background-color: ", ";\n }\n "])), color || (0, colors_1.changeLightness)(theme.main, 0.1), minimal
|
|
103
|
-
? (0, colors_1.getReadableColor)(theme, undefined, undefined, true
|
|
103
|
+
? (0, colors_1.getReadableColor)(theme, undefined, undefined, true)
|
|
104
104
|
: color
|
|
105
105
|
? (0, colors_1.getReadableColorFrom)(color)
|
|
106
|
-
: (0, colors_1.
|
|
106
|
+
: (0, colors_1.getReadableColorFrom)((0, colors_1.changeLightness)(theme.main, 0.1)), StyledTagKeyWrapper, labelKey ? (0, polished_1.rgba)('#000000', 0.2) : undefined);
|
|
107
107
|
}, function (_a) {
|
|
108
108
|
var theme = _a.theme, color = _a.color, interactive = _a.interactive, minimal = _a.minimal, effect = _a.effect;
|
|
109
109
|
return interactive
|
|
@@ -152,9 +152,9 @@ var StyledButtonWrapper = styled_components_1["default"].span(templateObject_16
|
|
|
152
152
|
});
|
|
153
153
|
var ReqoreTag = (0, react_1.forwardRef)(function (_a, ref) {
|
|
154
154
|
var _b;
|
|
155
|
-
var tooltip = _a.tooltip, label = _a.label, labelKey = _a.labelKey, icon = _a.icon, rightIcon = _a.rightIcon, className = _a.className, onClick = _a.onClick, _c = _a.size, size = _c === void 0 ? 'normal' : _c, onRemoveClick = _a.onRemoveClick, actions = _a.actions, asBadge = _a.asBadge, intent = _a.intent, color = _a.color, minimal = _a.minimal, _d = _a.wrap, wrap = _d === void 0 ? false : _d, width = _a.width, leftIconColor = _a.leftIconColor, rightIconColor = _a.rightIconColor, iconColor = _a.iconColor, labelEffect = _a.labelEffect, labelKeyEffect = _a.labelKeyEffect, rest = __rest(_a, ["tooltip", "label", "labelKey", "icon", "rightIcon", "className", "onClick", "size", "onRemoveClick", "actions", "asBadge", "intent", "color", "minimal", "wrap", "width", "leftIconColor", "rightIconColor", "iconColor", "labelEffect", "labelKeyEffect"]);
|
|
155
|
+
var tooltip = _a.tooltip, label = _a.label, labelKey = _a.labelKey, icon = _a.icon, rightIcon = _a.rightIcon, className = _a.className, onClick = _a.onClick, _c = _a.size, size = _c === void 0 ? 'normal' : _c, onRemoveClick = _a.onRemoveClick, actions = _a.actions, asBadge = _a.asBadge, intent = _a.intent, color = _a.color, minimal = _a.minimal, customTheme = _a.customTheme, _d = _a.wrap, wrap = _d === void 0 ? false : _d, width = _a.width, leftIconColor = _a.leftIconColor, rightIconColor = _a.rightIconColor, iconColor = _a.iconColor, labelEffect = _a.labelEffect, labelKeyEffect = _a.labelKeyEffect, rest = __rest(_a, ["tooltip", "label", "labelKey", "icon", "rightIcon", "className", "onClick", "size", "onRemoveClick", "actions", "asBadge", "intent", "color", "minimal", "customTheme", "wrap", "width", "leftIconColor", "rightIconColor", "iconColor", "labelEffect", "labelKeyEffect"]);
|
|
156
156
|
var targetRef = (0, useCombinedRefs_1.useCombinedRefs)(ref).targetRef;
|
|
157
|
-
var theme = (0, __1.useReqoreTheme)();
|
|
157
|
+
var theme = (0, __1.useReqoreTheme)('main', customTheme);
|
|
158
158
|
var _e = (0, react_1.useState)(undefined), itemRef = _e[0], setItemRef = _e[1];
|
|
159
159
|
(0, useTooltip_1.useTooltip)(itemRef, tooltip);
|
|
160
160
|
// If color or intent was specified, set the color
|
|
@@ -165,10 +165,10 @@ var ReqoreTag = (0, react_1.forwardRef)(function (_a, ref) {
|
|
|
165
165
|
customColor = minimal ? "".concat(customColor || '#000000', "40") : customColor;
|
|
166
166
|
return customColor;
|
|
167
167
|
};
|
|
168
|
-
return ((0, jsx_runtime_1.jsxs)(exports.StyledTag, __assign({}, rest, { effect: __assign(__assign({}, rest.effect), { gradient: intent ? undefined : (_b = rest.effect) === null || _b === void 0 ? void 0 : _b.gradient, interactive: !!onClick && !rest.disabled }), width: width, labelKey: labelKey, color: getCustomColor(intent), className: "".concat(className || '', " reqore-tag"), size: size, ref: function (ref) {
|
|
168
|
+
return ((0, jsx_runtime_1.jsxs)(exports.StyledTag, __assign({}, rest, { theme: theme, effect: __assign(__assign({}, rest.effect), { gradient: intent ? undefined : (_b = rest.effect) === null || _b === void 0 ? void 0 : _b.gradient, interactive: !!onClick && !rest.disabled }), width: width, labelKey: labelKey, color: getCustomColor(intent), className: "".concat(className || '', " reqore-tag"), size: size, ref: function (ref) {
|
|
169
169
|
targetRef.current = ref;
|
|
170
170
|
setItemRef(ref);
|
|
171
|
-
}, asBadge: asBadge, minimal: minimal, removable: !!onRemoveClick, interactive: !!onClick && !rest.disabled, wrap: wrap, hasWidth: !!width }, { children: [icon || labelKey ? ((0, jsx_runtime_1.jsxs)(StyledTagKeyWrapper, __assign({ size: size, className: 'reqore-tag-key-content', onClick: rest.disabled ? undefined : onClick, wrap: wrap, hasWidth: !!width, hasKey: !!labelKey, fixed: rest.fixed }, { children: [icon && ((0, jsx_runtime_1.jsx)(Icon_1["default"], { icon: icon, size: size, margin: label ? 'left' : 'both', color: leftIconColor || iconColor })), labelKey && ((0, jsx_runtime_1.jsx)(StyledTagContentKey, __assign({ wrap: wrap, hasWidth: !!width, size: size, effect: __assign({ weight: 'thick' }, labelKeyEffect) }, { children: labelKey })))] }))) : null, label || label === 0 || rightIcon ? ((0, jsx_runtime_1.jsxs)(StyledTagContentWrapper, __assign({ size: size, className: 'reqore-tag-content', onClick: rest.disabled ? undefined : onClick, wrap: wrap, hasWidth: !!width, hasKey: !!labelKey, fixed: rest.fixed }, { children: [label || label === 0 ? ((0, jsx_runtime_1.jsx)(StyledTagContent, __assign({ size: size, wrap: wrap, hasWidth: !!width, effect: __assign({}, labelEffect) }, { children: label }))) : null, rightIcon && ((0, jsx_runtime_1.jsx)(Icon_1["default"], { icon: rightIcon, size: size, margin: label || icon ? 'right' : 'both', color: rightIconColor || iconColor }))] }))) : null, (0, size_1["default"])(actions)
|
|
171
|
+
}, asBadge: asBadge, minimal: minimal, removable: !!onRemoveClick, interactive: !!onClick && !rest.disabled, wrap: wrap, hasWidth: !!width }, { children: [icon || labelKey ? ((0, jsx_runtime_1.jsxs)(StyledTagKeyWrapper, __assign({ size: size, className: 'reqore-tag-key-content', onClick: rest.disabled ? undefined : onClick, wrap: wrap, hasWidth: !!width, hasKey: !!labelKey, fixed: rest.fixed }, { children: [icon && ((0, jsx_runtime_1.jsx)(Icon_1["default"], { icon: icon, size: size, margin: label || labelKey ? 'left' : 'both', color: leftIconColor || iconColor })), labelKey && ((0, jsx_runtime_1.jsx)(StyledTagContentKey, __assign({ wrap: wrap, hasWidth: !!width, size: size, effect: __assign({ weight: 'thick' }, labelKeyEffect) }, { children: labelKey })))] }))) : null, label || label === 0 || rightIcon ? ((0, jsx_runtime_1.jsxs)(StyledTagContentWrapper, __assign({ size: size, className: 'reqore-tag-content', onClick: rest.disabled ? undefined : onClick, wrap: wrap, hasWidth: !!width, hasKey: !!labelKey, fixed: rest.fixed }, { children: [label || label === 0 ? ((0, jsx_runtime_1.jsx)(StyledTagContent, __assign({ size: size, wrap: wrap, hasWidth: !!width, effect: __assign({}, labelEffect) }, { children: label }))) : null, rightIcon && ((0, jsx_runtime_1.jsx)(Icon_1["default"], { icon: rightIcon, size: size, margin: label || (icon && !labelKey) ? 'right' : 'both', color: rightIconColor || iconColor }))] }))) : null, (0, size_1["default"])(actions)
|
|
172
172
|
? actions
|
|
173
173
|
.filter(function (action) { return action.show !== false; })
|
|
174
174
|
.map(function (action, index) { return ((0, jsx_runtime_1.jsx)(react_1["default"].Fragment, { children: (0, jsx_runtime_1.jsx)(__1.ReqorePopover, __assign({ component: StyledButtonWrapper, componentProps: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Tag/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAgC;AAChC,qCAAgC;AAChC,6CAAoD;AACpD,qEAAgD;AAChD,2BAAsD;AACtD,+CAO+B;AAE/B,+CAK8B;AAC9B,+DAA8D;AAC9D,qDAAoD;AACpD,uCAAkE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Tag/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAgC;AAChC,qCAAgC;AAChC,6CAAoD;AACpD,qEAAgD;AAChD,2BAAsD;AACtD,+CAO+B;AAE/B,+CAK8B;AAC9B,+DAA8D;AAC9D,qDAAoD;AACpD,uCAAkE;AAWlE,oCAMmB;AACnB,iDAAiC;AA4CpB,QAAA,SAAS,GAAG,IAAA,8BAAM,EAAC,qBAAY,CAAC,+eAAiB,kNAS/C,EAAkC,sBAElC,EAA8B,oBAC9B,EAAoD,aACzD,EAAmF,mBAC7E,EACiD,sBAC9C,EAA8D,gBACtE,EAAiC,2CAGxC,EAAiB,SAEjB,EAQK,QAEL,EAYC,QAED,EAqBa,UAGb,EAMC,IACJ,KApEc,UAAC,EAAQ;QAAN,IAAI,UAAA;IAAO,OAAA,sBAAc,CAAC,IAAI,CAAC;AAApB,CAAoB,EAElC,UAAC,EAAQ;QAAN,IAAI,UAAA;IAAO,OAAA,kBAAU,CAAC,IAAI,CAAC;AAAhB,CAAgB,EAC9B,UAAC,EAAS;QAAP,KAAK,WAAA;IAAO,OAAA,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AAArC,CAAqC,EACzD,UAAC,EAAgB;QAAd,KAAK,WAAA,EAAE,KAAK,WAAA;IAAO,OAAA,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,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AI,CAAC,MAAM;yBACpB,IACG,CAAC,MAAM,CAAC,OAAO;wBACjB,CAAC,CAAC,OAAO,MAAM,CAAC,OAAO,KAAK,QAAQ;4BAClC,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE;4BAC7B,CAAC,CAAC,MAAM,CAAC,OAAO;wBAClB,CAAC,CAAC,EAAE,CAAC,IACP,iBAAiB,sBAEjB,uBAAC,iBAAU,IAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,GAAI,IAC/B,IAlBG,KAAK,CAmBT,CAClB,EArBuB,CAqBvB,CAAC;gBACN,CAAC,CAAC,IAAI,EACP,aAAa,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CACjC,uBAAC,iBAAa,aACZ,SAAS,EAAE,mBAAmB,EAC9B,cAAc,EAAE;oBACd,IAAI,MAAA;oBACJ,KAAK,EAAE,cAAc,CAAC,MAAM,CAAC;oBAC7B,SAAS,EAAE,mBAAmB;oBAC9B,OAAO,EAAE,aAAa;oBACtB,MAAM,EAAE,IAAI,CAAC,MAAM;iBACpB,EACD,iBAAiB,QACjB,OAAO,EAAC,QAAQ,gBAEhB,uBAAC,iBAAU,IAAC,IAAI,EAAC,WAAW,EAAC,IAAI,EAAE,IAAI,GAAI,IAC7B,CACjB,CAAC,CAAC,CAAC,IAAI,KACE,CACb,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,qBAAe,SAAS,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Placement } from '@popperjs/core';
|
|
3
|
+
import { IReqoreOptions } from '../containers/UIProvider';
|
|
3
4
|
import { IReqoreIntent, IWithReqoreEffect, IWithReqoreFlat, IWithReqoreMinimal } from '../types/global';
|
|
4
5
|
import { IReqoreIconName } from '../types/icons';
|
|
5
6
|
export interface IPopoverControls {
|
|
@@ -27,6 +28,7 @@ export interface IPopover extends IReqoreIntent, IWithReqoreMinimal, IWithReqore
|
|
|
27
28
|
icon?: IReqoreIconName;
|
|
28
29
|
title?: string;
|
|
29
30
|
updater?: string | number;
|
|
31
|
+
uiScale?: IReqoreOptions['uiScale'];
|
|
30
32
|
}
|
|
31
33
|
export interface IPopoverOptions extends IPopover {
|
|
32
34
|
targetElement?: HTMLElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePopover.d.ts","sourceRoot":"","sources":["../../src/hooks/usePopover.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"usePopover.d.ts","sourceRoot":"","sources":["../../src/hooks/usePopover.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAO3C,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EACnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAgBjD,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,MAAM,EAAE,MAAM,OAAO,CAAC;IACtB,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,QACf,SAAQ,aAAa,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,eAAe;IACjB,OAAO,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IAC3C,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,WAAW,CAAC;IACpD,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;CACrC;AAED,MAAM,WAAW,eAAgB,SAAQ,QAAQ;IAC/C,aAAa,CAAC,EAAE,WAAW,CAAC;IAC5B,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;CACpD;AAED,QAAA,MAAM,UAAU,oIAYb,eAAe,KAAG,gBAsIpB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePopover.js","sourceRoot":"","sources":["../../src/hooks/usePopover.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,+BAAqE;AACrE,uCAAwD;AACxD,oDAA8B;AAC9B,6DAAkD;AAClD,wBAAuC;
|
|
1
|
+
{"version":3,"file":"usePopover.js","sourceRoot":"","sources":["../../src/hooks/usePopover.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,+BAAqE;AACrE,uCAAwD;AACxD,oDAA8B;AAC9B,6DAAkD;AAClD,wBAAuC;AAGvC,6EAAuD;AASvD,IAAM,WAAW,GAAG;IAClB,KAAK,EAAE,YAAY;IACnB,SAAS,EA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AI,OAAO,KAAK,WAAW,EAAE;oBAC3B,aAAa,CAAC,mBAAmB,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC;iBAChE;aACF;QACH,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC;IAElE,IAAA,sBAAU,EAAC;QACT,aAAa,EAAE,CAAC;IAClB,CAAC,CAAC,CAAC;IAEH,OAAO;QACL,EAAE,EAAE,OAAO;QACX,IAAI,EAAE;YACJ,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE;gBAC3B,WAAW,EAAE,CAAC;aACf;QACH,CAAC;QACD,KAAK,EAAE,cAAM,OAAA,cAAc,EAAE,EAAhB,CAAgB;QAC7B,MAAM,EAAE,cAAM,OAAA,aAAa,CAAC,OAAO,CAAC,EAAtB,CAAsB;KACrC,CAAC;AACJ,CAAC,CAAC;AAEF,qBAAe,UAAU,CAAC"}
|
package/package.json
CHANGED
|
@@ -275,6 +275,7 @@ export const StyledButtonContent = styled.div`
|
|
|
275
275
|
|
|
276
276
|
export interface IReqoreButtonBadgeProps extends IWithReqoreSize {
|
|
277
277
|
color?: TReqoreEffectColor;
|
|
278
|
+
theme?: IReqoreTheme;
|
|
278
279
|
content?: TReqoreBadge | TReqoreBadge[];
|
|
279
280
|
wrap?: boolean;
|
|
280
281
|
wrapGroup?: boolean;
|
|
@@ -282,12 +283,13 @@ export interface IReqoreButtonBadgeProps extends IWithReqoreSize {
|
|
|
282
283
|
|
|
283
284
|
export const ButtonBadge = memo(({ wrapGroup, ...props }: IReqoreButtonBadgeProps) => {
|
|
284
285
|
const renderTag = useCallback(
|
|
285
|
-
({ size, color, content, key }: IReqoreButtonBadgeProps & { key: number }) => (
|
|
286
|
+
({ size, color, theme, content, key }: IReqoreButtonBadgeProps & { key: number }) => (
|
|
286
287
|
<ReqoreTag
|
|
287
288
|
key={key}
|
|
288
289
|
size={getOneLessSize(size)}
|
|
289
290
|
asBadge
|
|
290
291
|
color={color}
|
|
292
|
+
customTheme={theme}
|
|
291
293
|
className='reqore-button-badge'
|
|
292
294
|
minimal={!(content as IReqoreTagProps)?.effect?.gradient}
|
|
293
295
|
{...(typeof content === 'string' || typeof content === 'number'
|
|
@@ -456,12 +458,12 @@ const ReqoreButton = memo(
|
|
|
456
458
|
{_children}
|
|
457
459
|
</StyledInvisibleContent>
|
|
458
460
|
{(badge || badge === 0) && wrap ? (
|
|
459
|
-
<ButtonBadge content={badge} size={size}
|
|
461
|
+
<ButtonBadge content={badge} size={size} theme={theme} wrap />
|
|
460
462
|
) : null}
|
|
461
463
|
</StyledAnimatedTextWrapper>
|
|
462
464
|
)}
|
|
463
465
|
{(badge || badge === 0) && !wrap ? (
|
|
464
|
-
<ButtonBadge content={badge} size={size}
|
|
466
|
+
<ButtonBadge content={badge} size={size} theme={theme} />
|
|
465
467
|
) : null}
|
|
466
468
|
{!rightIcon ? (
|
|
467
469
|
_children ? (
|
|
@@ -157,9 +157,10 @@ const InternalPopover: React.FC<IReqoreInternalPopoverProps> = memo(
|
|
|
157
157
|
icon,
|
|
158
158
|
minimal,
|
|
159
159
|
flat = true,
|
|
160
|
+
uiScale,
|
|
160
161
|
effect,
|
|
161
162
|
}) => {
|
|
162
|
-
const { removePopover, updatePopover, uiScale } = useContext(PopoverContext);
|
|
163
|
+
const { removePopover, updatePopover, uiScale: globalUiScale } = useContext(PopoverContext);
|
|
163
164
|
const [popperElement, setPopperElement] = useState(null);
|
|
164
165
|
const [arrowElement, setArrowElement] = useState(null);
|
|
165
166
|
const popperRef: MutableRefObject<any> = useRef(null);
|
|
@@ -204,12 +205,15 @@ const InternalPopover: React.FC<IReqoreInternalPopoverProps> = memo(
|
|
|
204
205
|
.replace(')', '')
|
|
205
206
|
.split(',')
|
|
206
207
|
.map((axis) => {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
208
|
+
const scale = uiScale || globalUiScale;
|
|
209
|
+
let modifiedAxis = parseInt(axis, 10);
|
|
210
|
+
|
|
211
|
+
if (scale || scale === 0) {
|
|
212
|
+
modifiedAxis =
|
|
213
|
+
parseInt(axis, 10) < 0 ? parseInt(axis, 10) * scale : parseInt(axis, 10) / scale;
|
|
211
214
|
}
|
|
212
|
-
|
|
215
|
+
|
|
216
|
+
return modifiedAxis;
|
|
213
217
|
});
|
|
214
218
|
|
|
215
219
|
return createPortal(
|
|
@@ -2,6 +2,7 @@ import { keys } from 'lodash';
|
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import { SIZE_TO_PX } from '../../constants/sizes';
|
|
4
4
|
import { TReqoreIntent } from '../../constants/theme';
|
|
5
|
+
import { IReqoreTooltip } from '../../types/global';
|
|
5
6
|
import { IReqoreIconName } from '../../types/icons';
|
|
6
7
|
import { IReqoreButtonProps } from '../Button';
|
|
7
8
|
import { IReqoreExportModalProps } from '../ExportModal';
|
|
@@ -45,6 +46,7 @@ export interface IReqoreKeyValueTableProps
|
|
|
45
46
|
|
|
46
47
|
keyLabel?: string;
|
|
47
48
|
keyIcon?: IReqoreIconName;
|
|
49
|
+
keyTooltip?: (key: string | number) => string | IReqoreTooltip;
|
|
48
50
|
keyColumnIntent?: TReqoreIntent;
|
|
49
51
|
keyAlign?: IReqoreTableColumn['align'];
|
|
50
52
|
maxKeyWidth?: number;
|
|
@@ -55,6 +57,7 @@ export interface IReqoreKeyValueTableProps
|
|
|
55
57
|
|
|
56
58
|
valueLabel?: string;
|
|
57
59
|
valueIcon?: IReqoreIconName;
|
|
60
|
+
valueTooltip?: (value: TReqoreKeyValueTableValue) => string | IReqoreTooltip;
|
|
58
61
|
valueAlign?: IReqoreTableColumn['align'];
|
|
59
62
|
minValueWidth?: number;
|
|
60
63
|
defaultValueFilter?: string | number;
|
|
@@ -74,8 +77,10 @@ export const ReqoreKeyValueTable = ({
|
|
|
74
77
|
keyLabel,
|
|
75
78
|
keyIcon,
|
|
76
79
|
keyRenderer,
|
|
80
|
+
keyTooltip,
|
|
77
81
|
valueLabel,
|
|
78
82
|
valueIcon,
|
|
83
|
+
valueTooltip,
|
|
79
84
|
valueRenderer,
|
|
80
85
|
keyColumnIntent,
|
|
81
86
|
minValueWidth = 100,
|
|
@@ -106,6 +111,7 @@ export const ReqoreKeyValueTable = ({
|
|
|
106
111
|
},
|
|
107
112
|
|
|
108
113
|
cell: {
|
|
114
|
+
tooltip: keyTooltip ? (cellValue) => keyTooltip(cellValue) : undefined,
|
|
109
115
|
content: keyRenderer ? ({ tableKey }) => keyRenderer(tableKey) : 'title',
|
|
110
116
|
},
|
|
111
117
|
},
|
|
@@ -126,12 +132,7 @@ export const ReqoreKeyValueTable = ({
|
|
|
126
132
|
},
|
|
127
133
|
|
|
128
134
|
cell: {
|
|
129
|
-
tooltip: (
|
|
130
|
-
content: JSON.stringify(value),
|
|
131
|
-
noArrow: true,
|
|
132
|
-
useTargetWidth: true,
|
|
133
|
-
delay: 400,
|
|
134
|
-
}),
|
|
135
|
+
tooltip: valueTooltip ? (cellValue) => valueTooltip(cellValue) : undefined,
|
|
135
136
|
content: (data) =>
|
|
136
137
|
valueRenderer?.(data, ReqoreTableValue) || <ReqoreTableValue value={data.value} />,
|
|
137
138
|
},
|
|
@@ -152,7 +152,9 @@ export const StyledReqoreNotification = styled(StyledEffect)<IReqoreNotification
|
|
|
152
152
|
}
|
|
153
153
|
`}
|
|
154
154
|
|
|
155
|
-
color: ${
|
|
155
|
+
color: ${minimal || !opaque
|
|
156
|
+
? 'inherit'
|
|
157
|
+
: getReadableColor(theme, null, null, true, minimal ? theme.originalMain : undefined)};
|
|
156
158
|
|
|
157
159
|
${clickable &&
|
|
158
160
|
css`
|
|
@@ -122,6 +122,7 @@ export interface IReqorePanelProps
|
|
|
122
122
|
getContentRef?: (ref: HTMLDivElement) => any;
|
|
123
123
|
|
|
124
124
|
headerProps?: React.HTMLAttributes<unknown>;
|
|
125
|
+
showHeaderTooltip?: boolean;
|
|
125
126
|
}
|
|
126
127
|
|
|
127
128
|
export interface IStyledPanel extends IReqorePanelProps {
|
|
@@ -357,6 +358,7 @@ export const ReqorePanel = forwardRef<HTMLDivElement, IReqorePanelProps>(
|
|
|
357
358
|
disabled,
|
|
358
359
|
breadcrumbs,
|
|
359
360
|
showActionsWhenCollapsed = true,
|
|
361
|
+
showHeaderTooltip,
|
|
360
362
|
...rest
|
|
361
363
|
}: IReqorePanelProps,
|
|
362
364
|
ref
|
|
@@ -698,7 +700,7 @@ export const ReqorePanel = forwardRef<HTMLDivElement, IReqorePanelProps>(
|
|
|
698
700
|
noWrap: true,
|
|
699
701
|
...headerEffect,
|
|
700
702
|
}}
|
|
701
|
-
tooltip={label}
|
|
703
|
+
tooltip={showHeaderTooltip ? label : undefined}
|
|
702
704
|
>
|
|
703
705
|
{label}
|
|
704
706
|
</ReqoreHeading>
|
|
@@ -787,7 +789,7 @@ export const ReqorePanel = forwardRef<HTMLDivElement, IReqorePanelProps>(
|
|
|
787
789
|
noHorizontalPadding={noHorizontalPadding}
|
|
788
790
|
>
|
|
789
791
|
{hasNonResponsiveActions(leftBottomActions) ? (
|
|
790
|
-
<ReqoreControlGroup size={panelSize}>
|
|
792
|
+
<ReqoreControlGroup size={panelSize} style={{ marginRight: 'auto' }}>
|
|
791
793
|
{leftBottomActions.map(renderNonResponsiveActions('flex-start'))}
|
|
792
794
|
</ReqoreControlGroup>
|
|
793
795
|
) : null}
|
|
@@ -797,6 +799,7 @@ export const ReqorePanel = forwardRef<HTMLDivElement, IReqorePanelProps>(
|
|
|
797
799
|
responsive={responsiveActions}
|
|
798
800
|
customTheme={theme}
|
|
799
801
|
size={panelSize}
|
|
802
|
+
style={{ marginRight: 'auto' }}
|
|
800
803
|
>
|
|
801
804
|
{leftBottomActions.map(renderResponsiveActions('flex-start'))}
|
|
802
805
|
</ReqoreControlGroup>
|
|
@@ -807,13 +810,18 @@ export const ReqorePanel = forwardRef<HTMLDivElement, IReqorePanelProps>(
|
|
|
807
810
|
horizontalAlign='flex-end'
|
|
808
811
|
responsive={responsiveActions}
|
|
809
812
|
customTheme={theme}
|
|
813
|
+
style={{ marginLeft: 'auto' }}
|
|
810
814
|
size={panelSize}
|
|
811
815
|
>
|
|
812
816
|
{rightBottomActions.map(renderResponsiveActions())}
|
|
813
817
|
</ReqoreControlGroup>
|
|
814
818
|
)}
|
|
815
819
|
{hasNonResponsiveActions(rightBottomActions) ? (
|
|
816
|
-
<ReqoreControlGroup
|
|
820
|
+
<ReqoreControlGroup
|
|
821
|
+
horizontalAlign='flex-end'
|
|
822
|
+
size={panelSize}
|
|
823
|
+
style={{ marginLeft: 'auto' }}
|
|
824
|
+
>
|
|
817
825
|
{rightBottomActions.map(renderNonResponsiveActions())}
|
|
818
826
|
</ReqoreControlGroup>
|
|
819
827
|
) : null}
|
|
@@ -24,6 +24,7 @@ import { ActiveIconScale, InactiveIconScale } from '../../styles';
|
|
|
24
24
|
import {
|
|
25
25
|
IReqoreDisabled,
|
|
26
26
|
IReqoreIntent,
|
|
27
|
+
IWithReqoreCustomTheme,
|
|
27
28
|
IWithReqoreEffect,
|
|
28
29
|
IWithReqoreFluid,
|
|
29
30
|
IWithReqoreMinimal,
|
|
@@ -51,7 +52,8 @@ export interface IReqoreTagProps
|
|
|
51
52
|
IReqoreDisabled,
|
|
52
53
|
IWithReqoreMinimal,
|
|
53
54
|
IWithReqoreFluid,
|
|
54
|
-
IWithReqoreEffect
|
|
55
|
+
IWithReqoreEffect,
|
|
56
|
+
IWithReqoreCustomTheme {
|
|
55
57
|
fixed?: boolean | 'key' | 'label';
|
|
56
58
|
size?: TSizes;
|
|
57
59
|
label?: string | number;
|
|
@@ -116,10 +118,10 @@ export const StyledTag = styled(StyledEffect)<IReqoreTagStyle>`
|
|
|
116
118
|
css`
|
|
117
119
|
background-color: ${color || changeLightness(theme.main, 0.1)};
|
|
118
120
|
color: ${minimal
|
|
119
|
-
? getReadableColor(theme, undefined, undefined, true
|
|
121
|
+
? getReadableColor(theme, undefined, undefined, true)
|
|
120
122
|
: color
|
|
121
123
|
? getReadableColorFrom(color)
|
|
122
|
-
:
|
|
124
|
+
: getReadableColorFrom(changeLightness(theme.main, 0.1))};
|
|
123
125
|
|
|
124
126
|
${StyledTagKeyWrapper} {
|
|
125
127
|
background-color: ${labelKey ? rgba('#000000', 0.2) : undefined};
|
|
@@ -251,6 +253,7 @@ const ReqoreTag = forwardRef<HTMLSpanElement, IReqoreTagProps>(
|
|
|
251
253
|
intent,
|
|
252
254
|
color,
|
|
253
255
|
minimal,
|
|
256
|
+
customTheme,
|
|
254
257
|
wrap = false,
|
|
255
258
|
width,
|
|
256
259
|
leftIconColor,
|
|
@@ -263,7 +266,7 @@ const ReqoreTag = forwardRef<HTMLSpanElement, IReqoreTagProps>(
|
|
|
263
266
|
ref
|
|
264
267
|
) => {
|
|
265
268
|
const { targetRef } = useCombinedRefs(ref);
|
|
266
|
-
const theme: IReqoreTheme = useReqoreTheme();
|
|
269
|
+
const theme: IReqoreTheme = useReqoreTheme('main', customTheme);
|
|
267
270
|
const [itemRef, setItemRef] = useState<HTMLDivElement>(undefined);
|
|
268
271
|
|
|
269
272
|
useTooltip(itemRef, tooltip);
|
|
@@ -282,6 +285,7 @@ const ReqoreTag = forwardRef<HTMLSpanElement, IReqoreTagProps>(
|
|
|
282
285
|
return (
|
|
283
286
|
<StyledTag
|
|
284
287
|
{...rest}
|
|
288
|
+
theme={theme}
|
|
285
289
|
effect={{
|
|
286
290
|
...rest.effect,
|
|
287
291
|
gradient: intent ? undefined : rest.effect?.gradient,
|
|
@@ -317,7 +321,7 @@ const ReqoreTag = forwardRef<HTMLSpanElement, IReqoreTagProps>(
|
|
|
317
321
|
<ReqoreIcon
|
|
318
322
|
icon={icon}
|
|
319
323
|
size={size}
|
|
320
|
-
margin={label ? 'left' : 'both'}
|
|
324
|
+
margin={label || labelKey ? 'left' : 'both'}
|
|
321
325
|
color={leftIconColor || iconColor}
|
|
322
326
|
/>
|
|
323
327
|
)}
|
|
@@ -364,7 +368,7 @@ const ReqoreTag = forwardRef<HTMLSpanElement, IReqoreTagProps>(
|
|
|
364
368
|
<ReqoreIcon
|
|
365
369
|
icon={rightIcon}
|
|
366
370
|
size={size}
|
|
367
|
-
margin={label || icon ? 'right' : 'both'}
|
|
371
|
+
margin={label || (icon && !labelKey) ? 'right' : 'both'}
|
|
368
372
|
color={rightIconColor || iconColor}
|
|
369
373
|
/>
|
|
370
374
|
)}
|
package/src/hooks/usePopover.tsx
CHANGED
|
@@ -5,6 +5,7 @@ import shortid from 'shortid';
|
|
|
5
5
|
import { useContext } from 'use-context-selector';
|
|
6
6
|
import { useReqoreProperty } from '..';
|
|
7
7
|
import { IPopoverData } from '../containers/PopoverProvider';
|
|
8
|
+
import { IReqoreOptions } from '../containers/UIProvider';
|
|
8
9
|
import PopoverContext from '../context/PopoverContext';
|
|
9
10
|
import {
|
|
10
11
|
IReqoreIntent,
|
|
@@ -58,6 +59,7 @@ export interface IPopover
|
|
|
58
59
|
icon?: IReqoreIconName;
|
|
59
60
|
title?: string;
|
|
60
61
|
updater?: string | number;
|
|
62
|
+
uiScale?: IReqoreOptions['uiScale'];
|
|
61
63
|
}
|
|
62
64
|
|
|
63
65
|
export interface IPopoverOptions extends IPopover {
|
|
@@ -5,6 +5,7 @@ import ReqoreIcon from '../../components/Icon';
|
|
|
5
5
|
import { IReqoreKeyValueTableProps, ReqoreKeyValueTable } from '../../components/KeyValueTable';
|
|
6
6
|
import { IReqoreTableRowData, TReqoreTableColumnContent } from '../../components/Table';
|
|
7
7
|
import { TReqorePaginationType } from '../../constants/paging';
|
|
8
|
+
import { sleep } from '../../helpers/utils';
|
|
8
9
|
import { Exportable as ExportableTable } from '../Table/Table.stories';
|
|
9
10
|
import { StoryMeta } from '../utils';
|
|
10
11
|
import { CustomIntentArg, FlatArg, IntentArg, SizeArg, argManager } from '../utils/args';
|
|
@@ -231,6 +232,34 @@ export const DefaultPaging: Story = {
|
|
|
231
232
|
},
|
|
232
233
|
};
|
|
233
234
|
|
|
235
|
+
export const KeyTooltip: Story = {
|
|
236
|
+
args: {
|
|
237
|
+
keyTooltip: (key) => `Tooltip for ${key}`,
|
|
238
|
+
},
|
|
239
|
+
play: async () => {
|
|
240
|
+
await sleep(500);
|
|
241
|
+
|
|
242
|
+
await fireEvent.mouseEnter(document.querySelector('.reqore-table-cell'));
|
|
243
|
+
},
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
export const ValueTooltip: Story = {
|
|
247
|
+
args: {
|
|
248
|
+
valueTooltip: (value) => ({
|
|
249
|
+
content: `${JSON.stringify(value || 'No value')}`,
|
|
250
|
+
noArrow: true,
|
|
251
|
+
blur: true,
|
|
252
|
+
flat: false,
|
|
253
|
+
placement: 'top',
|
|
254
|
+
}),
|
|
255
|
+
},
|
|
256
|
+
play: async () => {
|
|
257
|
+
await sleep(500);
|
|
258
|
+
|
|
259
|
+
await fireEvent.mouseEnter(document.querySelectorAll('.reqore-table-cell')[23]);
|
|
260
|
+
},
|
|
261
|
+
};
|
|
262
|
+
|
|
234
263
|
export const CustomColumnWidths: Story = {
|
|
235
264
|
args: {
|
|
236
265
|
minValueWidth: 500,
|
|
@@ -11,6 +11,9 @@ import { FlatArg, IconArg, IntentArg, SizeArg, argManager } from '../utils/args'
|
|
|
11
11
|
|
|
12
12
|
const { createArg } = argManager<IReqorePanelProps>();
|
|
13
13
|
|
|
14
|
+
const message =
|
|
15
|
+
'Shadowlands has mechanisms put in place for allowing players to catch up on Renown, the system of gaining favor and unlocking rewards, Campaign chapters, and soulbinds within your Covenant. This system works for main characters who have started late, for alts, for players who have switched Covenants and are starting over, and for players who have simply missed weekly quests for earning Renown due to being away from the game. I am a message a very long message - Shadowlands has mechanisms put in place for allowing players to catch up on Renown, the system of gaining favor and unlocking rewards, Campaign chapters, and soulbinds within your Covenant. This system works for main characters who have started late, for alts, for players who have switched Covenants and are starting over, and for players who have simply missed weekly quests for earning Renown due to being away from the game. I am a message a very long message - Shadowlands has mechanisms put in place for allowing players to catch up on Renown, the system of gaining favor and unlocking rewards, Campaign chapters, and soulbinds within your Covenant. This system works for main characters who have started late, for alts, for players who have switched Covenants and are starting over, and for players who have simply missed weekly quests for earning Renown due to being away from the game. I am a message a very long message - Shadowlands has mechanisms put in place for allowing players to catch up on Renown, the system of gaining favor and unlocking rewards, Campaign chapters, and soulbinds within your Covenant. This system works for main characters who have started late, for alts, for players who have switched Covenants and are starting over, and for players who have simply missed weekly quests for earning Renown due to being away from the game. I am a message a very long message - Shadowlands has mechanisms put in place for allowing players to catch up on Renown, the system of gaining favor and unlocking rewards, Campaign chapters, and soulbinds within your Covenant. This system works for main characters who have started late, for alts, for players who have switched Covenants and are starting over, and for players who have simply missed weekly quests for earning Renown due to being away from the game. I am a message a very long message - Shadowlands has mechanisms put in place for allowing players to catch up on Renown, the system of gaining favor and unlocking rewards, Campaign chapters, and soulbinds within your Covenant. This system works for main characters who have started late, for alts, for players who have switched Covenants and are starting over, and for players who have simply missed weekly quests for earning Renown due to being away from the game.';
|
|
16
|
+
|
|
14
17
|
const meta = {
|
|
15
18
|
title: 'Layout/Panel/Stories',
|
|
16
19
|
component: ReqorePanel,
|
|
@@ -270,31 +273,7 @@ const Template: StoryFn<IReqorePanelProps> = (args: IReqorePanelProps) => {
|
|
|
270
273
|
]}
|
|
271
274
|
{...args}
|
|
272
275
|
>
|
|
273
|
-
|
|
274
|
-
of gaining favor and unlocking rewards, Campaign chapters, and soulbinds within your Covenant.
|
|
275
|
-
This system works for main characters who have started late, for alts, for players who have
|
|
276
|
-
switched Covenants and are starting over, and for players who have simply missed weekly quests
|
|
277
|
-
for earning Renown due to being away from the game. I am a message a very long message -
|
|
278
|
-
Shadowlands has mechanisms put in place for allowing players to catch up on Renown, the system
|
|
279
|
-
of gaining favor and unlocking rewards, Campaign chapters, and soulbinds within your Covenant.
|
|
280
|
-
This system works for main characters who have started late, for alts, for players who have
|
|
281
|
-
switched Covenants and are starting over, and for players who have simply missed weekly quests
|
|
282
|
-
for earning Renown due to being away from the game. I am a message a very long message -
|
|
283
|
-
Shadowlands has mechanisms put in place for allowing players to catch up on Renown, the system
|
|
284
|
-
of gaining favor and unlocking rewards, Campaign chapters, and soulbinds within your Covenant.
|
|
285
|
-
This system works for main characters who have started late, for alts, for players who have
|
|
286
|
-
switched Covenants and are starting over, and for players who have simply missed weekly quests
|
|
287
|
-
for earning Renown due to being away from the game. I am a message a very long message -
|
|
288
|
-
Shadowlands has mechanisms put in place for allowing players to catch up on Renown, the system
|
|
289
|
-
of gaining favor and unlocking rewards, Campaign chapters, and soulbinds within your Covenant.
|
|
290
|
-
This system works for main characters who have started late, for alts, for players who have
|
|
291
|
-
switched Covenants and are starting over, and for players who have simply missed weekly quests
|
|
292
|
-
for earning Renown due to being away from the game. I am a message a very long message -
|
|
293
|
-
Shadowlands has mechanisms put in place for allowing players to catch up on Renown, the system
|
|
294
|
-
of gaining favor and unlocking rewards, Campaign chapters, and soulbinds within your Covenant.
|
|
295
|
-
This system works for main characters who have started late, for alts, for players who have
|
|
296
|
-
switched Covenants and are starting over, and for players who have simply missed weekly quests
|
|
297
|
-
for earning Renown due to being away from the game.
|
|
276
|
+
{args.children || message}
|
|
298
277
|
</ReqorePanel>
|
|
299
278
|
);
|
|
300
279
|
};
|
|
@@ -426,11 +405,12 @@ export const ActionsShownOnHover: Story = {
|
|
|
426
405
|
render: Template,
|
|
427
406
|
|
|
428
407
|
args: {
|
|
429
|
-
|
|
408
|
+
style: { minWidth: 400, maxWidth: 600 },
|
|
409
|
+
label: 'This is a simple test to',
|
|
430
410
|
collapsible: false,
|
|
431
|
-
|
|
432
|
-
badge: undefined,
|
|
411
|
+
responsiveActions: false,
|
|
433
412
|
actions: [{ label: 'test', show: 'hover' }],
|
|
413
|
+
children: 'This is a panel',
|
|
434
414
|
bottomActions: [
|
|
435
415
|
{
|
|
436
416
|
position: 'right',
|
|
@@ -87,6 +87,12 @@ const Template: StoryFn<IReqoreTagProps> = (args) => {
|
|
|
87
87
|
label={2}
|
|
88
88
|
/>
|
|
89
89
|
<ReqoreTag label='With Icon' icon='AlarmWarningLine' {...args} />
|
|
90
|
+
<ReqoreTag
|
|
91
|
+
{...args}
|
|
92
|
+
labelKey='Without label'
|
|
93
|
+
icon='AlarmWarningLine'
|
|
94
|
+
rightIcon='24HoursFill'
|
|
95
|
+
/>
|
|
90
96
|
<ReqoreTag
|
|
91
97
|
label='With Icon Colors'
|
|
92
98
|
icon='AlarmWarningLine'
|
package/src/stories/utils.ts
CHANGED
|
@@ -28,6 +28,7 @@ export type AdditionalStorybookArgs = IReqoreUIProviderProps & {
|
|
|
28
28
|
insideModal?: boolean;
|
|
29
29
|
animatedButtons?: IReqoreUIProviderProps['options']['animations']['buttons'];
|
|
30
30
|
animatedDialogs?: IReqoreUIProviderProps['options']['animations']['dialogs'];
|
|
31
|
+
globalUiScale?: IReqoreUIProviderProps['options']['uiScale'];
|
|
31
32
|
};
|
|
32
33
|
|
|
33
34
|
export type StoryMeta<
|