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