ixia-ui-react 1.0.2 → 1.2.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/dist/index.d.mts +1 -1
- package/dist/index.mjs +16 -5
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +524 -548
- package/package.json +34 -34
package/dist/index.d.mts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { AlertDialog as AlertDialog$1, Button as Button$1, Checkbox as Checkbox$
|
|
|
8
8
|
import React, { Children, createContext, createElement, isValidElement, useContext, useEffect, useId, useRef, useState } from "react";
|
|
9
9
|
import { Autocomplete as Autocomplete$1 } from "@base-ui/react/autocomplete";
|
|
10
10
|
import { Avatar as Avatar$1 } from "@base-ui/react/avatar";
|
|
11
|
-
import { DayPicker, getDefaultClassNames, isDateRange } from "@daypicker/react";
|
|
11
|
+
import { DayPicker, getDefaultClassNames, isDateRange, labelDayButton } from "@daypicker/react";
|
|
12
12
|
import { Select as Select$1 } from "@base-ui/react/select";
|
|
13
13
|
import { Legend, ResponsiveContainer, Tooltip as Tooltip$1 } from "recharts";
|
|
14
14
|
import { Checkbox as Checkbox$2 } from "@base-ui/react/checkbox";
|
|
@@ -1817,6 +1817,10 @@ function getRangeSelected(selectedDates) {
|
|
|
1817
1817
|
function getSingleSelected(selectedDates) {
|
|
1818
1818
|
if (selectedDates instanceof Date) return selectedDates;
|
|
1819
1819
|
}
|
|
1820
|
+
function labelDayButtonWithVisibleText(...args) {
|
|
1821
|
+
const [date, modifiers, options, dateLib] = args;
|
|
1822
|
+
return `${dateLib?.format(date, "d") ?? String(date.getDate())}, ${labelDayButton(date, modifiers, options, dateLib)}`;
|
|
1823
|
+
}
|
|
1820
1824
|
const defaultClassNames = getDefaultClassNames();
|
|
1821
1825
|
const calendarClassNames = {
|
|
1822
1826
|
caption_label: "style-text-strong-0",
|
|
@@ -1849,6 +1853,7 @@ function CalendarPicker({ className, mode = "single", selected, onSelect, ...pro
|
|
|
1849
1853
|
className,
|
|
1850
1854
|
classNames: calendarClassNames,
|
|
1851
1855
|
components: calendarComponents,
|
|
1856
|
+
labels: { labelDayButton: labelDayButtonWithVisibleText },
|
|
1852
1857
|
...props
|
|
1853
1858
|
};
|
|
1854
1859
|
switch (mode) {
|
|
@@ -2327,6 +2332,7 @@ const COPY_STATUS_ICON = {
|
|
|
2327
2332
|
};
|
|
2328
2333
|
function CodeBlockCopy({ className, children, ref, ...props }) {
|
|
2329
2334
|
const { currentValue } = useCodeBlock(), [copied, setCopied] = React.useState(false), handleClick = async () => {
|
|
2335
|
+
if (typeof currentValue.content !== "string") return;
|
|
2330
2336
|
try {
|
|
2331
2337
|
await navigator.clipboard.writeText(currentValue.content);
|
|
2332
2338
|
setCopied(true);
|
|
@@ -2362,6 +2368,7 @@ const DOWNLOAD_STATUS_ICON = {
|
|
|
2362
2368
|
};
|
|
2363
2369
|
function CodeBlockDownload({ className, children, ref, ...props }) {
|
|
2364
2370
|
const { currentValue } = useCodeBlock(), [downloaded, setDownloaded] = React.useState(false), handleClick = async () => {
|
|
2371
|
+
if (typeof currentValue.content !== "string") return;
|
|
2365
2372
|
try {
|
|
2366
2373
|
const blob = new Blob([currentValue.content]), url = URL.createObjectURL(blob), link = document.createElement("a");
|
|
2367
2374
|
link.href = url;
|
|
@@ -2707,7 +2714,11 @@ function CodeBlockWindow({ className, children, ref, ...props }) {
|
|
|
2707
2714
|
className: cn("relative overflow-auto rounded-lg px-md py-sm", className),
|
|
2708
2715
|
ref,
|
|
2709
2716
|
...props,
|
|
2710
|
-
children: [
|
|
2717
|
+
children: [
|
|
2718
|
+
children,
|
|
2719
|
+
typeof currentValue.content === "string" && /* @__PURE__ */ jsx("div", { dangerouslySetInnerHTML: { __html: currentValue.content } }),
|
|
2720
|
+
typeof currentValue.content !== "string" && currentValue.content
|
|
2721
|
+
]
|
|
2711
2722
|
});
|
|
2712
2723
|
}
|
|
2713
2724
|
//#endregion
|
|
@@ -3248,7 +3259,7 @@ function InputGroupInput({ size = "medium", className, ref, ...props }) {
|
|
|
3248
3259
|
if (ref && typeof ref === "object") Object.assign(ref, { current: node });
|
|
3249
3260
|
};
|
|
3250
3261
|
return /* @__PURE__ */ jsxs("button", {
|
|
3251
|
-
"aria-label":
|
|
3262
|
+
"aria-label": `${colorValue}, open color picker`,
|
|
3252
3263
|
className: cn("relative flex size-full items-center justify-start hover:cursor-pointer", className),
|
|
3253
3264
|
disabled: props.disabled,
|
|
3254
3265
|
onClick: () => inputRef.current?.click(),
|
|
@@ -3267,7 +3278,7 @@ function InputGroupInput({ size = "medium", className, ref, ...props }) {
|
|
|
3267
3278
|
...colorProps
|
|
3268
3279
|
}),
|
|
3269
3280
|
/* @__PURE__ */ jsx("p", {
|
|
3270
|
-
className: cn("text-left", size === "small" && "pr-xs pl-lg style-text-default--1", size === "medium" && "pl-[calc(var(--
|
|
3281
|
+
className: cn("text-left", size === "small" && "pr-xs pl-lg style-text-default--1", size === "medium" && "pl-[calc(var(--ixia-spacing-lg)+6px)] style-text-default-0", size === "large" && "pl-2xl style-text-default-1"),
|
|
3271
3282
|
children: colorValue
|
|
3272
3283
|
})
|
|
3273
3284
|
]
|
|
@@ -5196,7 +5207,7 @@ function Input({ fileUploadButtonIcon = defaultFileUploadButtonIcon, fileUploadB
|
|
|
5196
5207
|
})]
|
|
5197
5208
|
});
|
|
5198
5209
|
return /* @__PURE__ */ jsxs("button", {
|
|
5199
|
-
"aria-label":
|
|
5210
|
+
"aria-label": `${colorValue}, open color picker`,
|
|
5200
5211
|
className: cn("relative flex hover:cursor-pointer", inputVariants({
|
|
5201
5212
|
size,
|
|
5202
5213
|
variant
|