smarthr-ui 22.1.0 → 22.2.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.
- package/esm/components/Base/Base.d.ts +1 -6
- package/esm/components/Base/Base.js +10 -6
- package/esm/components/Base/Base.js.map +1 -1
- package/esm/components/Base/index.d.ts +1 -1
- package/esm/components/Base/index.js +1 -1
- package/esm/components/Base/index.js.map +1 -1
- package/esm/components/Header/HeaderLink.d.ts +2 -2
- package/esm/components/TextLink/TextLink.d.ts +2 -2
- package/esm/components/TextLink/TextLink.js +5 -5
- package/esm/components/TextLink/TextLink.js.map +1 -1
- package/esm/themes/createRadius.d.ts +4 -0
- package/esm/themes/createRadius.js +2 -0
- package/esm/themes/createRadius.js.map +1 -1
- package/lib/components/Base/Base.d.ts +1 -6
- package/lib/components/Base/Base.js +10 -6
- package/lib/components/Base/Base.js.map +1 -1
- package/lib/components/Base/index.d.ts +1 -1
- package/lib/components/Base/index.js +1 -2
- package/lib/components/Base/index.js.map +1 -1
- package/lib/components/Header/HeaderLink.d.ts +2 -2
- package/lib/components/TextLink/TextLink.d.ts +2 -2
- package/lib/components/TextLink/TextLink.js +4 -5
- package/lib/components/TextLink/TextLink.js.map +1 -1
- package/lib/themes/createRadius.d.ts +4 -0
- package/lib/themes/createRadius.js +2 -0
- package/lib/themes/createRadius.js.map +1 -1
- package/package.json +7 -7
- package/CHANGELOG.md +0 -1858
|
@@ -2,16 +2,11 @@ import React, { HTMLAttributes, ReactNode } from 'react';
|
|
|
2
2
|
declare type Props = {
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
/** 角丸のサイズ */
|
|
5
|
-
radius?:
|
|
5
|
+
radius?: 's' | 'm';
|
|
6
6
|
/** レイヤの重なり方向の高さ(影の付き方に影響する) */
|
|
7
7
|
layer?: LayerKeys;
|
|
8
8
|
};
|
|
9
|
-
export declare type RadiusKeys = keyof typeof radiusMap;
|
|
10
9
|
export declare type LayerKeys = keyof typeof layerMap;
|
|
11
|
-
export declare const radiusMap: {
|
|
12
|
-
readonly s: "6px";
|
|
13
|
-
readonly m: "8px";
|
|
14
|
-
};
|
|
15
10
|
export declare const layerMap: {
|
|
16
11
|
readonly 0: "LAYER0";
|
|
17
12
|
readonly 1: "LAYER1";
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import React, { forwardRef } from 'react';
|
|
1
|
+
import React, { forwardRef, useMemo } from 'react';
|
|
2
2
|
import styled, { css } from 'styled-components';
|
|
3
3
|
import { useTheme } from '../../hooks/useTheme';
|
|
4
4
|
import { useClassNames } from './useClassNames';
|
|
5
|
-
export const radiusMap = {
|
|
6
|
-
s: '6px',
|
|
7
|
-
m: '8px',
|
|
8
|
-
};
|
|
9
5
|
export const layerMap = {
|
|
10
6
|
0: 'LAYER0',
|
|
11
7
|
1: 'LAYER1',
|
|
@@ -16,7 +12,15 @@ export const layerMap = {
|
|
|
16
12
|
export const Base = forwardRef(({ radius = 'm', layer = 1, className = '', ...props }, ref) => {
|
|
17
13
|
const themes = useTheme();
|
|
18
14
|
const classNames = useClassNames();
|
|
19
|
-
|
|
15
|
+
const $radius = useMemo(() => {
|
|
16
|
+
switch (radius) {
|
|
17
|
+
case 's':
|
|
18
|
+
return themes.radius.m;
|
|
19
|
+
case 'm':
|
|
20
|
+
return themes.radius.l;
|
|
21
|
+
}
|
|
22
|
+
}, [radius, themes.radius.l, themes.radius.m]);
|
|
23
|
+
return (React.createElement(Wrapper, { className: `${className} ${classNames.base.wrapper}`, themes: themes, "$radius": $radius, "$layer": layerMap[layer], ref: ref, ...props }));
|
|
20
24
|
});
|
|
21
25
|
const Wrapper = styled.div `
|
|
22
26
|
${({ themes: { color, shadow }, $radius, $layer }) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Base.js","sourceRoot":"","sources":["../../../src/components/Base/Base.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA6B,UAAU,EAAE,MAAM,OAAO,CAAA;
|
|
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AC,KAAK,CAAC,EACvB,GAAG,EAAE,GAAG,KACJ,KAAK,GACT,CACH,CAAA;AACH,CAAC,CACF,CAAA;AAED,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAIxB;IACE,CAAC,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE;IACnD,OAAO,GAAG,CAAA;oBACM,MAAM,CAAC,MAAM,CAAC;uBACX,OAAO;0BACJ,KAAK,CAAC,KAAK;KAChC,CAAA;AACH,CAAC;CACF,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Base/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Base/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const HeaderLink: import("styled-components").StyledComponent<import("react").
|
|
2
|
+
export declare const HeaderLink: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<{
|
|
3
3
|
onClick?: ((e: import("react").MouseEvent<Element, MouseEvent>) => void) | undefined;
|
|
4
4
|
prefix?: import("react").ReactNode;
|
|
5
5
|
suffix?: import("react").ReactNode;
|
|
@@ -267,7 +267,7 @@ export declare const HeaderLink: import("styled-components").StyledComponent<imp
|
|
|
267
267
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLAnchorElement> | undefined;
|
|
268
268
|
ping?: string | undefined;
|
|
269
269
|
referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
|
|
270
|
-
}
|
|
270
|
+
} & import("react").RefAttributes<HTMLAnchorElement>>, import("styled-components").DefaultTheme, {
|
|
271
271
|
target: "_blank";
|
|
272
272
|
suffix: null;
|
|
273
273
|
}, "target" | "suffix">;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { AnchorHTMLAttributes, ReactNode
|
|
1
|
+
import React, { AnchorHTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
declare type ElementProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, keyof Props>;
|
|
3
3
|
declare type Props = {
|
|
4
4
|
/** リンクをクリックした時に発火するコールバック関数 */
|
|
@@ -8,5 +8,5 @@ declare type Props = {
|
|
|
8
8
|
/** テキストの後ろに表示するアイコン */
|
|
9
9
|
suffix?: ReactNode;
|
|
10
10
|
};
|
|
11
|
-
export declare const TextLink:
|
|
11
|
+
export declare const TextLink: React.ForwardRefExoticComponent<Props & ElementProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
12
12
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React, { useMemo } from 'react';
|
|
1
|
+
import React, { forwardRef, useMemo } from 'react';
|
|
2
2
|
import styled, { css } from 'styled-components';
|
|
3
3
|
import { useTheme } from '../../hooks/useTheme';
|
|
4
4
|
import { FaExternalLinkAltIcon } from '../Icon';
|
|
5
|
-
export const TextLink = ({ href, target, onClick, children, prefix, suffix, ...props }) => {
|
|
5
|
+
export const TextLink = forwardRef(({ href, target, onClick, children, prefix, suffix, ...props }, ref) => {
|
|
6
6
|
const theme = useTheme();
|
|
7
7
|
const actualSuffix = useMemo(() => {
|
|
8
8
|
if (target === '_blank' && suffix === undefined) {
|
|
@@ -30,12 +30,12 @@ export const TextLink = ({ href, target, onClick, children, prefix, suffix, ...p
|
|
|
30
30
|
onClick(e);
|
|
31
31
|
};
|
|
32
32
|
}, [href, onClick]);
|
|
33
|
-
return (React.createElement(
|
|
33
|
+
return (React.createElement(StyledAnchor, { ...props, ref: ref, href: actualHref, target: target, onClick: actualOnClick, themes: theme },
|
|
34
34
|
prefix && React.createElement(PrefixWrapper, { themes: theme }, prefix),
|
|
35
35
|
children,
|
|
36
36
|
actualSuffix && React.createElement(SuffixWrapper, { themes: theme }, actualSuffix)));
|
|
37
|
-
};
|
|
38
|
-
const
|
|
37
|
+
});
|
|
38
|
+
const StyledAnchor = styled.a `
|
|
39
39
|
${({ themes }) => {
|
|
40
40
|
const { color } = themes;
|
|
41
41
|
return css `
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextLink.js","sourceRoot":"","sources":["../../../src/components/TextLink/TextLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"TextLink.js","sourceRoot":"","sources":["../../../src/components/TextLink/TextLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAmC,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AACnF,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAS,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAY/C,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAChC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACrE,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAA;IACxB,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,EAAE;QAChC,IAAI,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,SAAS,EAAE;YAC/C,OAAO,oBAAC,qBAAqB,kBAAY,sCAAQ,GAAG,CAAA;SACrD;QACD,OAAO,MAAM,CAAA;IACf,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IACpB,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE;QAC9B,IAAI,IAA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,EAAE,EAAE,EAAE,EAAE,CAAC,GAAG,CAAA;oBACpB,aAAa,CAAC,IAAI,CAAC;;GAEpC,CACF,CAAA;AACD,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAC/B,CAAC,EAAE,MAAM,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,EAAE,CAAC,GAAG,CAAA;mBACrB,aAAa,CAAC,IAAI,CAAC;;GAEnC,CACF,CAAA"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
export interface RadiusProperty {
|
|
2
2
|
s?: string;
|
|
3
3
|
m?: string;
|
|
4
|
+
l?: string;
|
|
5
|
+
full?: string;
|
|
4
6
|
}
|
|
5
7
|
export interface CreatedRadiusTheme {
|
|
6
8
|
s: string;
|
|
7
9
|
m: string;
|
|
10
|
+
l: string;
|
|
11
|
+
full: string;
|
|
8
12
|
}
|
|
9
13
|
export declare const defaultRadius: CreatedRadiusTheme;
|
|
10
14
|
export declare const createRadius: (userRadius?: RadiusProperty) => CreatedRadiusTheme;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createRadius.js","sourceRoot":"","sources":["../../src/themes/createRadius.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"createRadius.js","sourceRoot":"","sources":["../../src/themes/createRadius.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAgBtC,MAAM,CAAC,MAAM,aAAa,GAAuB;IAC/C,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;IACR,IAAI,EAAE,SAAS;CAChB,CAAA;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,aAA6B,EAAE,EAAE,EAAE;IAC9D,MAAM,OAAO,GAAuB,KAAK,CAAC,EAAE,GAAG,aAAa,EAAE,EAAE,UAAU,CAAC,CAAA;IAC3E,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA"}
|
|
@@ -2,16 +2,11 @@ import React, { HTMLAttributes, ReactNode } from 'react';
|
|
|
2
2
|
declare type Props = {
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
/** 角丸のサイズ */
|
|
5
|
-
radius?:
|
|
5
|
+
radius?: 's' | 'm';
|
|
6
6
|
/** レイヤの重なり方向の高さ(影の付き方に影響する) */
|
|
7
7
|
layer?: LayerKeys;
|
|
8
8
|
};
|
|
9
|
-
export declare type RadiusKeys = keyof typeof radiusMap;
|
|
10
9
|
export declare type LayerKeys = keyof typeof layerMap;
|
|
11
|
-
export declare const radiusMap: {
|
|
12
|
-
readonly s: "6px";
|
|
13
|
-
readonly m: "8px";
|
|
14
|
-
};
|
|
15
10
|
export declare const layerMap: {
|
|
16
11
|
readonly 0: "LAYER0";
|
|
17
12
|
readonly 1: "LAYER1";
|
|
@@ -23,15 +23,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.Base = exports.layerMap =
|
|
26
|
+
exports.Base = exports.layerMap = void 0;
|
|
27
27
|
const react_1 = __importStar(require("react"));
|
|
28
28
|
const styled_components_1 = __importStar(require("styled-components"));
|
|
29
29
|
const useTheme_1 = require("../../hooks/useTheme");
|
|
30
30
|
const useClassNames_1 = require("./useClassNames");
|
|
31
|
-
exports.radiusMap = {
|
|
32
|
-
s: '6px',
|
|
33
|
-
m: '8px',
|
|
34
|
-
};
|
|
35
31
|
exports.layerMap = {
|
|
36
32
|
0: 'LAYER0',
|
|
37
33
|
1: 'LAYER1',
|
|
@@ -42,7 +38,15 @@ exports.layerMap = {
|
|
|
42
38
|
exports.Base = (0, react_1.forwardRef)(({ radius = 'm', layer = 1, className = '', ...props }, ref) => {
|
|
43
39
|
const themes = (0, useTheme_1.useTheme)();
|
|
44
40
|
const classNames = (0, useClassNames_1.useClassNames)();
|
|
45
|
-
|
|
41
|
+
const $radius = (0, react_1.useMemo)(() => {
|
|
42
|
+
switch (radius) {
|
|
43
|
+
case 's':
|
|
44
|
+
return themes.radius.m;
|
|
45
|
+
case 'm':
|
|
46
|
+
return themes.radius.l;
|
|
47
|
+
}
|
|
48
|
+
}, [radius, themes.radius.l, themes.radius.m]);
|
|
49
|
+
return (react_1.default.createElement(Wrapper, { className: `${className} ${classNames.base.wrapper}`, themes: themes, "$radius": $radius, "$layer": exports.layerMap[layer], ref: ref, ...props }));
|
|
46
50
|
});
|
|
47
51
|
const Wrapper = styled_components_1.default.div `
|
|
48
52
|
${({ themes: { color, shadow }, $radius, $layer }) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Base.js","sourceRoot":"","sources":["../../../src/components/Base/Base.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+
|
|
1
|
+
{"version":3,"file":"Base.js","sourceRoot":"","sources":["../../../src/components/Base/Base.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA6E;AAC7E,uEAA+C;AAC/C,mDAAsD;AACtD,mDAA+C;AAYlC,QAAA,QAAQ,GAAG;IACtB,CAAC,EAAE,QAAQ;IACX,CAAC,EAAE,QAAQ;IACX,CAAC,EAAE,QAAQ;IACX,CAAC,EAAE,QAAQ;IACX,CAAC,EAAE,QAAQ;CACH,CAAA;AAIG,QAAA,IAAI,GAAG,IAAA,kBAAU,EAC5B,CAAC,EAAE,MAAM,GAAG,GAAG,EAAE,KAAK,GAAG,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC7D,MAAM,MAAM,GAAG,IAAA,mBAAQ,GAAE,CAAA;IACzB,MAAM,UAAU,GAAG,IAAA,6BAAa,GAAE,CAAA;IAClC,MAAM,OAAO,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QAC3B,QAAQ,MAAM,EAAE;YACd,KAAK,GAAG;gBACN,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAA;YACxB,KAAK,GAAG;gBACN,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAA;SACzB;IACH,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;IAE9C,OAAO,CACL,8BAAC,OAAO,IACN,SAAS,EAAE,GAAG,SAAS,IAAI,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,EACpD,MAAM,EAAE,MAAM,aACL,OAAO,YACR,gBAAQ,CAAC,KAAK,CAAC,EACvB,GAAG,EAAE,GAAG,KACJ,KAAK,GACT,CACH,CAAA;AACH,CAAC,CACF,CAAA;AAED,MAAM,OAAO,GAAG,2BAAM,CAAC,GAAG,CAIxB;IACE,CAAC,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE;IACnD,OAAO,IAAA,uBAAG,EAAA;oBACM,MAAM,CAAC,MAAM,CAAC;uBACX,OAAO;0BACJ,KAAK,CAAC,KAAK;KAChC,CAAA;AACH,CAAC;CACF,CAAA"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DialogBase = exports.
|
|
3
|
+
exports.DialogBase = exports.Base = void 0;
|
|
4
4
|
var Base_1 = require("./Base");
|
|
5
5
|
Object.defineProperty(exports, "Base", { enumerable: true, get: function () { return Base_1.Base; } });
|
|
6
|
-
Object.defineProperty(exports, "radiusMap", { enumerable: true, get: function () { return Base_1.radiusMap; } });
|
|
7
6
|
var DialogBase_1 = require("./DialogBase");
|
|
8
7
|
Object.defineProperty(exports, "DialogBase", { enumerable: true, get: function () { return DialogBase_1.DialogBase; } });
|
|
9
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Base/index.ts"],"names":[],"mappings":";;;AAAA,+
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Base/index.ts"],"names":[],"mappings":";;;AAAA,+BAA6B;AAApB,4FAAA,IAAI,OAAA;AAEb,2CAAyC;AAAhC,wGAAA,UAAU,OAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const HeaderLink: import("styled-components").StyledComponent<import("react").
|
|
2
|
+
export declare const HeaderLink: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<{
|
|
3
3
|
onClick?: ((e: import("react").MouseEvent<Element, MouseEvent>) => void) | undefined;
|
|
4
4
|
prefix?: import("react").ReactNode;
|
|
5
5
|
suffix?: import("react").ReactNode;
|
|
@@ -267,7 +267,7 @@ export declare const HeaderLink: import("styled-components").StyledComponent<imp
|
|
|
267
267
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLAnchorElement> | undefined;
|
|
268
268
|
ping?: string | undefined;
|
|
269
269
|
referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
|
|
270
|
-
}
|
|
270
|
+
} & import("react").RefAttributes<HTMLAnchorElement>>, import("styled-components").DefaultTheme, {
|
|
271
271
|
target: "_blank";
|
|
272
272
|
suffix: null;
|
|
273
273
|
}, "target" | "suffix">;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { AnchorHTMLAttributes, ReactNode
|
|
1
|
+
import React, { AnchorHTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
declare type ElementProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, keyof Props>;
|
|
3
3
|
declare type Props = {
|
|
4
4
|
/** リンクをクリックした時に発火するコールバック関数 */
|
|
@@ -8,5 +8,5 @@ declare type Props = {
|
|
|
8
8
|
/** テキストの後ろに表示するアイコン */
|
|
9
9
|
suffix?: ReactNode;
|
|
10
10
|
};
|
|
11
|
-
export declare const TextLink:
|
|
11
|
+
export declare const TextLink: React.ForwardRefExoticComponent<Props & ElementProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
12
12
|
export {};
|
|
@@ -28,7 +28,7 @@ const react_1 = __importStar(require("react"));
|
|
|
28
28
|
const styled_components_1 = __importStar(require("styled-components"));
|
|
29
29
|
const useTheme_1 = require("../../hooks/useTheme");
|
|
30
30
|
const Icon_1 = require("../Icon");
|
|
31
|
-
|
|
31
|
+
exports.TextLink = (0, react_1.forwardRef)(({ href, target, onClick, children, prefix, suffix, ...props }, ref) => {
|
|
32
32
|
const theme = (0, useTheme_1.useTheme)();
|
|
33
33
|
const actualSuffix = (0, react_1.useMemo)(() => {
|
|
34
34
|
if (target === '_blank' && suffix === undefined) {
|
|
@@ -56,13 +56,12 @@ const TextLink = ({ href, target, onClick, children, prefix, suffix, ...props })
|
|
|
56
56
|
onClick(e);
|
|
57
57
|
};
|
|
58
58
|
}, [href, onClick]);
|
|
59
|
-
return (react_1.default.createElement(
|
|
59
|
+
return (react_1.default.createElement(StyledAnchor, { ...props, ref: ref, href: actualHref, target: target, onClick: actualOnClick, themes: theme },
|
|
60
60
|
prefix && react_1.default.createElement(PrefixWrapper, { themes: theme }, prefix),
|
|
61
61
|
children,
|
|
62
62
|
actualSuffix && react_1.default.createElement(SuffixWrapper, { themes: theme }, actualSuffix)));
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
const StyledAncher = styled_components_1.default.a `
|
|
63
|
+
});
|
|
64
|
+
const StyledAnchor = styled_components_1.default.a `
|
|
66
65
|
${({ themes }) => {
|
|
67
66
|
const { color } = themes;
|
|
68
67
|
return (0, styled_components_1.css) `
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextLink.js","sourceRoot":"","sources":["../../../src/components/TextLink/TextLink.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA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
|
|
7
9
|
m: string;
|
|
10
|
+
l: string;
|
|
11
|
+
full: string;
|
|
8
12
|
}
|
|
9
13
|
export declare const defaultRadius: CreatedRadiusTheme;
|
|
10
14
|
export declare const createRadius: (userRadius?: RadiusProperty) => CreatedRadiusTheme;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createRadius.js","sourceRoot":"","sources":["../../src/themes/createRadius.ts"],"names":[],"mappings":";;;AAAA,2CAAsC;
|
|
1
|
+
{"version":3,"file":"createRadius.js","sourceRoot":"","sources":["../../src/themes/createRadius.ts"],"names":[],"mappings":";;;AAAA,2CAAsC;AAgBzB,QAAA,aAAa,GAAuB;IAC/C,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;IACR,IAAI,EAAE,SAAS;CAChB,CAAA;AAEM,MAAM,YAAY,GAAG,CAAC,aAA6B,EAAE,EAAE,EAAE;IAC9D,MAAM,OAAO,GAAuB,IAAA,cAAK,EAAC,EAAE,GAAG,qBAAa,EAAE,EAAE,UAAU,CAAC,CAAA;IAC3E,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA;AAHY,QAAA,YAAY,gBAGxB"}
|
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": "22.
|
|
4
|
+
"version": "22.2.0",
|
|
5
5
|
"author": "SmartHR-UI Team",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"dayjs": "^1.11.3",
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
"@storybook/react": "^6.5.9",
|
|
28
28
|
"@storybook/testing-library": "^0.0.13",
|
|
29
29
|
"@storybook/theming": "^6.5.9",
|
|
30
|
-
"@swc/core": "^1.2.
|
|
30
|
+
"@swc/core": "^1.2.211",
|
|
31
31
|
"@swc/jest": "^0.2.21",
|
|
32
32
|
"@testing-library/react-hooks": "^8.0.1",
|
|
33
33
|
"@types/jest": "^28.1.3",
|
|
34
34
|
"@types/lodash.merge": "^4.6.7",
|
|
35
35
|
"@types/lodash.range": "^3.2.7",
|
|
36
36
|
"@types/node": "^14.18.21",
|
|
37
|
-
"@types/react": "^18.0.
|
|
37
|
+
"@types/react": "^18.0.15",
|
|
38
38
|
"@types/react-dom": "^18.0.5",
|
|
39
39
|
"@types/react-test-renderer": "^17.0.2",
|
|
40
40
|
"@types/react-transition-group": "^4.4.5",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"babel-plugin-polyfill-regenerator": "^0.3.1",
|
|
45
45
|
"ecma-version-validator-webpack-plugin": "^1.2.1",
|
|
46
46
|
"eslint": "^8.19.0",
|
|
47
|
-
"eslint-config-smarthr": "^6.0.
|
|
47
|
+
"eslint-config-smarthr": "^6.0.8",
|
|
48
48
|
"fs-extra": "^10.1.0",
|
|
49
49
|
"http-server": "^14.1.1",
|
|
50
50
|
"husky": "^8.0.1",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"postcss-syntax": "^0.36.2",
|
|
59
59
|
"prettier": "^2.7.1",
|
|
60
60
|
"prettier-config-smarthr": "^1.0.0",
|
|
61
|
-
"puppeteer": "^15.3.
|
|
61
|
+
"puppeteer": "^15.3.2",
|
|
62
62
|
"react": "^18.2.0",
|
|
63
63
|
"react-dom": "^18.2.0",
|
|
64
64
|
"react-test-renderer": "^18.2.0",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"storybook-readme": "^5.0.9",
|
|
71
71
|
"storycap": "^3.1.9",
|
|
72
72
|
"styled-components": "^5.3.5",
|
|
73
|
-
"styled-reset": "^4.4.
|
|
73
|
+
"styled-reset": "^4.4.2",
|
|
74
74
|
"stylelint": "^14.9.1",
|
|
75
75
|
"stylelint-config-prettier": "^9.0.3",
|
|
76
76
|
"stylelint-config-smarthr": "^1.0.3",
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
"minimist": "1.2.6",
|
|
155
155
|
"react": "^18.2.0",
|
|
156
156
|
"react-dom": "^18.2.0",
|
|
157
|
-
"@types/react": "^18.0.
|
|
157
|
+
"@types/react": "^18.0.15",
|
|
158
158
|
"@babel/helper-compilation-targets": "^7.18.6"
|
|
159
159
|
}
|
|
160
160
|
}
|