@salilvnair/dui 1.0.6 → 1.0.7
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/assets/{DuiShowcase-DdIO2HHe.js → DuiShowcase-CSkP-vdJ.js} +3 -3
- package/dist/assets/{index-BcOB3b2I.js → index-DQdlwLhi.js} +2 -2
- package/dist/index.html +1 -1
- package/dist/index.js +30 -25
- package/dist/index.js.map +1 -1
- package/dist/lib/components/button/DropDownButtonView.d.ts +8 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1038,49 +1038,54 @@ function Oy({
|
|
|
1038
1038
|
items: a,
|
|
1039
1039
|
accentColor: s,
|
|
1040
1040
|
disabled: l = !1,
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1041
|
+
primaryDisabled: c = !1,
|
|
1042
|
+
onPrimaryClick: d,
|
|
1043
|
+
className: u = "",
|
|
1044
|
+
align: p = "auto"
|
|
1044
1045
|
}) {
|
|
1045
|
-
const [
|
|
1046
|
+
const [f, g] = z(!1), h = $(null), b = s || "var(--color-primary)", m = He(r === "default" ? void 0 : r), y = m.height, v = m.fontSize, w = m.paddingX, S = i ? m.borderRadius : "0px", _ = l || c, k = n === "primary", I = n === "danger", E = k ? "var(--color-btn-primary-text, #fff)" : I ? "var(--color-btn-danger-text, #fff)" : "var(--color-text-primary)", N = k ? b : I ? "var(--color-error)" : n === "ghost" ? "transparent" : "var(--color-surface-hover)", C = k || I || n === "ghost" ? "1px solid transparent" : "1px solid var(--color-surface-border)", T = k || I ? "rgba(0,0,0,0.12)" : "var(--color-surface-active)";
|
|
1046
1047
|
return /* @__PURE__ */ x(Se, { children: [
|
|
1047
1048
|
/* @__PURE__ */ x(
|
|
1048
1049
|
"div",
|
|
1049
1050
|
{
|
|
1050
|
-
ref:
|
|
1051
|
-
className: `inline-flex items-center ${
|
|
1051
|
+
ref: h,
|
|
1052
|
+
className: `inline-flex items-center ${u}`,
|
|
1052
1053
|
style: {
|
|
1053
|
-
height:
|
|
1054
|
-
borderRadius:
|
|
1054
|
+
height: y,
|
|
1055
|
+
borderRadius: S,
|
|
1055
1056
|
overflow: "hidden",
|
|
1056
1057
|
opacity: l ? 0.5 : 1,
|
|
1057
|
-
background:
|
|
1058
|
-
border:
|
|
1059
|
-
color:
|
|
1058
|
+
background: N,
|
|
1059
|
+
border: C,
|
|
1060
|
+
color: E,
|
|
1060
1061
|
padding: 0,
|
|
1061
1062
|
transition: "background 120ms",
|
|
1062
|
-
"--dui-hover-btn-bg":
|
|
1063
|
+
"--dui-hover-btn-bg": T
|
|
1063
1064
|
},
|
|
1064
1065
|
children: [
|
|
1065
1066
|
/* @__PURE__ */ x(
|
|
1066
1067
|
"button",
|
|
1067
1068
|
{
|
|
1068
1069
|
type: "button",
|
|
1069
|
-
disabled:
|
|
1070
|
-
onClick:
|
|
1070
|
+
disabled: _,
|
|
1071
|
+
onClick: d,
|
|
1071
1072
|
className: "dui_dropdown-button__label",
|
|
1072
1073
|
style: {
|
|
1073
1074
|
height: "100%",
|
|
1074
|
-
paddingLeft:
|
|
1075
|
+
paddingLeft: w,
|
|
1075
1076
|
paddingRight: "8px",
|
|
1076
1077
|
display: "flex",
|
|
1077
1078
|
alignItems: "center",
|
|
1078
|
-
gap:
|
|
1079
|
-
fontSize:
|
|
1079
|
+
gap: m.gap,
|
|
1080
|
+
fontSize: v,
|
|
1080
1081
|
fontWeight: 500,
|
|
1081
1082
|
border: "none",
|
|
1082
1083
|
color: "inherit",
|
|
1083
|
-
|
|
1084
|
+
// The wrapper already dims when the whole control is disabled — dim just this
|
|
1085
|
+
// half when it's the only part that's off, so the chevron still reads as live.
|
|
1086
|
+
opacity: c && !l ? 0.5 : 1,
|
|
1087
|
+
transition: "opacity 120ms",
|
|
1088
|
+
cursor: _ ? "default" : "pointer",
|
|
1084
1089
|
fontFamily: "inherit"
|
|
1085
1090
|
},
|
|
1086
1091
|
children: [
|
|
@@ -1092,14 +1097,14 @@ function Oy({
|
|
|
1092
1097
|
/* @__PURE__ */ o("div", { style: {
|
|
1093
1098
|
width: "1px",
|
|
1094
1099
|
height: "60%",
|
|
1095
|
-
background:
|
|
1100
|
+
background: k || I ? "rgba(255,255,255,.25)" : "var(--color-surface-border)"
|
|
1096
1101
|
} }),
|
|
1097
1102
|
/* @__PURE__ */ o(
|
|
1098
1103
|
"button",
|
|
1099
1104
|
{
|
|
1100
1105
|
type: "button",
|
|
1101
1106
|
disabled: l,
|
|
1102
|
-
onClick: () => !l &&
|
|
1107
|
+
onClick: () => !l && g((W) => !W),
|
|
1103
1108
|
className: "dui_dropdown-button__chevron",
|
|
1104
1109
|
style: {
|
|
1105
1110
|
height: "100%",
|
|
@@ -1111,7 +1116,7 @@ function Oy({
|
|
|
1111
1116
|
color: "inherit",
|
|
1112
1117
|
cursor: l ? "default" : "pointer"
|
|
1113
1118
|
},
|
|
1114
|
-
children: /* @__PURE__ */ o(qe, { size: 10, style: { transition: "transform 140ms", transform:
|
|
1119
|
+
children: /* @__PURE__ */ o(qe, { size: 10, style: { transition: "transform 140ms", transform: f ? "rotate(180deg)" : "rotate(0deg)" } })
|
|
1115
1120
|
}
|
|
1116
1121
|
)
|
|
1117
1122
|
]
|
|
@@ -1121,13 +1126,13 @@ function Oy({
|
|
|
1121
1126
|
Fi,
|
|
1122
1127
|
{
|
|
1123
1128
|
items: a,
|
|
1124
|
-
anchorEl:
|
|
1125
|
-
open:
|
|
1126
|
-
onClose: () =>
|
|
1129
|
+
anchorEl: h.current,
|
|
1130
|
+
open: f,
|
|
1131
|
+
onClose: () => g(!1),
|
|
1127
1132
|
rounded: i,
|
|
1128
1133
|
matchAnchorWidth: !1,
|
|
1129
1134
|
width: "md",
|
|
1130
|
-
align:
|
|
1135
|
+
align: p
|
|
1131
1136
|
}
|
|
1132
1137
|
)
|
|
1133
1138
|
] });
|