smarthr-ui 96.1.2 → 97.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/lib/components/Combobox/helper.cjs +29 -13
- package/lib/components/Combobox/helper.cjs.map +1 -1
- package/lib/components/Combobox/helper.d.ts +1 -1
- package/lib/components/Combobox/helper.js +29 -13
- package/lib/components/Combobox/helper.js.map +1 -1
- package/lib/components/Combobox/useOptions.cjs +21 -17
- package/lib/components/Combobox/useOptions.cjs.map +1 -1
- package/lib/components/Combobox/useOptions.js +21 -17
- package/lib/components/Combobox/useOptions.js.map +1 -1
- package/lib/components/Dialog/DialogContentInner.cjs +8 -1
- package/lib/components/Dialog/DialogContentInner.cjs.map +1 -1
- package/lib/components/Dialog/DialogContentInner.js +9 -2
- package/lib/components/Dialog/DialogContentInner.js.map +1 -1
- package/lib/components/Dialog/ModelessDialog/ModelessDialog.cjs +13 -11
- package/lib/components/Dialog/ModelessDialog/ModelessDialog.cjs.map +1 -1
- package/lib/components/Dialog/ModelessDialog/ModelessDialog.js +13 -11
- package/lib/components/Dialog/ModelessDialog/ModelessDialog.js.map +1 -1
- package/lib/components/Dialog/RemoteDialogTrigger/RemoteDialogTrigger.cjs +5 -2
- package/lib/components/Dialog/RemoteDialogTrigger/RemoteDialogTrigger.cjs.map +1 -1
- package/lib/components/Dialog/RemoteDialogTrigger/RemoteDialogTrigger.js +5 -2
- package/lib/components/Dialog/RemoteDialogTrigger/RemoteDialogTrigger.js.map +1 -1
- package/lib/components/Disclosure/DisclosureTrigger.cjs +39 -18
- package/lib/components/Disclosure/DisclosureTrigger.cjs.map +1 -1
- package/lib/components/Disclosure/DisclosureTrigger.js +40 -19
- package/lib/components/Disclosure/DisclosureTrigger.js.map +1 -1
- package/lib/components/Disclosure/useDisclosure.cjs +8 -14
- package/lib/components/Disclosure/useDisclosure.cjs.map +1 -1
- package/lib/components/Disclosure/useDisclosure.js +8 -14
- package/lib/components/Disclosure/useDisclosure.js.map +1 -1
- package/lib/components/DropZone/DropZone.cjs +3 -0
- package/lib/components/DropZone/DropZone.cjs.map +1 -1
- package/lib/components/DropZone/DropZone.js +3 -0
- package/lib/components/DropZone/DropZone.js.map +1 -1
- package/lib/components/Dropdown/DropdownMenuButton/DropdownMenuButton.cjs +4 -2
- package/lib/components/Dropdown/DropdownMenuButton/DropdownMenuButton.cjs.map +1 -1
- package/lib/components/Dropdown/DropdownMenuButton/DropdownMenuButton.js +4 -2
- package/lib/components/Dropdown/DropdownMenuButton/DropdownMenuButton.js.map +1 -1
- package/lib/components/Dropdown/DropdownTrigger.cjs +3 -0
- package/lib/components/Dropdown/DropdownTrigger.cjs.map +1 -1
- package/lib/components/Dropdown/DropdownTrigger.js +3 -0
- package/lib/components/Dropdown/DropdownTrigger.js.map +1 -1
- package/lib/components/InputFile/InputFileMultiplyAppendable.cjs +12 -17
- package/lib/components/InputFile/InputFileMultiplyAppendable.cjs.map +1 -1
- package/lib/components/InputFile/InputFileMultiplyAppendable.js +12 -17
- package/lib/components/InputFile/InputFileMultiplyAppendable.js.map +1 -1
- package/lib/components/LineClamp/LineClamp.cjs +14 -3
- package/lib/components/LineClamp/LineClamp.cjs.map +1 -1
- package/lib/components/LineClamp/LineClamp.js +14 -3
- package/lib/components/LineClamp/LineClamp.js.map +1 -1
- package/lib/components/Select/Select.cjs +11 -11
- package/lib/components/Select/Select.cjs.map +1 -1
- package/lib/components/Select/Select.js +12 -12
- package/lib/components/Select/Select.js.map +1 -1
- package/lib/components/TabBar/TabItem.cjs +11 -9
- package/lib/components/TabBar/TabItem.cjs.map +1 -1
- package/lib/components/TabBar/TabItem.d.ts +2 -2
- package/lib/components/TabBar/TabItem.js +13 -11
- package/lib/components/TabBar/TabItem.js.map +1 -1
- package/lib/hooks/useHandleEscape.cjs +4 -4
- package/lib/hooks/useHandleEscape.cjs.map +1 -1
- package/lib/hooks/useHandleEscape.d.ts +1 -1
- package/lib/hooks/useHandleEscape.js +4 -4
- package/lib/hooks/useHandleEscape.js.map +1 -1
- package/lib/intl/Localizer.d.ts +3 -3
- package/lib/intl/locales/en_us.json.cjs +133 -0
- package/lib/intl/locales/en_us.json.cjs.map +1 -0
- package/lib/intl/locales/en_us.json.js +131 -0
- package/lib/intl/locales/en_us.json.js.map +1 -0
- package/lib/intl/locales/id_id.json.cjs +133 -0
- package/lib/intl/locales/id_id.json.cjs.map +1 -0
- package/lib/intl/locales/id_id.json.js +131 -0
- package/lib/intl/locales/id_id.json.js.map +1 -0
- package/lib/intl/locales/index.cjs +24 -18
- package/lib/intl/locales/index.cjs.map +1 -1
- package/lib/intl/locales/index.d.ts +1135 -1136
- package/lib/intl/locales/index.js +25 -19
- package/lib/intl/locales/index.js.map +1 -1
- package/lib/intl/locales/ja.json.cjs +133 -0
- package/lib/intl/locales/ja.json.cjs.map +1 -0
- package/lib/intl/locales/ja.json.js +131 -0
- package/lib/intl/locales/ja.json.js.map +1 -0
- package/lib/intl/locales/ja_easy.json.cjs +133 -0
- package/lib/intl/locales/ja_easy.json.cjs.map +1 -0
- package/lib/intl/locales/ja_easy.json.js +131 -0
- package/lib/intl/locales/ja_easy.json.js.map +1 -0
- package/lib/intl/locales/ko_kr.json.cjs +133 -0
- package/lib/intl/locales/ko_kr.json.cjs.map +1 -0
- package/lib/intl/locales/ko_kr.json.js +131 -0
- package/lib/intl/locales/ko_kr.json.js.map +1 -0
- package/lib/intl/locales/pt_br.json.cjs +133 -0
- package/lib/intl/locales/pt_br.json.cjs.map +1 -0
- package/lib/intl/locales/pt_br.json.js +131 -0
- package/lib/intl/locales/pt_br.json.js.map +1 -0
- package/lib/intl/locales/vi_vn.json.cjs +133 -0
- package/lib/intl/locales/vi_vn.json.cjs.map +1 -0
- package/lib/intl/locales/vi_vn.json.js +131 -0
- package/lib/intl/locales/vi_vn.json.js.map +1 -0
- package/lib/intl/locales/zh_hans_cn.json.cjs +133 -0
- package/lib/intl/locales/zh_hans_cn.json.cjs.map +1 -0
- package/lib/intl/locales/zh_hans_cn.json.js +131 -0
- package/lib/intl/locales/zh_hans_cn.json.js.map +1 -0
- package/lib/intl/locales/zh_hant_tw.json.cjs +133 -0
- package/lib/intl/locales/zh_hant_tw.json.cjs.map +1 -0
- package/lib/intl/locales/zh_hant_tw.json.js +131 -0
- package/lib/intl/locales/zh_hant_tw.json.js.map +1 -0
- package/lib/intl/useIntl.cjs.map +1 -1
- package/lib/intl/useIntl.d.ts +3 -3
- package/lib/intl/useIntl.js.map +1 -1
- package/metadata.json +1 -1
- package/package.json +2 -1
- package/lib/intl/locales/en_us.cjs +0 -135
- package/lib/intl/locales/en_us.cjs.map +0 -1
- package/lib/intl/locales/en_us.d.ts +0 -128
- package/lib/intl/locales/en_us.js +0 -133
- package/lib/intl/locales/en_us.js.map +0 -1
- package/lib/intl/locales/id_id.cjs +0 -135
- package/lib/intl/locales/id_id.cjs.map +0 -1
- package/lib/intl/locales/id_id.d.ts +0 -128
- package/lib/intl/locales/id_id.js +0 -133
- package/lib/intl/locales/id_id.js.map +0 -1
- package/lib/intl/locales/ja_easy.cjs +0 -135
- package/lib/intl/locales/ja_easy.cjs.map +0 -1
- package/lib/intl/locales/ja_easy.d.ts +0 -128
- package/lib/intl/locales/ja_easy.js +0 -133
- package/lib/intl/locales/ja_easy.js.map +0 -1
- package/lib/intl/locales/ko_kr.cjs +0 -135
- package/lib/intl/locales/ko_kr.cjs.map +0 -1
- package/lib/intl/locales/ko_kr.d.ts +0 -128
- package/lib/intl/locales/ko_kr.js +0 -133
- package/lib/intl/locales/ko_kr.js.map +0 -1
- package/lib/intl/locales/pt_br.cjs +0 -135
- package/lib/intl/locales/pt_br.cjs.map +0 -1
- package/lib/intl/locales/pt_br.d.ts +0 -128
- package/lib/intl/locales/pt_br.js +0 -133
- package/lib/intl/locales/pt_br.js.map +0 -1
- package/lib/intl/locales/vi_vn.cjs +0 -135
- package/lib/intl/locales/vi_vn.cjs.map +0 -1
- package/lib/intl/locales/vi_vn.d.ts +0 -128
- package/lib/intl/locales/vi_vn.js +0 -133
- package/lib/intl/locales/vi_vn.js.map +0 -1
- package/lib/intl/locales/zh_hans_cn.cjs +0 -135
- package/lib/intl/locales/zh_hans_cn.cjs.map +0 -1
- package/lib/intl/locales/zh_hans_cn.d.ts +0 -128
- package/lib/intl/locales/zh_hans_cn.js +0 -133
- package/lib/intl/locales/zh_hans_cn.js.map +0 -1
- package/lib/intl/locales/zh_hant_tw.cjs +0 -135
- package/lib/intl/locales/zh_hant_tw.cjs.map +0 -1
- package/lib/intl/locales/zh_hant_tw.d.ts +0 -128
- package/lib/intl/locales/zh_hant_tw.js +0 -133
- package/lib/intl/locales/zh_hant_tw.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { memo, createElement,
|
|
2
|
+
import { memo, createElement, useMemo } from 'react';
|
|
3
3
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
4
|
import { tv as ce } from './../../vendor/.pnpm/tailwind-variants@0.3.1_tailwindcss@3.4.19_ts-node@10.9.2_@swc_core@1.15.17_@types_node@20.19.35_typescript@5.9.3__/vendor/tailwind-variants/dist/index.js';
|
|
5
5
|
import { isMobileSafari, isIOS } from '../../libs/ua.js';
|
|
@@ -47,16 +47,6 @@ const classNameGenerator = ce({
|
|
|
47
47
|
},
|
|
48
48
|
});
|
|
49
49
|
const ActualSelect = ({ options, onChange, onChangeValue, error, width, hasBlank, blankLabel, size, className, disabled, required, ...rest }, ref) => {
|
|
50
|
-
const handleChange = useCallback((e) => {
|
|
51
|
-
onChange?.(e);
|
|
52
|
-
if (onChangeValue) {
|
|
53
|
-
const flattenOptions = options.reduce((pre, cur) => pre.concat('value' in cur ? cur : cur.options), []);
|
|
54
|
-
const selectedOption = flattenOptions.find((option) => option.value === e.target.value);
|
|
55
|
-
if (selectedOption) {
|
|
56
|
-
onChangeValue(selectedOption.value);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}, [onChange, onChangeValue, options]);
|
|
60
50
|
const classNames = useMemo(() => {
|
|
61
51
|
const { wrapper, select, iconWrap, blankOptgroup } = classNameGenerator();
|
|
62
52
|
const sizeProps = {
|
|
@@ -73,7 +63,17 @@ const ActualSelect = ({ options, onChange, onChangeValue, error, width, hasBlank
|
|
|
73
63
|
width: typeof width === 'number' ? `${width}px` : width,
|
|
74
64
|
}), [width]);
|
|
75
65
|
const actualBlankLabel = blankLabel ?? '';
|
|
76
|
-
return (jsxs("span", { className: classNames.wrapper, style: wrapperStyle, children: [jsxs("select", { ...rest, "data-smarthr-ui-input": "true", onChange:
|
|
66
|
+
return (jsxs("span", { className: classNames.wrapper, style: wrapperStyle, children: [jsxs("select", { ...rest, "data-smarthr-ui-input": "true", onChange: (e) => {
|
|
67
|
+
onChange?.(e);
|
|
68
|
+
if (onChangeValue) {
|
|
69
|
+
const selectedOption = options
|
|
70
|
+
.flatMap((option) => ('value' in option ? [option] : option.options))
|
|
71
|
+
.find((option) => option.value === e.target.value);
|
|
72
|
+
if (selectedOption) {
|
|
73
|
+
onChangeValue(selectedOption.value);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}, "aria-invalid": error || undefined, disabled: disabled,
|
|
77
77
|
// HINT: required属性を設定すると、iOS端末で以下の問題が発生します
|
|
78
78
|
// - フォームのsubmit時にバリデーションは行われるが、ユーザーにフィードバックがない
|
|
79
79
|
// - エラーメッセージが表示されない
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","sources":["../../../src/components/Select/Select.tsx"],"sourcesContent":["'use client'\n\nimport {\n type ChangeEvent,\n type ComponentPropsWithoutRef,\n type ForwardedRef,\n type OptgroupHTMLAttributes,\n type OptionHTMLAttributes,\n type PropsWithChildren,\n memo,\n
|
|
1
|
+
{"version":3,"file":"Select.js","sources":["../../../src/components/Select/Select.tsx"],"sourcesContent":["'use client'\n\nimport {\n type ChangeEvent,\n type ComponentPropsWithoutRef,\n type ForwardedRef,\n type OptgroupHTMLAttributes,\n type OptionHTMLAttributes,\n type PropsWithChildren,\n memo,\n useMemo,\n} from 'react'\nimport { tv } from 'tailwind-variants'\n\nimport { isIOS, isMobileSafari } from '../../libs/ua'\nimport { genericsForwardRef } from '../../libs/util'\nimport { FaAngleDownIcon } from '../Icon'\n\ntype Option<T extends string> = {\n value: T\n} & Omit<OptionHTMLAttributes<HTMLOptionElement>, 'value'>\ntype Optgroup<T extends string> = {\n label: string\n options: Array<Option<T>>\n} & OptgroupHTMLAttributes<HTMLOptGroupElement>\n\ntype AbstractProps<T extends string> = {\n /** 選択肢のデータの配列 */\n options: Array<Option<T> | Optgroup<T>>\n /** フォームの値が変わったときに発火するコールバック関数 */\n onChangeValue?: (value: T) => void\n /** フォームの値にエラーがあるかどうか */\n error?: boolean\n /** コンポーネントの幅 */\n width?: number | string\n /** コンポーネントの大きさ */\n size?: 'M' | 'S'\n /** 空の選択肢を表示するかどうか */\n hasBlank?: boolean\n /** 空の選択肢のラベル */\n blankLabel?: string\n}\n\ntype Props<T extends string> = AbstractProps<T> &\n Omit<ComponentPropsWithoutRef<'select'>, keyof AbstractProps<string> | 'children'>\n\nconst classNameGenerator = tv({\n slots: {\n wrapper: 'smarthr-ui-Select shr-relative shr-inline-block',\n select: [\n 'shr-peer shr-border-shorthand shr-w-full shr-cursor-pointer shr-appearance-none shr-rounded-m shr-bg-white shr-text-base shr-leading-tight shr-text-black',\n 'hover:shr-bg-white-darken',\n 'focus-visible:shr-focus-indicator',\n 'disabled:shr-pointer-events-none disabled:shr-bg-white-darken disabled:shr-text-disabled disabled:shr-opacity-100',\n 'contrast-more:shr-border-high-contrast',\n /* padding に依る積み上げでは文字が見切れてしまうため */\n 'shr-min-h-[calc(theme(fontSize.base)_+_theme(spacing[0.75])_*_2_+_theme(spacing.px)_*_2)]',\n 'shr-border-default disabled:shr-border-disabled',\n 'aria-[invalid]:shr-border-danger',\n ],\n iconWrap: [\n 'shr-pointer-events-none shr-absolute shr-inset-y-0 shr-inline-flex shr-items-center shr-text-grey',\n 'peer-focus-visible:shr-text-black peer-disabled:shr-text-disabled',\n ],\n blankOptgroup: 'shr-hidden',\n },\n variants: {\n size: {\n M: {\n select: 'shr-py-0.5 shr-pe-2 shr-ps-0.5',\n // ((右 padding - アイコン幅) / 2) + 右 border\n iconWrap: 'shr-end-[calc(theme(spacing[0.5])_+_theme(spacing.px))]',\n },\n S: {\n select: [\n 'shr-px-0.5 shr-py-0.25 shr-pe-1.5 shr-text-sm',\n /* padding に依る積み上げでは文字が見切れてしまうため */\n 'shr-min-h-[calc(theme(fontSize.sm)_+_theme(spacing[0.5])_*_2_+_theme(spacing.px)_*_2)]',\n ],\n iconWrap: 'shr-end-0.5 shr-text-sm',\n },\n },\n },\n})\n\nconst ActualSelect = <T extends string>(\n {\n options,\n onChange,\n onChangeValue,\n error,\n width,\n hasBlank,\n blankLabel,\n size,\n className,\n disabled,\n required,\n ...rest\n }: Props<T>,\n ref: ForwardedRef<HTMLSelectElement>,\n) => {\n const classNames = useMemo(() => {\n const { wrapper, select, iconWrap, blankOptgroup } = classNameGenerator()\n const sizeProps = {\n size: size || 'M',\n }\n\n return {\n wrapper: wrapper({ className }),\n select: select(sizeProps),\n iconWrap: iconWrap(sizeProps),\n blankOptGroup: blankOptgroup(),\n }\n }, [className, size])\n const wrapperStyle = useMemo(\n () => ({\n width: typeof width === 'number' ? `${width}px` : width,\n }),\n [width],\n )\n\n const actualBlankLabel = blankLabel ?? ''\n\n return (\n <span className={classNames.wrapper} style={wrapperStyle}>\n <select\n {...rest}\n data-smarthr-ui-input=\"true\"\n onChange={(e: ChangeEvent<HTMLSelectElement>) => {\n onChange?.(e)\n\n if (onChangeValue) {\n const selectedOption = options\n .flatMap((option) => ('value' in option ? [option] : option.options))\n .find((option) => option.value === e.target.value)\n\n if (selectedOption) {\n onChangeValue(selectedOption.value)\n }\n }\n }}\n aria-invalid={error || undefined}\n disabled={disabled}\n // HINT: required属性を設定すると、iOS端末で以下の問題が発生します\n // - フォームのsubmit時にバリデーションは行われるが、ユーザーにフィードバックがない\n // - エラーメッセージが表示されない\n // - 問題のある入力フィールドまでスクロールしない\n // 歴史的に一部の端末ではrequired属性が無視されることがあるため、HTMLのバリデーションのみとすることは少ないです\n // そのため、iOS端末ではrequired属性を設定しない方がユーザーがsubmitできない理由をエラーメッセージなどで正しく理解できるようになります\n required={isIOS ? undefined : required}\n ref={ref}\n className={classNames.select}\n >\n <BlankOption hasBlank={hasBlank}>{actualBlankLabel}</BlankOption>\n {options.map((option, index) => (\n <Option {...option} key={index} />\n ))}\n <NotOmittingLabelsInMobileSafari className={classNames.blankOptGroup} />\n </select>\n <span className={classNames.iconWrap}>\n <FaAngleDownIcon />\n </span>\n </span>\n )\n}\n\nconst BlankOption = memo<\n PropsWithChildren<{\n hasBlank: boolean | undefined\n }>\n>(({ hasBlank, children }) => hasBlank && <option value=\"\">{children}</option>)\n\nconst Option = memo<Props<string>['options'][number]>((option) => {\n if ('value' in option) {\n return <option {...option}>{option.label}</option>\n }\n\n const { options: groupedOptions, label, ...rest } = option\n\n return (\n <optgroup {...rest} key={label} label={label}>\n {groupedOptions.map((groupedOption) => (\n <option {...groupedOption} key={groupedOption.value}>\n {groupedOption.label}\n </option>\n ))}\n </optgroup>\n )\n})\n\n// Support for not omitting labels in Mobile Safari\nconst NotOmittingLabelsInMobileSafari = memo<{ className: string }>(\n ({ className }) => isMobileSafari && <optgroup className={className} />,\n)\n\nexport const Select = genericsForwardRef(ActualSelect)\n"],"names":[],"mappings":";;;;;;;;;;AA8CA;AACE;AACE;AACA;;;;;;;;;;AAUC;AACD;;;AAGC;AACD;AACD;AACD;AACE;AACE;AACE;;AAEA;AACD;AACD;AACE;;;;AAIC;AACD;AACD;AACF;AACF;AACF;AAED;AAiBE;AACE;AACA;;;;AAKE;AACA;AACA;;;AAGJ;AACA;AAEI;AACD;AAIH;;AAQQ;;;;AAKK;;AAGD;;;AAGN;;;;;;;AASA;AAeR;AAEA;AAMA;AACE;AACE;;AAGF;AAEA;AASF;AAEA;AACA;;;"}
|
|
@@ -38,18 +38,23 @@ const classNameGenerator = index.tv({
|
|
|
38
38
|
],
|
|
39
39
|
},
|
|
40
40
|
});
|
|
41
|
-
const TabItem = ({ selected = false, disabled, disabledReason, ...rest }) => {
|
|
41
|
+
const TabItem = ({ selected = false, disabled, disabledReason, onClick, ...rest }) => {
|
|
42
42
|
const tabAttrs = {
|
|
43
43
|
role: 'tab',
|
|
44
44
|
'aria-selected': selected,
|
|
45
45
|
};
|
|
46
|
+
const onClickRef = React.useRef(onClick);
|
|
47
|
+
onClickRef.current = onClick;
|
|
48
|
+
const actualOnClick = React.useCallback((e) => {
|
|
49
|
+
onClickRef.current(e);
|
|
50
|
+
}, []);
|
|
46
51
|
if (disabled && disabledReason) {
|
|
47
52
|
const Icon = disabledReason.icon || jsxRuntime.jsx(components_Icon_FaIcon.FaCircleInfoIcon, { color: "TEXT_GREY" });
|
|
48
|
-
return (jsxRuntime.jsx(components_Tooltip_Tooltip.Tooltip, { ...tabAttrs, message: disabledReason.message, "aria-disabled": disabled, className: "focus-visible:shr-focus-indicator", children: jsxRuntime.jsx(TabButton, { ...rest, disabled: disabled, suffix: Icon }) }));
|
|
53
|
+
return (jsxRuntime.jsx(components_Tooltip_Tooltip.Tooltip, { ...tabAttrs, message: disabledReason.message, "aria-disabled": disabled, className: "focus-visible:shr-focus-indicator", children: jsxRuntime.jsx(TabButton, { ...rest, onClick: actualOnClick, disabled: disabled, suffix: Icon }) }));
|
|
49
54
|
}
|
|
50
|
-
return jsxRuntime.jsx(TabButton, { ...rest, ...tabAttrs, disabled: disabled });
|
|
55
|
+
return jsxRuntime.jsx(TabButton, { ...rest, ...tabAttrs, onClick: actualOnClick, disabled: disabled });
|
|
51
56
|
};
|
|
52
|
-
const TabButton = ({ id, children, suffix,
|
|
57
|
+
const TabButton = React.memo(({ id, children, suffix, className, ...rest }) => {
|
|
53
58
|
const classNames = React.useMemo(() => {
|
|
54
59
|
const { wrapper, label, suffixWrapper } = classNameGenerator();
|
|
55
60
|
return {
|
|
@@ -58,11 +63,8 @@ const TabButton = ({ id, children, suffix, onClick, className, ...rest }) => {
|
|
|
58
63
|
suffixWrapper: suffixWrapper(),
|
|
59
64
|
};
|
|
60
65
|
}, [className]);
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
};
|
|
64
|
-
const TabLabel = React.memo(({ children, className }) => (jsxRuntime.jsx("span", { className: className, children: children })));
|
|
65
|
-
const TabButtonSuffix = React.memo(({ children, className }) => children && jsxRuntime.jsx("span", { className: className, children: children }));
|
|
66
|
+
return (jsxRuntime.jsxs(components_Button_UnstyledButton.UnstyledButton, { ...rest, type: "button", value: id, id: id, className: classNames.wrapper, children: [jsxRuntime.jsx("span", { className: classNames.label, children: children }), suffix && jsxRuntime.jsx("span", { className: classNames.suffixWrapper, children: suffix })] }));
|
|
67
|
+
});
|
|
66
68
|
|
|
67
69
|
exports.TabItem = TabItem;
|
|
68
70
|
//# sourceMappingURL=TabItem.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabItem.cjs","sources":["../../../src/components/TabBar/TabItem.tsx"],"sourcesContent":["import {\n type ComponentProps,\n type FC,\n type MouseEvent,\n type PropsWithChildren,\n type ReactNode,\n memo,\n useCallback,\n useMemo,\n} from 'react'\nimport { tv } from 'tailwind-variants'\n\nimport { UnstyledButton } from '../Button'\nimport { FaCircleInfoIcon } from '../Icon'\nimport { Tooltip } from '../Tooltip'\n\nconst classNameGenerator = tv({\n slots: {\n wrapper: [\n 'smarthr-ui-TabItem',\n 'shr-group/tabitem',\n 'shr-relative shr-inline-flex shr-items-center shr-gap-0.5 shr-px-1 shr-py-0.75',\n 'hover:shr-bg-white-darken',\n 'focus-visible:shr-focus-indicator focus-visible:shr-z-1',\n 'disabled:shr-cursor-not-allowed disabled:shr-bg-transparent',\n 'aria-selected:before:shr-absolute aria-selected:before:shr-inset-x-0 aria-selected:before:shr-bottom-0 aria-selected:before:shr-z-1 aria-selected:before:shr-block aria-selected:before:shr-h-0.25 aria-selected:before:shr-bg-main aria-selected:before:shr-content-[\"\"]',\n 'forced-colors:aria-selected:before:shr-bg-[Highlight]',\n ],\n label: [\n 'shr-font-bold shr-leading-none shr-text-grey',\n 'group-hover/tabitem:shr-text-black',\n 'group-disabled/tabitem:shr-text-grey/50',\n 'group-aria-selected/tabitem:shr-text-black',\n ],\n suffixWrapper: [\n // Badge など内包要素に依って高さが変わらないようにするため、ネガティブマージンを指定\n '-shr-my-0.25',\n // 内包アイコンの leading を詰める\n '[&_.smarthr-ui-Icon]:shr-block',\n ],\n },\n})\n\ntype AbstractProps = PropsWithChildren<{\n /** タブの ID */\n id: string\n /** ボタン内の末尾に表示する内容 */\n suffix?: ReactNode\n /** `true` のとき、タブが選択状態のスタイルになる */\n selected?: boolean\n /** `true` のとき、タブを無効状態にしてクリック不能にする */\n disabled?: boolean\n /**\n * 無効な理由\n */\n disabledReason?: {\n icon?: ReactNode\n message: ReactNode\n }\n /** タブをクリックした時に発火するコールバック関数 */\n onClick: (
|
|
1
|
+
{"version":3,"file":"TabItem.cjs","sources":["../../../src/components/TabBar/TabItem.tsx"],"sourcesContent":["import {\n type ComponentProps,\n type FC,\n type MouseEvent,\n type PropsWithChildren,\n type ReactNode,\n memo,\n useCallback,\n useMemo,\n useRef,\n} from 'react'\nimport { tv } from 'tailwind-variants'\n\nimport { UnstyledButton } from '../Button'\nimport { FaCircleInfoIcon } from '../Icon'\nimport { Tooltip } from '../Tooltip'\n\nconst classNameGenerator = tv({\n slots: {\n wrapper: [\n 'smarthr-ui-TabItem',\n 'shr-group/tabitem',\n 'shr-relative shr-inline-flex shr-items-center shr-gap-0.5 shr-px-1 shr-py-0.75',\n 'hover:shr-bg-white-darken',\n 'focus-visible:shr-focus-indicator focus-visible:shr-z-1',\n 'disabled:shr-cursor-not-allowed disabled:shr-bg-transparent',\n 'aria-selected:before:shr-absolute aria-selected:before:shr-inset-x-0 aria-selected:before:shr-bottom-0 aria-selected:before:shr-z-1 aria-selected:before:shr-block aria-selected:before:shr-h-0.25 aria-selected:before:shr-bg-main aria-selected:before:shr-content-[\"\"]',\n 'forced-colors:aria-selected:before:shr-bg-[Highlight]',\n ],\n label: [\n 'shr-font-bold shr-leading-none shr-text-grey',\n 'group-hover/tabitem:shr-text-black',\n 'group-disabled/tabitem:shr-text-grey/50',\n 'group-aria-selected/tabitem:shr-text-black',\n ],\n suffixWrapper: [\n // Badge など内包要素に依って高さが変わらないようにするため、ネガティブマージンを指定\n '-shr-my-0.25',\n // 内包アイコンの leading を詰める\n '[&_.smarthr-ui-Icon]:shr-block',\n ],\n },\n})\n\ntype AbstractProps = PropsWithChildren<{\n /** タブの ID */\n id: string\n /** ボタン内の末尾に表示する内容 */\n suffix?: ReactNode\n /** `true` のとき、タブが選択状態のスタイルになる */\n selected?: boolean\n /** `true` のとき、タブを無効状態にしてクリック不能にする */\n disabled?: boolean\n /**\n * 無効な理由\n */\n disabledReason?: {\n icon?: ReactNode\n message: ReactNode\n }\n /** タブをクリックした時に発火するコールバック関数 */\n onClick: (e: MouseEvent<HTMLButtonElement>) => void\n}>\ntype Props = AbstractProps &\n Omit<ComponentProps<typeof UnstyledButton>, keyof AbstractProps | 'aria-selected' | 'type'>\n\nexport const TabItem: FC<Props> = ({\n selected = false,\n disabled,\n disabledReason,\n onClick,\n ...rest\n}) => {\n const tabAttrs = {\n role: 'tab',\n 'aria-selected': selected,\n }\n const onClickRef = useRef(onClick)\n onClickRef.current = onClick\n\n const actualOnClick = useCallback((e: MouseEvent<HTMLButtonElement>) => {\n onClickRef.current(e)\n }, [])\n\n if (disabled && disabledReason) {\n const Icon = disabledReason.icon || <FaCircleInfoIcon color=\"TEXT_GREY\" />\n\n return (\n <Tooltip\n {...tabAttrs}\n message={disabledReason.message}\n aria-disabled={disabled}\n className=\"focus-visible:shr-focus-indicator\"\n >\n <TabButton {...rest} onClick={actualOnClick} disabled={disabled} suffix={Icon} />\n </Tooltip>\n )\n }\n\n return <TabButton {...rest} {...tabAttrs} onClick={actualOnClick} disabled={disabled} />\n}\n\nconst TabButton = memo<PropsWithChildren<Props>>(({ id, children, suffix, className, ...rest }) => {\n const classNames = useMemo(() => {\n const { wrapper, label, suffixWrapper } = classNameGenerator()\n\n return {\n wrapper: wrapper({ className }),\n label: label(),\n suffixWrapper: suffixWrapper(),\n }\n }, [className])\n\n return (\n <UnstyledButton {...rest} type=\"button\" value={id} id={id} className={classNames.wrapper}>\n <span className={classNames.label}>{children}</span>\n {suffix && <span className={classNames.suffixWrapper}>{suffix}</span>}\n </UnstyledButton>\n )\n})\n"],"names":["tv","useRef","useCallback","_jsx","FaCircleInfoIcon","Tooltip","memo","useMemo","_jsxs","UnstyledButton"],"mappings":";;;;;;;;;;;;;;AAiBA,MAAM,kBAAkB,GAAGA,QAAE,CAAC;AAC5B,IAAA,KAAK,EAAE;AACL,QAAA,OAAO,EAAE;YACP,oBAAoB;YACpB,mBAAmB;YACnB,gFAAgF;YAChF,2BAA2B;YAC3B,yDAAyD;YACzD,6DAA6D;YAC7D,2QAA2Q;YAC3Q,uDAAuD;AACxD,SAAA;AACD,QAAA,KAAK,EAAE;YACL,8CAA8C;YAC9C,oCAAoC;YACpC,yCAAyC;YACzC,4CAA4C;AAC7C,SAAA;AACD,QAAA,aAAa,EAAE;;YAEb,cAAc;;YAEd,gCAAgC;AACjC,SAAA;AACF,KAAA;AACF,CAAA,CAAC;MAwBW,OAAO,GAAc,CAAC,EACjC,QAAQ,GAAG,KAAK,EAChB,QAAQ,EACR,cAAc,EACd,OAAO,EACP,GAAG,IAAI,EACR,KAAI;AACH,IAAA,MAAM,QAAQ,GAAG;AACf,QAAA,IAAI,EAAE,KAAK;AACX,QAAA,eAAe,EAAE,QAAQ;KAC1B;AACD,IAAA,MAAM,UAAU,GAAGC,YAAM,CAAC,OAAO,CAAC;AAClC,IAAA,UAAU,CAAC,OAAO,GAAG,OAAO;AAE5B,IAAA,MAAM,aAAa,GAAGC,iBAAW,CAAC,CAAC,CAAgC,KAAI;AACrE,QAAA,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;IACvB,CAAC,EAAE,EAAE,CAAC;AAEN,IAAA,IAAI,QAAQ,IAAI,cAAc,EAAE;AAC9B,QAAA,MAAM,IAAI,GAAG,cAAc,CAAC,IAAI,IAAIC,cAAA,CAACC,uCAAgB,EAAA,EAAC,KAAK,EAAC,WAAW,GAAG;AAE1E,QAAA,QACED,cAAA,CAACE,kCAAO,EAAA,EAAA,GACF,QAAQ,EACZ,OAAO,EAAE,cAAc,CAAC,OAAO,EAAA,eAAA,EAChB,QAAQ,EACvB,SAAS,EAAC,mCAAmC,EAAA,QAAA,EAE7CF,cAAA,CAAC,SAAS,OAAK,IAAI,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAA,CAAI,EAAA,CACzE;IAEd;AAEA,IAAA,OAAOA,cAAA,CAAC,SAAS,EAAA,EAAA,GAAK,IAAI,KAAM,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,GAAI;AAC1F;AAEA,MAAM,SAAS,GAAGG,UAAI,CAA2B,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,KAAI;AAChG,IAAA,MAAM,UAAU,GAAGC,aAAO,CAAC,MAAK;QAC9B,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,GAAG,kBAAkB,EAAE;QAE9D,OAAO;AACL,YAAA,OAAO,EAAE,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC;YAC/B,KAAK,EAAE,KAAK,EAAE;YACd,aAAa,EAAE,aAAa,EAAE;SAC/B;AACH,IAAA,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC;IAEf,QACEC,gBAACC,+CAAc,EAAA,EAAA,GAAK,IAAI,EAAE,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,UAAU,CAAC,OAAO,aACtFN,cAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAE,UAAU,CAAC,KAAK,EAAA,QAAA,EAAG,QAAQ,EAAA,CAAQ,EACnD,MAAM,IAAIA,yBAAM,SAAS,EAAE,UAAU,CAAC,aAAa,YAAG,MAAM,EAAA,CAAQ,CAAA,EAAA,CACtD;AAErB,CAAC,CAAC;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ComponentProps, type FC, type PropsWithChildren, type ReactNode } from 'react';
|
|
1
|
+
import { type ComponentProps, type FC, type MouseEvent, type PropsWithChildren, type ReactNode } from 'react';
|
|
2
2
|
import { UnstyledButton } from '../Button';
|
|
3
3
|
type AbstractProps = PropsWithChildren<{
|
|
4
4
|
/** タブの ID */
|
|
@@ -17,7 +17,7 @@ type AbstractProps = PropsWithChildren<{
|
|
|
17
17
|
message: ReactNode;
|
|
18
18
|
};
|
|
19
19
|
/** タブをクリックした時に発火するコールバック関数 */
|
|
20
|
-
onClick: (
|
|
20
|
+
onClick: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
21
21
|
}>;
|
|
22
22
|
type Props = AbstractProps & Omit<ComponentProps<typeof UnstyledButton>, keyof AbstractProps | 'aria-selected' | 'type'>;
|
|
23
23
|
export declare const TabItem: FC<Props>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { memo, useMemo, useCallback } from 'react';
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { memo, useMemo, useRef, useCallback } from 'react';
|
|
3
3
|
import { tv as ce } from './../../vendor/.pnpm/tailwind-variants@0.3.1_tailwindcss@3.4.19_ts-node@10.9.2_@swc_core@1.15.17_@types_node@20.19.35_typescript@5.9.3__/vendor/tailwind-variants/dist/index.js';
|
|
4
4
|
import '../Button/Button.js';
|
|
5
5
|
import '../Button/AnchorButton.js';
|
|
@@ -36,18 +36,23 @@ const classNameGenerator = ce({
|
|
|
36
36
|
],
|
|
37
37
|
},
|
|
38
38
|
});
|
|
39
|
-
const TabItem = ({ selected = false, disabled, disabledReason, ...rest }) => {
|
|
39
|
+
const TabItem = ({ selected = false, disabled, disabledReason, onClick, ...rest }) => {
|
|
40
40
|
const tabAttrs = {
|
|
41
41
|
role: 'tab',
|
|
42
42
|
'aria-selected': selected,
|
|
43
43
|
};
|
|
44
|
+
const onClickRef = useRef(onClick);
|
|
45
|
+
onClickRef.current = onClick;
|
|
46
|
+
const actualOnClick = useCallback((e) => {
|
|
47
|
+
onClickRef.current(e);
|
|
48
|
+
}, []);
|
|
44
49
|
if (disabled && disabledReason) {
|
|
45
50
|
const Icon = disabledReason.icon || jsx(FaCircleInfoIcon, { color: "TEXT_GREY" });
|
|
46
|
-
return (jsx(Tooltip, { ...tabAttrs, message: disabledReason.message, "aria-disabled": disabled, className: "focus-visible:shr-focus-indicator", children: jsx(TabButton, { ...rest, disabled: disabled, suffix: Icon }) }));
|
|
51
|
+
return (jsx(Tooltip, { ...tabAttrs, message: disabledReason.message, "aria-disabled": disabled, className: "focus-visible:shr-focus-indicator", children: jsx(TabButton, { ...rest, onClick: actualOnClick, disabled: disabled, suffix: Icon }) }));
|
|
47
52
|
}
|
|
48
|
-
return jsx(TabButton, { ...rest, ...tabAttrs, disabled: disabled });
|
|
53
|
+
return jsx(TabButton, { ...rest, ...tabAttrs, onClick: actualOnClick, disabled: disabled });
|
|
49
54
|
};
|
|
50
|
-
const TabButton = ({ id, children, suffix,
|
|
55
|
+
const TabButton = memo(({ id, children, suffix, className, ...rest }) => {
|
|
51
56
|
const classNames = useMemo(() => {
|
|
52
57
|
const { wrapper, label, suffixWrapper } = classNameGenerator();
|
|
53
58
|
return {
|
|
@@ -56,11 +61,8 @@ const TabButton = ({ id, children, suffix, onClick, className, ...rest }) => {
|
|
|
56
61
|
suffixWrapper: suffixWrapper(),
|
|
57
62
|
};
|
|
58
63
|
}, [className]);
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
};
|
|
62
|
-
const TabLabel = memo(({ children, className }) => (jsx("span", { className: className, children: children })));
|
|
63
|
-
const TabButtonSuffix = memo(({ children, className }) => children && jsx("span", { className: className, children: children }));
|
|
64
|
+
return (jsxs(UnstyledButton, { ...rest, type: "button", value: id, id: id, className: classNames.wrapper, children: [jsx("span", { className: classNames.label, children: children }), suffix && jsx("span", { className: classNames.suffixWrapper, children: suffix })] }));
|
|
65
|
+
});
|
|
64
66
|
|
|
65
67
|
export { TabItem };
|
|
66
68
|
//# sourceMappingURL=TabItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabItem.js","sources":["../../../src/components/TabBar/TabItem.tsx"],"sourcesContent":["import {\n type ComponentProps,\n type FC,\n type MouseEvent,\n type PropsWithChildren,\n type ReactNode,\n memo,\n useCallback,\n useMemo,\n} from 'react'\nimport { tv } from 'tailwind-variants'\n\nimport { UnstyledButton } from '../Button'\nimport { FaCircleInfoIcon } from '../Icon'\nimport { Tooltip } from '../Tooltip'\n\nconst classNameGenerator = tv({\n slots: {\n wrapper: [\n 'smarthr-ui-TabItem',\n 'shr-group/tabitem',\n 'shr-relative shr-inline-flex shr-items-center shr-gap-0.5 shr-px-1 shr-py-0.75',\n 'hover:shr-bg-white-darken',\n 'focus-visible:shr-focus-indicator focus-visible:shr-z-1',\n 'disabled:shr-cursor-not-allowed disabled:shr-bg-transparent',\n 'aria-selected:before:shr-absolute aria-selected:before:shr-inset-x-0 aria-selected:before:shr-bottom-0 aria-selected:before:shr-z-1 aria-selected:before:shr-block aria-selected:before:shr-h-0.25 aria-selected:before:shr-bg-main aria-selected:before:shr-content-[\"\"]',\n 'forced-colors:aria-selected:before:shr-bg-[Highlight]',\n ],\n label: [\n 'shr-font-bold shr-leading-none shr-text-grey',\n 'group-hover/tabitem:shr-text-black',\n 'group-disabled/tabitem:shr-text-grey/50',\n 'group-aria-selected/tabitem:shr-text-black',\n ],\n suffixWrapper: [\n // Badge など内包要素に依って高さが変わらないようにするため、ネガティブマージンを指定\n '-shr-my-0.25',\n // 内包アイコンの leading を詰める\n '[&_.smarthr-ui-Icon]:shr-block',\n ],\n },\n})\n\ntype AbstractProps = PropsWithChildren<{\n /** タブの ID */\n id: string\n /** ボタン内の末尾に表示する内容 */\n suffix?: ReactNode\n /** `true` のとき、タブが選択状態のスタイルになる */\n selected?: boolean\n /** `true` のとき、タブを無効状態にしてクリック不能にする */\n disabled?: boolean\n /**\n * 無効な理由\n */\n disabledReason?: {\n icon?: ReactNode\n message: ReactNode\n }\n /** タブをクリックした時に発火するコールバック関数 */\n onClick: (
|
|
1
|
+
{"version":3,"file":"TabItem.js","sources":["../../../src/components/TabBar/TabItem.tsx"],"sourcesContent":["import {\n type ComponentProps,\n type FC,\n type MouseEvent,\n type PropsWithChildren,\n type ReactNode,\n memo,\n useCallback,\n useMemo,\n useRef,\n} from 'react'\nimport { tv } from 'tailwind-variants'\n\nimport { UnstyledButton } from '../Button'\nimport { FaCircleInfoIcon } from '../Icon'\nimport { Tooltip } from '../Tooltip'\n\nconst classNameGenerator = tv({\n slots: {\n wrapper: [\n 'smarthr-ui-TabItem',\n 'shr-group/tabitem',\n 'shr-relative shr-inline-flex shr-items-center shr-gap-0.5 shr-px-1 shr-py-0.75',\n 'hover:shr-bg-white-darken',\n 'focus-visible:shr-focus-indicator focus-visible:shr-z-1',\n 'disabled:shr-cursor-not-allowed disabled:shr-bg-transparent',\n 'aria-selected:before:shr-absolute aria-selected:before:shr-inset-x-0 aria-selected:before:shr-bottom-0 aria-selected:before:shr-z-1 aria-selected:before:shr-block aria-selected:before:shr-h-0.25 aria-selected:before:shr-bg-main aria-selected:before:shr-content-[\"\"]',\n 'forced-colors:aria-selected:before:shr-bg-[Highlight]',\n ],\n label: [\n 'shr-font-bold shr-leading-none shr-text-grey',\n 'group-hover/tabitem:shr-text-black',\n 'group-disabled/tabitem:shr-text-grey/50',\n 'group-aria-selected/tabitem:shr-text-black',\n ],\n suffixWrapper: [\n // Badge など内包要素に依って高さが変わらないようにするため、ネガティブマージンを指定\n '-shr-my-0.25',\n // 内包アイコンの leading を詰める\n '[&_.smarthr-ui-Icon]:shr-block',\n ],\n },\n})\n\ntype AbstractProps = PropsWithChildren<{\n /** タブの ID */\n id: string\n /** ボタン内の末尾に表示する内容 */\n suffix?: ReactNode\n /** `true` のとき、タブが選択状態のスタイルになる */\n selected?: boolean\n /** `true` のとき、タブを無効状態にしてクリック不能にする */\n disabled?: boolean\n /**\n * 無効な理由\n */\n disabledReason?: {\n icon?: ReactNode\n message: ReactNode\n }\n /** タブをクリックした時に発火するコールバック関数 */\n onClick: (e: MouseEvent<HTMLButtonElement>) => void\n}>\ntype Props = AbstractProps &\n Omit<ComponentProps<typeof UnstyledButton>, keyof AbstractProps | 'aria-selected' | 'type'>\n\nexport const TabItem: FC<Props> = ({\n selected = false,\n disabled,\n disabledReason,\n onClick,\n ...rest\n}) => {\n const tabAttrs = {\n role: 'tab',\n 'aria-selected': selected,\n }\n const onClickRef = useRef(onClick)\n onClickRef.current = onClick\n\n const actualOnClick = useCallback((e: MouseEvent<HTMLButtonElement>) => {\n onClickRef.current(e)\n }, [])\n\n if (disabled && disabledReason) {\n const Icon = disabledReason.icon || <FaCircleInfoIcon color=\"TEXT_GREY\" />\n\n return (\n <Tooltip\n {...tabAttrs}\n message={disabledReason.message}\n aria-disabled={disabled}\n className=\"focus-visible:shr-focus-indicator\"\n >\n <TabButton {...rest} onClick={actualOnClick} disabled={disabled} suffix={Icon} />\n </Tooltip>\n )\n }\n\n return <TabButton {...rest} {...tabAttrs} onClick={actualOnClick} disabled={disabled} />\n}\n\nconst TabButton = memo<PropsWithChildren<Props>>(({ id, children, suffix, className, ...rest }) => {\n const classNames = useMemo(() => {\n const { wrapper, label, suffixWrapper } = classNameGenerator()\n\n return {\n wrapper: wrapper({ className }),\n label: label(),\n suffixWrapper: suffixWrapper(),\n }\n }, [className])\n\n return (\n <UnstyledButton {...rest} type=\"button\" value={id} id={id} className={classNames.wrapper}>\n <span className={classNames.label}>{children}</span>\n {suffix && <span className={classNames.suffixWrapper}>{suffix}</span>}\n </UnstyledButton>\n )\n})\n"],"names":["tv","_jsx","_jsxs"],"mappings":";;;;;;;;;;;;AAiBA,MAAM,kBAAkB,GAAGA,EAAE,CAAC;AAC5B,IAAA,KAAK,EAAE;AACL,QAAA,OAAO,EAAE;YACP,oBAAoB;YACpB,mBAAmB;YACnB,gFAAgF;YAChF,2BAA2B;YAC3B,yDAAyD;YACzD,6DAA6D;YAC7D,2QAA2Q;YAC3Q,uDAAuD;AACxD,SAAA;AACD,QAAA,KAAK,EAAE;YACL,8CAA8C;YAC9C,oCAAoC;YACpC,yCAAyC;YACzC,4CAA4C;AAC7C,SAAA;AACD,QAAA,aAAa,EAAE;;YAEb,cAAc;;YAEd,gCAAgC;AACjC,SAAA;AACF,KAAA;AACF,CAAA,CAAC;MAwBW,OAAO,GAAc,CAAC,EACjC,QAAQ,GAAG,KAAK,EAChB,QAAQ,EACR,cAAc,EACd,OAAO,EACP,GAAG,IAAI,EACR,KAAI;AACH,IAAA,MAAM,QAAQ,GAAG;AACf,QAAA,IAAI,EAAE,KAAK;AACX,QAAA,eAAe,EAAE,QAAQ;KAC1B;AACD,IAAA,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC;AAClC,IAAA,UAAU,CAAC,OAAO,GAAG,OAAO;AAE5B,IAAA,MAAM,aAAa,GAAG,WAAW,CAAC,CAAC,CAAgC,KAAI;AACrE,QAAA,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;IACvB,CAAC,EAAE,EAAE,CAAC;AAEN,IAAA,IAAI,QAAQ,IAAI,cAAc,EAAE;AAC9B,QAAA,MAAM,IAAI,GAAG,cAAc,CAAC,IAAI,IAAIC,GAAA,CAAC,gBAAgB,EAAA,EAAC,KAAK,EAAC,WAAW,GAAG;AAE1E,QAAA,QACEA,GAAA,CAAC,OAAO,EAAA,EAAA,GACF,QAAQ,EACZ,OAAO,EAAE,cAAc,CAAC,OAAO,EAAA,eAAA,EAChB,QAAQ,EACvB,SAAS,EAAC,mCAAmC,EAAA,QAAA,EAE7CA,GAAA,CAAC,SAAS,OAAK,IAAI,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAA,CAAI,EAAA,CACzE;IAEd;AAEA,IAAA,OAAOA,GAAA,CAAC,SAAS,EAAA,EAAA,GAAK,IAAI,KAAM,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,GAAI;AAC1F;AAEA,MAAM,SAAS,GAAG,IAAI,CAA2B,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,KAAI;AAChG,IAAA,MAAM,UAAU,GAAG,OAAO,CAAC,MAAK;QAC9B,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,GAAG,kBAAkB,EAAE;QAE9D,OAAO;AACL,YAAA,OAAO,EAAE,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC;YAC/B,KAAK,EAAE,KAAK,EAAE;YACd,aAAa,EAAE,aAAa,EAAE;SAC/B;AACH,IAAA,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC;IAEf,QACEC,KAAC,cAAc,EAAA,EAAA,GAAK,IAAI,EAAE,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,UAAU,CAAC,OAAO,aACtFD,GAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAE,UAAU,CAAC,KAAK,EAAA,QAAA,EAAG,QAAQ,EAAA,CAAQ,EACnD,MAAM,IAAIA,cAAM,SAAS,EAAE,UAAU,CAAC,aAAa,YAAG,MAAM,EAAA,CAAQ,CAAA,EAAA,CACtD;AAErB,CAAC,CAAC;;;;"}
|
|
@@ -5,19 +5,19 @@ var React = require('react');
|
|
|
5
5
|
// https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key
|
|
6
6
|
// Esc is a IE/Edge specific value
|
|
7
7
|
const ESCAPE_KEY_REGEX = /^Esc(ape)?$/;
|
|
8
|
-
const useHandleEscape = (
|
|
8
|
+
const useHandleEscape = (memoizedCallback) => {
|
|
9
9
|
React.useEffect(() => {
|
|
10
|
-
if (!
|
|
10
|
+
if (!memoizedCallback) {
|
|
11
11
|
return;
|
|
12
12
|
}
|
|
13
13
|
const handleKeyPress = (e) => {
|
|
14
14
|
if (ESCAPE_KEY_REGEX.test(e.key)) {
|
|
15
|
-
|
|
15
|
+
memoizedCallback();
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
document.addEventListener('keydown', handleKeyPress);
|
|
19
19
|
return () => document.removeEventListener('keydown', handleKeyPress);
|
|
20
|
-
}, [
|
|
20
|
+
}, [memoizedCallback]);
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
exports.useHandleEscape = useHandleEscape;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useHandleEscape.cjs","sources":["../../src/hooks/useHandleEscape.ts"],"sourcesContent":["import { useEffect } from 'react'\n\n// https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key\n// Esc is a IE/Edge specific value\nconst ESCAPE_KEY_REGEX = /^Esc(ape)?$/\n\nexport const useHandleEscape = (
|
|
1
|
+
{"version":3,"file":"useHandleEscape.cjs","sources":["../../src/hooks/useHandleEscape.ts"],"sourcesContent":["import { useEffect } from 'react'\n\n// https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key\n// Esc is a IE/Edge specific value\nconst ESCAPE_KEY_REGEX = /^Esc(ape)?$/\n\nexport const useHandleEscape = (memoizedCallback?: () => void) => {\n useEffect(() => {\n if (!memoizedCallback) {\n return\n }\n\n const handleKeyPress = (e: KeyboardEvent) => {\n if (ESCAPE_KEY_REGEX.test(e.key)) {\n memoizedCallback()\n }\n }\n\n document.addEventListener('keydown', handleKeyPress)\n\n return () => document.removeEventListener('keydown', handleKeyPress)\n }, [memoizedCallback])\n}\n"],"names":["useEffect"],"mappings":";;;;AAEA;AACA;AACA,MAAM,gBAAgB,GAAG,aAAa;AAE/B,MAAM,eAAe,GAAG,CAAC,gBAA6B,KAAI;IAC/DA,eAAS,CAAC,MAAK;QACb,IAAI,CAAC,gBAAgB,EAAE;YACrB;QACF;AAEA,QAAA,MAAM,cAAc,GAAG,CAAC,CAAgB,KAAI;YAC1C,IAAI,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE;AAChC,gBAAA,gBAAgB,EAAE;YACpB;AACF,QAAA,CAAC;AAED,QAAA,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,cAAc,CAAC;QAEpD,OAAO,MAAM,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,cAAc,CAAC;AACtE,IAAA,CAAC,EAAE,CAAC,gBAAgB,CAAC,CAAC;AACxB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useHandleEscape: (
|
|
1
|
+
export declare const useHandleEscape: (memoizedCallback?: () => void) => void;
|
|
@@ -3,19 +3,19 @@ import { useEffect } from 'react';
|
|
|
3
3
|
// https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key
|
|
4
4
|
// Esc is a IE/Edge specific value
|
|
5
5
|
const ESCAPE_KEY_REGEX = /^Esc(ape)?$/;
|
|
6
|
-
const useHandleEscape = (
|
|
6
|
+
const useHandleEscape = (memoizedCallback) => {
|
|
7
7
|
useEffect(() => {
|
|
8
|
-
if (!
|
|
8
|
+
if (!memoizedCallback) {
|
|
9
9
|
return;
|
|
10
10
|
}
|
|
11
11
|
const handleKeyPress = (e) => {
|
|
12
12
|
if (ESCAPE_KEY_REGEX.test(e.key)) {
|
|
13
|
-
|
|
13
|
+
memoizedCallback();
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
16
|
document.addEventListener('keydown', handleKeyPress);
|
|
17
17
|
return () => document.removeEventListener('keydown', handleKeyPress);
|
|
18
|
-
}, [
|
|
18
|
+
}, [memoizedCallback]);
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
export { useHandleEscape };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useHandleEscape.js","sources":["../../src/hooks/useHandleEscape.ts"],"sourcesContent":["import { useEffect } from 'react'\n\n// https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key\n// Esc is a IE/Edge specific value\nconst ESCAPE_KEY_REGEX = /^Esc(ape)?$/\n\nexport const useHandleEscape = (
|
|
1
|
+
{"version":3,"file":"useHandleEscape.js","sources":["../../src/hooks/useHandleEscape.ts"],"sourcesContent":["import { useEffect } from 'react'\n\n// https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key\n// Esc is a IE/Edge specific value\nconst ESCAPE_KEY_REGEX = /^Esc(ape)?$/\n\nexport const useHandleEscape = (memoizedCallback?: () => void) => {\n useEffect(() => {\n if (!memoizedCallback) {\n return\n }\n\n const handleKeyPress = (e: KeyboardEvent) => {\n if (ESCAPE_KEY_REGEX.test(e.key)) {\n memoizedCallback()\n }\n }\n\n document.addEventListener('keydown', handleKeyPress)\n\n return () => document.removeEventListener('keydown', handleKeyPress)\n }, [memoizedCallback])\n}\n"],"names":[],"mappings":";;AAEA;AACA;AACA,MAAM,gBAAgB,GAAG,aAAa;AAE/B,MAAM,eAAe,GAAG,CAAC,gBAA6B,KAAI;IAC/D,SAAS,CAAC,MAAK;QACb,IAAI,CAAC,gBAAgB,EAAE;YACrB;QACF;AAEA,QAAA,MAAM,cAAc,GAAG,CAAC,CAAgB,KAAI;YAC1C,IAAI,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE;AAChC,gBAAA,gBAAgB,EAAE;YACpB;AACF,QAAA,CAAC;AAED,QAAA,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,cAAc,CAAC;QAEpD,OAAO,MAAM,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,cAAc,CAAC;AACtE,IAAA,CAAC,EAAE,CAAC,gBAAgB,CAAC,CAAC;AACxB;;;;"}
|
package/lib/intl/Localizer.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { FormattedMessage as ReactIntlFormattedMessage } from 'react-intl';
|
|
2
|
-
import type {
|
|
2
|
+
import type { typedJa } from './locales';
|
|
3
3
|
import type { ComponentProps } from 'react';
|
|
4
|
-
type Messages = Record<keyof typeof
|
|
4
|
+
type Messages = Record<keyof typeof typedJa, string>;
|
|
5
5
|
type Props<Id extends keyof Messages> = {
|
|
6
6
|
id: Id;
|
|
7
|
-
defaultText: (typeof
|
|
7
|
+
defaultText: (typeof typedJa)[Id];
|
|
8
8
|
values?: ComponentProps<typeof ReactIntlFormattedMessage>['values'];
|
|
9
9
|
};
|
|
10
10
|
export declare const Localizer: <ID extends keyof Messages>({ values, id, defaultText, ...rest }: Props<ID>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var enUs = {
|
|
4
|
+
"smarthr-ui/common/language": "English",
|
|
5
|
+
"smarthr-ui/ActionDialog/closeButtonLabel": "Cancel",
|
|
6
|
+
"smarthr-ui/AppHeader/school": "SmartHR School",
|
|
7
|
+
"smarthr-ui/AppHeader/help": "Help",
|
|
8
|
+
"smarthr-ui/AppHeader/userSettings": "Personal Settings",
|
|
9
|
+
"smarthr-ui/AppHeader/releaseNotes": "Release Notes",
|
|
10
|
+
"smarthr-ui/AppHeader/releaseNotesLoadError": "Failed to load the release notes. Please try again later.",
|
|
11
|
+
"smarthr-ui/AppHeader/seeAllReleaseNotes": "View all release notes",
|
|
12
|
+
"smarthr-ui/AppHeader/DesktopHeader/appLauncherLabel": "Apps",
|
|
13
|
+
"smarthr-ui/AppHeader/MobileHeader/account": "Account",
|
|
14
|
+
"smarthr-ui/AppHeader/MobileHeader/openMenu": "Open menu",
|
|
15
|
+
"smarthr-ui/AppHeader/MobileHeader/closeMenu": "Close menu",
|
|
16
|
+
"smarthr-ui/AppHeader/MobileHeader/allAppButton": "All Apps",
|
|
17
|
+
"smarthr-ui/AppHeader/MobileHeader/managementMenu": "Admin Menu",
|
|
18
|
+
"smarthr-ui/AppHeader/MobileHeader/latestReleaseNotes": "Latest Release Notes",
|
|
19
|
+
"smarthr-ui/AppHeader/MobileHeader/back": "Back",
|
|
20
|
+
"smarthr-ui/AppHeader/MobileHeader/openMenuAccordion": "Open",
|
|
21
|
+
"smarthr-ui/AppHeader/MobileHeader/closeMenuAccordion": "Close",
|
|
22
|
+
"smarthr-ui/AppHeader/Launcher/searchInputTitle": "Enter the name of the App.",
|
|
23
|
+
"smarthr-ui/AppHeader/Launcher/favoriteModeText": "Favorite Apps",
|
|
24
|
+
"smarthr-ui/AppHeader/Launcher/allModeText": "All Apps",
|
|
25
|
+
"smarthr-ui/AppHeader/Launcher/listText": "App List",
|
|
26
|
+
"smarthr-ui/AppHeader/Launcher/helpText": "About Favorite Apps",
|
|
27
|
+
"smarthr-ui/AppHeader/Launcher/searchResultText": "Search results",
|
|
28
|
+
"smarthr-ui/AppHeader/Launcher/emptyText": "App not found.",
|
|
29
|
+
"smarthr-ui/AppHeader/Launcher/sortDropdownLabel": "Sort by",
|
|
30
|
+
"smarthr-ui/AppHeader/Launcher/sortDropdownSelected": "Selected",
|
|
31
|
+
"smarthr-ui/AppHeader/Launcher/sortDropdownOrderDefault": "Default order",
|
|
32
|
+
"smarthr-ui/AppHeader/Launcher/sortDropdownOrderNameAsc": "App name (A→Z)",
|
|
33
|
+
"smarthr-ui/AppHeader/Launcher/sortDropdownOrderNameDesc": "App name (Z→A)",
|
|
34
|
+
"smarthr-ui/AppLauncher/showAllText": "View all",
|
|
35
|
+
"smarthr-ui/AppLauncher/triggerLabel": "Apps",
|
|
36
|
+
"smarthr-ui/Browser/notFoundDescription": "Try changing the filter criteria.",
|
|
37
|
+
"smarthr-ui/Browser/notFoundTitle": "No items found.",
|
|
38
|
+
"smarthr-ui/Button/loading": "In Progress",
|
|
39
|
+
"smarthr-ui/Calendar/currentYear": "Current year",
|
|
40
|
+
"smarthr-ui/Calendar/nextMonth": "Next month",
|
|
41
|
+
"smarthr-ui/Calendar/previousMonth": "Previous month",
|
|
42
|
+
"smarthr-ui/Calendar/selectYear": "Select year",
|
|
43
|
+
"smarthr-ui/Combobox/addItemButtonLabel": "Add “{name}”",
|
|
44
|
+
"smarthr-ui/Combobox/loadingText": "In Progress",
|
|
45
|
+
"smarthr-ui/Combobox/noResultsText": "No matching results found.",
|
|
46
|
+
"smarthr-ui/DropdownMenuButton/triggerActive": "Hide options",
|
|
47
|
+
"smarthr-ui/DropdownMenuButton/triggerInactive": "Show options",
|
|
48
|
+
"smarthr-ui/DropZone/selectButtonLabel": "Choose file to upload",
|
|
49
|
+
"smarthr-ui/FileViewer/rotateAlt": "Rotate Left",
|
|
50
|
+
"smarthr-ui/FileViewer/scaleDownAlt": "Zoom Out",
|
|
51
|
+
"smarthr-ui/FileViewer/scaleRateLabel": "Zoom Factor (%)",
|
|
52
|
+
"smarthr-ui/FileViewer/scaleUpAlt": "Zoom In",
|
|
53
|
+
"smarthr-ui/FileViewer/unsupportedFileText": "Unsupported file format.",
|
|
54
|
+
"smarthr-ui/FilterDropdown/applyText": "Apply",
|
|
55
|
+
"smarthr-ui/FilterDropdown/cancelText": "Cancel",
|
|
56
|
+
"smarthr-ui/FilterDropdown/resetText": "Clear filters",
|
|
57
|
+
"smarthr-ui/FilterDropdown/status": "Filters applied",
|
|
58
|
+
"smarthr-ui/FilterDropdown/triggerText": "Filter",
|
|
59
|
+
"smarthr-ui/FormDialog/closeButtonLabel": "Cancel",
|
|
60
|
+
"smarthr-ui/InformationPanel/closeButtonLabel": "Close",
|
|
61
|
+
"smarthr-ui/InformationPanel/openButtonLabel": "Open",
|
|
62
|
+
"smarthr-ui/InputFile/destroy": "Delete",
|
|
63
|
+
"smarthr-ui/LanguageSwitcher/checkIconAlt": "Selected",
|
|
64
|
+
"smarthr-ui/Loader/alt": "In Progress",
|
|
65
|
+
"smarthr-ui/MessageDialog/closeButtonLabel": "Close",
|
|
66
|
+
"smarthr-ui/ModelessDialog/closeButtonIconAlt": "Close",
|
|
67
|
+
"smarthr-ui/ModelessDialog/dialogHandlerAriaLabel": "Dialog position",
|
|
68
|
+
"smarthr-ui/ModelessDialog/dialogHandlerAriaRoleDescription": "Can be dragged",
|
|
69
|
+
"smarthr-ui/ModelessDialog/dialogHandlerDescription": "Can be moved up, down, left, or right using arrow keys",
|
|
70
|
+
"smarthr-ui/ModelessDialog/dialogHandlerLiveRegionText": "{top}px from top, {left}px from left",
|
|
71
|
+
"smarthr-ui/MultiCombobox/destroyButtonIconAltSuffix": ": remove",
|
|
72
|
+
"smarthr-ui/MultiCombobox/selectedListAriaLabel": "Selected items",
|
|
73
|
+
"smarthr-ui/NotificationBar/closeButtonIconAlt": "Close",
|
|
74
|
+
"smarthr-ui/Pagination/controllerItemButtonFirstLabel": "First",
|
|
75
|
+
"smarthr-ui/Pagination/controllerItemButtonLastLabel": "Last",
|
|
76
|
+
"smarthr-ui/Pagination/controllerItemButtonNextLabel": "Next",
|
|
77
|
+
"smarthr-ui/Pagination/controllerItemButtonPreviousLabel": "Previous",
|
|
78
|
+
"smarthr-ui/Pagination/itemButtonLabel": "Page {page}",
|
|
79
|
+
"smarthr-ui/Pagination/navigationLabel": "Pagination",
|
|
80
|
+
"smarthr-ui/RequiredLabel/text": "Required",
|
|
81
|
+
"smarthr-ui/SearchInput/iconAlt": "Search",
|
|
82
|
+
"smarthr-ui/SideMenu/navigationLabel": "Sidebar",
|
|
83
|
+
"smarthr-ui/SingleCombobox/destroyButtonIconAlt": "Clear",
|
|
84
|
+
"smarthr-ui/SortDropdown/applyText": "Apply",
|
|
85
|
+
"smarthr-ui/SortDropdown/ascLabel": "Ascending",
|
|
86
|
+
"smarthr-ui/SortDropdown/cancelText": "Cancel",
|
|
87
|
+
"smarthr-ui/SortDropdown/descLabel": "Descending",
|
|
88
|
+
"smarthr-ui/SortDropdown/sortFieldLabel": "Sort items",
|
|
89
|
+
"smarthr-ui/SortDropdown/sortOrderLegend": "Order",
|
|
90
|
+
"smarthr-ui/StepFormDialog/backButtonLabel": "Back",
|
|
91
|
+
"smarthr-ui/StepFormDialog/closeButtonLabel": "Cancel",
|
|
92
|
+
"smarthr-ui/StepFormDialog/nextButtonLabel": "Next",
|
|
93
|
+
"smarthr-ui/StepStatusIcon/closedAlt": "Interrupted",
|
|
94
|
+
"smarthr-ui/StepStatusIcon/completedAlt": "Completed",
|
|
95
|
+
"smarthr-ui/Textarea/availableLetters": "{availableLetters} characters left",
|
|
96
|
+
"smarthr-ui/Textarea/maxLettersExceeded": "{exceededLetters} characters over limit",
|
|
97
|
+
"smarthr-ui/Textarea/screenReaderMaxLettersDescription": "Maximum {maxLetters} characters",
|
|
98
|
+
"smarthr-ui/OpenInNewTabIcon/openInNewTab": "Open in another tab",
|
|
99
|
+
"smarthr-ui/Th/sortDirectionAsc": "Ascending",
|
|
100
|
+
"smarthr-ui/Th/sortDirectionDesc": "Descending",
|
|
101
|
+
"smarthr-ui/Th/sortDirectionNone": "No sorting",
|
|
102
|
+
"smarthr-ui/ThCheckbox/checkAllInvisibleLabel": "Select/Deselect All",
|
|
103
|
+
"smarthr-ui/ThCheckbox/checkColumnName": "Select",
|
|
104
|
+
"smarthr-ui/ErrorScreen/homeLink": "Back to Home",
|
|
105
|
+
"smarthr-ui/ErrorScreen/smarthrLink": "Back to SmartHR",
|
|
106
|
+
"smarthr-ui/AuthErrorScreen/title": "Authentication Issue",
|
|
107
|
+
"smarthr-ui/ForbiddenErrorScreen/title": "You don’t have permission to view this page",
|
|
108
|
+
"smarthr-ui/ForbiddenErrorScreen/description": "For more details, please contact the administrator at your company.",
|
|
109
|
+
"smarthr-ui/NotFoundErrorScreen/title": "Page Not Found",
|
|
110
|
+
"smarthr-ui/NotFoundErrorScreen/description": "The page you are looking for is temporarily unavailable, or it may have been moved or deleted.",
|
|
111
|
+
"smarthr-ui/UnauthorizedErrorScreen/title": "Logged Out Due to Inactivity",
|
|
112
|
+
"smarthr-ui/UnauthorizedErrorScreen/description1": "You have been automatically logged out due to inactivity.",
|
|
113
|
+
"smarthr-ui/UnauthorizedErrorScreen/description2": "Please log in again to access the requested page.",
|
|
114
|
+
"smarthr-ui/UnauthorizedErrorScreen/reLoginButton": "Log in again",
|
|
115
|
+
"smarthr-ui/UnexpectedErrorScreen/title": "Unexpected Error",
|
|
116
|
+
"smarthr-ui/UnexpectedErrorScreen/apology": "We apologize for the inconvenience.",
|
|
117
|
+
"smarthr-ui/UnexpectedErrorScreen/possibleCause": "This error may have occurred due to a temporary connection issue, your device or browser settings, or the contents of the file you uploaded.",
|
|
118
|
+
"smarthr-ui/UnexpectedErrorScreen/pleaseRetry": "We apologize for the trouble. Please try the following:",
|
|
119
|
+
"smarthr-ui/UnexpectedErrorScreen/retryItem1": "Wait a moment, then try again.",
|
|
120
|
+
"smarthr-ui/UnexpectedErrorScreen/retryItem2": "Check {maintenanceLink}. Note that the information about maintenance and major system issues may take some time to be posted.",
|
|
121
|
+
"smarthr-ui/UnexpectedErrorScreen/ifNotResolved": "If the issues is not resolved, try the steps below:",
|
|
122
|
+
"smarthr-ui/UnexpectedErrorScreen/checkItem1": "Check if you’re using a recommended browser/settings (see {environmentLink})",
|
|
123
|
+
"smarthr-ui/UnexpectedErrorScreen/checkItem2": "Try clearing your browser’s cookies and cache. For details, see {cookieCacheLink}.",
|
|
124
|
+
"smarthr-ui/UnexpectedErrorScreen/contactAdmin": "If the issue persists after checking the above, please contact your company’s HR representative, or another person with SmartHR administrator privileges, and provide the information listed here: {errorInfoLink}.",
|
|
125
|
+
"smarthr-ui/UnexpectedErrorScreen/adminContact": "If you have SmartHR administrator privileges, please contact us using the chat icon in the lower right and provide the following information: {errorInfoLink}.",
|
|
126
|
+
"smarthr-ui/UnexpectedErrorScreen/maintenanceLink": "Maintenance & Service Alerts",
|
|
127
|
+
"smarthr-ui/UnexpectedErrorScreen/environmentLink": "SmartHR system requirements",
|
|
128
|
+
"smarthr-ui/UnexpectedErrorScreen/cookieCacheLink": "Q. How do I clear my browser’s cookies and cache?",
|
|
129
|
+
"smarthr-ui/UnexpectedErrorScreen/errorOccursInformation": "Information needed to investigate the error"
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
module.exports = enUs;
|
|
133
|
+
//# sourceMappingURL=en_us.json.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"en_us.json.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|