@sia.soul/sia-react-ui 0.1.77 → 0.1.79
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/chart.js +2 -3
- package/dist/{chunk-Q4FDV6KP.js → chunk-BDS42FR3.js} +2 -4
- package/dist/{chunk-JNZXYBGM.js → chunk-GODBVCIQ.js} +2 -2
- package/dist/chunk-JZWTTSOZ.js +131 -0
- package/dist/{chunk-TKCXP6RZ.js → chunk-WXERMWTW.js} +113 -436
- package/dist/{chunk-YMOOL62S.js → chunk-XHLIIDD2.js} +407 -21
- package/dist/{chunk-K5OU5NOT.js → chunk-Y4Y2NVBM.js} +2 -2
- package/dist/{chunk-QDZXP2UO.js → chunk-ZNJK3IKA.js} +10 -12
- package/dist/{core-Bx07vzrr.d.cts → core-DT3yw5kl.d.cts} +9 -2
- package/dist/{core-CBLT4Vfl.d.ts → core-TQOjO7wf.d.ts} +9 -2
- package/dist/core.cjs +337 -276
- package/dist/core.css +19 -0
- package/dist/core.d.cts +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +5 -6
- package/dist/index.cjs +1007 -944
- package/dist/index.css +19 -0
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +13 -15
- package/dist/rich-text-editor.cjs +522 -74
- package/dist/rich-text-editor.js +3 -3
- package/dist/select-date-range.cjs +305 -178
- package/dist/select-date-range.js +4 -4
- package/package.json +1 -1
- package/dist/chunk-IKAMZNCK.js +0 -65
- package/dist/chunk-SMCYEPBL.js +0 -73
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SelectDateRange
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-Y4Y2NVBM.js";
|
|
4
|
+
import "./chunk-WXERMWTW.js";
|
|
5
|
+
import "./chunk-XHLIIDD2.js";
|
|
6
|
+
import "./chunk-JZWTTSOZ.js";
|
|
7
7
|
import "./chunk-H7IAG72O.js";
|
|
8
8
|
export {
|
|
9
9
|
SelectDateRange
|
package/package.json
CHANGED
package/dist/chunk-IKAMZNCK.js
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useControlSize,
|
|
3
|
-
withTitleTooltip
|
|
4
|
-
} from "./chunk-H7IAG72O.js";
|
|
5
|
-
|
|
6
|
-
// src/components/Button.tsx
|
|
7
|
-
import { forwardRef, useRef } from "react";
|
|
8
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
var Button = forwardRef(function Button2({
|
|
10
|
-
variant = "default",
|
|
11
|
-
size: sizeProp,
|
|
12
|
-
loading = false,
|
|
13
|
-
block = false,
|
|
14
|
-
danger = false,
|
|
15
|
-
icon,
|
|
16
|
-
iconPosition = "start",
|
|
17
|
-
className = "",
|
|
18
|
-
children,
|
|
19
|
-
disabled,
|
|
20
|
-
onClick,
|
|
21
|
-
style,
|
|
22
|
-
...props
|
|
23
|
-
}, forwardedRef) {
|
|
24
|
-
const size = useControlSize(sizeProp);
|
|
25
|
-
const localRef = useRef(null);
|
|
26
|
-
function setRef(node) {
|
|
27
|
-
localRef.current = node;
|
|
28
|
-
if (typeof forwardedRef === "function") forwardedRef(node);
|
|
29
|
-
else if (forwardedRef) forwardedRef.current = node;
|
|
30
|
-
}
|
|
31
|
-
function handleClick(event) {
|
|
32
|
-
const button = localRef.current;
|
|
33
|
-
if (button && variant === "primary") {
|
|
34
|
-
const rect = button.getBoundingClientRect();
|
|
35
|
-
button.style.setProperty("--sia-wave-x", `${event.clientX - rect.left}px`);
|
|
36
|
-
button.style.setProperty("--sia-wave-y", `${event.clientY - rect.top}px`);
|
|
37
|
-
button.dataset.wave = "active";
|
|
38
|
-
window.setTimeout(() => delete button.dataset.wave, 360);
|
|
39
|
-
}
|
|
40
|
-
onClick?.(event);
|
|
41
|
-
}
|
|
42
|
-
const mergedStyle = block ? { ...style, width: "100%" } : style ?? {};
|
|
43
|
-
return /* @__PURE__ */ jsxs(
|
|
44
|
-
"button",
|
|
45
|
-
{
|
|
46
|
-
ref: setRef,
|
|
47
|
-
type: "button",
|
|
48
|
-
className: `sia-button sia-button--${variant} sia-button--${size}${danger ? " sia-button--danger" : ""} ${className}`.trim(),
|
|
49
|
-
"aria-busy": loading || void 0,
|
|
50
|
-
disabled: disabled || loading,
|
|
51
|
-
onClick: handleClick,
|
|
52
|
-
style: mergedStyle,
|
|
53
|
-
...withTitleTooltip(props),
|
|
54
|
-
children: [
|
|
55
|
-
loading ? /* @__PURE__ */ jsx("span", { className: "sia-button__spinner", "aria-hidden": "true" }) : icon && iconPosition === "start" ? /* @__PURE__ */ jsx("span", { className: "sia-button__icon", children: icon }) : null,
|
|
56
|
-
children !== void 0 && children !== null ? /* @__PURE__ */ jsx("span", { children }) : null,
|
|
57
|
-
!loading && icon && iconPosition === "end" ? /* @__PURE__ */ jsx("span", { className: "sia-button__icon", children: icon }) : null
|
|
58
|
-
]
|
|
59
|
-
}
|
|
60
|
-
);
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
export {
|
|
64
|
-
Button
|
|
65
|
-
};
|
package/dist/chunk-SMCYEPBL.js
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useControlSize,
|
|
3
|
-
useFloatingPlaceholder,
|
|
4
|
-
withTitleTooltip
|
|
5
|
-
} from "./chunk-H7IAG72O.js";
|
|
6
|
-
|
|
7
|
-
// src/components/TextArea.tsx
|
|
8
|
-
import { forwardRef, useId, useState } from "react";
|
|
9
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
-
var TextArea = forwardRef(function TextArea2({
|
|
11
|
-
label,
|
|
12
|
-
hint,
|
|
13
|
-
status = "default",
|
|
14
|
-
size: sizeProp,
|
|
15
|
-
showCount = false,
|
|
16
|
-
placeholder,
|
|
17
|
-
placeholderMode,
|
|
18
|
-
className = "",
|
|
19
|
-
id,
|
|
20
|
-
disabled,
|
|
21
|
-
value,
|
|
22
|
-
defaultValue,
|
|
23
|
-
maxLength,
|
|
24
|
-
onChange,
|
|
25
|
-
...props
|
|
26
|
-
}, ref) {
|
|
27
|
-
const size = useControlSize(sizeProp);
|
|
28
|
-
const fallbackId = useId();
|
|
29
|
-
const textAreaId = id ?? fallbackId;
|
|
30
|
-
const [uncontrolledValue, setUncontrolledValue] = useState(() => defaultValue === void 0 ? "" : String(defaultValue));
|
|
31
|
-
const currentText = value !== void 0 ? String(value) : uncontrolledValue;
|
|
32
|
-
const floating = useFloatingPlaceholder({ mode: placeholderMode, placeholder, filled: currentText.length > 0 });
|
|
33
|
-
const hintId = `${textAreaId}-hint`;
|
|
34
|
-
const describedBy = [props["aria-describedby"], hint ? hintId : null].filter(Boolean).join(" ") || void 0;
|
|
35
|
-
function handleChange(event) {
|
|
36
|
-
setUncontrolledValue(event.target.value);
|
|
37
|
-
onChange?.(event);
|
|
38
|
-
}
|
|
39
|
-
const control = /* @__PURE__ */ jsxs("span", { className: `sia-textarea-control sia-textarea-control--${size} sia-textarea-control--${status}${floating.className}${disabled ? " is-disabled" : ""}`, children: [
|
|
40
|
-
/* @__PURE__ */ jsx(
|
|
41
|
-
"textarea",
|
|
42
|
-
{
|
|
43
|
-
...withTitleTooltip(props),
|
|
44
|
-
ref,
|
|
45
|
-
id: textAreaId,
|
|
46
|
-
className: "sia-textarea",
|
|
47
|
-
disabled,
|
|
48
|
-
value,
|
|
49
|
-
defaultValue,
|
|
50
|
-
maxLength,
|
|
51
|
-
placeholder,
|
|
52
|
-
"aria-describedby": describedBy,
|
|
53
|
-
"aria-invalid": status === "error" || void 0,
|
|
54
|
-
onChange: handleChange
|
|
55
|
-
}
|
|
56
|
-
),
|
|
57
|
-
floating.label,
|
|
58
|
-
showCount ? /* @__PURE__ */ jsxs("span", { className: `sia-textarea-control__count${maxLength !== void 0 && currentText.length >= maxLength ? " is-limit" : ""}`, "aria-live": "polite", children: [
|
|
59
|
-
currentText.length,
|
|
60
|
-
maxLength !== void 0 ? `/${maxLength}` : null
|
|
61
|
-
] }) : null
|
|
62
|
-
] });
|
|
63
|
-
if (!label && !hint) return /* @__PURE__ */ jsx("span", { className: `sia-field ${className}`.trim(), children: control });
|
|
64
|
-
return /* @__PURE__ */ jsxs("span", { className: `sia-field ${className}`.trim(), children: [
|
|
65
|
-
label ? /* @__PURE__ */ jsx("label", { className: "sia-field__label", htmlFor: textAreaId, children: label }) : null,
|
|
66
|
-
control,
|
|
67
|
-
hint ? /* @__PURE__ */ jsx("span", { id: hintId, className: `sia-field__hint sia-field__hint--${status}`, children: hint }) : null
|
|
68
|
-
] });
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
export {
|
|
72
|
-
TextArea
|
|
73
|
-
};
|