asma-core-ui 3.1.0-beta.4 → 4.0.0-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.
Files changed (37) hide show
  1. package/dist/asma-core-ui.es.js +7 -7
  2. package/dist/src/components/custom/widget/widget/StyledWidget.d.ts +2 -2
  3. package/dist/src/components/feedback/minimizable-dialog/MinimizableDialog.d.ts +3 -3
  4. package/dist/src/components/feedback/snack-bar/SnackbarProvider.d.ts +32 -0
  5. package/dist/src/components/feedback/snack-bar/StyledAlertSnackbar.d.ts +11 -0
  6. package/dist/src/components/feedback/snack-bar/components/StyledInfoSnackbar.d.ts +12 -0
  7. package/dist/src/components/feedback/snack-bar/components/processMessageError.d.ts +3 -0
  8. package/dist/src/components/feedback/snack-bar/components/processMessageInfo.d.ts +3 -0
  9. package/dist/src/components/feedback/snack-bar/components/types.d.ts +10 -0
  10. package/dist/src/components/feedback/snack-bar/components-styled/InfoMessages.d.ts +2 -0
  11. package/dist/src/components/feedback/snack-bar/index.d.ts +5 -0
  12. package/dist/src/components/feedback/snack-bar/message.d.ts +17 -0
  13. package/dist/src/components/feedback/snack-bar/processAlertSnackBar.d.ts +1 -0
  14. package/dist/src/components/feedback/snack-bar/processInfoSnackbar.d.ts +1 -0
  15. package/dist/src/components/icons/calendar-icon/NewCalendarIcon.d.ts +2 -0
  16. package/dist/src/components/icons/calendar-icon/index.d.ts +1 -0
  17. package/dist/src/components/icons/handyman-icon/HandymanIcon.d.ts +2 -0
  18. package/dist/src/components/icons/handyman-icon/index.d.ts +1 -0
  19. package/dist/src/components/icons/handyman-outline-icon/HandymanOutlineIcon.d.ts +2 -0
  20. package/dist/src/components/icons/handyman-outline-icon/index.d.ts +1 -0
  21. package/dist/src/components/icons/index.d.ts +4 -0
  22. package/dist/src/components/icons/pin-icon/PinIcon.d.ts +2 -0
  23. package/dist/src/components/icons/pin-icon/index.d.ts +1 -0
  24. package/dist/src/components/icons/work-icon/WorkIcon.d.ts +2 -0
  25. package/dist/src/components/icons/work-icon/index.d.ts +1 -0
  26. package/dist/src/components/inputs/rich-input/RichInput.d.ts +1 -0
  27. package/dist/src/components/inputs/select-autocomplete/StyledSelectAutocomplete.d.ts +2 -1
  28. package/dist/src/components/table/StyledTable.d.ts +8 -2
  29. package/dist/src/components/table/components/TableHeader.d.ts +2 -1
  30. package/dist/src/components/table/components/TableHeaderCell.d.ts +3 -2
  31. package/dist/src/components/table/types.d.ts +1 -1
  32. package/dist/src/components/utils/filter-menu/StyledFilterMenu.d.ts +2 -0
  33. package/dist/src/index.d.ts +2 -1
  34. package/dist/tailwind.config.d.ts +1 -1
  35. package/package.json +10 -3
  36. package/tw-configs/twConfigs.json +4 -2
  37. package/dist/style.css +0 -1
@@ -1,5 +1,5 @@
1
1
  import type { PropsWithChildren, ReactNode } from 'react';
2
- export type StyledTableProps = {
2
+ export type StyledWidgetProps = {
3
3
  title: string;
4
4
  icon?: ReactNode;
5
5
  link?: {
@@ -13,4 +13,4 @@ export type StyledTableProps = {
13
13
  hide?: boolean;
14
14
  };
15
15
  };
16
- export declare const StyledWidget: React.FC<PropsWithChildren<StyledTableProps>>;
16
+ export declare const StyledWidget: React.FC<PropsWithChildren<StyledWidgetProps>>;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import { type ReactNode } from 'react';
2
2
  export declare const MinimizableDialog: React.FC<{
3
3
  onCloseText: string;
4
4
  onMinimizeText: string;
@@ -8,8 +8,8 @@ export declare const MinimizableDialog: React.FC<{
8
8
  showCloseIcon?: boolean;
9
9
  showMinimizeIcon?: boolean;
10
10
  showExpandIcon?: boolean;
11
- title: string;
12
- label?: string;
11
+ title: ReactNode;
12
+ label?: ReactNode;
13
13
  children?: React.ReactNode;
14
14
  className?: string;
15
15
  primaryButtonText?: string;
@@ -0,0 +1,32 @@
1
+ import type { AlertColor } from '@mui/material';
2
+ import { type SnackbarProviderProps } from 'notistack';
3
+ /**
4
+ * @ignore
5
+ * @internal
6
+ */
7
+ export declare const SnackbarProvider: (props: SnackbarProviderProps) => JSX.Element;
8
+ declare module 'notistack' {
9
+ interface VariantOverrides {
10
+ alert: {
11
+ /**
12
+ * The className to apply to the alert.
13
+ */
14
+ alertClassName?: string;
15
+ /**
16
+ * The variant to use.
17
+ * @default 'standard'
18
+ */
19
+ alertVariant?: 'standard' | 'filled' | 'outlined';
20
+ /**
21
+ * The severity of the alert. This defines the color and icon used.
22
+ * @default 'success'
23
+ */
24
+ severity?: AlertColor;
25
+ /**
26
+ * If true, the alert is closable.
27
+ * @default false
28
+ */
29
+ closeButton?: boolean;
30
+ };
31
+ }
32
+ }
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import type { AlertColor } from '@mui/material';
3
+ import { type CustomContentProps } from 'notistack';
4
+ interface StyledAlertSnackbarProps extends CustomContentProps {
5
+ severity?: AlertColor;
6
+ alertClassName?: string;
7
+ alertVariant?: 'standard' | 'filled' | 'outlined';
8
+ closeButton?: boolean;
9
+ }
10
+ export declare const StyledAlertSnackbar: import("react").ForwardRefExoticComponent<StyledAlertSnackbarProps & import("react").RefAttributes<HTMLDivElement>>;
11
+ export {};
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import type { AlertColor } from '@mui/material';
3
+ import { type CustomContentProps } from 'notistack';
4
+ interface StyledInfoSnackbarProps extends CustomContentProps {
5
+ severity?: AlertColor;
6
+ alertClassName?: string;
7
+ alertVariant?: 'standard' | 'filled' | 'outlined';
8
+ closeButton?: boolean;
9
+ type?: 'loading';
10
+ }
11
+ export declare const StyledInfoSnackbar: import("react").ForwardRefExoticComponent<StyledInfoSnackbarProps & import("react").RefAttributes<HTMLDivElement>>;
12
+ export {};
@@ -0,0 +1,3 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { MessageProps } from './types';
3
+ export declare function processMessageError(messageInfo: string | ReactNode, options?: MessageProps): () => void;
@@ -0,0 +1,3 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { MessageProps } from './types';
3
+ export declare function processMessageInfo(messageInfo: string | ReactNode, options?: MessageProps): () => void;
@@ -0,0 +1,10 @@
1
+ import type { AlertColor } from '@mui/material';
2
+ import type { SnackbarProviderProps } from 'notistack';
3
+ export type MessageProps = SnackbarProviderProps & {
4
+ severity?: AlertColor;
5
+ persist?: boolean;
6
+ closeButton?: boolean;
7
+ className?: string;
8
+ id?: string;
9
+ type?: 'loading';
10
+ };
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const InfoMessages: React.FC;
@@ -1 +1,6 @@
1
+ export * from './SnackbarProvider';
2
+ export { enqueueSnackbar, closeSnackbar, useSnackbar } from 'notistack';
1
3
  export * from './StyledSnackbar';
4
+ export * from './processAlertSnackBar';
5
+ export * from './processInfoSnackbar';
6
+ export * from './message';
@@ -0,0 +1,17 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { MessageProps } from './components/types';
3
+ /**
4
+ * Important props:
5
+ * @param id - string. To control the message
6
+ * @remarks use callBack function to close the message manually. Providing ID as a param is important in this case.
7
+ * Without ID, callback fil force close all active notifications
8
+ * @param closeButton - true | false
9
+ * @param persist - true | false
10
+ * @param autoHideDuration - number
11
+ * @moreProps https://notistack.com/api-reference#mutual-props
12
+ */
13
+ export declare const message: {
14
+ info: (messageInfo: string | ReactNode, options?: MessageProps) => (() => void);
15
+ error: (messageInfo: string | ReactNode, options?: MessageProps) => (() => void);
16
+ loading: (messageInfo: string | ReactNode, options?: MessageProps) => (() => void);
17
+ };
@@ -0,0 +1 @@
1
+ export declare function processAlertSnackBar(message: string): void;
@@ -0,0 +1 @@
1
+ export declare function processInfoSnackbar(message: string): void;
@@ -0,0 +1,2 @@
1
+ import type { SVGProps } from 'react';
2
+ export declare const NewCalendarIcon: (props: SVGProps<SVGSVGElement>) => JSX.Element;
@@ -1 +1,2 @@
1
1
  export * from './CalendarIcon';
2
+ export * from './NewCalendarIcon';
@@ -0,0 +1,2 @@
1
+ import type { SVGProps } from 'react';
2
+ export declare function HandymanIcon(props: SVGProps<SVGSVGElement>): JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './HandymanIcon.jsx';
@@ -0,0 +1,2 @@
1
+ import type { SVGProps } from 'react';
2
+ export declare function HandymanOutlineIcon(props: SVGProps<SVGSVGElement>): JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './HandymanOutlineIcon.jsx';
@@ -76,3 +76,7 @@ export * from './badge-icon';
76
76
  export * from './edit-square-icon';
77
77
  export * from './plus-icon';
78
78
  export * from './plus-icon-circle';
79
+ export * from './handyman-outline-icon';
80
+ export * from './handyman-icon';
81
+ export * from './pin-icon';
82
+ export * from './work-icon';
@@ -0,0 +1,2 @@
1
+ import type { SVGProps } from 'react';
2
+ export declare function PinIcon(props: SVGProps<SVGSVGElement>): JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './PinIcon';
@@ -0,0 +1,2 @@
1
+ import type { SVGProps } from 'react';
2
+ export declare function WorkIcon(props: SVGProps<SVGSVGElement>): JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './WorkIcon';
@@ -7,6 +7,7 @@ export interface IRichInput extends ReactQuill.ReactQuillProps {
7
7
  is_error?: boolean;
8
8
  helperText?: string;
9
9
  dataTest: string;
10
+ ghost?: boolean;
10
11
  }
11
12
  declare const RichInput: FC<IRichInput>;
12
13
  export { RichInput };
@@ -6,6 +6,7 @@ import { type AutocompleteProps, type ChipTypeMap } from '@mui/material';
6
6
  * inputRef to get Node of Input Element inside
7
7
  *
8
8
  */
9
- export declare function StyledSelectAutocomplete<T, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, ChipComponent extends React.ElementType = ChipTypeMap['defaultComponent']>({ dataTest, ...props }: AutocompleteProps<T, Multiple, DisableClearable, FreeSolo, ChipComponent> & {
9
+ export declare function StyledSelectAutocomplete<T, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, ChipComponent extends React.ElementType = ChipTypeMap['defaultComponent']>({ dataTest, autoHeight, ...props }: AutocompleteProps<T, Multiple, DisableClearable, FreeSolo, ChipComponent> & {
10
10
  dataTest: string;
11
+ autoHeight?: boolean;
11
12
  }): JSX.Element;
@@ -1,4 +1,6 @@
1
- import { type StyledTableProps } from './types';
1
+ import { type StyledTableProps, type TableState } from './types';
2
+ import { TableBody } from './components/TableBody';
3
+ import type { ColumnSizingState } from './types';
2
4
  /**
3
5
  *
4
6
  * Custom props:
@@ -9,4 +11,8 @@ import { type StyledTableProps } from './types';
9
11
  */
10
12
  export declare const StyledTable: <TData extends {
11
13
  id: string | number;
12
- }, TCustomData = Record<string, unknown>>(props: StyledTableProps<TData, TCustomData>) => JSX.Element;
14
+ }, TCustomData = Record<string, unknown>>(props: StyledTableProps<TData, TCustomData> & {
15
+ getColumnSizing?: ((column_sizing: ColumnSizingState) => void) | undefined;
16
+ getTableState?: ((tableState: TableState) => void) | undefined;
17
+ }) => JSX.Element;
18
+ export declare const MemoizedTableBody: typeof TableBody;
@@ -3,7 +3,8 @@ import { type Table } from '@tanstack/react-table';
3
3
  import type { StyledTableProps } from '../types';
4
4
  export declare function TableHeader<TData extends {
5
5
  id: string | number;
6
- }, TCustomData = Record<string, unknown>>({ table, styledTableProps }: {
6
+ }, TCustomData = Record<string, unknown>>({ table, styledTableProps, tableCanResize, }: {
7
7
  table: Table<TData>;
8
8
  styledTableProps: StyledTableProps<TData, TCustomData>;
9
+ tableCanResize: boolean;
9
10
  }): JSX.Element | null;
@@ -1,9 +1,10 @@
1
1
  /// <reference types="react" />
2
2
  import { type Header } from '@tanstack/react-table';
3
- import type { StyledTableProps } from '../types';
3
+ import { type StyledTableProps } from '../types';
4
4
  export declare function TableHeaderCell<TData extends {
5
5
  id: string | number;
6
- }, TCustomData = Record<string, unknown>>({ styledTableProps, header, }: {
6
+ }, TCustomData = Record<string, unknown>>({ styledTableProps, header, tableCanResize, }: {
7
7
  styledTableProps: StyledTableProps<TData, TCustomData>;
8
8
  header: Header<TData, unknown>;
9
+ tableCanResize: boolean;
9
10
  }): JSX.Element;
@@ -32,6 +32,7 @@ type IHideFooter = {
32
32
  };
33
33
  type TFooter<TData> = IFooter<TData> | IHideFooter;
34
34
  type TTableOptions<TData> = TableOptions<TData>;
35
+ export type * from '@tanstack/react-table';
35
36
  export type StyledTableProps<TData, TCustomData> = {
36
37
  locale?: 'no' | 'en';
37
38
  height?: string | number;
@@ -62,4 +63,3 @@ export type StyledTableProps<TData, TCustomData> = {
62
63
  export declare const SELECT_COLUMN_ID = "select";
63
64
  export declare const EXPAND_COLUMN_ID = "expand-column-id";
64
65
  export declare const ACTIONS_COLUMN_ID = "actions";
65
- export {};
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import type { PopoverProps } from '@mui/material';
2
3
  /**
3
4
  * Custom props:
4
5
  * @param filterIsActive - needed to determine whether or not to show the dot in the top right corner indicating some changes were made
@@ -11,6 +12,7 @@ type StyledFilterMenuProps = {
11
12
  disabled?: boolean;
12
13
  size?: 'small' | 'large' | 'medium';
13
14
  variant?: 'contained' | 'outlined' | 'text' | 'textGray';
15
+ popoverProps?: Omit<PopoverProps, 'open' | 'anchorEl' | 'onClose'>;
14
16
  };
15
17
  export declare const StyledFilterMenu: React.FC<StyledFilterMenuProps>;
16
18
  export {};
@@ -6,6 +6,7 @@ export * from './components/icons';
6
6
  export * from './components/data-display/typography';
7
7
  export * from './components/feedback/dialog';
8
8
  export * from './components/feedback/alert';
9
+ export * from './components/feedback/snack-bar';
9
10
  export * from './components/inputs/button';
10
11
  export * from './components/inputs/checkbox';
11
12
  export * from './components/inputs/input-field';
@@ -17,7 +18,6 @@ export * from './components/inputs/slider';
17
18
  export * from './components/inputs/switch';
18
19
  export * from './components/inputs/radio-button';
19
20
  export * from './components/inputs/label';
20
- export * from './components/feedback/snack-bar';
21
21
  export * from './components/pickers/date-picker';
22
22
  export * from './components/pickers/time-picker';
23
23
  export * from './components/miscellaneous/StyledFormControl';
@@ -35,6 +35,7 @@ export * from './components/table';
35
35
  export * from './components/utils/popover';
36
36
  export * from './components/custom/widget/widget-title/StyledWidgetTitle';
37
37
  export * from './components/custom/widget/widget-header/StyledWidgetHeader';
38
+ export * from './components/custom/widget/widget/StyledWidget';
38
39
  export * from './components/custom/module/module-title/StyledModuleTitle';
39
40
  export * from './components/utils/filter-menu/StyledFilterMenu';
40
41
  export * from './components/feedback/minimizable-dialog/MinimizableDialog';
@@ -43,7 +43,6 @@ declare const _default: {
43
43
  "delta-900": string;
44
44
  "delta-9000": string;
45
45
  "sigma-700": string;
46
- "zeta-700": string;
47
46
  "theta-100": string;
48
47
  "theta-200": string;
49
48
  "theta-300": string;
@@ -72,6 +71,7 @@ declare const _default: {
72
71
  };
73
72
  boxShadow: {
74
73
  ash: string;
74
+ mui: string;
75
75
  };
76
76
  animation: {
77
77
  "slide-in": string;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "3.1.0-beta.4",
6
+ "version": "4.0.0-1",
7
7
  "type": "module",
8
8
  "files": [
9
9
  "dist/**/*",
@@ -17,7 +17,7 @@
17
17
  "module": "./dist/asma-core-ui.es.js",
18
18
  "scripts": {
19
19
  "dev": "vite",
20
- "build": "tsc && rm -rf ./dist && vite build",
20
+ "build": "npx tsc && rm -rf ./dist && vite build",
21
21
  "preview": "vite preview",
22
22
  "lint": "eslint src/**/*.{js,jsx,ts,tsx}",
23
23
  "version": "echo $npm_package_version",
@@ -37,11 +37,14 @@
37
37
  },
38
38
  "license": "UNLICENSED",
39
39
  "dependencies": {
40
+ "@emotion/react": "^11.11.1",
41
+ "@emotion/styled": "^11.11.0",
40
42
  "@fontsource/material-icons": "^5.0.4",
41
43
  "@fontsource/roboto": "^5.0.4",
42
44
  "@iconify/react": "^4.1.1",
43
45
  "@mui/material": "^5.13.7",
44
46
  "@tanstack/react-table": "^8.10.0",
47
+ "asma-core-ui": "^3.0.53",
45
48
  "clsx": "^1.2.1",
46
49
  "date-fns": "^2.30.0",
47
50
  "lodash-es": "^4.17.21",
@@ -51,7 +54,9 @@
51
54
  "react": "^18.2.0",
52
55
  "react-day-picker": "^8.8.2",
53
56
  "react-dom": "^18.2.0",
54
- "react-quill": "^2.0.0"
57
+ "react-quill": "^2.0.0",
58
+ "sass": "^1.77.5",
59
+ "vite-plugin-css-injected-by-js": "^3.5.1"
55
60
  },
56
61
  "devDependencies": {
57
62
  "@changesets/cli": "^2.26.2",
@@ -100,6 +105,8 @@
100
105
  "vite-tsconfig-paths": "^4.2.0"
101
106
  },
102
107
  "peerDependencies": {
108
+ "@emotion/react": "^11.*",
109
+ "@emotion/styled": "^11.*",
103
110
  "@mui/material": "^5.*",
104
111
  "immer": "^9.*",
105
112
  "react": "^18.*",
@@ -38,7 +38,6 @@
38
38
  "delta-900": "var(--colors-delta-900)",
39
39
  "delta-9000": "var(--colors-gray-9000)",
40
40
  "sigma-700": "var(--colors-sigma-700)",
41
- "zeta-700": "var(--colors-zeta-700)",
42
41
  "theta-100": "var(--colors-theta-100)",
43
42
  "theta-200": "var(--colors-theta-200)",
44
43
  "theta-300": "var(--colors-theta-300)",
@@ -66,7 +65,10 @@
66
65
  "custom-grey-04": "hsl(var(--color-cardea--grey-04) / <alpha-value>)",
67
66
  "custom-grey-06": "hsl(var(--color-cardea--grey-06) / <alpha-value>)"
68
67
  },
69
- "boxShadow": { "ash": "-1px 8px 18px -20px black" },
68
+ "boxShadow": {
69
+ "ash": "-1px 8px 18px -20px black",
70
+ "mui": "0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12)"
71
+ },
70
72
  "animation": {
71
73
  "slide-in": "slide-in 0.3s linear",
72
74
  "slide-out": "slide-out 0.3s linear",