@kwiz/fluentui 1.0.132 → 1.0.133

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.
@@ -1,8 +1,10 @@
1
+ import { InfoLabelProps } from '@fluentui/react-components';
1
2
  import React from 'react';
2
3
  import { FluentIconType } from '../types/common';
3
4
  import { iMenuItemEX } from './menu';
4
5
  export interface iCardProps {
5
6
  title: string;
7
+ titleInfo?: InfoLabelProps['info'];
6
8
  description?: string;
7
9
  icon: FluentIconType;
8
10
  menuItems?: iMenuItemEX[];
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Card, CardFooter, cardFooterClassNames, CardHeader, CardPreview, Label, makeStyles, tokens } from '@fluentui/react-components';
2
+ import { Card, CardFooter, cardFooterClassNames, CardHeader, CardPreview, InfoLabel, Label, makeStyles, tokens } from '@fluentui/react-components';
3
3
  import { MoreVerticalRegular } from '@fluentui/react-icons';
4
4
  import { isNotEmptyArray, isNotEmptyString, isNullOrEmptyArray, isNullOrUndefined } from '@kwiz/common';
5
5
  import { MenuEx } from './menu';
@@ -42,7 +42,9 @@ export const CardEX = (props) => {
42
42
  const classes = useStyles();
43
43
  const hasDescription = isNotEmptyString(props.description);
44
44
  const hasActions = isNotEmptyArray(props.menuItems) || !isNullOrUndefined(props.footer);
45
- return (_jsxs(Card, { className: classes.card, onClick: props.onClick, children: [_jsx(CardPreview, { children: _jsxs("div", { className: hasDescription ? classes.previewContent : classes.previewContentNoDescription, children: [_jsx(props.icon, { className: classes.cardIcon }), !hasDescription && _jsxs(_Fragment, { children: [_jsx("br", {}), _jsx(Label, { children: props.title })] })] }) }), hasDescription && _jsx(CardHeader, { header: _jsx(Label, { className: classes.cardLabels, children: props.title }), description: _jsx(Label, { className: classes.cardLabels, size: 'small', children: props.description }) }), hasActions && _jsx(CardFooter, { action: isNullOrEmptyArray(props.menuItems)
45
+ return (_jsxs(Card, { className: classes.card, onClick: props.onClick, children: [_jsx(CardPreview, { children: _jsxs("div", { className: hasDescription ? classes.previewContent : classes.previewContentNoDescription, children: [_jsx(props.icon, { className: classes.cardIcon }), !hasDescription && _jsxs(_Fragment, { children: [_jsx("br", {}), _jsx(Label, { children: props.title })] })] }) }), hasDescription && _jsx(CardHeader, { header: isNullOrUndefined(props.titleInfo)
46
+ ? _jsx(Label, { className: classes.cardLabels, children: props.title })
47
+ : _jsx(InfoLabel, { className: classes.cardLabels, info: props.titleInfo, children: props.title }), description: _jsx(Label, { className: classes.cardLabels, size: 'small', children: props.description }) }), hasActions && _jsx(CardFooter, { action: isNullOrEmptyArray(props.menuItems)
46
48
  ? undefined
47
49
  : _jsx(MenuEx, { trigger: { title: 'more', icon: _jsx(MoreVerticalRegular, {}) }, items: props.menuItems }), children: props.footer })] }));
48
50
  };
@@ -1 +1 @@
1
- {"version":3,"file":"card.js","sourceRoot":"","sources":["../../src/controls/card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,oBAAoB,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACxI,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGxG,OAAO,EAAe,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE7C,MAAM,SAAS,GAAG,UAAU,CAAC;IACzB,IAAI,EAAE;QACF,MAAM,EAAE,OAAO;QACf,KAAK,EAAE,OAAO;QACd,CAAC,MAAM,oBAAoB,CAAC,IAAI,SAAS,CAAC,EAAE;YACxC,OAAO,EAAE,MAAM;SAClB;QACD,SAAS,EAAE;YACP,eAAe,EAAE,MAAM,CAAC,4BAA4B;YACpD,CAAC,MAAM,oBAAoB,CAAC,IAAI,SAAS,C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IAAI,KAAC,UAAU,IAC1B,MAAM,EAAE,iBAAiB,CAAC,KAAK,CAAC,SAAS,CAAC;oBACtC,CAAC,CAAC,KAAC,KAAK,IAAC,SAAS,EAAE,OAAO,CAAC,UAAU,YAAG,KAAK,CAAC,KAAK,GAAS;oBAC7D,CAAC,CAAC,KAAC,SAAS,IAAC,SAAS,EAAE,OAAO,CAAC,UAAU,EAAE,IAAI,EAAE,KAAK,CAAC,SAAS,YAAG,KAAK,CAAC,KAAK,GAAa,EAChG,WAAW,EAAE,KAAC,KAAK,IAAC,SAAS,EAAE,OAAO,CAAC,UAAU,EAAE,IAAI,EAAC,OAAO,YAAE,KAAK,CAAC,WAAW,GAAS,GAC7F,EACD,UAAU,IAAI,KAAC,UAAU,IAAC,MAAM,EAAE,kBAAkB,CAAC,KAAK,CAAC,SAAS,CAAC;oBAClE,CAAC,CAAC,SAAS;oBACX,CAAC,CAAC,KAAC,MAAM,IAAC,OAAO,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,KAAC,mBAAmB,KAAG,EAAE,EAC/D,KAAK,EAAE,KAAK,CAAC,SAAS,GAAI,YAC7B,KAAK,CAAC,MAAM,GACJ,IACV,CAAC,CAAC;AACjB,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kwiz/fluentui",
3
- "version": "1.0.132",
3
+ "version": "1.0.133",
4
4
  "description": "KWIZ common controls for FluentUI",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",