asma-core-ui 3.1.0-beta.4 → 4.0.0-2

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 (28) 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/icons/calendar-icon/NewCalendarIcon.d.ts +2 -0
  5. package/dist/src/components/icons/calendar-icon/index.d.ts +1 -0
  6. package/dist/src/components/icons/handyman-icon/HandymanIcon.d.ts +2 -0
  7. package/dist/src/components/icons/handyman-icon/index.d.ts +1 -0
  8. package/dist/src/components/icons/handyman-outline-icon/HandymanOutlineIcon.d.ts +2 -0
  9. package/dist/src/components/icons/handyman-outline-icon/index.d.ts +1 -0
  10. package/dist/src/components/icons/index.d.ts +4 -0
  11. package/dist/src/components/icons/pin-icon/PinIcon.d.ts +2 -0
  12. package/dist/src/components/icons/pin-icon/index.d.ts +1 -0
  13. package/dist/src/components/icons/work-icon/WorkIcon.d.ts +2 -0
  14. package/dist/src/components/icons/work-icon/index.d.ts +1 -0
  15. package/dist/src/components/inputs/rich-input/RichInput.d.ts +1 -0
  16. package/dist/src/components/inputs/select-autocomplete/StyledSelectAutocomplete.d.ts +2 -1
  17. package/dist/src/components/table/StyledTable.d.ts +8 -2
  18. package/dist/src/components/table/components/TableHeader.d.ts +2 -1
  19. package/dist/src/components/table/components/TableHeaderCell.d.ts +3 -2
  20. package/dist/src/components/table/types.d.ts +1 -1
  21. package/dist/src/components/utils/filter-menu/StyledFilterMenu.d.ts +2 -0
  22. package/dist/src/index.d.ts +1 -1
  23. package/dist/tailwind.config.d.ts +1 -1
  24. package/package.json +10 -4
  25. package/tw-configs/twConfigs.json +4 -2
  26. package/dist/src/components/feedback/snack-bar/StyledSnackbar.d.ts +0 -2
  27. package/dist/src/components/feedback/snack-bar/index.d.ts +0 -1
  28. 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,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 {};
@@ -17,7 +17,6 @@ export * from './components/inputs/slider';
17
17
  export * from './components/inputs/switch';
18
18
  export * from './components/inputs/radio-button';
19
19
  export * from './components/inputs/label';
20
- export * from './components/feedback/snack-bar';
21
20
  export * from './components/pickers/date-picker';
22
21
  export * from './components/pickers/time-picker';
23
22
  export * from './components/miscellaneous/StyledFormControl';
@@ -35,6 +34,7 @@ export * from './components/table';
35
34
  export * from './components/utils/popover';
36
35
  export * from './components/custom/widget/widget-title/StyledWidgetTitle';
37
36
  export * from './components/custom/widget/widget-header/StyledWidgetHeader';
37
+ export * from './components/custom/widget/widget/StyledWidget';
38
38
  export * from './components/custom/module/module-title/StyledModuleTitle';
39
39
  export * from './components/utils/filter-menu/StyledFilterMenu';
40
40
  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-2",
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,21 +37,25 @@
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",
48
51
  "material-ui-popup-state": "^5.0.10",
49
52
  "node": "18.17.0",
50
- "notistack": "^3.0.1",
51
53
  "react": "^18.2.0",
52
54
  "react-day-picker": "^8.8.2",
53
55
  "react-dom": "^18.2.0",
54
- "react-quill": "^2.0.0"
56
+ "react-quill": "^2.0.0",
57
+ "sass": "^1.77.5",
58
+ "vite-plugin-css-injected-by-js": "^3.5.1"
55
59
  },
56
60
  "devDependencies": {
57
61
  "@changesets/cli": "^2.26.2",
@@ -100,6 +104,8 @@
100
104
  "vite-tsconfig-paths": "^4.2.0"
101
105
  },
102
106
  "peerDependencies": {
107
+ "@emotion/react": "^11.*",
108
+ "@emotion/styled": "^11.*",
103
109
  "@mui/material": "^5.*",
104
110
  "immer": "^9.*",
105
111
  "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",
@@ -1,2 +0,0 @@
1
- import { type SnackbarProps } from '@mui/material';
2
- export declare const StyledSnackbar: ({ children, ...props }: SnackbarProps) => JSX.Element;
@@ -1 +0,0 @@
1
- export * from './StyledSnackbar';