@deix/rossini-core 0.2.2 → 0.3.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/lib/package.json +2 -2
- package/lib/src/components/display/Accordion/Accordion.d.ts +16 -0
- package/lib/src/components/display/Accordion/Accordion.d.ts.map +1 -0
- package/lib/src/components/display/Accordion/Accordion.js +44 -0
- package/lib/src/components/display/index.d.ts +3 -0
- package/lib/src/components/display/index.d.ts.map +1 -0
- package/lib/src/components/display/index.js +1 -0
- package/lib/src/components/index.d.ts +2 -0
- package/lib/src/components/index.d.ts.map +1 -1
- package/lib/src/components/index.js +1 -0
- package/lib/src/index.d.ts +2 -2
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +1 -1
- package/lib/tsconfig-lib.tsbuildinfo +1 -1
- package/package.json +2 -2
package/lib/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deix/rossini-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"main": "lib/src/index.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
|
-
"url": "https://github.com/
|
|
7
|
+
"url": "https://github.com/deix-ai/rossini-core.git"
|
|
8
8
|
},
|
|
9
9
|
"license": "UNLICENSED",
|
|
10
10
|
"private": false,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { AccordionProps as MUIAccordionProps, TypographyProps } from '@mui/material';
|
|
3
|
+
import { StringTranslation } from '../../../types';
|
|
4
|
+
interface RossiniAccordionProps {
|
|
5
|
+
title: StringTranslation | string;
|
|
6
|
+
titleProps?: Partial<TypographyProps>;
|
|
7
|
+
subtitle?: StringTranslation | string;
|
|
8
|
+
subtitleProps?: Partial<TypographyProps>;
|
|
9
|
+
icon?: ReactNode;
|
|
10
|
+
tooltip?: string;
|
|
11
|
+
expandIcon?: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export type AccordionProps = RossiniAccordionProps & MUIAccordionProps;
|
|
14
|
+
declare const Accordion: React.FC<AccordionProps>;
|
|
15
|
+
export default Accordion;
|
|
16
|
+
//# sourceMappingURL=Accordion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../../../../../src/components/display/Accordion/Accordion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGzC,OAAO,EAEL,cAAc,IAAI,iBAAiB,EAKnC,eAAe,EAChB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAuB,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGxE,UAAU,qBAAqB;IAC7B,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAAC;IAClC,UAAU,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IACtC,QAAQ,CAAC,EAAE,iBAAiB,GAAG,MAAM,CAAC;IACtC,aAAa,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IACzC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,SAAS,CAAC;CACxB;AAED,MAAM,MAAM,cAAc,GAAG,qBAAqB,GAAG,iBAAiB,CAAC;AAEvE,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAqCvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import React from 'react';
|
|
24
|
+
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
|
25
|
+
import { Accordion as MUIAccordion, AccordionDetails, AccordionSummary, Tooltip, Typography, } from '@mui/material';
|
|
26
|
+
import { isStringTranslation } from '../../../types';
|
|
27
|
+
import { useLocale } from '../../../utils';
|
|
28
|
+
var Accordion = function (_a) {
|
|
29
|
+
var title = _a.title, _b = _a.titleProps, titleProps = _b === void 0 ? { variant: 'h6', color: 'textPrimary' } : _b, subtitle = _a.subtitle, _c = _a.subtitleProps, subtitleProps = _c === void 0 ? { variant: 'subtitle1', gutterBottom: true } : _c, icon = _a.icon, tooltip = _a.tooltip, _d = _a.expandIcon, expandIcon = _d === void 0 ? React.createElement(ExpandMoreIcon, null) : _d, children = _a.children, muiProps = __rest(_a, ["title", "titleProps", "subtitle", "subtitleProps", "icon", "tooltip", "expandIcon", "children"]);
|
|
30
|
+
var locale = useLocale();
|
|
31
|
+
var titleString = isStringTranslation(title) ? title[locale] : title;
|
|
32
|
+
var subtitleString = subtitle && isStringTranslation(subtitle) ? subtitle[locale] : subtitle;
|
|
33
|
+
return (React.createElement(Tooltip, { title: tooltip || '' },
|
|
34
|
+
React.createElement(React.Fragment, null,
|
|
35
|
+
React.createElement(MUIAccordion, __assign({}, muiProps),
|
|
36
|
+
React.createElement(AccordionSummary, { expandIcon: expandIcon },
|
|
37
|
+
icon && React.createElement("div", { style: { marginRight: '16px' } }, icon),
|
|
38
|
+
React.createElement(Typography, __assign({}, titleProps), titleString)),
|
|
39
|
+
React.createElement(AccordionDetails, null,
|
|
40
|
+
React.createElement(React.Fragment, null,
|
|
41
|
+
subtitle && (React.createElement(Typography, __assign({}, subtitleProps), subtitleString)),
|
|
42
|
+
children))))));
|
|
43
|
+
};
|
|
44
|
+
export default Accordion;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/display/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC7D,YAAY,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Accordion } from './Accordion/Accordion';
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { Avatar, LanguageSelect, ToggleButtonGroup } from './buttons';
|
|
2
2
|
export type { AvatarProps, ButtonGroupOption, LanguageSelectProps, ToggleButtonGroupProps, } from './buttons';
|
|
3
|
+
export { Accordion } from './display';
|
|
4
|
+
export type { AccordionProps } from './display';
|
|
3
5
|
export { MinimalLayout, StandardLayout } from './layout';
|
|
4
6
|
export type { AppLogoInfo, FooterProps, SidebarLink, SidebarProps, } from './layout';
|
|
5
7
|
export { CircularLoading, DotWaveLoading } from './progress';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACtE,YAAY,EACV,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACzD,YAAY,EACV,WAAW,EACX,WAAW,EACX,WAAW,EACX,YAAY,GACb,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC7D,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACtE,YAAY,EACV,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,YAAY,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACzD,YAAY,EACV,WAAW,EACX,WAAW,EACX,WAAW,EACX,YAAY,GACb,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC7D,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC"}
|
package/lib/src/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { Avatar, CircularLoading, DotWaveLoading, LanguageSelect, MinimalLayout, StandardLayout, ToggleButtonGroup, } from './components';
|
|
2
|
-
export type { AppLogoInfo, AvatarProps, ButtonGroupOption, FooterProps, LanguageSelectProps, LoaderProps, SidebarLink, SidebarProps, ToggleButtonGroupProps, } from './components';
|
|
1
|
+
export { Accordion, Avatar, CircularLoading, DotWaveLoading, LanguageSelect, MinimalLayout, StandardLayout, ToggleButtonGroup, } from './components';
|
|
2
|
+
export type { AccordionProps, AppLogoInfo, AvatarProps, ButtonGroupOption, FooterProps, LanguageSelectProps, LoaderProps, SidebarLink, SidebarProps, ToggleButtonGroupProps, } from './components';
|
|
3
3
|
export { isStringTranslation } from './types';
|
|
4
4
|
export type { DBRow, DBRows, Locale, PaginatedResponse, Query, StringTranslation, } from './types';
|
|
5
5
|
export { camelToSnake, colorToRgb, commonStart, dateDiff, getTextColor, getTimeStr, hexToRgb, isValidDate, PageProvider, stringToColor, toTitleCase, useAPI, useLocale, usePersistedState, useUserInfo, } from './utils';
|
package/lib/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,eAAe,EACf,cAAc,EACd,cAAc,EACd,aAAa,EACb,cAAc,EACd,iBAAiB,GAClB,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,WAAW,EACX,WAAW,EACX,iBAAiB,EACjB,WAAW,EACX,mBAAmB,EACnB,WAAW,EACX,WAAW,EACX,YAAY,EACZ,sBAAsB,GACvB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC9C,YAAY,EACV,KAAK,EACL,MAAM,EACN,MAAM,EACN,iBAAiB,EACjB,KAAK,EACL,iBAAiB,GAClB,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,YAAY,EACZ,UAAU,EACV,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,aAAa,EACb,WAAW,EACX,MAAM,EACN,SAAS,EACT,iBAAiB,EACjB,WAAW,GACZ,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,MAAM,EACN,eAAe,EACf,cAAc,EACd,cAAc,EACd,aAAa,EACb,cAAc,EACd,iBAAiB,GAClB,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,cAAc,EACd,WAAW,EACX,WAAW,EACX,iBAAiB,EACjB,WAAW,EACX,mBAAmB,EACnB,WAAW,EACX,WAAW,EACX,YAAY,EACZ,sBAAsB,GACvB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC9C,YAAY,EACV,KAAK,EACL,MAAM,EACN,MAAM,EACN,iBAAiB,EACjB,KAAK,EACL,iBAAiB,GAClB,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,YAAY,EACZ,UAAU,EACV,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,aAAa,EACb,WAAW,EACX,MAAM,EACN,SAAS,EACT,iBAAiB,EACjB,WAAW,GACZ,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC"}
|
package/lib/src/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Avatar, CircularLoading, DotWaveLoading, LanguageSelect, MinimalLayout, StandardLayout, ToggleButtonGroup, } from './components';
|
|
1
|
+
export { Accordion, Avatar, CircularLoading, DotWaveLoading, LanguageSelect, MinimalLayout, StandardLayout, ToggleButtonGroup, } from './components';
|
|
2
2
|
export { isStringTranslation } from './types';
|
|
3
3
|
export { camelToSnake, colorToRgb, commonStart, dateDiff, getTextColor, getTimeStr, hexToRgb, isValidDate, PageProvider, stringToColor, toTitleCase, useAPI, useLocale, usePersistedState, useUserInfo, } from './utils';
|