smarthr-ui 43.3.0 → 44.0.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/BottomFixedArea/BottomFixedArea.d.ts +10 -7
- package/esm/components/BottomFixedArea/BottomFixedArea.js +35 -30
- package/esm/components/BottomFixedArea/BottomFixedArea.js.map +1 -1
- package/esm/components/Button/UnstyledButton.js +1 -18
- package/esm/components/Button/UnstyledButton.js.map +1 -1
- package/esm/components/Calendar/CalendarTable.js +21 -18
- package/esm/components/Calendar/CalendarTable.js.map +1 -1
- package/esm/components/CompactInformationPanel/CompactInformationPanel.d.ts +4 -9
- package/esm/components/CompactInformationPanel/CompactInformationPanel.js +8 -15
- package/esm/components/CompactInformationPanel/CompactInformationPanel.js.map +1 -1
- package/esm/components/Dialog/ActionDialog/ActionDialog.d.ts +2 -2
- package/esm/components/Dialog/ActionDialog/ActionDialog.js +1 -1
- package/esm/components/Dialog/ActionDialog/ActionDialog.js.map +1 -1
- package/esm/components/Dialog/ActionDialog/ActionDialogContentInner.d.ts +0 -4
- package/esm/components/Dialog/ActionDialog/ActionDialogContentInner.js +36 -44
- package/esm/components/Dialog/ActionDialog/ActionDialogContentInner.js.map +1 -1
- package/esm/components/ErrorScreen/ErrorScreen.js +1 -1
- package/esm/components/ErrorScreen/ErrorScreen.js.map +1 -1
- package/esm/components/Experimental/SideMenu/SideMenu.js +3 -1
- package/esm/components/Experimental/SideMenu/SideMenu.js.map +1 -1
- package/esm/components/Experimental/SideMenu/SideMenuGroup.js +9 -2
- package/esm/components/Experimental/SideMenu/SideMenuGroup.js.map +1 -1
- package/esm/components/Header/AppLauncher/AppLauncher.d.ts +6 -5
- package/esm/components/Header/AppLauncher/AppLauncher.js +28 -46
- package/esm/components/Header/AppLauncher/AppLauncher.js.map +1 -1
- package/esm/components/Layout/index.d.ts +0 -1
- package/esm/components/Layout/index.js +0 -1
- package/esm/components/Layout/index.js.map +1 -1
- package/esm/components/LineClamp/LineClamp.d.ts +69 -11
- package/esm/components/LineClamp/LineClamp.js +23 -40
- package/esm/components/LineClamp/LineClamp.js.map +1 -1
- package/esm/components/SectioningContent/SectioningContent.d.ts +7 -8
- package/esm/components/SectioningContent/SectioningContent.js +1 -4
- package/esm/components/SectioningContent/SectioningContent.js.map +1 -1
- package/esm/components/TabBar/TabItem.d.ts +3 -2
- package/esm/components/TabBar/TabItem.js +9 -29
- package/esm/components/TabBar/TabItem.js.map +1 -1
- package/esm/components/Table/TableReel.d.ts +2 -2
- package/esm/components/Table/TableReel.js +19 -19
- package/esm/components/Table/TableReel.js.map +1 -1
- package/esm/components/Table/useClassNames.d.ts +0 -4
- package/esm/components/Table/useClassNames.js +2 -7
- package/esm/components/Table/useClassNames.js.map +1 -1
- package/esm/components/Table/useReelShadow.d.ts +14 -20
- package/esm/components/Table/useReelShadow.js +5 -32
- package/esm/components/Table/useReelShadow.js.map +1 -1
- package/esm/hooks/useTailwindTheme.d.ts +7 -7
- package/esm/index.d.ts +1 -2
- package/esm/index.js +1 -2
- package/esm/index.js.map +1 -1
- package/esm/smarthr-ui-preset.js +3 -0
- package/esm/smarthr-ui-preset.js.map +1 -1
- package/lib/components/BottomFixedArea/BottomFixedArea.d.ts +10 -7
- package/lib/components/BottomFixedArea/BottomFixedArea.js +33 -28
- package/lib/components/BottomFixedArea/BottomFixedArea.js.map +1 -1
- package/lib/components/Button/UnstyledButton.js +1 -18
- package/lib/components/Button/UnstyledButton.js.map +1 -1
- package/lib/components/Calendar/CalendarTable.js +21 -18
- package/lib/components/Calendar/CalendarTable.js.map +1 -1
- package/lib/components/CompactInformationPanel/CompactInformationPanel.d.ts +4 -9
- package/lib/components/CompactInformationPanel/CompactInformationPanel.js +8 -18
- package/lib/components/CompactInformationPanel/CompactInformationPanel.js.map +1 -1
- package/lib/components/Dialog/ActionDialog/ActionDialog.d.ts +2 -2
- package/lib/components/Dialog/ActionDialog/ActionDialog.js +1 -1
- package/lib/components/Dialog/ActionDialog/ActionDialog.js.map +1 -1
- package/lib/components/Dialog/ActionDialog/ActionDialogContentInner.d.ts +0 -4
- package/lib/components/Dialog/ActionDialog/ActionDialogContentInner.js +35 -43
- package/lib/components/Dialog/ActionDialog/ActionDialogContentInner.js.map +1 -1
- package/lib/components/ErrorScreen/ErrorScreen.js +1 -1
- package/lib/components/ErrorScreen/ErrorScreen.js.map +1 -1
- package/lib/components/Experimental/SideMenu/SideMenu.js +3 -1
- package/lib/components/Experimental/SideMenu/SideMenu.js.map +1 -1
- package/lib/components/Experimental/SideMenu/SideMenuGroup.js +9 -2
- package/lib/components/Experimental/SideMenu/SideMenuGroup.js.map +1 -1
- package/lib/components/Header/AppLauncher/AppLauncher.d.ts +6 -5
- package/lib/components/Header/AppLauncher/AppLauncher.js +28 -46
- package/lib/components/Header/AppLauncher/AppLauncher.js.map +1 -1
- package/lib/components/Layout/index.d.ts +0 -1
- package/lib/components/Layout/index.js +1 -3
- package/lib/components/Layout/index.js.map +1 -1
- package/lib/components/LineClamp/LineClamp.d.ts +69 -11
- package/lib/components/LineClamp/LineClamp.js +22 -39
- package/lib/components/LineClamp/LineClamp.js.map +1 -1
- package/lib/components/SectioningContent/SectioningContent.d.ts +7 -8
- package/lib/components/SectioningContent/SectioningContent.js +1 -7
- package/lib/components/SectioningContent/SectioningContent.js.map +1 -1
- package/lib/components/TabBar/TabItem.d.ts +3 -2
- package/lib/components/TabBar/TabItem.js +9 -29
- package/lib/components/TabBar/TabItem.js.map +1 -1
- package/lib/components/Table/TableReel.d.ts +2 -2
- package/lib/components/Table/TableReel.js +18 -21
- package/lib/components/Table/TableReel.js.map +1 -1
- package/lib/components/Table/useClassNames.d.ts +0 -4
- package/lib/components/Table/useClassNames.js +1 -6
- package/lib/components/Table/useClassNames.js.map +1 -1
- package/lib/components/Table/useReelShadow.d.ts +14 -20
- package/lib/components/Table/useReelShadow.js +6 -34
- package/lib/components/Table/useReelShadow.js.map +1 -1
- package/lib/hooks/useTailwindTheme.d.ts +7 -7
- package/lib/index.d.ts +1 -2
- package/lib/index.js +2 -5
- package/lib/index.js.map +1 -1
- package/lib/smarthr-ui-preset.js +3 -0
- package/lib/smarthr-ui-preset.js.map +1 -1
- package/package.json +7 -7
- package/smarthr-ui.css +132 -25
- package/esm/components/BottomFixedArea/TertiaryLink.d.ts +0 -11
- package/esm/components/BottomFixedArea/TertiaryLink.js +0 -44
- package/esm/components/BottomFixedArea/TertiaryLink.js.map +0 -1
- package/esm/components/BottomFixedArea/useClassNames.d.ts +0 -10
- package/esm/components/BottomFixedArea/useClassNames.js +0 -16
- package/esm/components/BottomFixedArea/useClassNames.js.map +0 -1
- package/esm/components/CompactInformationPanel/useClassNames.d.ts +0 -3
- package/esm/components/CompactInformationPanel/useClassNames.js +0 -10
- package/esm/components/CompactInformationPanel/useClassNames.js.map +0 -1
- package/esm/components/Header/AppLauncher/useClassNames.d.ts +0 -6
- package/esm/components/Header/AppLauncher/useClassNames.js +0 -13
- package/esm/components/Header/AppLauncher/useClassNames.js.map +0 -1
- package/esm/components/HeadlineArea/HeadlineArea.d.ts +0 -21
- package/esm/components/HeadlineArea/HeadlineArea.js +0 -33
- package/esm/components/HeadlineArea/HeadlineArea.js.map +0 -1
- package/esm/components/HeadlineArea/index.d.ts +0 -1
- package/esm/components/HeadlineArea/index.js +0 -2
- package/esm/components/HeadlineArea/index.js.map +0 -1
- package/esm/components/HeadlineArea/useClassNames.d.ts +0 -4
- package/esm/components/HeadlineArea/useClassNames.js +0 -11
- package/esm/components/HeadlineArea/useClassNames.js.map +0 -1
- package/esm/components/Layout/LineUp/LineUp.d.ts +0 -23
- package/esm/components/Layout/LineUp/LineUp.js +0 -26
- package/esm/components/Layout/LineUp/LineUp.js.map +0 -1
- package/esm/components/Layout/LineUp/index.d.ts +0 -1
- package/esm/components/Layout/LineUp/index.js +0 -2
- package/esm/components/Layout/LineUp/index.js.map +0 -1
- package/esm/components/LineClamp/useClassNames.d.ts +0 -3
- package/esm/components/LineClamp/useClassNames.js +0 -10
- package/esm/components/LineClamp/useClassNames.js.map +0 -1
- package/lib/components/BottomFixedArea/TertiaryLink.d.ts +0 -11
- package/lib/components/BottomFixedArea/TertiaryLink.js +0 -74
- package/lib/components/BottomFixedArea/TertiaryLink.js.map +0 -1
- package/lib/components/BottomFixedArea/useClassNames.d.ts +0 -10
- package/lib/components/BottomFixedArea/useClassNames.js +0 -20
- package/lib/components/BottomFixedArea/useClassNames.js.map +0 -1
- package/lib/components/CompactInformationPanel/useClassNames.d.ts +0 -3
- package/lib/components/CompactInformationPanel/useClassNames.js +0 -14
- package/lib/components/CompactInformationPanel/useClassNames.js.map +0 -1
- package/lib/components/Header/AppLauncher/useClassNames.d.ts +0 -6
- package/lib/components/Header/AppLauncher/useClassNames.js +0 -17
- package/lib/components/Header/AppLauncher/useClassNames.js.map +0 -1
- package/lib/components/HeadlineArea/HeadlineArea.d.ts +0 -21
- package/lib/components/HeadlineArea/HeadlineArea.js +0 -63
- package/lib/components/HeadlineArea/HeadlineArea.js.map +0 -1
- package/lib/components/HeadlineArea/index.d.ts +0 -1
- package/lib/components/HeadlineArea/index.js +0 -18
- package/lib/components/HeadlineArea/index.js.map +0 -1
- package/lib/components/HeadlineArea/useClassNames.d.ts +0 -4
- package/lib/components/HeadlineArea/useClassNames.js +0 -15
- package/lib/components/HeadlineArea/useClassNames.js.map +0 -1
- package/lib/components/Layout/LineUp/LineUp.d.ts +0 -23
- package/lib/components/Layout/LineUp/LineUp.js +0 -52
- package/lib/components/Layout/LineUp/LineUp.js.map +0 -1
- package/lib/components/Layout/LineUp/index.d.ts +0 -1
- package/lib/components/Layout/LineUp/index.js +0 -6
- package/lib/components/Layout/LineUp/index.js.map +0 -1
- package/lib/components/LineClamp/useClassNames.d.ts +0 -3
- package/lib/components/LineClamp/useClassNames.js +0 -14
- package/lib/components/LineClamp/useClassNames.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ComponentProps, ComponentPropsWithRef, ComponentType, FC, FunctionComponentElement, MouseEventHandler, ReactNode } from 'react';
|
|
2
2
|
import { AnchorButton, Button } from '../Button';
|
|
3
|
-
import {
|
|
3
|
+
import { ComponentProps as IconProps } from '../Icon';
|
|
4
4
|
export type Primary = FunctionComponentElement<ComponentProps<typeof Button>> | FunctionComponentElement<ComponentProps<typeof AnchorButton>>;
|
|
5
5
|
export type Secondary = FunctionComponentElement<ComponentProps<typeof Button>> | FunctionComponentElement<ComponentProps<typeof AnchorButton>>;
|
|
6
|
-
type ElementProps = Omit<
|
|
6
|
+
type ElementProps = Omit<ComponentPropsWithRef<'div'>, keyof Props>;
|
|
7
7
|
type Props = {
|
|
8
8
|
/** この領域の説明 */
|
|
9
9
|
description?: ReactNode;
|
|
@@ -12,11 +12,14 @@ type Props = {
|
|
|
12
12
|
/** 表示する `Button` または `AnchorButton` (`variant="secondary"` である必要がある)*/
|
|
13
13
|
secondaryButton?: Secondary;
|
|
14
14
|
/** 表示する tertialy link のプロパティの配列 */
|
|
15
|
-
tertiaryLinks?: Array<
|
|
15
|
+
tertiaryLinks?: Array<ComponentPropsWithRef<'button'> & {
|
|
16
|
+
text: ReactNode;
|
|
17
|
+
icon?: ComponentType<IconProps>;
|
|
18
|
+
type?: 'button' | 'reset';
|
|
19
|
+
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
20
|
+
}>;
|
|
16
21
|
/** コンポーネントに適用する z-index 値 */
|
|
17
22
|
zIndex?: number;
|
|
18
|
-
/** コンポーネントに適用するクラス名 */
|
|
19
|
-
className?: string;
|
|
20
23
|
};
|
|
21
|
-
export declare const BottomFixedArea:
|
|
24
|
+
export declare const BottomFixedArea: FC<Props & ElementProps>;
|
|
22
25
|
export {};
|
|
@@ -1,38 +1,43 @@
|
|
|
1
|
-
import React, { useEffect, } from 'react';
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import React, { useEffect, useMemo, } from 'react';
|
|
2
|
+
import { tv } from 'tailwind-variants';
|
|
3
|
+
import { Base } from '../Base';
|
|
4
|
+
import { Button } from '../Button';
|
|
5
5
|
import { Cluster, Stack } from '../Layout';
|
|
6
|
-
import { Text } from '../Text';
|
|
7
|
-
import { TertiaryLink } from './TertiaryLink';
|
|
8
6
|
import { validateElement } from './bottomFixedAreaHelper';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
const bottomFixedArea = tv({
|
|
8
|
+
slots: {
|
|
9
|
+
wrapper: [
|
|
10
|
+
'smarthr-ui-BottomFixedArea',
|
|
11
|
+
'shr-fixed shr-bottom-0 shr-z-fixed-menu shr-box-border shr-w-full shr-rounded-none shr-p-1.5 shr-text-center',
|
|
12
|
+
// Layer 3 だが、上方向への指定のためベタ書き: https://smarthr.design/products/design-tokens/shadow/
|
|
13
|
+
'[box-shadow:_0_-4px_8px_2px_rgba(0,_0,_0,_0.24)]',
|
|
14
|
+
'[&_ul]:shr-list-none',
|
|
15
|
+
],
|
|
16
|
+
tertiaryButton: [
|
|
17
|
+
'smarthr-ui-BottomFixedArea-tertiaryLink',
|
|
18
|
+
'-shr-mb-0.5 shr-font-normal shr-text-main',
|
|
19
|
+
],
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
export const BottomFixedArea = ({ description, primaryButton, secondaryButton, tertiaryLinks, zIndex, className, ...props }) => {
|
|
23
|
+
const { wrapperStyleProps, tertiaryButtonStyle } = useMemo(() => {
|
|
24
|
+
const { wrapper, tertiaryButton } = bottomFixedArea();
|
|
25
|
+
return {
|
|
26
|
+
wrapperStyleProps: { className: wrapper({ className }), style: { zIndex } },
|
|
27
|
+
tertiaryButtonStyle: tertiaryButton(),
|
|
28
|
+
};
|
|
29
|
+
}, [className, zIndex]);
|
|
13
30
|
useEffect(() => {
|
|
14
31
|
validateElement(primaryButton, secondaryButton);
|
|
15
32
|
}, [primaryButton, secondaryButton]);
|
|
16
|
-
return (React.createElement(Base, { ...props,
|
|
33
|
+
return (React.createElement(Base, { ...props, ...wrapperStyleProps },
|
|
17
34
|
React.createElement(Stack, null,
|
|
18
|
-
description &&
|
|
19
|
-
|
|
20
|
-
secondaryButton && React.createElement("
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
React.createElement(
|
|
35
|
+
description && React.createElement("p", { className: "smarthr-ui-BottomFixedArea-description" }, description),
|
|
36
|
+
React.createElement(Stack, { gap: 0.25 },
|
|
37
|
+
(secondaryButton || primaryButton) && (React.createElement(Cluster, { as: "ul", justify: "center", gap: { row: 0.5, column: 1 } },
|
|
38
|
+
secondaryButton && (React.createElement("li", { className: "smarthr-ui-BottomFixedArea-secondaryButton" }, secondaryButton)),
|
|
39
|
+
primaryButton && (React.createElement("li", { className: "smarthr-ui-BottomFixedArea-primaryButton" }, primaryButton)))),
|
|
40
|
+
tertiaryLinks && tertiaryLinks.length > 0 && (React.createElement(Cluster, { as: "ul", justify: "center", gap: { row: 0.5, column: 0 } }, tertiaryLinks.map(({ text, icon: Icon, onClick, ...tertiaryProps }, index) => (React.createElement("li", { key: index, className: "smarthr-ui-BottomFixedArea-tertiaryListItem" },
|
|
41
|
+
React.createElement(Button, { ...tertiaryProps, variant: "text", prefix: Icon && React.createElement(Icon, null), onClick: onClick, className: tertiaryButtonStyle }, text))))))))));
|
|
24
42
|
};
|
|
25
|
-
const Base = styled(BaseComponent) `
|
|
26
|
-
${({ $themes: { spacingByChar }, $zIndex }) => css `
|
|
27
|
-
position: fixed;
|
|
28
|
-
bottom: 0;
|
|
29
|
-
width: 100%;
|
|
30
|
-
padding: ${spacingByChar(1.5)};
|
|
31
|
-
text-align: center;
|
|
32
|
-
z-index: ${$zIndex};
|
|
33
|
-
box-shadow: 0 -4px 8px 2px rgba(0, 0, 0, 0.24);
|
|
34
|
-
border-radius: 0;
|
|
35
|
-
box-sizing: border-box;
|
|
36
|
-
`}
|
|
37
|
-
`;
|
|
38
43
|
//# sourceMappingURL=BottomFixedArea.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomFixedArea.js","sourceRoot":"","sources":["../../../src/components/BottomFixedArea/BottomFixedArea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"BottomFixedArea.js","sourceRoot":"","sources":["../../../src/components/BottomFixedArea/BottomFixedArea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAQZ,SAAS,EACT,OAAO,GACR,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAA;AAEtC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,EAAgB,MAAM,EAAE,MAAM,WAAW,CAAA;AAEhD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAA;AAE1C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAgCzD,MAAM,eAAe,GAAG,EAAE,CAAC;IACzB,KAAK,EAAE;QACL,OAAO,EAAE;YACP,4BAA4B;YAC5B,8GAA8G;YAC9G,mFAAmF;YACnF,kDAAkD;YAClD,sBAAsB;SACvB;QACD,cAAc,EAAE;YACd,yCAAyC;YACzC,2CAA2C;SAC5C;KACF;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,eAAe,GAA6B,CAAC,EACxD,WAAW,EACX,aAAa,EACb,eAAe,EACf,aAAa,EACb,MAAM,EACN,SAAS,EACT,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE;QAC9D,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,eAAe,EAAE,CAAA;QACrD,OAAO;YACL,iBAAiB,EAAE,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE;YAC3E,mBAAmB,EAAE,cAAc,EAAE;SACtC,CAAA;IACH,CAAC,EAAE,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,EAChB,SAAS,EAAE,mBAAmB,IAE7B,IAAI,CACE,CACN,CACN,CAAC,CACM,CACX,CACK,CACF,CACH,CACR,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -2,24 +2,7 @@ import React, { forwardRef, useMemo } from 'react';
|
|
|
2
2
|
import { tv } from 'tailwind-variants';
|
|
3
3
|
const unstyledButton = tv({
|
|
4
4
|
base: [
|
|
5
|
-
'shr-appearance-none',
|
|
6
|
-
'shr-inline',
|
|
7
|
-
'shr-items-stretch',
|
|
8
|
-
'shr-overflow-visible',
|
|
9
|
-
'shr-cursor-auto',
|
|
10
|
-
'shr-p-0',
|
|
11
|
-
'shr-border-none',
|
|
12
|
-
'shr-border-current',
|
|
13
|
-
'shr-box-content',
|
|
14
|
-
'shr-bg-transparent',
|
|
15
|
-
'shr-bg-none',
|
|
16
|
-
'shr-bg-origin-padding',
|
|
17
|
-
'shr-text-inherit',
|
|
18
|
-
'shr-font-inherit',
|
|
19
|
-
'shr-text-inherit',
|
|
20
|
-
'shr-text-left',
|
|
21
|
-
'shr-select-auto',
|
|
22
|
-
'focus-visible:shr-focus-indicator',
|
|
5
|
+
'shr-box-content shr-inline shr-cursor-auto shr-select-auto shr-appearance-none shr-items-stretch shr-overflow-visible shr-border-none shr-border-current shr-bg-transparent shr-bg-none shr-bg-origin-padding shr-p-0 shr-text-left shr-font-inherit shr-text-inherit focus-visible:shr-focus-indicator',
|
|
23
6
|
],
|
|
24
7
|
});
|
|
25
8
|
export const UnstyledButton = forwardRef(({ className, type = 'button', ...props }, ref) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnstyledButton.js","sourceRoot":"","sources":["../../../src/components/Button/UnstyledButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAqC,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AACrF,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAA;AAEtC,MAAM,cAAc,GAAG,EAAE,CAAC;IACxB,IAAI,EAAE;QACJ,
|
|
1
|
+
{"version":3,"file":"UnstyledButton.js","sourceRoot":"","sources":["../../../src/components/Button/UnstyledButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAqC,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AACrF,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAA;AAEtC,MAAM,cAAc,GAAG,EAAE,CAAC;IACxB,IAAI,EAAE;QACJ,ySAAyS;KAC1S;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAGtC,CAAC,EAAE,SAAS,EAAE,IAAI,GAAG,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAClD,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,cAAc,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAA;IACxE,OAAO,mCAAY,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,GAAI,CAAA;AACvE,CAAC,CAAC,CAAA"}
|
|
@@ -5,7 +5,8 @@ import { UnstyledButton } from '../Button';
|
|
|
5
5
|
import { daysInWeek, getMonthArray, isBetween } from './calendarHelper';
|
|
6
6
|
const calendarTable = tv({
|
|
7
7
|
slots: {
|
|
8
|
-
|
|
8
|
+
wrapper: 'shr-px-0.75 shr-pb-1 shr-pt-0.25',
|
|
9
|
+
table: 'smarthr-ui-CalendarTable shr-border-spacing-0 shr-text-base shr-text-black',
|
|
9
10
|
th: 'smarthr-ui-CalendarTable-headCell shr-px-0 shr-py-0.5 shr-text-center shr-align-middle shr-font-normal shr-text-grey',
|
|
10
11
|
td: 'smarthr-ui-CalendarTable-dataCell shr-p-0 shr-align-middle',
|
|
11
12
|
cellButton: 'shr-group shr-flex shr-items-center shr-justify-center shr-px-0.5 shr-py-0.25 disabled:shr-cursor-not-allowed disabled:shr-text-disabled [&&&]:shr-cursor-pointer',
|
|
@@ -25,31 +26,33 @@ const calendarTable = tv({
|
|
|
25
26
|
},
|
|
26
27
|
});
|
|
27
28
|
export const CalendarTable = ({ current, from, to, onSelectDate, selected, className, ...props }) => {
|
|
28
|
-
const { table, th, td, cellButton, dateCell } = calendarTable();
|
|
29
|
-
const { tableStyle, thStyle, tdStyle, cellButtonStyle } = useMemo(() => ({
|
|
30
|
-
|
|
29
|
+
const { wrapper, table, th, td, cellButton, dateCell } = calendarTable();
|
|
30
|
+
const { wrapperStyle, tableStyle, thStyle, tdStyle, cellButtonStyle } = useMemo(() => ({
|
|
31
|
+
wrapperStyle: wrapper({ className }),
|
|
32
|
+
tableStyle: table(),
|
|
31
33
|
thStyle: th(),
|
|
32
34
|
tdStyle: td(),
|
|
33
35
|
cellButtonStyle: cellButton(),
|
|
34
|
-
}), [cellButton, className, table, td, th]);
|
|
36
|
+
}), [cellButton, className, table, td, th, wrapper]);
|
|
35
37
|
const currentDay = dayjs(current);
|
|
36
38
|
const selectedDay = selected ? dayjs(selected) : null;
|
|
37
39
|
const now = dayjs().startOf('date');
|
|
38
40
|
const fromDay = dayjs(from);
|
|
39
41
|
const toDay = dayjs(to);
|
|
40
42
|
const array = getMonthArray(currentDay.toDate());
|
|
41
|
-
return (React.createElement("
|
|
42
|
-
React.createElement("
|
|
43
|
-
React.createElement("
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
!
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
React.createElement("
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
43
|
+
return (React.createElement("div", { className: wrapperStyle },
|
|
44
|
+
React.createElement("table", { ...props, className: tableStyle },
|
|
45
|
+
React.createElement("thead", null,
|
|
46
|
+
React.createElement("tr", null, daysInWeek.map((day, i) => (React.createElement("th", { key: i, className: thStyle }, day))))),
|
|
47
|
+
React.createElement("tbody", null, array.map((week, weekIndex) => (React.createElement("tr", { key: weekIndex }, week.map((date, dateIndex) => {
|
|
48
|
+
const isOutRange = !date ||
|
|
49
|
+
!isBetween(currentDay.date(date).toDate(), fromDay.toDate(), toDay.toDate());
|
|
50
|
+
const isSelectedDate = !!date && !!selectedDay && currentDay.date(date).isSame(selectedDay, 'date');
|
|
51
|
+
return (React.createElement("td", { key: dateIndex, className: tdStyle }, date && (React.createElement(UnstyledButton, { disabled: isOutRange, onClick: (e) => !isOutRange && onSelectDate(e, currentDay.date(date).toDate()), "aria-pressed": isSelectedDate, type: "button", className: cellButtonStyle },
|
|
52
|
+
React.createElement("span", { className: dateCell({
|
|
53
|
+
isToday: currentDay.date(date).isSame(now, 'date'),
|
|
54
|
+
isSelected: isSelectedDate,
|
|
55
|
+
}) }, date)))));
|
|
56
|
+
}))))))));
|
|
54
57
|
};
|
|
55
58
|
//# sourceMappingURL=CalendarTable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarTable.js","sourceRoot":"","sources":["../../../src/components/Calendar/CalendarTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAE,EAA4C,OAAO,EAAE,MAAM,OAAO,CAAA;AAChF,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAA;AAEtC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAE1C,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAgBvE,MAAM,aAAa,GAAG,EAAE,CAAC;IACvB,KAAK,EAAE;QACL,KAAK,
|
|
1
|
+
{"version":3,"file":"CalendarTable.js","sourceRoot":"","sources":["../../../src/components/Calendar/CalendarTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAE,EAA4C,OAAO,EAAE,MAAM,OAAO,CAAA;AAChF,OAAO,EAAE,EAAE,EAAE,MA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SAAS,EAAE,OAAO,IACnC,IAAI,IAAI,CACP,oBAAC,cAAc,IACb,QAAQ,EAAE,UAAU,EACpB,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CACb,CAAC,UAAU,IAAI,YAAY,CAAC,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC,kBAElD,cAAc,EAC5B,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,eAAe;oBAE1B,8BACE,SAAS,EAAE,QAAQ,CAAC;4BAClB,OAAO,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC;4BAClD,UAAU,EAAE,cAAc;yBAC3B,CAAC,IAED,IAAI,CACA,CACQ,CAClB,CACE,CACN,CAAA;YACH,CAAC,CAAC,CACC,CACN,CAAC,CACI,CACF,CACJ,CACP,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import { FC,
|
|
1
|
+
import { FC, PropsWithChildren } from 'react';
|
|
2
2
|
import { BaseElementProps } from '../Base';
|
|
3
|
-
type
|
|
4
|
-
type Props = {
|
|
3
|
+
type Props = PropsWithChildren<{
|
|
5
4
|
/** 表示する情報の種類 */
|
|
6
|
-
type?:
|
|
7
|
-
|
|
8
|
-
className?: string;
|
|
9
|
-
/** 表示する情報の内容 */
|
|
10
|
-
children: ReactNode;
|
|
11
|
-
};
|
|
5
|
+
type?: 'info' | 'success' | 'warning' | 'error';
|
|
6
|
+
}>;
|
|
12
7
|
export declare const CompactInformationPanel: FC<Props & BaseElementProps>;
|
|
13
8
|
export {};
|
|
@@ -1,20 +1,13 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
import { useTheme } from '../../hooks/useTheme';
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { tv } from 'tailwind-variants';
|
|
4
3
|
import { Base } from '../Base';
|
|
5
4
|
import { ResponseMessage } from '../ResponseMessage';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
const compactInformationPanel = tv({
|
|
6
|
+
base: ['smarthr-ui-CompactInformationPanel', 'shr-flex shr-p-1 shr-shadow-layer-3'],
|
|
7
|
+
});
|
|
8
|
+
export const CompactInformationPanel = ({ type = 'info', className, children, ...props }) => {
|
|
9
|
+
const styles = useMemo(() => compactInformationPanel({ className }), [className]);
|
|
10
|
+
return (React.createElement(Base, { ...props, className: styles },
|
|
11
11
|
React.createElement(ResponseMessage, { type: type, iconGap: 0.5 }, children)));
|
|
12
12
|
};
|
|
13
|
-
const Wrapper = styled(Base) `
|
|
14
|
-
${({ $themes: { spacingByChar, shadow } }) => css `
|
|
15
|
-
display: flex;
|
|
16
|
-
box-shadow: ${shadow.LAYER3};
|
|
17
|
-
padding: ${spacingByChar(1)};
|
|
18
|
-
`}
|
|
19
|
-
`;
|
|
20
13
|
//# sourceMappingURL=CompactInformationPanel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompactInformationPanel.js","sourceRoot":"","sources":["../../../src/components/CompactInformationPanel/CompactInformationPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"CompactInformationPanel.js","sourceRoot":"","sources":["../../../src/components/CompactInformationPanel/CompactInformationPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAyB,OAAO,EAAE,MAAM,OAAO,CAAA;AAC7D,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAA;AAEtC,OAAO,EAAE,IAAI,EAAoB,MAAM,SAAS,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAOpD,MAAM,uBAAuB,GAAG,EAAE,CAAC;IACjC,IAAI,EAAE,CAAC,oCAAoC,EAAE,qCAAqC,CAAC;CACpF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAiC,CAAC,EACpE,IAAI,GAAG,MAAM,EACb,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,uBAAuB,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAA;IAEjF,OAAO,CACL,oBAAC,IAAI,OAAK,KAAK,EAAE,SAAS,EAAE,MAAM;QAChC,oBAAC,eAAe,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,IACtC,QAAQ,CACO,CACb,CACR,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { ComponentProps } from 'react';
|
|
2
2
|
import { DialogProps } from '../types';
|
|
3
3
|
import { ActionDialogContentInnerProps } from './ActionDialogContentInner';
|
|
4
4
|
type Props = Omit<ActionDialogContentInnerProps, 'titleId'> & DialogProps;
|
|
5
|
-
type ElementProps = Omit<
|
|
5
|
+
type ElementProps = Omit<ComponentProps<'div'>, keyof Props>;
|
|
6
6
|
export declare const ActionDialog: React.FC<Props & ElementProps>;
|
|
7
7
|
export {};
|
|
@@ -3,7 +3,7 @@ import { useId } from '../../../hooks/useId';
|
|
|
3
3
|
import { DialogContentInner } from '../DialogContentInner';
|
|
4
4
|
import { useDialogPortal } from '../useDialogPortal';
|
|
5
5
|
import { ActionDialogContentInner } from './ActionDialogContentInner';
|
|
6
|
-
export const ActionDialog = ({ children, title, subtitle, titleTag, actionText, actionTheme, onClickAction, onClickClose, onPressEscape = onClickClose, responseMessage, actionDisabled = false, closeDisabled, subActionArea, className
|
|
6
|
+
export const ActionDialog = ({ children, title, subtitle, titleTag, actionText, actionTheme, onClickAction, onClickClose, onPressEscape = onClickClose, responseMessage, actionDisabled = false, closeDisabled, subActionArea, className, portalParent, decorators, id, ...props }) => {
|
|
7
7
|
const { createPortal } = useDialogPortal(portalParent, id);
|
|
8
8
|
const titleId = useId();
|
|
9
9
|
const handleClickClose = useCallback(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionDialog.js","sourceRoot":"","sources":["../../../../src/components/Dialog/ActionDialog/ActionDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAkB,WAAW,EAAE,MAAM,OAAO,CAAA;AAE1D,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAE1D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAEpD,OAAO,EAAE,wBAAwB,EAAiC,MAAM,4BAA4B,CAAA;AAKpG,MAAM,CAAC,MAAM,YAAY,GAAmC,CAAC,EAC3D,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,WAAW,EACX,aAAa,EACb,YAAY,EACZ,aAAa,GAAG,YAAY,EAC5B,eAAe,EACf,cAAc,GAAG,KAAK,EACtB,aAAa,EACb,aAAa,EACb,SAAS,
|
|
1
|
+
{"version":3,"file":"ActionDialog.js","sourceRoot":"","sources":["../../../../src/components/Dialog/ActionDialog/ActionDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAkB,WAAW,EAAE,MAAM,OAAO,CAAA;AAE1D,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAE1D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAEpD,OAAO,EAAE,wBAAwB,EAAiC,MAAM,4BAA4B,CAAA;AAKpG,MAAM,CAAC,MAAM,YAAY,GAAmC,CAAC,EAC3D,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,WAAW,EACX,aAAa,EACb,YAAY,EACZ,aAAa,GAAG,Y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AACH,CAAC,CAAA"}
|
|
@@ -37,10 +37,6 @@ export type BaseProps = PropsWithChildren<{
|
|
|
37
37
|
closeDisabled?: boolean;
|
|
38
38
|
/** ダイアログフッターの左端操作領域 */
|
|
39
39
|
subActionArea?: ReactNode;
|
|
40
|
-
/**
|
|
41
|
-
* コンポーネントに適用するクラス名
|
|
42
|
-
*/
|
|
43
|
-
className?: string;
|
|
44
40
|
/** コンポーネント内の文言を変更するための関数を設定 */
|
|
45
41
|
decorators?: DecoratorsType<'closeButtonLabel'>;
|
|
46
42
|
}>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import React, { useCallback } from 'react';
|
|
2
|
-
import
|
|
3
|
-
import { useTheme } from '../../../hooks/useTheme';
|
|
1
|
+
import React, { useCallback, useMemo } from 'react';
|
|
2
|
+
import { tv } from 'tailwind-variants';
|
|
4
3
|
import { Button } from '../../Button';
|
|
5
4
|
import { Heading } from '../../Heading';
|
|
6
5
|
import { Cluster, Stack } from '../../Layout';
|
|
@@ -8,57 +7,50 @@ import { ResponseMessage } from '../../ResponseMessage';
|
|
|
8
7
|
import { Section } from '../../SectioningContent';
|
|
9
8
|
import { Text } from '../../Text';
|
|
10
9
|
import { useOffsetHeight } from '../dialogHelper';
|
|
11
|
-
import { useClassNames } from '../useClassNames';
|
|
12
10
|
const CLOSE_BUTTON_LABEL = 'キャンセル';
|
|
11
|
+
const actionDialogContentInner = tv({
|
|
12
|
+
slots: {
|
|
13
|
+
headingArea: ['smarthr-ui-Dialog-titleArea', 'shr-border-b-shorthand shr-px-1.5 shr-py-1'],
|
|
14
|
+
body: ['smarthr-ui-Dialog-body', 'shr-overflow-auto'],
|
|
15
|
+
actionArea: ['smarthr-ui-Dialog-actionArea', 'shr-border-t-shorthand shr-px-1.5 shr-py-1'],
|
|
16
|
+
buttonArea: ['smarthr-ui-Dialog-buttonArea', 'shr-ms-auto'],
|
|
17
|
+
message: 'shr-text-right',
|
|
18
|
+
},
|
|
19
|
+
});
|
|
13
20
|
export const ActionDialogContentInner = ({ children, title, titleId, subtitle, titleTag, actionText, actionTheme = 'primary', onClickAction, onClickClose, responseMessage, actionDisabled = false, closeDisabled, subActionArea, decorators, }) => {
|
|
14
|
-
const classNames = useClassNames().dialog;
|
|
15
|
-
const theme = useTheme();
|
|
16
21
|
const handleClickAction = useCallback(() => {
|
|
17
22
|
onClickAction(onClickClose);
|
|
18
23
|
}, [onClickAction, onClickClose]);
|
|
19
24
|
const { offsetHeight, titleRef, bottomRef } = useOffsetHeight();
|
|
20
25
|
const isRequestProcessing = responseMessage && responseMessage.status === 'processing';
|
|
26
|
+
const { headingStyle, bodyStyleProps, actionAreaStyle, buttonAreaStyle, messageStyle } = useMemo(() => {
|
|
27
|
+
const { headingArea, body, actionArea, buttonArea, message } = actionDialogContentInner();
|
|
28
|
+
return {
|
|
29
|
+
headingStyle: headingArea(),
|
|
30
|
+
bodyStyleProps: {
|
|
31
|
+
className: body(),
|
|
32
|
+
style: {
|
|
33
|
+
maxHeight: `calc(100vh - ${offsetHeight}px)`,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
actionAreaStyle: actionArea(),
|
|
37
|
+
buttonAreaStyle: buttonArea(),
|
|
38
|
+
messageStyle: message(),
|
|
39
|
+
};
|
|
40
|
+
}, [offsetHeight]);
|
|
21
41
|
return (React.createElement(Section, null,
|
|
22
42
|
React.createElement(Heading, { tag: titleTag },
|
|
23
|
-
React.createElement(
|
|
24
|
-
subtitle && (React.createElement(Text, { size: "S", leading: "TIGHT", color: "TEXT_GREY", className:
|
|
25
|
-
React.createElement(Text, { id: titleId, size: "L", leading: "TIGHT", className:
|
|
26
|
-
React.createElement(
|
|
27
|
-
React.createElement(
|
|
28
|
-
React.createElement(Cluster, { justify: "space-between" },
|
|
43
|
+
React.createElement(Stack, { gap: 0.25, as: "span", ref: titleRef, className: headingStyle },
|
|
44
|
+
subtitle && (React.createElement(Text, { size: "S", leading: "TIGHT", color: "TEXT_GREY", className: "smarthr-ui-Dialog-subtitle" }, subtitle)),
|
|
45
|
+
React.createElement(Text, { id: titleId, size: "L", leading: "TIGHT", className: "smarthr-ui-Dialog-title" }, title))),
|
|
46
|
+
React.createElement("div", { ...bodyStyleProps }, children),
|
|
47
|
+
React.createElement(Stack, { gap: 0.5, ref: bottomRef, className: actionAreaStyle },
|
|
48
|
+
React.createElement(Cluster, { justify: "space-between", className: buttonAreaStyle },
|
|
29
49
|
subActionArea,
|
|
30
|
-
React.createElement(
|
|
31
|
-
React.createElement(Button, { onClick: onClickClose, disabled: closeDisabled || isRequestProcessing, className:
|
|
32
|
-
React.createElement(Button, { variant: actionTheme, onClick: handleClickAction, disabled: actionDisabled, loading: isRequestProcessing, className:
|
|
33
|
-
(responseMessage?.status === 'success' || responseMessage?.status === 'error') && (React.createElement(
|
|
50
|
+
React.createElement(Cluster, { gap: { row: 0.5, column: 1 }, justify: "flex-end", className: "smarthr-ui-Dialog-buttonArea" },
|
|
51
|
+
React.createElement(Button, { onClick: onClickClose, disabled: closeDisabled || isRequestProcessing, className: "smarthr-ui-Dialog-closeButton" }, decorators?.closeButtonLabel?.(CLOSE_BUTTON_LABEL) || CLOSE_BUTTON_LABEL),
|
|
52
|
+
React.createElement(Button, { variant: actionTheme, onClick: handleClickAction, disabled: actionDisabled, loading: isRequestProcessing, className: "smarthr-ui-Dialog-actionButton" }, actionText))),
|
|
53
|
+
(responseMessage?.status === 'success' || responseMessage?.status === 'error') && (React.createElement("div", { className: messageStyle },
|
|
34
54
|
React.createElement(ResponseMessage, { type: responseMessage.status, role: "alert" }, responseMessage.text))))));
|
|
35
55
|
};
|
|
36
|
-
const TitleAreaStack = styled(Stack).attrs(() => ({
|
|
37
|
-
gap: 0.25,
|
|
38
|
-
forwardedAs: 'span',
|
|
39
|
-
})) `
|
|
40
|
-
${({ $themes: { border, space } }) => css `
|
|
41
|
-
margin-block: unset;
|
|
42
|
-
border-bottom: ${border.shorthand};
|
|
43
|
-
padding: ${space(1)} ${space(1.5)};
|
|
44
|
-
`}
|
|
45
|
-
`;
|
|
46
|
-
const Body = styled.div `
|
|
47
|
-
${({ offsetHeight }) => css `
|
|
48
|
-
max-height: calc(100vh - ${offsetHeight}px);
|
|
49
|
-
overflow: auto;
|
|
50
|
-
`}
|
|
51
|
-
`;
|
|
52
|
-
const ActionAreaStack = styled(Stack).attrs({ gap: 0.5 }) `
|
|
53
|
-
${({ $themes: { space, border } }) => css `
|
|
54
|
-
border-top: ${border.shorthand};
|
|
55
|
-
padding: ${space(1)} ${space(1.5)};
|
|
56
|
-
`}
|
|
57
|
-
`;
|
|
58
|
-
const ButtonArea = styled(Cluster).attrs({ gap: { row: 0.5, column: 1 }, justify: 'flex-end' }) `
|
|
59
|
-
margin-inline-start: auto;
|
|
60
|
-
`;
|
|
61
|
-
const Message = styled.div `
|
|
62
|
-
text-align: right;
|
|
63
|
-
`;
|
|
64
56
|
//# sourceMappingURL=ActionDialogContentInner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionDialogContentInner.js","sourceRoot":"","sources":["../../../../src/components/Dialog/ActionDialog/ActionDialogContentInner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAoC,WAAW,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"ActionDialogContentInner.js","sourceRoot":"","sources":["../../../../src/components/Dialog/ActionDialog/ActionDialogContentInner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAoC,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AACrF,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAA;AAEtC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,OAAO,EAAmB,MAAM,eAAe,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,EAAE,O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,QAAQ,EAAE,aAAa,IAAI,mBAAmB,EAC9C,SAAS,EAAC,+BAA+B,IAExC,UAAU,EAAE,gBAAgB,EAAE,CAAC,kBAAkB,CAAC,IAAI,kBAAkB,CAClE;oBACT,oBAAC,MAAM,IACL,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE,mBAAmB,EAC5B,SAAS,EAAC,gCAAgC,IAEzC,UAAU,CACJ,CACD,CACF;YACT,CAAC,eAAe,EAAE,MAAM,KAAK,SAAS,IAAI,eAAe,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CACjF,6BAAK,SAAS,EAAE,YAAY;gBAC1B,oBAAC,eAAe,IAAC,IAAI,EAAE,eAAe,CAAC,MAAM,EAAE,IAAI,EAAC,OAAO,IACxD,eAAe,CAAC,IAAI,CACL,CACd,CACP,CACK,CACA,CACX,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -15,7 +15,7 @@ export const ErrorScreen = ({ logo = React.createElement(SmartHRLogo, { fill: "b
|
|
|
15
15
|
React.createElement(Stack, { align: "center" },
|
|
16
16
|
title && React.createElement(PageHeading, { className: "smarthr-ui-ErrorScreen-title" }, title),
|
|
17
17
|
children && React.createElement("div", { className: "smarthr-ui-ErrorScreen-content" }, children),
|
|
18
|
-
links?.length && (React.createElement(Stack, { as: "ul", gap: 0.5, align: "center", className: "smarthr-ui-ErrorScreen-linkList" }, links.map((link, index) => (React.createElement("li", { key: index },
|
|
18
|
+
links?.length && (React.createElement(Stack, { as: "ul", gap: 0.5, align: "center", className: "smarthr-ui-ErrorScreen-linkList shr-list-none" }, links.map((link, index) => (React.createElement("li", { key: index },
|
|
19
19
|
React.createElement(TextLink, { ...(link.target ? { target: link.target } : {}), href: link.url, className: "smarthr-ui-ErrorScreen-link" }, link.label)))))))),
|
|
20
20
|
footer && React.createElement("div", { className: "shr-self-stretch" }, footer)));
|
|
21
21
|
};
|
|
@@ -1 +1 @@
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BAAC,WAAW,IAAC,SAAS,EAAC,8BAA8B,IAAE,KAAK,CAAe;gBAEpF,QAAQ,IAAI,6BAAK,SAAS,EAAC,gCAAgC,IAAE,QAAQ,CAAO;gBAE5E,KAAK,EAAE,MAAM,IAAI,CAChB,oBAAC,KAAK,IACJ,EAAE,EAAC,IAAI,EACP,GAAG,EAAE,GAAG,EACR,KAAK,EAAC,QAAQ,EACd,SAAS,EAAC,+CAA+C,IAExD,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAC1B,4BAAI,GAAG,EAAE,KAAK;oBACZ,oBAAC,QAAQ,OACH,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAChD,IAAI,EAAE,IAAI,CAAC,GAAG,EACd,SAAS,EAAC,6BAA6B,IAEtC,IAAI,CAAC,KAAK,CACF,CACR,CACN,CAAC,CACI,CACT,CACK,CACF;QAEP,MAAM,IAAI,6BAAK,SAAS,EAAC,kBAAkB,IAAE,MAAM,CAAO,CACpD,CACV,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -11,5 +11,7 @@ export const SideMenu = ({ children, className, ...props }) => {
|
|
|
11
11
|
};
|
|
12
12
|
SideMenu.Group = SideMenuGroup;
|
|
13
13
|
SideMenu.Item = SideMenuItem;
|
|
14
|
-
const StyledStack = styled(Stack).attrs({ forwardedAs: 'ul', inline: true, gap: 0.75 })
|
|
14
|
+
const StyledStack = styled(Stack).attrs({ forwardedAs: 'ul', inline: true, gap: 0.75 }) `
|
|
15
|
+
list-style: none;
|
|
16
|
+
`;
|
|
15
17
|
//# sourceMappingURL=SideMenu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideMenu.js","sourceRoot":"","sources":["../../../../src/components/Experimental/SideMenu/SideMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgD,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,CAAC,MAAM,QAAQ,GAA6C,CAAC,EACjE,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,UAAU,GAAG,aAAa,EAAE,CAAA;IAElC,OAAO,CACL,oBAAC,WAAW,OAAK,KAAK,EAAE,SAAS,EAAE,GAAG,SAAS,IAAI,EAAE,IAAI,UAAU,CAAC,OAAO,EAAE,IAC1E,QAAQ,CACG,CACf,CAAA;AACH,CAAC,CAAA;AACD,QAAQ,CAAC,KAAK,GAAG,aAAa,CAAA;AAC9B,QAAQ,CAAC,IAAI,GAAG,YAAY,CAAA;AAE5B,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAA;;CAEtF,CAAA"}
|
|
@@ -19,6 +19,13 @@ const GroupStack = styled(Stack).attrs({ forwardedAs: 'li', gap: 0.5 }) `
|
|
|
19
19
|
}
|
|
20
20
|
`}
|
|
21
21
|
`;
|
|
22
|
-
const GroupNameText = styled(Text).attrs({
|
|
23
|
-
|
|
22
|
+
const GroupNameText = styled(Text).attrs({
|
|
23
|
+
color: 'TEXT_GREY',
|
|
24
|
+
leading: 'TIGHT',
|
|
25
|
+
size: 'S',
|
|
26
|
+
weight: 'normal',
|
|
27
|
+
}) ``;
|
|
28
|
+
const SideMenuListStack = styled(Stack).attrs({ forwardedAs: 'ul', gap: 0 }) `
|
|
29
|
+
list-style: none;
|
|
30
|
+
`;
|
|
24
31
|
//# sourceMappingURL=SideMenuGroup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideMenuGroup.js","sourceRoot":"","sources":["../../../../src/components/Experimental/SideMenu/SideMenuGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuD,MAAM,OAAO,CAAA;AAC3E,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM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AM,EAAE,QAAQ;CACjB,CAAC,CAAA,EAAE,CAAA;AACJ,MAAM,iBAAiB,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAA;;CAE3E,CAAA"}
|
|
@@ -3,11 +3,12 @@ import type { DecoratorsType } from '../../../types';
|
|
|
3
3
|
type Category = {
|
|
4
4
|
type?: string;
|
|
5
5
|
heading: ReactNode;
|
|
6
|
-
items:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
items: AppItem[];
|
|
7
|
+
};
|
|
8
|
+
type AppItem = {
|
|
9
|
+
label: ReactNode;
|
|
10
|
+
url: string;
|
|
11
|
+
target?: string;
|
|
11
12
|
};
|
|
12
13
|
type Props = {
|
|
13
14
|
apps: Category[];
|