smarthr-ui 30.4.0 → 30.5.0

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,9 +1,10 @@
1
- import React, { HTMLAttributes } from 'react';
1
+ import React, { HTMLAttributes, ReactNode } from 'react';
2
+ import { DecoratorsType } from '../../../types/props';
2
3
  type Category = {
3
4
  type?: string;
4
- heading: string;
5
+ heading: ReactNode;
5
6
  items: Array<{
6
- label: string;
7
+ label: ReactNode;
7
8
  url: string;
8
9
  target?: string;
9
10
  }>;
@@ -11,6 +12,8 @@ type Category = {
11
12
  type Props = {
12
13
  apps: Category[];
13
14
  urlToShowAll?: string | null;
15
+ /** コンポーネント内の文言を変更するための関数を設定 */
16
+ decorators?: DecoratorsType<'triggerLabel'>;
14
17
  };
15
18
  type ElementProps = Omit<HTMLAttributes<HTMLElement>, keyof Props>;
16
19
  export declare const AppLauncher: React.FC<Props & ElementProps>;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { useMemo } from 'react';
2
2
  import styled, { css } from 'styled-components';
3
3
  import { useTheme } from '../../../hooks/useTheme';
4
4
  import { Button } from '../../Button';
@@ -8,14 +8,16 @@ import { FaToolboxIcon } from '../../Icon';
8
8
  import { Cluster, Stack } from '../../Layout';
9
9
  import { TextLink } from '../../TextLink';
10
10
  import { useClassNames } from './useClassNames';
11
- export const AppLauncher = ({ apps, urlToShowAll, ...props }) => {
11
+ const TRIGGER_LABEL = 'アプリ';
12
+ export const AppLauncher = ({ apps, urlToShowAll, decorators, ...props }) => {
12
13
  const theme = useTheme();
13
14
  const classNames = useClassNames();
15
+ const triggerLabel = useMemo(() => decorators?.triggerLabel?.(TRIGGER_LABEL) || TRIGGER_LABEL, [decorators]);
14
16
  const baseApps = apps.find(({ type }) => type === 'base');
15
17
  const others = apps.filter((category) => category !== baseApps);
16
18
  return (React.createElement(Dropdown, { ...props },
17
19
  React.createElement(DropdownTrigger, null,
18
- React.createElement(AppsButton, { themes: theme, prefix: React.createElement(FaToolboxIcon, null) }, "\u30A2\u30D7\u30EA")),
20
+ React.createElement(AppsButton, { themes: theme, prefix: React.createElement(FaToolboxIcon, null) }, triggerLabel)),
19
21
  React.createElement(DropdownContent, { controllable: true },
20
22
  React.createElement(Wrapper, { themes: theme, className: classNames.wrapper },
21
23
  React.createElement(DropdownScrollArea, null,
@@ -1 +1 @@
1
- {"version":3,"file":"AppLauncher.js","sourceRoot":"","sources":["../../../../src/components/Header/AppLauncher/AppLauncher.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyB,MAAM,OAAO,CAAA;AAC7C,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAE/C,OAAO,EAAS,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAC/F,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAC1C,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAEzC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAkB/C,MAAM,CAAC,MAAM,WAAW,GAAmC,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IAC9F,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAA;IACxB,MAAM,UAAU,GAAG,aAAa,EAAE,CAAA;IAElC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,KAAK,MAAM,CAAC,CAAA;IACzD,MAAM,MAAM,GAAG,IA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M,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAmB;IAC3E,CAAC,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,CAAC,GAAG,CAAA;eAC5B,KAAK,CAAC,GAAG,CAAC;mBACN,OAAO,CAAC,MAAM;GAC9B;CACF,CAAA;AACD,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAmB;IAC3C,CAAC,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,CAAC,GAAG,CAAA;;0BAEhB,KAAK,CAAC,CAAC,IAAI,CAAC;;qBAEjB,KAAK,CAAC,CAAC,IAAI,CAAC;kBACf,MAAM,CAAC,SAAS;2BACP,KAAK,CAAC,CAAC,CAAC;sBACb,KAAK,CAAC,IAAI,CAAC;GAC9B;CACF,CAAA"}
@@ -23,7 +23,6 @@ export declare const HeaderDropdownMenuButton: import("styled-components").Style
23
23
  nonce?: string | undefined;
24
24
  tabIndex?: number | undefined;
25
25
  disabled?: boolean | undefined;
26
- autoFocus?: boolean | undefined;
27
26
  formAction?: string | undefined;
28
27
  formEncType?: string | undefined;
29
28
  formMethod?: string | undefined;
@@ -33,6 +32,7 @@ export declare const HeaderDropdownMenuButton: import("styled-components").Style
33
32
  defaultValue?: string | number | readonly string[] | undefined;
34
33
  suppressContentEditableWarning?: boolean | undefined;
35
34
  suppressHydrationWarning?: boolean | undefined;
35
+ autoFocus?: boolean | undefined;
36
36
  contextMenu?: string | undefined;
37
37
  placeholder?: string | undefined;
38
38
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -297,6 +297,7 @@ export declare const HeaderDropdownMenuButton: import("styled-components").Style
297
297
  defaultValue?: string | number | readonly string[] | undefined;
298
298
  suppressContentEditableWarning?: boolean | undefined;
299
299
  suppressHydrationWarning?: boolean | undefined;
300
+ autoFocus?: boolean | undefined;
300
301
  contextMenu?: string | undefined;
301
302
  placeholder?: string | undefined;
302
303
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -561,7 +562,6 @@ export declare const HeaderDropdownMenuButton: import("styled-components").Style
561
562
  nonce?: string | undefined;
562
563
  tabIndex?: number | undefined;
563
564
  disabled?: boolean | undefined;
564
- autoFocus?: boolean | undefined;
565
565
  formAction?: string | undefined;
566
566
  formEncType?: string | undefined;
567
567
  formMethod?: string | undefined;
@@ -571,6 +571,7 @@ export declare const HeaderDropdownMenuButton: import("styled-components").Style
571
571
  defaultValue?: string | number | readonly string[] | undefined;
572
572
  suppressContentEditableWarning?: boolean | undefined;
573
573
  suppressHydrationWarning?: boolean | undefined;
574
+ autoFocus?: boolean | undefined;
574
575
  contextMenu?: string | undefined;
575
576
  placeholder?: string | undefined;
576
577
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -835,6 +836,7 @@ export declare const HeaderDropdownMenuButton: import("styled-components").Style
835
836
  defaultValue?: string | number | readonly string[] | undefined;
836
837
  suppressContentEditableWarning?: boolean | undefined;
837
838
  suppressHydrationWarning?: boolean | undefined;
839
+ autoFocus?: boolean | undefined;
838
840
  contextMenu?: string | undefined;
839
841
  placeholder?: string | undefined;
840
842
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -1104,7 +1106,6 @@ export declare const HeaderDropdownMenuButton: import("styled-components").Style
1104
1106
  nonce?: string | undefined;
1105
1107
  tabIndex?: number | undefined;
1106
1108
  disabled?: boolean | undefined;
1107
- autoFocus?: boolean | undefined;
1108
1109
  formAction?: string | undefined;
1109
1110
  formEncType?: string | undefined;
1110
1111
  formMethod?: string | undefined;
@@ -1114,6 +1115,7 @@ export declare const HeaderDropdownMenuButton: import("styled-components").Style
1114
1115
  defaultValue?: string | number | readonly string[] | undefined;
1115
1116
  suppressContentEditableWarning?: boolean | undefined;
1116
1117
  suppressHydrationWarning?: boolean | undefined;
1118
+ autoFocus?: boolean | undefined;
1117
1119
  contextMenu?: string | undefined;
1118
1120
  placeholder?: string | undefined;
1119
1121
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -33,6 +33,7 @@ export declare const HeaderLink: import("styled-components").StyledComponent<imp
33
33
  defaultValue?: string | number | readonly string[] | undefined;
34
34
  suppressContentEditableWarning?: boolean | undefined;
35
35
  suppressHydrationWarning?: boolean | undefined;
36
+ autoFocus?: boolean | undefined;
36
37
  contextMenu?: string | undefined;
37
38
  placeholder?: string | undefined;
38
39
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -28,7 +28,6 @@ export declare const ItemButton: import("styled-components").StyledComponent<Rea
28
28
  nonce?: string | undefined;
29
29
  tabIndex?: number | undefined;
30
30
  disabled?: boolean | undefined;
31
- autoFocus?: boolean | undefined;
32
31
  formAction?: string | undefined;
33
32
  formEncType?: string | undefined;
34
33
  formMethod?: string | undefined;
@@ -38,6 +37,7 @@ export declare const ItemButton: import("styled-components").StyledComponent<Rea
38
37
  defaultValue?: string | number | readonly string[] | undefined;
39
38
  suppressContentEditableWarning?: boolean | undefined;
40
39
  suppressHydrationWarning?: boolean | undefined;
40
+ autoFocus?: boolean | undefined;
41
41
  contextMenu?: string | undefined;
42
42
  placeholder?: string | undefined;
43
43
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -1,9 +1,10 @@
1
- import React, { HTMLAttributes } from 'react';
1
+ import React, { HTMLAttributes, ReactNode } from 'react';
2
+ import { DecoratorsType } from '../../../types/props';
2
3
  type Category = {
3
4
  type?: string;
4
- heading: string;
5
+ heading: ReactNode;
5
6
  items: Array<{
6
- label: string;
7
+ label: ReactNode;
7
8
  url: string;
8
9
  target?: string;
9
10
  }>;
@@ -11,6 +12,8 @@ type Category = {
11
12
  type Props = {
12
13
  apps: Category[];
13
14
  urlToShowAll?: string | null;
15
+ /** コンポーネント内の文言を変更するための関数を設定 */
16
+ decorators?: DecoratorsType<'triggerLabel'>;
14
17
  };
15
18
  type ElementProps = Omit<HTMLAttributes<HTMLElement>, keyof Props>;
16
19
  export declare const AppLauncher: React.FC<Props & ElementProps>;
@@ -22,12 +22,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
22
22
  __setModuleDefault(result, mod);
23
23
  return result;
24
24
  };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
25
  Object.defineProperty(exports, "__esModule", { value: true });
29
26
  exports.AppLauncher = void 0;
30
- const react_1 = __importDefault(require("react"));
27
+ const react_1 = __importStar(require("react"));
31
28
  const styled_components_1 = __importStar(require("styled-components"));
32
29
  const useTheme_1 = require("../../../hooks/useTheme");
33
30
  const Button_1 = require("../../Button");
@@ -37,14 +34,16 @@ const Icon_1 = require("../../Icon");
37
34
  const Layout_1 = require("../../Layout");
38
35
  const TextLink_1 = require("../../TextLink");
39
36
  const useClassNames_1 = require("./useClassNames");
40
- const AppLauncher = ({ apps, urlToShowAll, ...props }) => {
37
+ const TRIGGER_LABEL = 'アプリ';
38
+ const AppLauncher = ({ apps, urlToShowAll, decorators, ...props }) => {
41
39
  const theme = (0, useTheme_1.useTheme)();
42
40
  const classNames = (0, useClassNames_1.useClassNames)();
41
+ const triggerLabel = (0, react_1.useMemo)(() => decorators?.triggerLabel?.(TRIGGER_LABEL) || TRIGGER_LABEL, [decorators]);
43
42
  const baseApps = apps.find(({ type }) => type === 'base');
44
43
  const others = apps.filter((category) => category !== baseApps);
45
44
  return (react_1.default.createElement(Dropdown_1.Dropdown, { ...props },
46
45
  react_1.default.createElement(Dropdown_1.DropdownTrigger, null,
47
- react_1.default.createElement(AppsButton, { themes: theme, prefix: react_1.default.createElement(Icon_1.FaToolboxIcon, null) }, "\u30A2\u30D7\u30EA")),
46
+ react_1.default.createElement(AppsButton, { themes: theme, prefix: react_1.default.createElement(Icon_1.FaToolboxIcon, null) }, triggerLabel)),
48
47
  react_1.default.createElement(Dropdown_1.DropdownContent, { controllable: true },
49
48
  react_1.default.createElement(Wrapper, { themes: theme, className: classNames.wrapper },
50
49
  react_1.default.createElement(Dropdown_1.DropdownScrollArea, null,
@@ -1 +1 @@
1
- {"version":3,"file":"AppLauncher.js","sourceRoot":"","sources":["../../../../src/components/Header/AppLauncher/AppLauncher.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA6C;AAC7C,uEAA+C;AAE/C,sDAAyD;AACzD,yCAAqC;AACrC,6CAA+F;AAC/F,2CAAuC;AACvC,qCAA0C;AAC1C,yCAA6C;AAC7C,6CAAyC;AAEzC,mDAA+C;AAkBxC,MAAM,WAAW,GAAmC,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IAC9F,MAAM,KAAK,GAAG,IAAA,mBAAQ,GAAE,CAAA;IACxB,MAAM,UAAU,GAAG,IAAA,6BAAa,GAAE,CAAA;IAElC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,KAAK,MAAM,CAAC,CAAA;IACzD,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAA;IAE/D,OAAO,CACL,8BAAC,mBAAQ,OAAK,KAAK;QACjB,8BAAC,0BAAe;YACd,8BAAC,UAAU,IAAC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,8BAAC,oBAAa,OAAG,yBAEvC,CACG;QAClB,8BAAC,0BAAe,IAAC,YAAY;YAC3B,8BAAC,OAAO,IAAC,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,CAAC,OAAO;gBACnD,8BAAC,6BAAkB;oBACjB,8BAAC,cAAK,IAAC,GAAG,EAAE,GAAG;wBACZ,QAAQ,IAAI,CACX,8BAAC,cAAK,IAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,UAAU,CAAC,QAAQ;4BAC7C,8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M;oBACjD,8BAAC,mBAAQ,IAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,qCAElD,CACJ,CACV,CACO,CACM,CACT,CACZ,CAAA;AACH,CAAC,CAAA;AAhFY,QAAA,WAAW,eAgFvB;AAED,MAAM,UAAU,GAAG,IAAA,2BAAM,EAAC,eAAM,CAAC,CAAmB;IAChD,CAAC,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,CAAC,IAAA,uBAAG,EAAA;;;sBAGnB,KAAK,CAAC,IAAI,CAAC;aACpB,KAAK,CAAC,UAAU;;;;;;;;GAQ1B;CACF,CAAA;AACD,MAAM,OAAO,GAAG,IAAA,2BAAM,EAAC,cAAK,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAmB;IAC3E,CAAC,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,CAAC,IAAA,uBAAG,EAAA;eAC5B,KAAK,CAAC,GAAG,CAAC;mBACN,OAAO,CAAC,MAAM;GAC9B;CACF,CAAA;AACD,MAAM,MAAM,GAAG,IAAA,2BAAM,EAAC,cAAK,CAAC,CAAmB;IAC3C,CAAC,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,CAAC,IAAA,uBAAG,EAAA;;0BAEhB,KAAK,CAAC,CAAC,IAAI,CAAC;;qBAEjB,KAAK,CAAC,CAAC,IAAI,CAAC;kBACf,MAAM,CAAC,SAAS;2BACP,KAAK,CAAC,CAAC,CAAC;sBACb,KAAK,CAAC,IAAI,CAAC;GAC9B;CACF,CAAA"}
@@ -23,7 +23,6 @@ export declare const HeaderDropdownMenuButton: import("styled-components").Style
23
23
  nonce?: string | undefined;
24
24
  tabIndex?: number | undefined;
25
25
  disabled?: boolean | undefined;
26
- autoFocus?: boolean | undefined;
27
26
  formAction?: string | undefined;
28
27
  formEncType?: string | undefined;
29
28
  formMethod?: string | undefined;
@@ -33,6 +32,7 @@ export declare const HeaderDropdownMenuButton: import("styled-components").Style
33
32
  defaultValue?: string | number | readonly string[] | undefined;
34
33
  suppressContentEditableWarning?: boolean | undefined;
35
34
  suppressHydrationWarning?: boolean | undefined;
35
+ autoFocus?: boolean | undefined;
36
36
  contextMenu?: string | undefined;
37
37
  placeholder?: string | undefined;
38
38
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -297,6 +297,7 @@ export declare const HeaderDropdownMenuButton: import("styled-components").Style
297
297
  defaultValue?: string | number | readonly string[] | undefined;
298
298
  suppressContentEditableWarning?: boolean | undefined;
299
299
  suppressHydrationWarning?: boolean | undefined;
300
+ autoFocus?: boolean | undefined;
300
301
  contextMenu?: string | undefined;
301
302
  placeholder?: string | undefined;
302
303
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -561,7 +562,6 @@ export declare const HeaderDropdownMenuButton: import("styled-components").Style
561
562
  nonce?: string | undefined;
562
563
  tabIndex?: number | undefined;
563
564
  disabled?: boolean | undefined;
564
- autoFocus?: boolean | undefined;
565
565
  formAction?: string | undefined;
566
566
  formEncType?: string | undefined;
567
567
  formMethod?: string | undefined;
@@ -571,6 +571,7 @@ export declare const HeaderDropdownMenuButton: import("styled-components").Style
571
571
  defaultValue?: string | number | readonly string[] | undefined;
572
572
  suppressContentEditableWarning?: boolean | undefined;
573
573
  suppressHydrationWarning?: boolean | undefined;
574
+ autoFocus?: boolean | undefined;
574
575
  contextMenu?: string | undefined;
575
576
  placeholder?: string | undefined;
576
577
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -835,6 +836,7 @@ export declare const HeaderDropdownMenuButton: import("styled-components").Style
835
836
  defaultValue?: string | number | readonly string[] | undefined;
836
837
  suppressContentEditableWarning?: boolean | undefined;
837
838
  suppressHydrationWarning?: boolean | undefined;
839
+ autoFocus?: boolean | undefined;
838
840
  contextMenu?: string | undefined;
839
841
  placeholder?: string | undefined;
840
842
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -1104,7 +1106,6 @@ export declare const HeaderDropdownMenuButton: import("styled-components").Style
1104
1106
  nonce?: string | undefined;
1105
1107
  tabIndex?: number | undefined;
1106
1108
  disabled?: boolean | undefined;
1107
- autoFocus?: boolean | undefined;
1108
1109
  formAction?: string | undefined;
1109
1110
  formEncType?: string | undefined;
1110
1111
  formMethod?: string | undefined;
@@ -1114,6 +1115,7 @@ export declare const HeaderDropdownMenuButton: import("styled-components").Style
1114
1115
  defaultValue?: string | number | readonly string[] | undefined;
1115
1116
  suppressContentEditableWarning?: boolean | undefined;
1116
1117
  suppressHydrationWarning?: boolean | undefined;
1118
+ autoFocus?: boolean | undefined;
1117
1119
  contextMenu?: string | undefined;
1118
1120
  placeholder?: string | undefined;
1119
1121
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -33,6 +33,7 @@ export declare const HeaderLink: import("styled-components").StyledComponent<imp
33
33
  defaultValue?: string | number | readonly string[] | undefined;
34
34
  suppressContentEditableWarning?: boolean | undefined;
35
35
  suppressHydrationWarning?: boolean | undefined;
36
+ autoFocus?: boolean | undefined;
36
37
  contextMenu?: string | undefined;
37
38
  placeholder?: string | undefined;
38
39
  spellCheck?: (boolean | "false" | "true") | undefined;
@@ -28,7 +28,6 @@ export declare const ItemButton: import("styled-components").StyledComponent<Rea
28
28
  nonce?: string | undefined;
29
29
  tabIndex?: number | undefined;
30
30
  disabled?: boolean | undefined;
31
- autoFocus?: boolean | undefined;
32
31
  formAction?: string | undefined;
33
32
  formEncType?: string | undefined;
34
33
  formMethod?: string | undefined;
@@ -38,6 +37,7 @@ export declare const ItemButton: import("styled-components").StyledComponent<Rea
38
37
  defaultValue?: string | number | readonly string[] | undefined;
39
38
  suppressContentEditableWarning?: boolean | undefined;
40
39
  suppressHydrationWarning?: boolean | undefined;
40
+ autoFocus?: boolean | undefined;
41
41
  contextMenu?: string | undefined;
42
42
  placeholder?: string | undefined;
43
43
  spellCheck?: (boolean | "false" | "true") | undefined;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "smarthr-ui",
3
3
  "description": "SmartHR ui components built with React.",
4
- "version": "30.4.0",
4
+ "version": "30.5.0",
5
5
  "author": "SmartHR-UI Team",
6
6
  "dependencies": {
7
7
  "@smarthr/wareki": "^1.2.0",
@@ -31,14 +31,14 @@
31
31
  "@storybook/test-runner": "^0.9.4",
32
32
  "@storybook/testing-library": "^0.0.13",
33
33
  "@storybook/theming": "^6.5.16",
34
- "@swc/core": "^1.3.44",
34
+ "@swc/core": "^1.3.49",
35
35
  "@swc/jest": "^0.2.24",
36
36
  "@testing-library/react-hooks": "^8.0.1",
37
37
  "@types/jest": "^29.5.0",
38
38
  "@types/lodash.merge": "^4.6.7",
39
39
  "@types/lodash.range": "^3.2.7",
40
40
  "@types/node": "^14.18.42",
41
- "@types/react": "^18.0.29",
41
+ "@types/react": "^18.0.32",
42
42
  "@types/react-dom": "^18.0.11",
43
43
  "@types/react-test-renderer": "^17.0.2",
44
44
  "@types/react-transition-group": "^4.4.5",
@@ -73,7 +73,7 @@
73
73
  "standard-version": "^9.3.2",
74
74
  "storycap": "^4.0.0",
75
75
  "styled-components": "^5.3.9",
76
- "styled-reset": "^4.4.5",
76
+ "styled-reset": "^4.4.6",
77
77
  "stylelint": "^15.3.0",
78
78
  "stylelint-config-prettier": "^9.0.5",
79
79
  "stylelint-config-smarthr": "^1.1.0",
@@ -155,7 +155,7 @@
155
155
  "typings": "lib/index.d.ts",
156
156
  "resolutions": {
157
157
  "@babel/helper-compilation-targets": "^7.20.7",
158
- "@types/react": "^18.0.29",
158
+ "@types/react": "^18.0.32",
159
159
  "minimist": "1.2.8",
160
160
  "react": "^18.2.0",
161
161
  "react-dom": "^18.2.0",