smarthr-ui 41.2.0 → 41.3.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/AppNavi/AppNaviAnchor.js +8 -2
- package/esm/components/AppNavi/AppNaviAnchor.js.map +1 -1
- package/esm/components/Balloon/Balloon.js +1 -2
- package/esm/components/Balloon/Balloon.js.map +1 -1
- package/esm/components/Button/Button.js +1 -1
- package/esm/components/Button/Button.js.map +1 -1
- package/esm/components/Button/ButtonWrapper.js +1 -2
- package/esm/components/Button/ButtonWrapper.js.map +1 -1
- package/esm/components/Calendar/Calendar.js +1 -1
- package/esm/components/Calendar/Calendar.js.map +1 -1
- package/esm/components/Calendar/CalendarTable.js +1 -1
- package/esm/components/Calendar/CalendarTable.js.map +1 -1
- package/esm/components/Calendar/YearPicker.js +1 -1
- package/esm/components/Calendar/YearPicker.js.map +1 -1
- package/esm/components/CheckBox/CheckBox.js +1 -1
- package/esm/components/CheckBox/CheckBox.js.map +1 -1
- package/esm/components/Chip/Chip.js +1 -6
- package/esm/components/Chip/Chip.js.map +1 -1
- package/esm/components/DatePicker/DatePicker.js +1 -1
- package/esm/components/DatePicker/DatePicker.js.map +1 -1
- package/esm/components/Dialog/DialogContentInner.js +1 -1
- package/esm/components/Dialog/DialogContentInner.js.map +1 -1
- package/esm/components/Dialog/MessageDialog/MessageDialog.d.ts +2 -2
- package/esm/components/Dialog/MessageDialog/MessageDialog.js +1 -1
- package/esm/components/Dialog/MessageDialog/MessageDialog.js.map +1 -1
- package/esm/components/Dialog/MessageDialog/MessageDialogContent.d.ts +2 -2
- package/esm/components/Dialog/MessageDialog/MessageDialogContent.js +1 -1
- package/esm/components/Dialog/MessageDialog/MessageDialogContent.js.map +1 -1
- package/esm/components/Dialog/MessageDialog/MessageDialogContentInner.js +28 -40
- package/esm/components/Dialog/MessageDialog/MessageDialogContentInner.js.map +1 -1
- package/esm/components/Dialog/ModelessDialog.js +2 -2
- package/esm/components/Dialog/ModelessDialog.js.map +1 -1
- package/esm/components/Dropdown/DropdownMenuButton/DropdownMenuButton.d.ts +2 -2
- package/esm/components/Dropdown/DropdownMenuButton/DropdownMenuButton.js +33 -43
- package/esm/components/Dropdown/DropdownMenuButton/DropdownMenuButton.js.map +1 -1
- package/esm/components/Dropdown/FilterDropdown/FilterDropdown.js +1 -1
- package/esm/components/Dropdown/FilterDropdown/FilterDropdown.js.map +1 -1
- package/esm/components/FormGroup/FormGroup.js +7 -1
- package/esm/components/FormGroup/FormGroup.js.map +1 -1
- package/esm/components/Header/HeaderDropdownMenuButton.d.ts +2 -0
- package/esm/components/Input/Input.js +1 -1
- package/esm/components/Input/Input.js.map +1 -1
- package/esm/components/InputFile/InputFile.js +1 -1
- package/esm/components/InputFile/InputFile.js.map +1 -1
- package/esm/components/NotificationBar/NotificationBar.d.ts +237 -9
- package/esm/components/NotificationBar/NotificationBar.js +133 -134
- package/esm/components/NotificationBar/NotificationBar.js.map +1 -1
- package/esm/components/RadioButton/RadioButton.js +1 -1
- package/esm/components/RadioButton/RadioButton.js.map +1 -1
- package/esm/components/RadioButtonPanel/RadioButtonPanel.js +1 -1
- package/esm/components/RadioButtonPanel/RadioButtonPanel.js.map +1 -1
- package/esm/components/RightFixedNote/RightFixedNote.d.ts +4 -0
- package/esm/components/RightFixedNote/RightFixedNote.js +13 -9
- package/esm/components/RightFixedNote/RightFixedNote.js.map +1 -1
- package/esm/components/RightFixedNote/RightFixedNoteItem.d.ts +2 -0
- package/esm/components/RightFixedNote/RightFixedNoteItem.js +2 -2
- package/esm/components/RightFixedNote/RightFixedNoteItem.js.map +1 -1
- package/esm/components/Select/Select.js +1 -1
- package/esm/components/Select/Select.js.map +1 -1
- package/esm/components/StatusLabel/StatusLabel.js +1 -2
- package/esm/components/StatusLabel/StatusLabel.js.map +1 -1
- package/esm/components/TabBar/TabBar.js +1 -6
- package/esm/components/TabBar/TabBar.js.map +1 -1
- package/esm/components/Table/Table.js +3 -3
- package/esm/components/Table/Table.js.map +1 -1
- package/esm/components/Table/Td.js +1 -6
- package/esm/components/Table/Td.js.map +1 -1
- package/esm/components/Table/TdCheckbox.js +18 -22
- package/esm/components/Table/TdCheckbox.js.map +1 -1
- package/esm/components/Table/ThCheckbox.js +18 -22
- package/esm/components/Table/ThCheckbox.js.map +1 -1
- package/esm/components/Textarea/Textarea.js +1 -1
- package/esm/components/Textarea/Textarea.js.map +1 -1
- package/esm/hooks/useTailwindTheme.d.ts +12 -0
- package/esm/smarthr-ui-preset.d.ts +13 -1
- package/esm/smarthr-ui-preset.js +41 -17
- package/esm/smarthr-ui-preset.js.map +1 -1
- package/lib/components/AppNavi/AppNaviAnchor.js +31 -2
- package/lib/components/AppNavi/AppNaviAnchor.js.map +1 -1
- package/lib/components/Balloon/Balloon.js +1 -2
- package/lib/components/Balloon/Balloon.js.map +1 -1
- package/lib/components/Button/Button.js +1 -1
- package/lib/components/Button/Button.js.map +1 -1
- package/lib/components/Button/ButtonWrapper.js +1 -2
- package/lib/components/Button/ButtonWrapper.js.map +1 -1
- package/lib/components/Calendar/Calendar.js +1 -1
- package/lib/components/Calendar/Calendar.js.map +1 -1
- package/lib/components/Calendar/CalendarTable.js +1 -1
- package/lib/components/Calendar/CalendarTable.js.map +1 -1
- package/lib/components/Calendar/YearPicker.js +1 -1
- package/lib/components/Calendar/YearPicker.js.map +1 -1
- package/lib/components/CheckBox/CheckBox.js +1 -1
- package/lib/components/CheckBox/CheckBox.js.map +1 -1
- package/lib/components/Chip/Chip.js +1 -6
- package/lib/components/Chip/Chip.js.map +1 -1
- package/lib/components/DatePicker/DatePicker.js +1 -1
- package/lib/components/DatePicker/DatePicker.js.map +1 -1
- package/lib/components/Dialog/DialogContentInner.js +1 -1
- package/lib/components/Dialog/DialogContentInner.js.map +1 -1
- package/lib/components/Dialog/MessageDialog/MessageDialog.d.ts +2 -2
- package/lib/components/Dialog/MessageDialog/MessageDialog.js +1 -1
- package/lib/components/Dialog/MessageDialog/MessageDialog.js.map +1 -1
- package/lib/components/Dialog/MessageDialog/MessageDialogContent.d.ts +2 -2
- package/lib/components/Dialog/MessageDialog/MessageDialogContent.js +1 -1
- package/lib/components/Dialog/MessageDialog/MessageDialogContent.js.map +1 -1
- package/lib/components/Dialog/MessageDialog/MessageDialogContentInner.js +28 -43
- package/lib/components/Dialog/MessageDialog/MessageDialogContentInner.js.map +1 -1
- package/lib/components/Dialog/ModelessDialog.js +2 -2
- package/lib/components/Dialog/ModelessDialog.js.map +1 -1
- package/lib/components/Dropdown/DropdownMenuButton/DropdownMenuButton.d.ts +2 -2
- package/lib/components/Dropdown/DropdownMenuButton/DropdownMenuButton.js +33 -43
- package/lib/components/Dropdown/DropdownMenuButton/DropdownMenuButton.js.map +1 -1
- package/lib/components/Dropdown/FilterDropdown/FilterDropdown.js +1 -1
- package/lib/components/Dropdown/FilterDropdown/FilterDropdown.js.map +1 -1
- package/lib/components/FormGroup/FormGroup.js +7 -1
- package/lib/components/FormGroup/FormGroup.js.map +1 -1
- package/lib/components/Header/HeaderDropdownMenuButton.d.ts +2 -0
- package/lib/components/Input/Input.js +1 -1
- package/lib/components/Input/Input.js.map +1 -1
- package/lib/components/InputFile/InputFile.js +1 -1
- package/lib/components/InputFile/InputFile.js.map +1 -1
- package/lib/components/NotificationBar/NotificationBar.d.ts +237 -9
- package/lib/components/NotificationBar/NotificationBar.js +134 -135
- package/lib/components/NotificationBar/NotificationBar.js.map +1 -1
- package/lib/components/RadioButton/RadioButton.js +1 -1
- package/lib/components/RadioButton/RadioButton.js.map +1 -1
- package/lib/components/RadioButtonPanel/RadioButtonPanel.js +1 -1
- package/lib/components/RadioButtonPanel/RadioButtonPanel.js.map +1 -1
- package/lib/components/RightFixedNote/RightFixedNote.d.ts +4 -0
- package/lib/components/RightFixedNote/RightFixedNote.js +13 -9
- package/lib/components/RightFixedNote/RightFixedNote.js.map +1 -1
- package/lib/components/RightFixedNote/RightFixedNoteItem.d.ts +2 -0
- package/lib/components/RightFixedNote/RightFixedNoteItem.js +2 -2
- package/lib/components/RightFixedNote/RightFixedNoteItem.js.map +1 -1
- package/lib/components/Select/Select.js +1 -1
- package/lib/components/Select/Select.js.map +1 -1
- package/lib/components/StatusLabel/StatusLabel.js +1 -2
- package/lib/components/StatusLabel/StatusLabel.js.map +1 -1
- package/lib/components/TabBar/TabBar.js +1 -6
- package/lib/components/TabBar/TabBar.js.map +1 -1
- package/lib/components/Table/Table.js +3 -3
- package/lib/components/Table/Table.js.map +1 -1
- package/lib/components/Table/Td.js +1 -6
- package/lib/components/Table/Td.js.map +1 -1
- package/lib/components/Table/TdCheckbox.js +16 -20
- package/lib/components/Table/TdCheckbox.js.map +1 -1
- package/lib/components/Table/ThCheckbox.js +16 -20
- package/lib/components/Table/ThCheckbox.js.map +1 -1
- package/lib/components/Textarea/Textarea.js +1 -1
- package/lib/components/Textarea/Textarea.js.map +1 -1
- package/lib/hooks/useTailwindTheme.d.ts +12 -0
- package/lib/smarthr-ui-preset.d.ts +13 -1
- package/lib/smarthr-ui-preset.js +41 -17
- package/lib/smarthr-ui-preset.js.map +1 -1
- package/package.json +19 -19
- package/smarthr-ui.css +243 -89
- package/esm/components/Dropdown/DropdownMenuButton/useClassNames.d.ts +0 -5
- package/esm/components/Dropdown/DropdownMenuButton/useClassNames.js +0 -12
- package/esm/components/Dropdown/DropdownMenuButton/useClassNames.js.map +0 -1
- package/esm/components/NotificationBar/useClassNames.d.ts +0 -7
- package/esm/components/NotificationBar/useClassNames.js +0 -14
- package/esm/components/NotificationBar/useClassNames.js.map +0 -1
- package/lib/components/Dropdown/DropdownMenuButton/useClassNames.d.ts +0 -5
- package/lib/components/Dropdown/DropdownMenuButton/useClassNames.js +0 -16
- package/lib/components/Dropdown/DropdownMenuButton/useClassNames.js.map +0 -1
- package/lib/components/NotificationBar/useClassNames.d.ts +0 -7
- package/lib/components/NotificationBar/useClassNames.js +0 -18
- package/lib/components/NotificationBar/useClassNames.js.map +0 -1
|
@@ -1661,6 +1661,7 @@ export declare const HeaderDropdownMenuButton: import("styled-components").Style
|
|
|
1661
1661
|
onlyIconTrigger?: boolean | undefined;
|
|
1662
1662
|
} & {
|
|
1663
1663
|
type?: "button" | "reset" | "submit" | undefined;
|
|
1664
|
+
key?: import("react").Key | null | undefined;
|
|
1664
1665
|
id?: string | undefined;
|
|
1665
1666
|
name?: string | undefined;
|
|
1666
1667
|
color?: string | undefined;
|
|
@@ -1685,6 +1686,7 @@ export declare const HeaderDropdownMenuButton: import("styled-components").Style
|
|
|
1685
1686
|
nonce?: string | undefined;
|
|
1686
1687
|
tabIndex?: number | undefined;
|
|
1687
1688
|
disabled?: boolean | undefined;
|
|
1689
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
1688
1690
|
formAction?: string | undefined;
|
|
1689
1691
|
formEncType?: string | undefined;
|
|
1690
1692
|
formMethod?: string | undefined;
|
|
@@ -39,7 +39,7 @@ const bgColors = {
|
|
|
39
39
|
const wrapper = (0, tailwind_variants_1.tv)({
|
|
40
40
|
base: [
|
|
41
41
|
'smarthr-ui-Input',
|
|
42
|
-
'shr-box-border shr-inline-flex shr-cursor-text shr-items-center shr-gap-0.5 shr-rounded-m shr-
|
|
42
|
+
'shr-border-shorthand shr-box-border shr-inline-flex shr-cursor-text shr-items-center shr-gap-0.5 shr-rounded-m shr-bg-white shr-px-0.5',
|
|
43
43
|
'contrast-more:shr-border-high-contrast',
|
|
44
44
|
'focus-within:shr-focus-indicator',
|
|
45
45
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAUc;AACd,yDAAsC;AAEtC,mEAAuD;AAwBvD,MAAM,QAAQ,GAAG;IACf,UAAU,EAAE,YAAY;IACxB,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,WAAW;IACtB,eAAe,EAAE,iBAAiB;IAClC,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,QAAQ;IAChB,iBAAiB,EAAE,mBAAmB;CAC9B,CAAA;AAEV,MAAM,OAAO,GAAG,IAAA,sBAAE,EAAC;IACjB,IAAI,EAAE;QACJ,kBAAkB;QAClB,
|
|
1
|
+
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAUc;AACd,yDAAsC;AAEtC,mEAAuD;AAwBvD,MAAM,QAAQ,GAAG;IACf,UAAU,EAAE,YAAY;IACxB,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,WAAW;IACtB,eAAe,EAAE,iBAAiB;IAClC,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,QAAQ;IAChB,iBAAiB,EAAE,mBAAmB;CAC9B,CAAA;AAEV,MAAM,OAAO,GAAG,IAAA,sBAAE,EAAC;IACjB,IAAI,EAAE;QACJ,kBAAkB;QAClB,wIAAwI;QACxI,wCAAwC;QACxC,kCAAkC;KACnC;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE;YACR,IAAI,EAAE,yEAAyE;SAChF;QACD,KAAK,EAAE;YACL,IAAI,EAAE,uBAAuB;SAC9B;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,8EAA8E;SACrF;KACF;CACF,CAAC,CAAA;AACF,MAAM,KAAK,GAAG,IAAA,sBAAE,EAAC;IACf,KAAK,EAAE;QACL,KAAK,EAAE;YACL,wBAAwB;YACxB,kKAAkK;YAClK,2BAA2B;YAC3B,qDAAqD;YACrD,8BAA8B;SAC/B;QACD,KAAK,EAAE,sDAAsD;KAC9D;CACF,CAAC,CAAA;AAEW,QAAA,KAAK,GAAG,IAAA,kBAAU,EAC7B,CACE,EACE,OAAO,EACP,MAAM,EACN,SAAS,EACT,MAAM,EACN,MAAM,EACN,SAAS,EACT,KAAK,EACL,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,OAAO,EAC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F,CAAA;AAED,MAAM,YAAY,GAAG,CAAC,CAAa,EAAE,EAAE;IACrC,mCAAmC;IACnC,CAAC,CAAC,MAAM,IAAK,CAAC,CAAC,MAA2B,CAAC,IAAI,EAAE,CAAA;AACnD,CAAC,CAAA"}
|
|
@@ -36,7 +36,7 @@ const inputFile = (0, tailwind_variants_1.tv)({
|
|
|
36
36
|
fileList: ['smarthr-ui-InputFile-fileList', 'shr-list-none shr-self-stretch shr-text-base'],
|
|
37
37
|
fileItem: 'shr-flex shr-items-center',
|
|
38
38
|
inputWrapper: [
|
|
39
|
-
'shr-relative shr-inline-flex shr-rounded-m shr-
|
|
39
|
+
'shr-border-shorthand shr-relative shr-inline-flex shr-rounded-m shr-bg-white shr-font-bold shr-leading-none',
|
|
40
40
|
'contrast-more:shr-border-high-contrast',
|
|
41
41
|
'focus-within:shr-focus-indicator',
|
|
42
42
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputFile.js","sourceRoot":"","sources":["../../../src/components/InputFile/InputFile.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAUc;AACd,yDAAoD;AAEpD,kCAAoC;AACpC,sCAAkC;AAClC,kCAA0D;AAC1D,sCAAiC;AAIjC,MAAM,SAAS,GAAG,IAAA,sBAAE,EAAC;IACnB,KAAK,EAAE;QACL,OAAO,EAAE,gCAAgC;QACzC,QAAQ,EAAE,CAAC,+BAA+B,EAAE,8CAA8C,CAAC;QAC3F,QAAQ,EAAE,2BAA2B;QACrC,YAAY,EAAE;YACZ,
|
|
1
|
+
{"version":3,"file":"InputFile.js","sourceRoot":"","sources":["../../../src/components/InputFile/InputFile.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAUc;AACd,yDAAoD;AAEpD,kCAAoC;AACpC,sCAAkC;AAClC,kCAA0D;AAC1D,sCAAiC;AAIjC,MAAM,SAAS,GAAG,IAAA,sBAAE,EAAC;IACnB,KAAK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AAI,CAAC,IAAI,CAAQ;YAClE,8BAAC,eAAM,IACL,OAAO,EAAC,MAAM,EACd,MAAM,EAAE,8BAAC,qBAAc,OAAG,EAC1B,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,EAClC,SAAS,EAAC,mCAAmC,IAE5C,iBAAiB,CACX,CACN,CACN,CAAC,CACS,CACd;QACD,wCAAM,SAAS,EAAE,iBAAiB;YAEhC,4CACM,KAAK,EACT,IAAI,EAAC,MAAM,EACX,QAAQ,EAAE,YAAY,EACtB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,KAAK,EAAE,EAClB,GAAG,EAAE,QAAQ,kBACC,KAAK,IAAI,SAAS,qBACf,OAAO,GACxB;YACF,wCAAM,SAAS,EAAE,MAAM,EAAE;gBACvB,8BAAC,uBAAgB,OAAG,CACf;YACP,wCAAM,EAAE,EAAE,OAAO,iBAAc,MAAM,IAClC,KAAK,CACD,CACF,CACD,CACT,CAAA;AACH,CAAC,CACF,CAAA"}
|
|
@@ -1,23 +1,251 @@
|
|
|
1
1
|
import React, { ComponentProps, ComponentPropsWithoutRef, PropsWithChildren } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { VariantProps } from 'tailwind-variants';
|
|
3
|
+
import { Base } from '../Base';
|
|
4
|
+
export declare const notificationBar: import("tailwind-variants").TVReturnType<{
|
|
5
|
+
/** 下地 */
|
|
6
|
+
base: {
|
|
7
|
+
none: {};
|
|
8
|
+
base: {
|
|
9
|
+
wrapper: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
/** メッセージの種類 */
|
|
13
|
+
type: {
|
|
14
|
+
info: {
|
|
15
|
+
icon: string;
|
|
16
|
+
};
|
|
17
|
+
success: {};
|
|
18
|
+
warning: {
|
|
19
|
+
icon: string;
|
|
20
|
+
};
|
|
21
|
+
error: {};
|
|
22
|
+
};
|
|
23
|
+
/** 強調するかどうか */
|
|
24
|
+
bold: {
|
|
25
|
+
true: string;
|
|
26
|
+
false: string;
|
|
27
|
+
};
|
|
28
|
+
/** スライドインするかどうか */
|
|
29
|
+
animate: {
|
|
30
|
+
true: {
|
|
31
|
+
wrapper: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
}, {
|
|
35
|
+
wrapper: string;
|
|
36
|
+
inner: string;
|
|
37
|
+
messageArea: string[];
|
|
38
|
+
icon: string;
|
|
39
|
+
actionArea: string;
|
|
40
|
+
actionWrapper: string;
|
|
41
|
+
closeButton: string;
|
|
42
|
+
}, undefined, import("tailwind-variants/dist/config").TVConfig<{
|
|
43
|
+
/** 下地 */
|
|
44
|
+
base: {
|
|
45
|
+
none: {};
|
|
46
|
+
base: {
|
|
47
|
+
wrapper: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
/** メッセージの種類 */
|
|
51
|
+
type: {
|
|
52
|
+
info: {
|
|
53
|
+
icon: string;
|
|
54
|
+
};
|
|
55
|
+
success: {};
|
|
56
|
+
warning: {
|
|
57
|
+
icon: string;
|
|
58
|
+
};
|
|
59
|
+
error: {};
|
|
60
|
+
};
|
|
61
|
+
/** 強調するかどうか */
|
|
62
|
+
bold: {
|
|
63
|
+
true: string;
|
|
64
|
+
false: string;
|
|
65
|
+
};
|
|
66
|
+
/** スライドインするかどうか */
|
|
67
|
+
animate: {
|
|
68
|
+
true: {
|
|
69
|
+
wrapper: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
}, {
|
|
73
|
+
/** 下地 */
|
|
74
|
+
base: {
|
|
75
|
+
none: {};
|
|
76
|
+
base: {
|
|
77
|
+
wrapper: string;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
/** メッセージの種類 */
|
|
81
|
+
type: {
|
|
82
|
+
info: {
|
|
83
|
+
icon: string;
|
|
84
|
+
};
|
|
85
|
+
success: {};
|
|
86
|
+
warning: {
|
|
87
|
+
icon: string;
|
|
88
|
+
};
|
|
89
|
+
error: {};
|
|
90
|
+
};
|
|
91
|
+
/** 強調するかどうか */
|
|
92
|
+
bold: {
|
|
93
|
+
true: string;
|
|
94
|
+
false: string;
|
|
95
|
+
};
|
|
96
|
+
/** スライドインするかどうか */
|
|
97
|
+
animate: {
|
|
98
|
+
true: {
|
|
99
|
+
wrapper: string;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
}>, {
|
|
103
|
+
/** 下地 */
|
|
104
|
+
base: {
|
|
105
|
+
none: {};
|
|
106
|
+
base: {
|
|
107
|
+
wrapper: string;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
5
110
|
/** メッセージの種類 */
|
|
6
|
-
type:
|
|
111
|
+
type: {
|
|
112
|
+
info: {
|
|
113
|
+
icon: string;
|
|
114
|
+
};
|
|
115
|
+
success: {};
|
|
116
|
+
warning: {
|
|
117
|
+
icon: string;
|
|
118
|
+
};
|
|
119
|
+
error: {};
|
|
120
|
+
};
|
|
7
121
|
/** 強調するかどうか */
|
|
8
|
-
bold
|
|
122
|
+
bold: {
|
|
123
|
+
true: string;
|
|
124
|
+
false: string;
|
|
125
|
+
};
|
|
9
126
|
/** スライドインするかどうか */
|
|
10
|
-
animate
|
|
127
|
+
animate: {
|
|
128
|
+
true: {
|
|
129
|
+
wrapper: string;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
}, {
|
|
133
|
+
wrapper: string;
|
|
134
|
+
inner: string;
|
|
135
|
+
messageArea: string[];
|
|
136
|
+
icon: string;
|
|
137
|
+
actionArea: string;
|
|
138
|
+
actionWrapper: string;
|
|
139
|
+
closeButton: string;
|
|
140
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
141
|
+
/** 下地 */
|
|
142
|
+
base: {
|
|
143
|
+
none: {};
|
|
144
|
+
base: {
|
|
145
|
+
wrapper: string;
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
/** メッセージの種類 */
|
|
149
|
+
type: {
|
|
150
|
+
info: {
|
|
151
|
+
icon: string;
|
|
152
|
+
};
|
|
153
|
+
success: {};
|
|
154
|
+
warning: {
|
|
155
|
+
icon: string;
|
|
156
|
+
};
|
|
157
|
+
error: {};
|
|
158
|
+
};
|
|
159
|
+
/** 強調するかどうか */
|
|
160
|
+
bold: {
|
|
161
|
+
true: string;
|
|
162
|
+
false: string;
|
|
163
|
+
};
|
|
164
|
+
/** スライドインするかどうか */
|
|
165
|
+
animate: {
|
|
166
|
+
true: {
|
|
167
|
+
wrapper: string;
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
}, {
|
|
171
|
+
wrapper: string;
|
|
172
|
+
inner: string;
|
|
173
|
+
messageArea: string[];
|
|
174
|
+
icon: string;
|
|
175
|
+
actionArea: string;
|
|
176
|
+
actionWrapper: string;
|
|
177
|
+
closeButton: string;
|
|
178
|
+
}, undefined, import("tailwind-variants/dist/config").TVConfig<{
|
|
179
|
+
/** 下地 */
|
|
180
|
+
base: {
|
|
181
|
+
none: {};
|
|
182
|
+
base: {
|
|
183
|
+
wrapper: string;
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
/** メッセージの種類 */
|
|
187
|
+
type: {
|
|
188
|
+
info: {
|
|
189
|
+
icon: string;
|
|
190
|
+
};
|
|
191
|
+
success: {};
|
|
192
|
+
warning: {
|
|
193
|
+
icon: string;
|
|
194
|
+
};
|
|
195
|
+
error: {};
|
|
196
|
+
};
|
|
197
|
+
/** 強調するかどうか */
|
|
198
|
+
bold: {
|
|
199
|
+
true: string;
|
|
200
|
+
false: string;
|
|
201
|
+
};
|
|
202
|
+
/** スライドインするかどうか */
|
|
203
|
+
animate: {
|
|
204
|
+
true: {
|
|
205
|
+
wrapper: string;
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
}, {
|
|
209
|
+
/** 下地 */
|
|
210
|
+
base: {
|
|
211
|
+
none: {};
|
|
212
|
+
base: {
|
|
213
|
+
wrapper: string;
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
/** メッセージの種類 */
|
|
217
|
+
type: {
|
|
218
|
+
info: {
|
|
219
|
+
icon: string;
|
|
220
|
+
};
|
|
221
|
+
success: {};
|
|
222
|
+
warning: {
|
|
223
|
+
icon: string;
|
|
224
|
+
};
|
|
225
|
+
error: {};
|
|
226
|
+
};
|
|
227
|
+
/** 強調するかどうか */
|
|
228
|
+
bold: {
|
|
229
|
+
true: string;
|
|
230
|
+
false: string;
|
|
231
|
+
};
|
|
232
|
+
/** スライドインするかどうか */
|
|
233
|
+
animate: {
|
|
234
|
+
true: {
|
|
235
|
+
wrapper: string;
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
}>, unknown, unknown, undefined>>;
|
|
239
|
+
type StyleVariants = VariantProps<typeof notificationBar>;
|
|
240
|
+
type Props = PropsWithChildren<Omit<StyleVariants, 'type'> & Required<Pick<StyleVariants, 'type'>> & {
|
|
11
241
|
/** メッセージ */
|
|
12
242
|
message: React.ReactNode;
|
|
13
243
|
/** 閉じるボタン押下時に発火させる関数 */
|
|
14
244
|
onClose?: () => void;
|
|
15
245
|
/** role 属性 */
|
|
16
246
|
role?: 'alert' | 'status';
|
|
17
|
-
/** 下地 */
|
|
18
|
-
base?: 'none' | 'base';
|
|
19
247
|
}>;
|
|
20
248
|
type ElementProps = Omit<ComponentPropsWithoutRef<'div'>, keyof Props>;
|
|
21
|
-
type BaseProps = Pick<ComponentProps<typeof
|
|
249
|
+
type BaseProps = Pick<ComponentProps<typeof Base>, 'layer'>;
|
|
22
250
|
export declare const NotificationBar: React.FC<Props & ElementProps & BaseProps>;
|
|
23
251
|
export {};
|
|
@@ -23,162 +23,161 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.NotificationBar = exports.
|
|
26
|
+
exports.NotificationBar = exports.notificationBar = void 0;
|
|
27
27
|
const react_1 = __importStar(require("react"));
|
|
28
|
-
const
|
|
29
|
-
const useTheme_1 = require("../../hooks/useTheme");
|
|
28
|
+
const tailwind_variants_1 = require("tailwind-variants");
|
|
30
29
|
const Base_1 = require("../Base");
|
|
31
30
|
const Button_1 = require("../Button");
|
|
32
31
|
const Icon_1 = require("../Icon");
|
|
33
32
|
const Layout_1 = require("../Layout");
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
33
|
+
exports.notificationBar = (0, tailwind_variants_1.tv)({
|
|
34
|
+
slots: {
|
|
35
|
+
wrapper: 'smarthr-ui-NotificationBar shr-flex shr-items-baseline shr-justify-between shr-gap-0.5 shr-p-0.75',
|
|
36
|
+
inner: 'shr-flex-grow',
|
|
37
|
+
messageArea: [
|
|
38
|
+
'smarthr-ui-NotificationBar-messageArea',
|
|
39
|
+
'shr-flex shr-grow',
|
|
40
|
+
'[&_.smarthr-ui-Icon-withText]:shr-leading-tight',
|
|
41
|
+
],
|
|
42
|
+
icon: '',
|
|
43
|
+
actionArea: 'smarthr-ui-NotificationBar-actionArea shr-shrink-0',
|
|
44
|
+
actionWrapper: 'smarthr-ui-NotificationBar-actions -shr-my-0.5',
|
|
45
|
+
closeButton: 'smarthr-ui-NotificationBar-closeButton -shr-mb-0.5 -shr-mr-0.5 -shr-mt-0.5 shr-flex-shrink-0 shr-text-black',
|
|
46
|
+
},
|
|
47
|
+
variants: {
|
|
48
|
+
/** 下地 */
|
|
49
|
+
base: {
|
|
50
|
+
none: {},
|
|
51
|
+
base: {
|
|
52
|
+
wrapper: 'shr-py-1 shr-pe-1 shr-ps-1.5',
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
/** メッセージの種類 */
|
|
56
|
+
type: {
|
|
57
|
+
info: {
|
|
58
|
+
icon: 'shr-text-grey',
|
|
59
|
+
},
|
|
60
|
+
success: {},
|
|
61
|
+
warning: {
|
|
62
|
+
icon: 'shr-text-black',
|
|
63
|
+
},
|
|
64
|
+
error: {},
|
|
65
|
+
},
|
|
66
|
+
/** 強調するかどうか */
|
|
67
|
+
bold: {
|
|
68
|
+
true: '',
|
|
69
|
+
false: '',
|
|
70
|
+
},
|
|
71
|
+
/** スライドインするかどうか */
|
|
72
|
+
animate: {
|
|
73
|
+
true: {
|
|
74
|
+
wrapper: 'shr-animate-[notifiction-bar-slide-in_0.2s_ease-out]',
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
compoundVariants: [
|
|
79
|
+
{
|
|
80
|
+
type: ['info', 'success', 'warning', 'error'],
|
|
81
|
+
bold: false,
|
|
82
|
+
className: {
|
|
83
|
+
wrapper: 'shr-bg-white shr-text-black',
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
type: 'success',
|
|
88
|
+
bold: false,
|
|
89
|
+
className: {
|
|
90
|
+
icon: 'shr-text-main',
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
type: 'error',
|
|
95
|
+
bold: false,
|
|
96
|
+
className: {
|
|
97
|
+
icon: 'shr-text-danger',
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
type: 'info',
|
|
102
|
+
bold: true,
|
|
103
|
+
className: {
|
|
104
|
+
wrapper: 'shr-bg-white',
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
type: 'success',
|
|
109
|
+
bold: true,
|
|
110
|
+
className: {
|
|
111
|
+
wrapper: 'shr-bg-main shr-text-white',
|
|
112
|
+
icon: 'shr-text-white',
|
|
113
|
+
closeButton: 'shr-text-white [&]:hover:shr-bg-main-darken [&]:focus-visible:shr-bg-main-darken',
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
type: 'warning',
|
|
118
|
+
bold: true,
|
|
119
|
+
className: {
|
|
120
|
+
wrapper: 'shr-bg-warning-yellow shr-text-black',
|
|
121
|
+
closeButton: 'shr-text-black [&]:hover:shr-bg-warning-yellow-darken [&]:focus-visible:shr-bg-warning-yellow-darken',
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
type: 'error',
|
|
126
|
+
bold: true,
|
|
127
|
+
className: {
|
|
128
|
+
wrapper: 'shr-bg-danger shr-text-white',
|
|
129
|
+
icon: 'shr-text-white',
|
|
130
|
+
closeButton: 'shr-text-white [&]:hover:shr-bg-danger-darken [&]:focus-visible:shr-bg-danger-darken',
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
],
|
|
134
|
+
});
|
|
135
|
+
const NotificationBar = ({ type, bold = false, animate, message, onClose, children, role = type === 'info' ? 'status' : 'alert', base = 'none', layer, className, ...props }) => {
|
|
136
|
+
const Icon = (0, react_1.useMemo)(() => {
|
|
41
137
|
switch (type) {
|
|
42
138
|
case 'info':
|
|
43
|
-
return
|
|
44
|
-
Icon: Icon_1.FaInfoCircleIcon,
|
|
45
|
-
iconColor: color.TEXT_GREY,
|
|
46
|
-
};
|
|
139
|
+
return Icon_1.FaInfoCircleIcon;
|
|
47
140
|
case 'success': {
|
|
48
|
-
|
|
49
|
-
? {
|
|
50
|
-
iconColor: color.TEXT_WHITE,
|
|
51
|
-
fgColor: color.TEXT_WHITE,
|
|
52
|
-
bgColor: color.MAIN,
|
|
53
|
-
}
|
|
54
|
-
: {};
|
|
55
|
-
return {
|
|
56
|
-
Icon: Icon_1.FaCheckCircleIcon,
|
|
57
|
-
iconColor: color.MAIN,
|
|
58
|
-
...colors,
|
|
59
|
-
};
|
|
141
|
+
return Icon_1.FaCheckCircleIcon;
|
|
60
142
|
}
|
|
61
143
|
case 'warning': {
|
|
62
|
-
|
|
63
|
-
? {
|
|
64
|
-
Icon: Icon_1.FaExclamationTriangleIcon,
|
|
65
|
-
fgColor: color.TEXT_BLACK,
|
|
66
|
-
bgColor: color.WARNING_YELLOW,
|
|
67
|
-
}
|
|
68
|
-
: {};
|
|
69
|
-
return {
|
|
70
|
-
Icon: Icon_1.WarningIcon,
|
|
71
|
-
iconColor: color.TEXT_BLACK,
|
|
72
|
-
...colors,
|
|
73
|
-
};
|
|
144
|
+
return bold ? Icon_1.FaExclamationTriangleIcon : Icon_1.WarningIcon;
|
|
74
145
|
}
|
|
75
146
|
case 'error': {
|
|
76
|
-
|
|
77
|
-
? {
|
|
78
|
-
iconColor: color.TEXT_WHITE,
|
|
79
|
-
fgColor: color.TEXT_WHITE,
|
|
80
|
-
bgColor: color.DANGER,
|
|
81
|
-
}
|
|
82
|
-
: {};
|
|
83
|
-
return {
|
|
84
|
-
Icon: Icon_1.FaExclamationCircleIcon,
|
|
85
|
-
iconColor: color.DANGER,
|
|
86
|
-
...colors,
|
|
87
|
-
};
|
|
147
|
+
return Icon_1.FaExclamationCircleIcon;
|
|
88
148
|
}
|
|
89
149
|
}
|
|
90
|
-
}, [
|
|
91
|
-
const { baseComponent: WrapBase, baseProps } = (0, react_1.useMemo)(() => base === 'base'
|
|
150
|
+
}, [type, bold]);
|
|
151
|
+
const { baseComponent: WrapBase = react_1.default.Fragment, baseProps = {} } = (0, react_1.useMemo)(() => base === 'base'
|
|
92
152
|
? {
|
|
93
|
-
baseComponent: Base,
|
|
153
|
+
baseComponent: Base_1.Base,
|
|
94
154
|
baseProps: {
|
|
95
155
|
layer,
|
|
156
|
+
overflow: 'hidden',
|
|
96
157
|
},
|
|
97
158
|
}
|
|
98
|
-
: {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
159
|
+
: {}, [base, layer]);
|
|
160
|
+
const { wrapperStyle, innerStyle, messageAreaStyle, iconStyle, actionAreaStyle, actionWrapperStyle, closeButtonStyle, } = (0, react_1.useMemo)(() => {
|
|
161
|
+
const { wrapper, inner, messageArea, icon, actionArea, actionWrapper, closeButton } = (0, exports.notificationBar)({ type, bold, base });
|
|
162
|
+
return {
|
|
163
|
+
wrapperStyle: wrapper({ animate, className }),
|
|
164
|
+
innerStyle: inner(),
|
|
165
|
+
messageAreaStyle: messageArea(),
|
|
166
|
+
iconStyle: icon(),
|
|
167
|
+
actionAreaStyle: actionArea(),
|
|
168
|
+
actionWrapperStyle: actionWrapper(),
|
|
169
|
+
closeButtonStyle: closeButton(),
|
|
170
|
+
};
|
|
171
|
+
}, [animate, base, bold, className, type]);
|
|
102
172
|
return (react_1.default.createElement(WrapBase, { ...baseProps },
|
|
103
|
-
react_1.default.createElement(
|
|
104
|
-
react_1.default.createElement(
|
|
105
|
-
react_1.default.createElement(
|
|
106
|
-
react_1.default.createElement(Icon, { text: message,
|
|
107
|
-
children && (react_1.default.createElement(
|
|
108
|
-
react_1.default.createElement(
|
|
109
|
-
onClose && (react_1.default.createElement(
|
|
173
|
+
react_1.default.createElement("div", { ...props, className: wrapperStyle, role: role },
|
|
174
|
+
react_1.default.createElement(Layout_1.Cluster, { gap: 1, align: "center", justify: "flex-end", className: innerStyle },
|
|
175
|
+
react_1.default.createElement("div", { className: messageAreaStyle },
|
|
176
|
+
react_1.default.createElement(Icon, { text: message, iconGap: 0.5, className: iconStyle })),
|
|
177
|
+
children && (react_1.default.createElement(Layout_1.Cluster, { gap: 0.5, align: "center", className: actionAreaStyle },
|
|
178
|
+
react_1.default.createElement(Layout_1.Cluster, { align: "center", justify: "flex-end", className: actionWrapperStyle }, children)))),
|
|
179
|
+
onClose && (react_1.default.createElement(Button_1.Button, { variant: "text", size: "s", onClick: onClose, className: closeButtonStyle },
|
|
110
180
|
react_1.default.createElement(Icon_1.FaTimesIcon, { alt: "\u9589\u3058\u308B" }))))));
|
|
111
181
|
};
|
|
112
182
|
exports.NotificationBar = NotificationBar;
|
|
113
|
-
const Base = (0, styled_components_1.default)(Base_1.Base).attrs({ overflow: 'hidden' }) ``;
|
|
114
|
-
const Wrapper = styled_components_1.default.div(({ themes: { color, fontSize, leading, space }, $colorSet: { fgColor = color.TEXT_BLACK, bgColor = color.WHITE }, onBase, animate, }) => (0, styled_components_1.css) `
|
|
115
|
-
display: flex;
|
|
116
|
-
gap: ${space(0.5)};
|
|
117
|
-
align-items: baseline;
|
|
118
|
-
justify-content: space-between;
|
|
119
|
-
background-color: ${bgColor};
|
|
120
|
-
padding: ${space(0.75)};
|
|
121
|
-
${onBase &&
|
|
122
|
-
(0, styled_components_1.css) `
|
|
123
|
-
padding-block: ${space(1)};
|
|
124
|
-
padding-inline: ${space(1.5)} ${space(1)};
|
|
125
|
-
`}
|
|
126
|
-
color: ${fgColor};
|
|
127
|
-
${animate &&
|
|
128
|
-
(0, styled_components_1.css) `
|
|
129
|
-
/* 1行の場合の高さ分だけスライドさせる */
|
|
130
|
-
/* stylelint-disable-next-line */
|
|
131
|
-
animation: ${slideIn(`calc(${fontSize.M} * ${leading.TIGHT} + ${space(1.5)})`)} 0.2s ease-out;
|
|
132
|
-
`}
|
|
133
|
-
`);
|
|
134
|
-
const Inner = (0, styled_components_1.default)(Layout_1.Cluster).attrs({
|
|
135
|
-
gap: 1,
|
|
136
|
-
align: 'center',
|
|
137
|
-
justify: 'flex-end',
|
|
138
|
-
}) `
|
|
139
|
-
flex-grow: 1;
|
|
140
|
-
`;
|
|
141
|
-
const slideIn = (translateLength) => (0, styled_components_1.keyframes) `
|
|
142
|
-
from {
|
|
143
|
-
opacity: 0;
|
|
144
|
-
transform: translateY(calc(-1 * ${translateLength}));
|
|
145
|
-
}
|
|
146
|
-
to {
|
|
147
|
-
opacity: 1;
|
|
148
|
-
transform: translateY(0);
|
|
149
|
-
}
|
|
150
|
-
`;
|
|
151
|
-
const MessageArea = styled_components_1.default.div(({ themes: { leading, spacingByChar } }) => (0, styled_components_1.css) `
|
|
152
|
-
display: flex;
|
|
153
|
-
gap: ${spacingByChar(0.5)};
|
|
154
|
-
align-items: center;
|
|
155
|
-
flex-grow: 1;
|
|
156
|
-
|
|
157
|
-
.smarthr-ui-Icon-withText {
|
|
158
|
-
line-height: ${leading.TIGHT};
|
|
159
|
-
}
|
|
160
|
-
`);
|
|
161
|
-
const ActionArea = styled_components_1.default.div(({ themes: { spacingByChar } }) => (0, styled_components_1.css) `
|
|
162
|
-
display: flex;
|
|
163
|
-
gap: ${spacingByChar(0.5)};
|
|
164
|
-
align-items: center;
|
|
165
|
-
flex-shrink: 0;
|
|
166
|
-
`);
|
|
167
|
-
const ActionWrapper = (0, styled_components_1.default)(Layout_1.Cluster)(({ themes: { spacingByChar } }) => (0, styled_components_1.css) `
|
|
168
|
-
margin-block: ${spacingByChar(-0.5)};
|
|
169
|
-
`);
|
|
170
|
-
const CloseButton = (0, styled_components_1.default)(Button_1.Button)(({ themes: { color, spacingByChar }, $colorSet: { fgColor = color.TEXT_BLACK, bgColor = color.WHITE }, }) => (0, styled_components_1.css) `
|
|
171
|
-
flex-shrink: 0;
|
|
172
|
-
|
|
173
|
-
margin-top: ${spacingByChar(-0.5)};
|
|
174
|
-
margin-right: ${spacingByChar(-0.5)};
|
|
175
|
-
margin-bottom: ${spacingByChar(-0.5)};
|
|
176
|
-
color: ${fgColor};
|
|
177
|
-
|
|
178
|
-
&:hover,
|
|
179
|
-
&:focus-visible {
|
|
180
|
-
background-color: ${color.hoverColor(bgColor)};
|
|
181
|
-
color: ${fgColor};
|
|
182
|
-
}
|
|
183
|
-
`);
|
|
184
183
|
//# sourceMappingURL=NotificationBar.js.map
|