sevago-library 1.1.2 → 1.1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # sevago-library
2
2
 
3
+ ## 1.1.4
4
+
5
+ ### Patch Changes
6
+
7
+ - feat: add tablet media query constant and update components for improved responsiveness
8
+
9
+ ## 1.1.3
10
+
11
+ ### Patch Changes
12
+
13
+ - feat: create how to use and change readme
14
+
3
15
  ## 1.1.2
4
16
 
5
17
  ### Patch Changes
package/README.md CHANGED
@@ -27,94 +27,13 @@ Install required peer dependencies:
27
27
  npm install react react-dom @emotion/react @emotion/styled @mui/material @mui/system @reduxjs/toolkit react-redux react-router-dom redux-persist
28
28
  ```
29
29
 
30
- ---
31
-
32
- ## Usage
33
-
34
- Import components, constants, utilities, and types directly from the package:
35
-
36
- ```tsx
37
- import { AppGrid, MODE, timeUtils } from 'sevago-library';
38
- import type { AppInfo } from 'sevago-library';
39
-
40
- const theme = MODE.light;
41
- const dateText = timeUtils.getDateTime(new Date());
42
-
43
- function AppList({ apps }: { apps: AppInfo[] }) {
44
- return (
45
- <AppGrid
46
- apps={apps}
47
- columns={5}
48
- rows={3}
49
- onClickApp={(app) => window.open(app.path.production)}
50
- />
51
- );
52
- }
53
- ```
54
-
55
- For applications that use the bundled provider/app shell:
56
-
57
- ```tsx
58
- import React from 'react';
59
- import { Provider } from 'react-redux';
60
- import { PersistGate } from 'redux-persist/integration/react';
61
- import { BrowserRouter } from 'react-router-dom';
62
- import App from 'sevago-library';
63
-
64
- function RootApp() {
65
- return (
66
- <Provider store={store}>
67
- <PersistGate loading={null} persistor={persistor}>
68
- <BrowserRouter>
69
- <App />
70
- </BrowserRouter>
71
- </PersistGate>
72
- </Provider>
73
- );
74
- }
75
-
76
- export default RootApp;
77
- ```
78
-
79
- ---
80
-
81
30
  ## Documentation
82
31
 
83
32
  Useful project references:
84
33
 
85
34
  - [Repository](https://github.com/core-sevago/sevago-library)
86
35
  - [npm package](https://www.npmjs.com/package/sevago-library)
87
- - [Material Symbols](https://fonts.google.com/icons)
88
-
89
- ---
90
-
91
- ## Components
92
-
93
- Common exports include:
94
-
95
- - `AppGrid`
96
- - `AppsSidebar`
97
- - `SystemMonitorScreen`
98
- - `SystemMonitorSidebarPart`
99
- - `DefaultLayout`
100
- - `LoadingComponent`
101
- - `LogoComponent`
102
- - `MotionBox`
103
- - `NoteComponent`
104
- - `PriceComponent`
105
- - `ReviewComponent`
106
-
107
- The library also exports shared elements, styles, constants, enums, interfaces, and utility functions.
108
-
109
- ---
110
-
111
- ## TypeScript
112
-
113
- The package ships with generated TypeScript declarations from `dist`.
114
-
115
- ```tsx
116
- import type { AppInfo, AppGridProps, Environment } from 'sevago-library';
117
- ```
36
+ - [Core-sevago/sevago-library](https://core-sevago.github.io/sevago-library)
118
37
 
119
38
  ---
120
39
 
@@ -126,26 +45,6 @@ For issues and usage questions, use the project repository:
126
45
 
127
46
  ---
128
47
 
129
- ## Contributing
130
-
131
- Create a changeset for every public change:
132
-
133
- ```bash
134
- npm run changeset
135
- ```
136
-
137
- Choose `patch`, `minor`, or `major`, then commit the generated file in `.changeset/`.
138
-
139
- To publish a new version from a clean `master` branch:
140
-
141
- ```bash
142
- bash deploy.sh
143
- ```
144
-
145
- The deploy script applies Changesets, builds the library, commits release artifacts, publishes to npm, and pushes the release commit with tags.
146
-
147
- ---
148
-
149
48
  ## Changelog
150
49
 
151
50
  The [changelog](https://github.com/core-sevago/sevago-library/blob/master/CHANGELOG.md) is generated by Changesets and updated for every release.
@@ -158,18 +57,8 @@ Future changes should be tracked through GitHub issues and released with Changes
158
57
 
159
58
  ---
160
59
 
161
- ## License
162
-
163
- This project is licensed under the [MIT license](https://opensource.org/licenses/MIT).
164
-
165
- ---
166
-
167
60
  ## Security
168
61
 
169
62
  Do not publish credentials, tokens, private URLs, or environment files. Report security issues through the project maintainers.
170
63
 
171
64
  ---
172
-
173
- ## Keywords
174
-
175
- `sso` `authentication` `react` `typescript` `sevago`
package/dist/index.cjs.js CHANGED
@@ -1393,10 +1393,12 @@ const OPACITY = {
1393
1393
  0: "00"
1394
1394
  };
1395
1395
  const PAGE_TAKE_DEFAULT = { page: 1, take: 10 };
1396
+ const TABLET_MEDIA = "@media (min-width: 768px) and (max-width: 1366px)";
1396
1397
  const other_const = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1397
1398
  __proto__: null,
1398
1399
  OPACITY,
1399
- PAGE_TAKE_DEFAULT
1400
+ PAGE_TAKE_DEFAULT,
1401
+ TABLET_MEDIA
1400
1402
  }, Symbol.toStringTag, { value: "Module" }));
1401
1403
  const ANIMATION_TIME = 300;
1402
1404
  const SCALE_VALUE = "scale(1.05)";
@@ -39650,7 +39652,7 @@ const getFocusedListItemIndex = (listElement) => {
39650
39652
  return children.indexOf(getActiveElement(listElement));
39651
39653
  };
39652
39654
  const DEFAULT_DESKTOP_MODE_MEDIA_QUERY = "@media (pointer: fine)";
39653
- function mergeSx(...sxProps) {
39655
+ function mergeSx$1(...sxProps) {
39654
39656
  return sxProps.reduce((acc, sxProp) => {
39655
39657
  if (Array.isArray(sxProp)) {
39656
39658
  acc.push(...sxProp);
@@ -67767,7 +67769,7 @@ const MobileDateTimePicker = /* @__PURE__ */ React__namespace.forwardRef(functio
67767
67769
  hidden: false
67768
67770
  }, (_c = defaultizedProps.slotProps) == null ? void 0 : _c.tabs),
67769
67771
  layout: _extends({}, (_d = defaultizedProps.slotProps) == null ? void 0 : _d.layout, {
67770
- sx: mergeSx([{
67772
+ sx: mergeSx$1([{
67771
67773
  [`& .${multiSectionDigitalClockClasses.root}`]: {
67772
67774
  width: DIALOG_WIDTH
67773
67775
  },
@@ -74153,6 +74155,34 @@ const ButtonUploadFileElement = ({
74153
74155
  /* @__PURE__ */ jsxRuntime.jsx("input", { type: "file", accept, hidden: true, multiple, ref: fileInputRef, onChange: change })
74154
74156
  ] });
74155
74157
  };
74158
+ const mergeSx = (...items) => {
74159
+ return items.flatMap((item) => {
74160
+ if (!item) return [];
74161
+ return Array.isArray(item) ? item : [item];
74162
+ });
74163
+ };
74164
+ const buttonRootSx = {
74165
+ minWidth: 100,
74166
+ textTransform: "none",
74167
+ borderRadius: BORDER_RADIUS_ELEMENT_SMALL,
74168
+ width: "fit-content",
74169
+ [TABLET_MEDIA]: {
74170
+ minWidth: 120,
74171
+ minHeight: 44,
74172
+ px: 2.5,
74173
+ py: 1,
74174
+ "& .MuiButton-startIcon .material-symbols-rounded, & .MuiButton-endIcon .material-symbols-rounded": {
74175
+ fontSize: 22
74176
+ }
74177
+ }
74178
+ };
74179
+ const buttonContentSx = {
74180
+ ...TYPOGRAPHY.textSm.regular,
74181
+ whiteSpace: "nowrap",
74182
+ [TABLET_MEDIA]: {
74183
+ ...TYPOGRAPHY.textMd.medium
74184
+ }
74185
+ };
74156
74186
  const ButtonElement = ({
74157
74187
  content,
74158
74188
  loading = false,
@@ -74161,7 +74191,6 @@ const ButtonElement = ({
74161
74191
  variant = "contained",
74162
74192
  sx,
74163
74193
  disabled = false,
74164
- permission,
74165
74194
  ...rest
74166
74195
  }) => {
74167
74196
  const { palette } = material.useTheme();
@@ -74172,13 +74201,7 @@ const ButtonElement = ({
74172
74201
  variant,
74173
74202
  startIcon: !loading && startIcon ? typeof startIcon === "string" ? /* @__PURE__ */ jsxRuntime.jsx(IconElement, { icon: startIcon, sx: { cursor: "pointer" } }) : startIcon : void 0,
74174
74203
  endIcon: !loading && endIcon ? typeof endIcon === "string" ? /* @__PURE__ */ jsxRuntime.jsx(IconElement, { icon: endIcon, sx: { cursor: "pointer" } }) : endIcon : void 0,
74175
- sx: {
74176
- minWidth: 100,
74177
- textTransform: "none",
74178
- borderRadius: BORDER_RADIUS_ELEMENT_SMALL,
74179
- width: "fit-content",
74180
- ...sx
74181
- },
74204
+ sx: mergeSx(buttonRootSx, sx),
74182
74205
  disabled,
74183
74206
  children: loading ? /* @__PURE__ */ jsxRuntime.jsx(
74184
74207
  LoadingComponent,
@@ -74187,7 +74210,7 @@ const ButtonElement = ({
74187
74210
  size: "small",
74188
74211
  sx: { minHeight: "24.5px" }
74189
74212
  }
74190
- ) : /* @__PURE__ */ jsxRuntime.jsx(material.Typography, { sx: { ...TYPOGRAPHY.textSm.regular, whiteSpace: "nowrap" }, children: content })
74213
+ ) : /* @__PURE__ */ jsxRuntime.jsx(material.Typography, { sx: buttonContentSx, children: content })
74191
74214
  }
74192
74215
  );
74193
74216
  };
@@ -74292,6 +74315,31 @@ const getButtonColor = (button, position) => {
74292
74315
  ...buttonProps
74293
74316
  };
74294
74317
  };
74318
+ const dialogTitleTextSx = {
74319
+ fontSize: "16px",
74320
+ [TABLET_MEDIA]: {
74321
+ fontSize: "18px",
74322
+ lineHeight: "26px"
74323
+ }
74324
+ };
74325
+ const dialogTitleIconSx = {
74326
+ [TABLET_MEDIA]: {
74327
+ fontSize: 22
74328
+ }
74329
+ };
74330
+ const dialogCloseButtonSx = {
74331
+ [TABLET_MEDIA]: {
74332
+ width: 44,
74333
+ height: 44,
74334
+ padding: 1.25
74335
+ }
74336
+ };
74337
+ const dialogCloseIconSx = {
74338
+ fontSize: 20,
74339
+ [TABLET_MEDIA]: {
74340
+ fontSize: 24
74341
+ }
74342
+ };
74295
74343
  const DialogElement = ({
74296
74344
  iconLabel = "",
74297
74345
  label,
@@ -74361,10 +74409,11 @@ const DialogElement = ({
74361
74409
  icon: iconLabel,
74362
74410
  content: label.toLowerCase(),
74363
74411
  size: "medium",
74364
- sxText: { fontSize: "16px", ...sxTitle }
74412
+ sxIcon: dialogTitleIconSx,
74413
+ sxText: { ...dialogTitleTextSx, ...sxTitle }
74365
74414
  }
74366
74415
  ),
74367
- closeButton && /* @__PURE__ */ jsxRuntime.jsx(material.IconButton, { onClick: () => onClose == null ? void 0 : onClose({}, "escapeKeyDown"), children: /* @__PURE__ */ jsxRuntime.jsx(IconElement, { icon: "close", sx: { fontSize: 20 } }) })
74416
+ closeButton && /* @__PURE__ */ jsxRuntime.jsx(material.IconButton, { onClick: () => onClose == null ? void 0 : onClose({}, "escapeKeyDown"), sx: dialogCloseButtonSx, children: /* @__PURE__ */ jsxRuntime.jsx(IconElement, { icon: "close", sx: dialogCloseIconSx }) })
74368
74417
  ] }),
74369
74418
  nodeLabel
74370
74419
  ]
@@ -74412,15 +74461,7 @@ const DialogElement = ({
74412
74461
  /* @__PURE__ */ jsxRuntime.jsxs(StackRow, { sx: { flex: 1, justifyContent: "flex-end" }, children: [
74413
74462
  styledButtonLeft && /* @__PURE__ */ jsxRuntime.jsx(ButtonElement, { ...styledButtonLeft, fullWidth }),
74414
74463
  styledButtonCenter && /* @__PURE__ */ jsxRuntime.jsx(ButtonElement, { ...styledButtonCenter, fullWidth }),
74415
- styledButtonRight && /* @__PURE__ */ jsxRuntime.jsx(
74416
- ButtonElement,
74417
- {
74418
- ...styledButtonRight,
74419
- fullWidth,
74420
- loading: styledButtonRight.loading,
74421
- sx: { bgcolor: styledButtonRight.color }
74422
- }
74423
- )
74464
+ styledButtonRight && /* @__PURE__ */ jsxRuntime.jsx(ButtonElement, { ...styledButtonRight, fullWidth, loading: styledButtonRight.loading })
74424
74465
  ] })
74425
74466
  ] }) })
74426
74467
  }
@@ -77496,7 +77537,6 @@ const AppsSidebar = ({
77496
77537
  onClickApp
77497
77538
  }) => {
77498
77539
  if (!isOpen) return null;
77499
- const theme = useTheme();
77500
77540
  const appsGroupObj = Object.keys(APP_OBJ).reduce(
77501
77541
  (r2, key) => {
77502
77542
  if (blacklist.includes(key)) return r2;
@@ -77534,7 +77574,7 @@ const AppsSidebar = ({
77534
77574
  left: position === "left" ? 0 : "auto",
77535
77575
  right: position === "right" ? 0 : "auto",
77536
77576
  height: "100%",
77537
- backgroundColor: theme.palette.common.white,
77577
+ backgroundColor: BACKGROUND[50],
77538
77578
  zIndex: 100,
77539
77579
  padding: PADDING_GAP_LAYOUT,
77540
77580
  overflowY: "auto"
@@ -77554,8 +77594,8 @@ const AppsSidebar = ({
77554
77594
  iconRadius: 5.5,
77555
77595
  titleVariant: "body1",
77556
77596
  captionVariant: "caption",
77557
- titleColor: theme.palette.grey[800],
77558
- captionColor: theme.palette.grey[600],
77597
+ titleColor: GRAY[500],
77598
+ captionColor: GRAY[500],
77559
77599
  onClickApp,
77560
77600
  showPagination: false
77561
77601
  }