@univerjs/design 1.0.0-alpha.3 → 1.0.0-alpha.5
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/cjs/index.js +66 -69
- package/lib/cjs/locale/ar-SA.js +10 -0
- package/lib/cjs/locale/ca-ES.js +10 -0
- package/lib/cjs/locale/de-DE.js +10 -0
- package/lib/cjs/locale/en-US.js +10 -0
- package/lib/cjs/locale/es-ES.js +10 -0
- package/lib/cjs/locale/fa-IR.js +10 -0
- package/lib/cjs/locale/fr-FR.js +10 -0
- package/lib/cjs/locale/id-ID.js +10 -0
- package/lib/cjs/locale/it-IT.js +10 -0
- package/lib/cjs/locale/ja-JP.js +10 -0
- package/lib/cjs/locale/ko-KR.js +10 -0
- package/lib/cjs/locale/pl-PL.js +10 -0
- package/lib/cjs/locale/pt-BR.js +10 -0
- package/lib/cjs/locale/ru-RU.js +10 -0
- package/lib/cjs/locale/sk-SK.js +10 -0
- package/lib/cjs/locale/vi-VN.js +10 -0
- package/lib/cjs/locale/zh-CN.js +10 -0
- package/lib/cjs/locale/zh-HK.js +10 -0
- package/lib/cjs/locale/zh-TW.js +10 -0
- package/lib/es/index.js +66 -69
- package/lib/es/locale/ar-SA.js +10 -0
- package/lib/es/locale/ca-ES.js +10 -0
- package/lib/es/locale/de-DE.js +10 -0
- package/lib/es/locale/en-US.js +10 -0
- package/lib/es/locale/es-ES.js +10 -0
- package/lib/es/locale/fa-IR.js +10 -0
- package/lib/es/locale/fr-FR.js +10 -0
- package/lib/es/locale/id-ID.js +10 -0
- package/lib/es/locale/it-IT.js +10 -0
- package/lib/es/locale/ja-JP.js +10 -0
- package/lib/es/locale/ko-KR.js +10 -0
- package/lib/es/locale/pl-PL.js +10 -0
- package/lib/es/locale/pt-BR.js +10 -0
- package/lib/es/locale/ru-RU.js +10 -0
- package/lib/es/locale/sk-SK.js +10 -0
- package/lib/es/locale/vi-VN.js +10 -0
- package/lib/es/locale/zh-CN.js +10 -0
- package/lib/es/locale/zh-HK.js +10 -0
- package/lib/es/locale/zh-TW.js +10 -0
- package/lib/index.js +66 -69
- package/lib/locale/ar-SA.js +10 -0
- package/lib/locale/ca-ES.js +10 -0
- package/lib/locale/de-DE.js +10 -0
- package/lib/locale/en-US.js +10 -0
- package/lib/locale/es-ES.js +10 -0
- package/lib/locale/fa-IR.js +10 -0
- package/lib/locale/fr-FR.js +10 -0
- package/lib/locale/id-ID.js +10 -0
- package/lib/locale/it-IT.js +10 -0
- package/lib/locale/ja-JP.js +10 -0
- package/lib/locale/ko-KR.js +10 -0
- package/lib/locale/pl-PL.js +10 -0
- package/lib/locale/pt-BR.js +10 -0
- package/lib/locale/ru-RU.js +10 -0
- package/lib/locale/sk-SK.js +10 -0
- package/lib/locale/vi-VN.js +10 -0
- package/lib/locale/zh-CN.js +10 -0
- package/lib/locale/zh-HK.js +10 -0
- package/lib/locale/zh-TW.js +10 -0
- package/lib/types/locale/en-US.d.ts +10 -0
- package/lib/umd/index.js +14 -14
- package/lib/umd/locale/ar-SA.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/id-ID.js +1 -1
- package/lib/umd/locale/it-IT.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/pl-PL.js +1 -1
- package/lib/umd/locale/pt-BR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-HK.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -5,8 +5,8 @@ let clsx = require("clsx");
|
|
|
5
5
|
let tailwind_merge = require("tailwind-merge");
|
|
6
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
7
|
let class_variance_authority = require("class-variance-authority");
|
|
8
|
-
let _radix_ui_react_slot = require("@radix-ui/react-slot");
|
|
9
8
|
let _radix_ui_react_direction = require("@radix-ui/react-direction");
|
|
9
|
+
let _radix_ui_react_slot = require("@radix-ui/react-slot");
|
|
10
10
|
let _radix_ui_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
|
|
11
11
|
let _radix_ui_react_popover = require("@radix-ui/react-popover");
|
|
12
12
|
let _radix_ui_react_dialog = require("@radix-ui/react-dialog");
|
|
@@ -119,10 +119,57 @@ function Avatar(props) {
|
|
|
119
119
|
});
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
+
//#endregion
|
|
123
|
+
//#region src/helper/is-browser.ts
|
|
124
|
+
/**
|
|
125
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
126
|
+
*
|
|
127
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
128
|
+
* you may not use this file except in compliance with the License.
|
|
129
|
+
* You may obtain a copy of the License at
|
|
130
|
+
*
|
|
131
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
132
|
+
*
|
|
133
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
134
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
135
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
136
|
+
* See the License for the specific language governing permissions and
|
|
137
|
+
* limitations under the License.
|
|
138
|
+
*/
|
|
139
|
+
function isBrowser() {
|
|
140
|
+
return typeof window !== "undefined" && typeof document !== "undefined";
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
//#endregion
|
|
144
|
+
//#region src/components/config-provider/ConfigProvider.tsx
|
|
145
|
+
const ConfigContext = (0, react.createContext)({ mountContainer: isBrowser() ? document.body : null });
|
|
146
|
+
function ConfigProvider(props) {
|
|
147
|
+
const { children, locale, mountContainer, direction } = props;
|
|
148
|
+
const value = (0, react.useMemo)(() => {
|
|
149
|
+
return {
|
|
150
|
+
locale,
|
|
151
|
+
direction,
|
|
152
|
+
mountContainer
|
|
153
|
+
};
|
|
154
|
+
}, [
|
|
155
|
+
locale,
|
|
156
|
+
direction,
|
|
157
|
+
mountContainer
|
|
158
|
+
]);
|
|
159
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ConfigContext.Provider, {
|
|
160
|
+
value,
|
|
161
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_direction.DirectionProvider, {
|
|
162
|
+
dir: direction !== null && direction !== void 0 ? direction : "ltr",
|
|
163
|
+
children
|
|
164
|
+
})
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
|
|
122
168
|
//#endregion
|
|
123
169
|
//#region src/components/badge/Badge.tsx
|
|
124
170
|
function Badge(props) {
|
|
125
171
|
const { className, children, closable = false, onClose } = props;
|
|
172
|
+
const { locale } = (0, react.useContext)(ConfigContext);
|
|
126
173
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
127
174
|
"data-u-comp": "badge",
|
|
128
175
|
className: clsx$1("univer-box-border univer-inline-flex univer-items-center univer-gap-1 univer-truncate univer-rounded-md univer-border univer-border-solid univer-border-gray-100 univer-bg-gray-100 univer-px-2.5 univer-py-0.5 univer-text-xs univer-font-medium univer-text-gray-900 dark:!univer-border-gray-500 dark:!univer-bg-gray-700 dark:!univer-text-gray-300", className),
|
|
@@ -132,7 +179,7 @@ function Badge(props) {
|
|
|
132
179
|
}), closable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
133
180
|
className: "univer-flex univer-cursor-pointer univer-items-center univer-justify-center univer-border-none univer-p-0 univer-outline-none univer-transition-opacity hover:univer-opacity-70",
|
|
134
181
|
type: "button",
|
|
135
|
-
"aria-label":
|
|
182
|
+
"aria-label": locale === null || locale === void 0 ? void 0 : locale.Accessibility.closeBadge,
|
|
136
183
|
onClick: onClose,
|
|
137
184
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_icons.CloseIcon, { className: "univer-text-current" })
|
|
138
185
|
})]
|
|
@@ -177,52 +224,6 @@ const Button = (0, react.forwardRef)(({ className, variant, size, asChild = fals
|
|
|
177
224
|
});
|
|
178
225
|
Button.displayName = "Button";
|
|
179
226
|
|
|
180
|
-
//#endregion
|
|
181
|
-
//#region src/helper/is-browser.ts
|
|
182
|
-
/**
|
|
183
|
-
* Copyright 2023-present DreamNum Co., Ltd.
|
|
184
|
-
*
|
|
185
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
186
|
-
* you may not use this file except in compliance with the License.
|
|
187
|
-
* You may obtain a copy of the License at
|
|
188
|
-
*
|
|
189
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
190
|
-
*
|
|
191
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
192
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
193
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
194
|
-
* See the License for the specific language governing permissions and
|
|
195
|
-
* limitations under the License.
|
|
196
|
-
*/
|
|
197
|
-
function isBrowser() {
|
|
198
|
-
return typeof window !== "undefined" && typeof document !== "undefined";
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
//#endregion
|
|
202
|
-
//#region src/components/config-provider/ConfigProvider.tsx
|
|
203
|
-
const ConfigContext = (0, react.createContext)({ mountContainer: isBrowser() ? document.body : null });
|
|
204
|
-
function ConfigProvider(props) {
|
|
205
|
-
const { children, locale, mountContainer, direction } = props;
|
|
206
|
-
const value = (0, react.useMemo)(() => {
|
|
207
|
-
return {
|
|
208
|
-
locale,
|
|
209
|
-
direction,
|
|
210
|
-
mountContainer
|
|
211
|
-
};
|
|
212
|
-
}, [
|
|
213
|
-
locale,
|
|
214
|
-
direction,
|
|
215
|
-
mountContainer
|
|
216
|
-
]);
|
|
217
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ConfigContext.Provider, {
|
|
218
|
-
value,
|
|
219
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_direction.DirectionProvider, {
|
|
220
|
-
dir: direction !== null && direction !== void 0 ? direction : "ltr",
|
|
221
|
-
children
|
|
222
|
-
})
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
|
|
226
227
|
//#endregion
|
|
227
228
|
//#region src/components/button/ButtonGroup.tsx
|
|
228
229
|
const ButtonGroup = ({ className, orientation = "horizontal", children }) => {
|
|
@@ -1153,7 +1154,6 @@ function useDraggable(options = {}) {
|
|
|
1153
1154
|
};
|
|
1154
1155
|
}
|
|
1155
1156
|
function Dialog(props) {
|
|
1156
|
-
var _locale$Confirm$cance, _locale$Confirm, _locale$Confirm$confi, _locale$Confirm2;
|
|
1157
1157
|
const { className, children, style, open = false, title, width, draggable = false, defaultPosition, footer: propFooter, mask = true, keyboard = true, closable = true, maskClosable = true, showOk, showCancel, onOpenChange, onClose, onOk, onCancel } = props;
|
|
1158
1158
|
const { locale, mountContainer, direction } = (0, react.useContext)(ConfigContext);
|
|
1159
1159
|
const { position, isDragging, setElementRef, handleMouseDown } = useDraggable({
|
|
@@ -1164,11 +1164,11 @@ function Dialog(props) {
|
|
|
1164
1164
|
className: "univer-flex univer-justify-end univer-gap-2",
|
|
1165
1165
|
children: [showCancel && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
1166
1166
|
onClick: onCancel,
|
|
1167
|
-
children:
|
|
1167
|
+
children: locale === null || locale === void 0 ? void 0 : locale.Confirm.cancel
|
|
1168
1168
|
}), showOk && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
1169
1169
|
variant: "primary",
|
|
1170
1170
|
onClick: onOk,
|
|
1171
|
-
children:
|
|
1171
|
+
children: locale === null || locale === void 0 ? void 0 : locale.Confirm.confirm
|
|
1172
1172
|
})]
|
|
1173
1173
|
}) : null;
|
|
1174
1174
|
const handleContentRef = (0, react.useCallback)((node) => {
|
|
@@ -1915,7 +1915,6 @@ const MemoizedAlphaSlider = (0, react.memo)(AlphaSlider);
|
|
|
1915
1915
|
const MemoizedColorInput = (0, react.memo)(ColorInput);
|
|
1916
1916
|
const MemoizedColorPresets = (0, react.memo)(ColorPresets);
|
|
1917
1917
|
function ColorPicker({ format = "hex", value, onChange }) {
|
|
1918
|
-
if (!isBrowser) return null;
|
|
1919
1918
|
const { direction, locale } = (0, react.useContext)(ConfigContext);
|
|
1920
1919
|
const [hsv, setHsv] = (0, react.useState)([
|
|
1921
1920
|
0,
|
|
@@ -1952,6 +1951,7 @@ function ColorPicker({ format = "hex", value, onChange }) {
|
|
|
1952
1951
|
console.error("Invalid value:", error);
|
|
1953
1952
|
}
|
|
1954
1953
|
}, [value, format]);
|
|
1954
|
+
if (!isBrowser) return null;
|
|
1955
1955
|
function handleColorChange(h, s, v) {
|
|
1956
1956
|
setHsv([
|
|
1957
1957
|
h,
|
|
@@ -2440,11 +2440,7 @@ const FormDualColumnLayout = (props) => {
|
|
|
2440
2440
|
*/
|
|
2441
2441
|
function Pager(props) {
|
|
2442
2442
|
const { className, value: current = 0, total: count = 0, loop, text: propText, onChange } = props;
|
|
2443
|
-
const text =
|
|
2444
|
-
current,
|
|
2445
|
-
count,
|
|
2446
|
-
propText
|
|
2447
|
-
]);
|
|
2443
|
+
const text = propText !== null && propText !== void 0 ? propText : `${current}/${count}`;
|
|
2448
2444
|
const hasValue = count > 0;
|
|
2449
2445
|
const onClickLeftArrow = () => {
|
|
2450
2446
|
if (current === 1) {
|
|
@@ -2514,9 +2510,9 @@ function Gallery(props) {
|
|
|
2514
2510
|
const [isVisible, setIsVisible] = (0, react.useState)(false);
|
|
2515
2511
|
const [activeImageIndex, setActiveImageIndex] = (0, react.useState)(0);
|
|
2516
2512
|
const [zoomLevel, setZoomLevel] = (0, react.useState)(1);
|
|
2517
|
-
const { direction } = (0, react.useContext)(ConfigContext);
|
|
2513
|
+
const { direction, locale } = (0, react.useContext)(ConfigContext);
|
|
2518
2514
|
const dialogRef = (0, react.useRef)(null);
|
|
2519
|
-
const activeImage =
|
|
2515
|
+
const activeImage = images[activeImageIndex];
|
|
2520
2516
|
const hasPagination = images.length > 1;
|
|
2521
2517
|
(0, react.useEffect)(() => {
|
|
2522
2518
|
if (open && dialogRef.current) dialogRef.current.focus();
|
|
@@ -2566,7 +2562,7 @@ function Gallery(props) {
|
|
|
2566
2562
|
dir: direction,
|
|
2567
2563
|
role: "dialog",
|
|
2568
2564
|
"aria-modal": "true",
|
|
2569
|
-
"aria-label":
|
|
2565
|
+
"aria-label": locale === null || locale === void 0 ? void 0 : locale.Accessibility.imageGallery,
|
|
2570
2566
|
tabIndex: -1,
|
|
2571
2567
|
ref: dialogRef,
|
|
2572
2568
|
className: clsx$1("univer-fixed univer-inset-0 univer-z-[1080] univer-flex univer-h-screen univer-w-screen univer-select-none univer-items-center univer-justify-center", {
|
|
@@ -2585,7 +2581,7 @@ function Gallery(props) {
|
|
|
2585
2581
|
className: "univer-h-full univer-w-full univer-object-contain univer-transition-transform univer-duration-300 univer-ease-out",
|
|
2586
2582
|
style: { transform: `scale(${zoomLevel})` },
|
|
2587
2583
|
src: activeImage,
|
|
2588
|
-
alt:
|
|
2584
|
+
alt: locale === null || locale === void 0 ? void 0 : locale.Accessibility.image.replace("{0}", String(activeImageIndex + 1)).replace("{1}", String(images.length)),
|
|
2589
2585
|
draggable: false
|
|
2590
2586
|
})
|
|
2591
2587
|
}),
|
|
@@ -2600,21 +2596,21 @@ function Gallery(props) {
|
|
|
2600
2596
|
}),
|
|
2601
2597
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2602
2598
|
type: "button",
|
|
2603
|
-
"aria-label":
|
|
2599
|
+
"aria-label": locale === null || locale === void 0 ? void 0 : locale.Accessibility.zoomIn,
|
|
2604
2600
|
className: buttonClassName,
|
|
2605
2601
|
onClick: () => handleToggleZoom(.25),
|
|
2606
2602
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_icons.ZoomInIcon, { "aria-hidden": "true" })
|
|
2607
2603
|
}),
|
|
2608
2604
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2609
2605
|
type: "button",
|
|
2610
|
-
"aria-label":
|
|
2606
|
+
"aria-label": locale === null || locale === void 0 ? void 0 : locale.Accessibility.zoomOut,
|
|
2611
2607
|
className: buttonClassName,
|
|
2612
2608
|
onClick: () => handleToggleZoom(-.25),
|
|
2613
2609
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_icons.ZoomOutIcon, { "aria-hidden": "true" })
|
|
2614
2610
|
}),
|
|
2615
2611
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2616
2612
|
type: "button",
|
|
2617
|
-
"aria-label":
|
|
2613
|
+
"aria-label": locale === null || locale === void 0 ? void 0 : locale.Accessibility.resetZoom,
|
|
2618
2614
|
className: buttonClassName,
|
|
2619
2615
|
onClick: () => handleToggleZoom("reset"),
|
|
2620
2616
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_icons.OneToOneIcon, { "aria-hidden": "true" })
|
|
@@ -2714,9 +2710,10 @@ const Input = (0, react.forwardRef)(({ autoFocus = false, className, style, type
|
|
|
2714
2710
|
//#endregion
|
|
2715
2711
|
//#region src/components/input-number/InputNumber.tsx
|
|
2716
2712
|
const InputNumber = (0, react.forwardRef)(({ value, defaultValue, size = "small", min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER, step = 1, precision, formatter, parser, controls = true, className, inputClassName, controlsClassName, disabled, onChange, onKeyDown, onPressEnter, onFocus, onBlur, allowEmpty = false }, ref) => {
|
|
2713
|
+
const { locale } = (0, react.useContext)(ConfigContext);
|
|
2717
2714
|
const [internalValue, setInternalValue] = (0, react.useState)(value !== void 0 ? value : defaultValue !== void 0 ? defaultValue : null);
|
|
2718
2715
|
const lastValidValueRef = (0, react.useRef)(internalValue);
|
|
2719
|
-
const [inputValue, setInputValue] = (0, react.useState)(formatValue(internalValue));
|
|
2716
|
+
const [inputValue, setInputValue] = (0, react.useState)(() => formatValue(internalValue));
|
|
2720
2717
|
const inputRef = (0, react.useRef)(null);
|
|
2721
2718
|
const longPressTimerRef = (0, react.useRef)(null);
|
|
2722
2719
|
const longPressIntervalRef = (0, react.useRef)(null);
|
|
@@ -2868,7 +2865,7 @@ const InputNumber = (0, react.forwardRef)(({ value, defaultValue, size = "small"
|
|
|
2868
2865
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2869
2866
|
className: clsx$1("univer-box-border univer-flex univer-h-1/2 univer-w-5 univer-cursor-pointer univer-items-center univer-justify-center univer-border-none univer-bg-transparent univer-p-0 univer-transition-colors hover:univer-bg-gray-100 dark:!univer-text-white dark:hover:!univer-bg-gray-600", incrementDisabled && "univer-cursor-not-allowed univer-opacity-60"),
|
|
2870
2867
|
role: "button",
|
|
2871
|
-
"aria-label":
|
|
2868
|
+
"aria-label": locale === null || locale === void 0 ? void 0 : locale.Accessibility.increment,
|
|
2872
2869
|
"aria-disabled": incrementDisabled,
|
|
2873
2870
|
tabIndex: -1,
|
|
2874
2871
|
onMouseDown: (e) => e.preventDefault(),
|
|
@@ -2880,7 +2877,7 @@ const InputNumber = (0, react.forwardRef)(({ value, defaultValue, size = "small"
|
|
|
2880
2877
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2881
2878
|
className: clsx$1("univer-box-border univer-flex univer-h-1/2 univer-w-5 univer-cursor-pointer univer-items-center univer-justify-center univer-border-none univer-bg-transparent univer-p-0 univer-transition-colors hover:univer-bg-gray-100 dark:!univer-text-white dark:hover:!univer-bg-gray-600", decrementDisabled && "univer-cursor-not-allowed univer-opacity-60"),
|
|
2882
2879
|
role: "button",
|
|
2883
|
-
"aria-label":
|
|
2880
|
+
"aria-label": locale === null || locale === void 0 ? void 0 : locale.Accessibility.decrement,
|
|
2884
2881
|
"aria-disabled": decrementDisabled,
|
|
2885
2882
|
tabIndex: -1,
|
|
2886
2883
|
onMouseDown: (e) => e.preventDefault(),
|
|
@@ -3213,7 +3210,7 @@ function getCssLinearGradientAngle(value) {
|
|
|
3213
3210
|
return (getGradientAngle(value) + 90) % 360;
|
|
3214
3211
|
}
|
|
3215
3212
|
function GradientColorPicker(props) {
|
|
3216
|
-
var _draftValue$stops$sel,
|
|
3213
|
+
var _draftValue$stops$sel, _draftValue$stops$sel2;
|
|
3217
3214
|
const { className, compact = false, value = DEFAULT_VALUE, onChange } = props;
|
|
3218
3215
|
const { locale } = (0, react.useContext)(ConfigContext);
|
|
3219
3216
|
const [draftValue, setDraftValue] = (0, react.useState)(value);
|
|
@@ -3481,7 +3478,7 @@ function GradientColorPicker(props) {
|
|
|
3481
3478
|
className: "univer-flex-1",
|
|
3482
3479
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3483
3480
|
className: "univer-mb-0.5 univer-text-xs univer-text-gray-500",
|
|
3484
|
-
children:
|
|
3481
|
+
children: locale === null || locale === void 0 ? void 0 : locale.GradientColorPicker.transparency
|
|
3485
3482
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InputNumber, {
|
|
3486
3483
|
value: Math.round((1 - getStopOpacity(draftValue.stops[selectedIndex])) * 100),
|
|
3487
3484
|
min: 0,
|
package/lib/cjs/locale/ar-SA.js
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
|
|
2
2
|
//#region src/locale/ar-SA.ts
|
|
3
3
|
const locale = { design: {
|
|
4
|
+
Accessibility: {
|
|
5
|
+
closeBadge: "إغلاق الشارة",
|
|
6
|
+
imageGallery: "معرض الصور",
|
|
7
|
+
image: "الصورة {0} من {1}",
|
|
8
|
+
zoomIn: "تكبير",
|
|
9
|
+
zoomOut: "تصغير",
|
|
10
|
+
resetZoom: "إعادة ضبط التكبير",
|
|
11
|
+
increment: "زيادة",
|
|
12
|
+
decrement: "إنقاص"
|
|
13
|
+
},
|
|
4
14
|
Confirm: {
|
|
5
15
|
cancel: "إلغاء",
|
|
6
16
|
confirm: "موافق"
|
package/lib/cjs/locale/ca-ES.js
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
|
|
2
2
|
//#region src/locale/ca-ES.ts
|
|
3
3
|
const locale = { design: {
|
|
4
|
+
Accessibility: {
|
|
5
|
+
closeBadge: "Tanca la insígnia",
|
|
6
|
+
imageGallery: "Galeria d’imatges",
|
|
7
|
+
image: "Imatge {0} de {1}",
|
|
8
|
+
zoomIn: "Apropa",
|
|
9
|
+
zoomOut: "Allunya",
|
|
10
|
+
resetZoom: "Restableix el zoom",
|
|
11
|
+
increment: "Incrementa",
|
|
12
|
+
decrement: "Disminueix"
|
|
13
|
+
},
|
|
4
14
|
Confirm: {
|
|
5
15
|
cancel: "cancel·la",
|
|
6
16
|
confirm: "ok"
|
package/lib/cjs/locale/de-DE.js
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
|
|
2
2
|
//#region src/locale/de-DE.ts
|
|
3
3
|
const locale = { design: {
|
|
4
|
+
Accessibility: {
|
|
5
|
+
closeBadge: "Badge schließen",
|
|
6
|
+
imageGallery: "Bildergalerie",
|
|
7
|
+
image: "Bild {0} von {1}",
|
|
8
|
+
zoomIn: "Vergrößern",
|
|
9
|
+
zoomOut: "Verkleinern",
|
|
10
|
+
resetZoom: "Zoom zurücksetzen",
|
|
11
|
+
increment: "Erhöhen",
|
|
12
|
+
decrement: "Verringern"
|
|
13
|
+
},
|
|
4
14
|
Confirm: {
|
|
5
15
|
cancel: "Abbrechen",
|
|
6
16
|
confirm: "OK"
|
package/lib/cjs/locale/en-US.js
CHANGED
|
@@ -16,6 +16,16 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
const locale = { design: {
|
|
19
|
+
Accessibility: {
|
|
20
|
+
closeBadge: "Close badge",
|
|
21
|
+
imageGallery: "Image gallery",
|
|
22
|
+
image: "Image {0} of {1}",
|
|
23
|
+
zoomIn: "Zoom in",
|
|
24
|
+
zoomOut: "Zoom out",
|
|
25
|
+
resetZoom: "Reset zoom",
|
|
26
|
+
increment: "increment",
|
|
27
|
+
decrement: "decrement"
|
|
28
|
+
},
|
|
19
29
|
Confirm: {
|
|
20
30
|
cancel: "cancel",
|
|
21
31
|
confirm: "ok"
|
package/lib/cjs/locale/es-ES.js
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
|
|
2
2
|
//#region src/locale/es-ES.ts
|
|
3
3
|
const locale = { design: {
|
|
4
|
+
Accessibility: {
|
|
5
|
+
closeBadge: "Cerrar insignia",
|
|
6
|
+
imageGallery: "Galería de imágenes",
|
|
7
|
+
image: "Imagen {0} de {1}",
|
|
8
|
+
zoomIn: "Acercar",
|
|
9
|
+
zoomOut: "Alejar",
|
|
10
|
+
resetZoom: "Restablecer zoom",
|
|
11
|
+
increment: "Incrementar",
|
|
12
|
+
decrement: "Disminuir"
|
|
13
|
+
},
|
|
4
14
|
Confirm: {
|
|
5
15
|
cancel: "Cancelar",
|
|
6
16
|
confirm: "Aceptar"
|
package/lib/cjs/locale/fa-IR.js
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
|
|
2
2
|
//#region src/locale/fa-IR.ts
|
|
3
3
|
const locale = { design: {
|
|
4
|
+
Accessibility: {
|
|
5
|
+
closeBadge: "بستن نشان",
|
|
6
|
+
imageGallery: "گالری تصاویر",
|
|
7
|
+
image: "تصویر {0} از {1}",
|
|
8
|
+
zoomIn: "بزرگنمایی",
|
|
9
|
+
zoomOut: "کوچکنمایی",
|
|
10
|
+
resetZoom: "بازنشانی بزرگنمایی",
|
|
11
|
+
increment: "افزایش",
|
|
12
|
+
decrement: "کاهش"
|
|
13
|
+
},
|
|
4
14
|
Confirm: {
|
|
5
15
|
cancel: "لغو",
|
|
6
16
|
confirm: "باشه"
|
package/lib/cjs/locale/fr-FR.js
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
|
|
2
2
|
//#region src/locale/fr-FR.ts
|
|
3
3
|
const locale = { design: {
|
|
4
|
+
Accessibility: {
|
|
5
|
+
closeBadge: "Fermer le badge",
|
|
6
|
+
imageGallery: "Galerie d’images",
|
|
7
|
+
image: "Image {0} sur {1}",
|
|
8
|
+
zoomIn: "Zoom avant",
|
|
9
|
+
zoomOut: "Zoom arrière",
|
|
10
|
+
resetZoom: "Réinitialiser le zoom",
|
|
11
|
+
increment: "Augmenter",
|
|
12
|
+
decrement: "Diminuer"
|
|
13
|
+
},
|
|
4
14
|
Confirm: {
|
|
5
15
|
cancel: "annuler",
|
|
6
16
|
confirm: "ok"
|
package/lib/cjs/locale/id-ID.js
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
|
|
2
2
|
//#region src/locale/id-ID.ts
|
|
3
3
|
const locale = { design: {
|
|
4
|
+
Accessibility: {
|
|
5
|
+
closeBadge: "Tutup lencana",
|
|
6
|
+
imageGallery: "Galeri gambar",
|
|
7
|
+
image: "Gambar {0} dari {1}",
|
|
8
|
+
zoomIn: "Perbesar",
|
|
9
|
+
zoomOut: "Perkecil",
|
|
10
|
+
resetZoom: "Atur ulang zoom",
|
|
11
|
+
increment: "Tambah",
|
|
12
|
+
decrement: "Kurangi"
|
|
13
|
+
},
|
|
4
14
|
Confirm: {
|
|
5
15
|
cancel: "Batal",
|
|
6
16
|
confirm: "OK"
|
package/lib/cjs/locale/it-IT.js
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
|
|
2
2
|
//#region src/locale/it-IT.ts
|
|
3
3
|
const locale = { design: {
|
|
4
|
+
Accessibility: {
|
|
5
|
+
closeBadge: "Chiudi badge",
|
|
6
|
+
imageGallery: "Galleria immagini",
|
|
7
|
+
image: "Immagine {0} di {1}",
|
|
8
|
+
zoomIn: "Ingrandisci",
|
|
9
|
+
zoomOut: "Riduci",
|
|
10
|
+
resetZoom: "Reimposta zoom",
|
|
11
|
+
increment: "Incrementa",
|
|
12
|
+
decrement: "Decrementa"
|
|
13
|
+
},
|
|
4
14
|
Confirm: {
|
|
5
15
|
cancel: "annulla",
|
|
6
16
|
confirm: "ok"
|
package/lib/cjs/locale/ja-JP.js
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
|
|
2
2
|
//#region src/locale/ja-JP.ts
|
|
3
3
|
const locale = { design: {
|
|
4
|
+
Accessibility: {
|
|
5
|
+
closeBadge: "バッジを閉じる",
|
|
6
|
+
imageGallery: "画像ギャラリー",
|
|
7
|
+
image: "画像 {0}/{1}",
|
|
8
|
+
zoomIn: "拡大",
|
|
9
|
+
zoomOut: "縮小",
|
|
10
|
+
resetZoom: "ズームをリセット",
|
|
11
|
+
increment: "増加",
|
|
12
|
+
decrement: "減少"
|
|
13
|
+
},
|
|
4
14
|
Confirm: {
|
|
5
15
|
cancel: "キャンセル",
|
|
6
16
|
confirm: "確認"
|
package/lib/cjs/locale/ko-KR.js
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
|
|
2
2
|
//#region src/locale/ko-KR.ts
|
|
3
3
|
const locale = { design: {
|
|
4
|
+
Accessibility: {
|
|
5
|
+
closeBadge: "배지 닫기",
|
|
6
|
+
imageGallery: "이미지 갤러리",
|
|
7
|
+
image: "이미지 {0}/{1}",
|
|
8
|
+
zoomIn: "확대",
|
|
9
|
+
zoomOut: "축소",
|
|
10
|
+
resetZoom: "확대/축소 초기화",
|
|
11
|
+
increment: "증가",
|
|
12
|
+
decrement: "감소"
|
|
13
|
+
},
|
|
4
14
|
Confirm: {
|
|
5
15
|
cancel: "취소",
|
|
6
16
|
confirm: "확인"
|
package/lib/cjs/locale/pl-PL.js
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
|
|
2
2
|
//#region src/locale/pl-PL.ts
|
|
3
3
|
const locale = { design: {
|
|
4
|
+
Accessibility: {
|
|
5
|
+
closeBadge: "Zamknij plakietkę",
|
|
6
|
+
imageGallery: "Galeria obrazów",
|
|
7
|
+
image: "Obraz {0} z {1}",
|
|
8
|
+
zoomIn: "Powiększ",
|
|
9
|
+
zoomOut: "Pomniejsz",
|
|
10
|
+
resetZoom: "Resetuj powiększenie",
|
|
11
|
+
increment: "Zwiększ",
|
|
12
|
+
decrement: "Zmniejsz"
|
|
13
|
+
},
|
|
4
14
|
Confirm: {
|
|
5
15
|
cancel: "anuluj",
|
|
6
16
|
confirm: "ok"
|
package/lib/cjs/locale/pt-BR.js
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
|
|
2
2
|
//#region src/locale/pt-BR.ts
|
|
3
3
|
const locale = { design: {
|
|
4
|
+
Accessibility: {
|
|
5
|
+
closeBadge: "Fechar selo",
|
|
6
|
+
imageGallery: "Galeria de imagens",
|
|
7
|
+
image: "Imagem {0} de {1}",
|
|
8
|
+
zoomIn: "Ampliar",
|
|
9
|
+
zoomOut: "Reduzir",
|
|
10
|
+
resetZoom: "Redefinir zoom",
|
|
11
|
+
increment: "Incrementar",
|
|
12
|
+
decrement: "Diminuir"
|
|
13
|
+
},
|
|
4
14
|
Confirm: {
|
|
5
15
|
cancel: "cancelar",
|
|
6
16
|
confirm: "ok"
|
package/lib/cjs/locale/ru-RU.js
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
|
|
2
2
|
//#region src/locale/ru-RU.ts
|
|
3
3
|
const locale = { design: {
|
|
4
|
+
Accessibility: {
|
|
5
|
+
closeBadge: "Закрыть метку",
|
|
6
|
+
imageGallery: "Галерея изображений",
|
|
7
|
+
image: "Изображение {0} из {1}",
|
|
8
|
+
zoomIn: "Увеличить",
|
|
9
|
+
zoomOut: "Уменьшить",
|
|
10
|
+
resetZoom: "Сбросить масштаб",
|
|
11
|
+
increment: "Увеличить значение",
|
|
12
|
+
decrement: "Уменьшить значение"
|
|
13
|
+
},
|
|
4
14
|
Confirm: {
|
|
5
15
|
cancel: "отмена",
|
|
6
16
|
confirm: "ок"
|
package/lib/cjs/locale/sk-SK.js
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
|
|
2
2
|
//#region src/locale/sk-SK.ts
|
|
3
3
|
const locale = { design: {
|
|
4
|
+
Accessibility: {
|
|
5
|
+
closeBadge: "Zavrieť odznak",
|
|
6
|
+
imageGallery: "Galéria obrázkov",
|
|
7
|
+
image: "Obrázok {0} z {1}",
|
|
8
|
+
zoomIn: "Priblížiť",
|
|
9
|
+
zoomOut: "Oddialiť",
|
|
10
|
+
resetZoom: "Obnoviť priblíženie",
|
|
11
|
+
increment: "Zvýšiť",
|
|
12
|
+
decrement: "Znížiť"
|
|
13
|
+
},
|
|
4
14
|
Confirm: {
|
|
5
15
|
cancel: "zrušiť",
|
|
6
16
|
confirm: "ok"
|
package/lib/cjs/locale/vi-VN.js
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
|
|
2
2
|
//#region src/locale/vi-VN.ts
|
|
3
3
|
const locale = { design: {
|
|
4
|
+
Accessibility: {
|
|
5
|
+
closeBadge: "Đóng huy hiệu",
|
|
6
|
+
imageGallery: "Thư viện ảnh",
|
|
7
|
+
image: "Ảnh {0} trên {1}",
|
|
8
|
+
zoomIn: "Phóng to",
|
|
9
|
+
zoomOut: "Thu nhỏ",
|
|
10
|
+
resetZoom: "Đặt lại thu phóng",
|
|
11
|
+
increment: "Tăng",
|
|
12
|
+
decrement: "Giảm"
|
|
13
|
+
},
|
|
4
14
|
Confirm: {
|
|
5
15
|
cancel: "Hủy bỏ",
|
|
6
16
|
confirm: "Xác nhận"
|
package/lib/cjs/locale/zh-CN.js
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
|
|
2
2
|
//#region src/locale/zh-CN.ts
|
|
3
3
|
const locale = { design: {
|
|
4
|
+
Accessibility: {
|
|
5
|
+
closeBadge: "关闭徽章",
|
|
6
|
+
imageGallery: "图片库",
|
|
7
|
+
image: "第 {0} 张图片,共 {1} 张",
|
|
8
|
+
zoomIn: "放大",
|
|
9
|
+
zoomOut: "缩小",
|
|
10
|
+
resetZoom: "重置缩放",
|
|
11
|
+
increment: "增加",
|
|
12
|
+
decrement: "减少"
|
|
13
|
+
},
|
|
4
14
|
Confirm: {
|
|
5
15
|
cancel: "取消",
|
|
6
16
|
confirm: "确定"
|
package/lib/cjs/locale/zh-HK.js
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
|
|
2
2
|
//#region src/locale/zh-HK.ts
|
|
3
3
|
const locale = { design: {
|
|
4
|
+
Accessibility: {
|
|
5
|
+
closeBadge: "關閉徽章",
|
|
6
|
+
imageGallery: "圖片庫",
|
|
7
|
+
image: "第 {0} 張圖片,共 {1} 張",
|
|
8
|
+
zoomIn: "放大",
|
|
9
|
+
zoomOut: "縮小",
|
|
10
|
+
resetZoom: "重設縮放",
|
|
11
|
+
increment: "增加",
|
|
12
|
+
decrement: "減少"
|
|
13
|
+
},
|
|
4
14
|
Confirm: {
|
|
5
15
|
cancel: "取消",
|
|
6
16
|
confirm: "確定"
|
package/lib/cjs/locale/zh-TW.js
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
|
|
2
2
|
//#region src/locale/zh-TW.ts
|
|
3
3
|
const locale = { design: {
|
|
4
|
+
Accessibility: {
|
|
5
|
+
closeBadge: "關閉徽章",
|
|
6
|
+
imageGallery: "圖片庫",
|
|
7
|
+
image: "第 {0} 張圖片,共 {1} 張",
|
|
8
|
+
zoomIn: "放大",
|
|
9
|
+
zoomOut: "縮小",
|
|
10
|
+
resetZoom: "重設縮放",
|
|
11
|
+
increment: "增加",
|
|
12
|
+
decrement: "減少"
|
|
13
|
+
},
|
|
4
14
|
Confirm: {
|
|
5
15
|
cancel: "取消",
|
|
6
16
|
confirm: "確定"
|