@kjun-ui/native 0.15.0 → 0.16.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.cjs +30 -18
- package/dist/index.js +30 -18
- package/dist/index.web.cjs +30 -18
- package/dist/index.web.js +30 -18
- package/dist/styles.css +25 -2
- package/dist/types/packages/native/src/list.d.cts +4 -1
- package/dist/types/packages/native/src/list.d.ts +4 -1
- package/dist/types/packages/native/src/popover.d.cts +6 -1
- package/dist/types/packages/native/src/popover.d.ts +6 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -4070,7 +4070,7 @@ function KjunFilterGroup({
|
|
|
4070
4070
|
paddingHorizontal: { xs: import_tokens24.tokens.dimension.value8, sm: import_tokens24.tokens.dimension.value12, md: import_tokens24.tokens.dimension.value12, lg: import_tokens24.tokens.dimension.value14, xl: import_tokens24.tokens.dimension.value16 }[size],
|
|
4071
4071
|
// Corners follow the button scale with the height, so every size keeps the same shape.
|
|
4072
4072
|
borderRadius: import_tokens24.tokens.button.radii[size],
|
|
4073
|
-
backgroundColor: active ? colors.
|
|
4073
|
+
backgroundColor: active ? colors.filterSelectedBg : colors.secondary
|
|
4074
4074
|
},
|
|
4075
4075
|
children: [
|
|
4076
4076
|
option.dot && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
@@ -4089,7 +4089,7 @@ function KjunFilterGroup({
|
|
|
4089
4089
|
{
|
|
4090
4090
|
name: option.icon,
|
|
4091
4091
|
size: import_tokens24.tokens.extensions.selection.iconSize,
|
|
4092
|
-
color: active ? colors.
|
|
4092
|
+
color: active ? colors.filterSelectedText : colors.textSecondary
|
|
4093
4093
|
}
|
|
4094
4094
|
),
|
|
4095
4095
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react_native25.View, { children: [
|
|
@@ -4112,7 +4112,7 @@ function KjunFilterGroup({
|
|
|
4112
4112
|
right: 0,
|
|
4113
4113
|
top: 0,
|
|
4114
4114
|
...selectionTypeStyle(size, active),
|
|
4115
|
-
color: active ? colors.
|
|
4115
|
+
color: active ? colors.filterSelectedText : colors.textSecondary
|
|
4116
4116
|
},
|
|
4117
4117
|
children: option.label
|
|
4118
4118
|
}
|
|
@@ -4769,7 +4769,10 @@ function KjunPopover({
|
|
|
4769
4769
|
] });
|
|
4770
4770
|
}
|
|
4771
4771
|
function KjunTooltip({
|
|
4772
|
-
content:
|
|
4772
|
+
content: body = "",
|
|
4773
|
+
title,
|
|
4774
|
+
align,
|
|
4775
|
+
width,
|
|
4773
4776
|
placement = "top",
|
|
4774
4777
|
delay = 0,
|
|
4775
4778
|
children,
|
|
@@ -4778,6 +4781,7 @@ function KjunTooltip({
|
|
|
4778
4781
|
open: controlled,
|
|
4779
4782
|
onOpenChange
|
|
4780
4783
|
}) {
|
|
4784
|
+
const message = [title, body].filter(Boolean).join(", ");
|
|
4781
4785
|
const { colors } = useKjunStyles(), [internal, setInternal] = (0, import_react38.useState)(false), open = controlled != null ? controlled : internal, latest = (0, import_react38.useRef)({ open, onOpenChange }), setOpen = (value) => {
|
|
4782
4786
|
var _a, _b;
|
|
4783
4787
|
if (latest.current.open === value) return;
|
|
@@ -4863,25 +4867,29 @@ function KjunTooltip({
|
|
|
4863
4867
|
triggerRef: ref,
|
|
4864
4868
|
placement,
|
|
4865
4869
|
ariaLabel: message,
|
|
4866
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime27.
|
|
4870
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
4867
4871
|
import_react_native31.View,
|
|
4868
4872
|
{
|
|
4869
4873
|
style: {
|
|
4870
4874
|
paddingVertical: import_tokens28.tokens.extensions.tooltip.paddingY,
|
|
4871
4875
|
paddingHorizontal: import_tokens28.tokens.extensions.tooltip.paddingX,
|
|
4872
|
-
maxWidth: import_tokens28.tokens.extensions.tooltip.maxWidth,
|
|
4876
|
+
maxWidth: width ? import_tokens28.tokens.extensions.tooltip.maxWidths[width] : import_tokens28.tokens.extensions.tooltip.maxWidth,
|
|
4873
4877
|
backgroundColor: colors.chartTooltipBg
|
|
4874
4878
|
},
|
|
4875
|
-
children:
|
|
4876
|
-
KText,
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4879
|
+
children: [
|
|
4880
|
+
!!title && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(KText, { style: { ...typeStyle("controlSmall"), color: colors.chartTooltipText, ...align ? { textAlign: align === "center" ? "center" : "left" } : {} }, children: title }),
|
|
4881
|
+
!!body && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4882
|
+
KText,
|
|
4883
|
+
{
|
|
4884
|
+
style: {
|
|
4885
|
+
...typeStyle("caption"),
|
|
4886
|
+
color: colors.chartTooltipText,
|
|
4887
|
+
...align ? { textAlign: align === "center" ? "center" : "left" } : {}
|
|
4888
|
+
},
|
|
4889
|
+
children: body
|
|
4890
|
+
}
|
|
4891
|
+
)
|
|
4892
|
+
]
|
|
4885
4893
|
}
|
|
4886
4894
|
)
|
|
4887
4895
|
}
|
|
@@ -9923,9 +9931,13 @@ function KjunListRow({ title, description, leading, trailing, actions, href, dis
|
|
|
9923
9931
|
hasContent(actions) && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react_native59.View, { pointerEvents: disabled ? "none" : "auto", ...disabled && import_react_native59.Platform.OS === "web" ? { inert: true } : {}, style: { maxWidth: "45%", flexDirection: "row", flexWrap: "wrap", gap: import_tokens59.tokens.extensions.list.actionsGap, paddingRight: import_tokens59.tokens.extensions.list.actionsPadding, opacity: disabled ? import_tokens59.tokens.states.opacity.disabled : 1 }, children: content(actions) })
|
|
9924
9932
|
] });
|
|
9925
9933
|
}
|
|
9926
|
-
function KjunListSection({ title, description, actions, children, ariaLabel, surface = true, divider = true, density = "default" }) {
|
|
9934
|
+
function KjunListSection({ title, description, actions, children, ariaLabel, surface = true, divider = true, density = "default", radius = "none" }) {
|
|
9927
9935
|
const { colors } = useKjunStyles();
|
|
9928
|
-
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_react_native59.View, { style: {
|
|
9936
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_react_native59.View, { style: {
|
|
9937
|
+
minWidth: 0,
|
|
9938
|
+
backgroundColor: surface ? colors.surface : "transparent",
|
|
9939
|
+
...radius === "none" ? {} : { borderRadius: import_tokens59.tokens.card.radii[radius], overflow: "hidden" }
|
|
9940
|
+
}, children: [
|
|
9929
9941
|
!!(title || description || actions) && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_react_native59.View, { style: { flexDirection: "row", alignItems: "center", gap: import_tokens59.tokens.extensions.list.gap, padding: import_tokens59.tokens.extensions.list.padding }, children: [
|
|
9930
9942
|
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_react_native59.View, { style: { flex: 1 }, children: [
|
|
9931
9943
|
!!title && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(KText, { accessibilityRole: "header", style: { ...typeStyle("cardTitle") }, children: title }),
|
package/dist/index.js
CHANGED
|
@@ -4034,7 +4034,7 @@ function KjunFilterGroup({
|
|
|
4034
4034
|
paddingHorizontal: { xs: tokens21.dimension.value8, sm: tokens21.dimension.value12, md: tokens21.dimension.value12, lg: tokens21.dimension.value14, xl: tokens21.dimension.value16 }[size],
|
|
4035
4035
|
// Corners follow the button scale with the height, so every size keeps the same shape.
|
|
4036
4036
|
borderRadius: tokens21.button.radii[size],
|
|
4037
|
-
backgroundColor: active ? colors.
|
|
4037
|
+
backgroundColor: active ? colors.filterSelectedBg : colors.secondary
|
|
4038
4038
|
},
|
|
4039
4039
|
children: [
|
|
4040
4040
|
option.dot && /* @__PURE__ */ jsx23(
|
|
@@ -4053,7 +4053,7 @@ function KjunFilterGroup({
|
|
|
4053
4053
|
{
|
|
4054
4054
|
name: option.icon,
|
|
4055
4055
|
size: tokens21.extensions.selection.iconSize,
|
|
4056
|
-
color: active ? colors.
|
|
4056
|
+
color: active ? colors.filterSelectedText : colors.textSecondary
|
|
4057
4057
|
}
|
|
4058
4058
|
),
|
|
4059
4059
|
/* @__PURE__ */ jsxs12(View17, { children: [
|
|
@@ -4076,7 +4076,7 @@ function KjunFilterGroup({
|
|
|
4076
4076
|
right: 0,
|
|
4077
4077
|
top: 0,
|
|
4078
4078
|
...selectionTypeStyle(size, active),
|
|
4079
|
-
color: active ? colors.
|
|
4079
|
+
color: active ? colors.filterSelectedText : colors.textSecondary
|
|
4080
4080
|
},
|
|
4081
4081
|
children: option.label
|
|
4082
4082
|
}
|
|
@@ -4777,7 +4777,10 @@ function KjunPopover({
|
|
|
4777
4777
|
] });
|
|
4778
4778
|
}
|
|
4779
4779
|
function KjunTooltip({
|
|
4780
|
-
content:
|
|
4780
|
+
content: body = "",
|
|
4781
|
+
title,
|
|
4782
|
+
align,
|
|
4783
|
+
width,
|
|
4781
4784
|
placement = "top",
|
|
4782
4785
|
delay = 0,
|
|
4783
4786
|
children,
|
|
@@ -4786,6 +4789,7 @@ function KjunTooltip({
|
|
|
4786
4789
|
open: controlled,
|
|
4787
4790
|
onOpenChange
|
|
4788
4791
|
}) {
|
|
4792
|
+
const message = [title, body].filter(Boolean).join(", ");
|
|
4789
4793
|
const { colors } = useKjunStyles(), [internal, setInternal] = useState17(false), open = controlled != null ? controlled : internal, latest = useRef19({ open, onOpenChange }), setOpen = (value) => {
|
|
4790
4794
|
var _a, _b;
|
|
4791
4795
|
if (latest.current.open === value) return;
|
|
@@ -4871,25 +4875,29 @@ function KjunTooltip({
|
|
|
4871
4875
|
triggerRef: ref,
|
|
4872
4876
|
placement,
|
|
4873
4877
|
ariaLabel: message,
|
|
4874
|
-
children: /* @__PURE__ */
|
|
4878
|
+
children: /* @__PURE__ */ jsxs15(
|
|
4875
4879
|
View20,
|
|
4876
4880
|
{
|
|
4877
4881
|
style: {
|
|
4878
4882
|
paddingVertical: tokens25.extensions.tooltip.paddingY,
|
|
4879
4883
|
paddingHorizontal: tokens25.extensions.tooltip.paddingX,
|
|
4880
|
-
maxWidth: tokens25.extensions.tooltip.maxWidth,
|
|
4884
|
+
maxWidth: width ? tokens25.extensions.tooltip.maxWidths[width] : tokens25.extensions.tooltip.maxWidth,
|
|
4881
4885
|
backgroundColor: colors.chartTooltipBg
|
|
4882
4886
|
},
|
|
4883
|
-
children:
|
|
4884
|
-
KText,
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4887
|
+
children: [
|
|
4888
|
+
!!title && /* @__PURE__ */ jsx27(KText, { style: { ...typeStyle("controlSmall"), color: colors.chartTooltipText, ...align ? { textAlign: align === "center" ? "center" : "left" } : {} }, children: title }),
|
|
4889
|
+
!!body && /* @__PURE__ */ jsx27(
|
|
4890
|
+
KText,
|
|
4891
|
+
{
|
|
4892
|
+
style: {
|
|
4893
|
+
...typeStyle("caption"),
|
|
4894
|
+
color: colors.chartTooltipText,
|
|
4895
|
+
...align ? { textAlign: align === "center" ? "center" : "left" } : {}
|
|
4896
|
+
},
|
|
4897
|
+
children: body
|
|
4898
|
+
}
|
|
4899
|
+
)
|
|
4900
|
+
]
|
|
4893
4901
|
}
|
|
4894
4902
|
)
|
|
4895
4903
|
}
|
|
@@ -9966,9 +9974,13 @@ function KjunListRow({ title, description, leading, trailing, actions, href, dis
|
|
|
9966
9974
|
hasContent(actions) && /* @__PURE__ */ jsx56(View48, { pointerEvents: disabled ? "none" : "auto", ...disabled && Platform26.OS === "web" ? { inert: true } : {}, style: { maxWidth: "45%", flexDirection: "row", flexWrap: "wrap", gap: tokens55.extensions.list.actionsGap, paddingRight: tokens55.extensions.list.actionsPadding, opacity: disabled ? tokens55.states.opacity.disabled : 1 }, children: content(actions) })
|
|
9967
9975
|
] });
|
|
9968
9976
|
}
|
|
9969
|
-
function KjunListSection({ title, description, actions, children, ariaLabel, surface = true, divider = true, density = "default" }) {
|
|
9977
|
+
function KjunListSection({ title, description, actions, children, ariaLabel, surface = true, divider = true, density = "default", radius = "none" }) {
|
|
9970
9978
|
const { colors } = useKjunStyles();
|
|
9971
|
-
return /* @__PURE__ */ jsxs41(View48, { style: {
|
|
9979
|
+
return /* @__PURE__ */ jsxs41(View48, { style: {
|
|
9980
|
+
minWidth: 0,
|
|
9981
|
+
backgroundColor: surface ? colors.surface : "transparent",
|
|
9982
|
+
...radius === "none" ? {} : { borderRadius: tokens55.card.radii[radius], overflow: "hidden" }
|
|
9983
|
+
}, children: [
|
|
9972
9984
|
!!(title || description || actions) && /* @__PURE__ */ jsxs41(View48, { style: { flexDirection: "row", alignItems: "center", gap: tokens55.extensions.list.gap, padding: tokens55.extensions.list.padding }, children: [
|
|
9973
9985
|
/* @__PURE__ */ jsxs41(View48, { style: { flex: 1 }, children: [
|
|
9974
9986
|
!!title && /* @__PURE__ */ jsx56(KText, { accessibilityRole: "header", style: { ...typeStyle("cardTitle") }, children: title }),
|
package/dist/index.web.cjs
CHANGED
|
@@ -4232,7 +4232,7 @@ function KjunFilterGroup({
|
|
|
4232
4232
|
paddingHorizontal: { xs: import_tokens25.tokens.dimension.value8, sm: import_tokens25.tokens.dimension.value12, md: import_tokens25.tokens.dimension.value12, lg: import_tokens25.tokens.dimension.value14, xl: import_tokens25.tokens.dimension.value16 }[size],
|
|
4233
4233
|
// Corners follow the button scale with the height, so every size keeps the same shape.
|
|
4234
4234
|
borderRadius: import_tokens25.tokens.button.radii[size],
|
|
4235
|
-
backgroundColor: active ? colors.
|
|
4235
|
+
backgroundColor: active ? colors.filterSelectedBg : colors.secondary
|
|
4236
4236
|
},
|
|
4237
4237
|
children: [
|
|
4238
4238
|
option.dot && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
@@ -4251,7 +4251,7 @@ function KjunFilterGroup({
|
|
|
4251
4251
|
{
|
|
4252
4252
|
name: option.icon,
|
|
4253
4253
|
size: import_tokens25.tokens.extensions.selection.iconSize,
|
|
4254
|
-
color: active ? colors.
|
|
4254
|
+
color: active ? colors.filterSelectedText : colors.textSecondary
|
|
4255
4255
|
}
|
|
4256
4256
|
),
|
|
4257
4257
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react_native25.View, { children: [
|
|
@@ -4274,7 +4274,7 @@ function KjunFilterGroup({
|
|
|
4274
4274
|
right: 0,
|
|
4275
4275
|
top: 0,
|
|
4276
4276
|
...selectionTypeStyle(size, active),
|
|
4277
|
-
color: active ? colors.
|
|
4277
|
+
color: active ? colors.filterSelectedText : colors.textSecondary
|
|
4278
4278
|
},
|
|
4279
4279
|
children: option.label
|
|
4280
4280
|
}
|
|
@@ -4931,7 +4931,10 @@ function KjunPopover({
|
|
|
4931
4931
|
] });
|
|
4932
4932
|
}
|
|
4933
4933
|
function KjunTooltip({
|
|
4934
|
-
content:
|
|
4934
|
+
content: body = "",
|
|
4935
|
+
title,
|
|
4936
|
+
align,
|
|
4937
|
+
width,
|
|
4935
4938
|
placement = "top",
|
|
4936
4939
|
delay = 0,
|
|
4937
4940
|
children,
|
|
@@ -4940,6 +4943,7 @@ function KjunTooltip({
|
|
|
4940
4943
|
open: controlled,
|
|
4941
4944
|
onOpenChange
|
|
4942
4945
|
}) {
|
|
4946
|
+
const message = [title, body].filter(Boolean).join(", ");
|
|
4943
4947
|
const { colors } = useKjunStyles(), [internal, setInternal] = (0, import_react41.useState)(false), open = controlled != null ? controlled : internal, latest = (0, import_react41.useRef)({ open, onOpenChange }), setOpen = (value) => {
|
|
4944
4948
|
var _a, _b;
|
|
4945
4949
|
if (latest.current.open === value) return;
|
|
@@ -5025,25 +5029,29 @@ function KjunTooltip({
|
|
|
5025
5029
|
triggerRef: ref,
|
|
5026
5030
|
placement,
|
|
5027
5031
|
ariaLabel: message,
|
|
5028
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime27.
|
|
5032
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
5029
5033
|
import_react_native31.View,
|
|
5030
5034
|
{
|
|
5031
5035
|
style: {
|
|
5032
5036
|
paddingVertical: import_tokens29.tokens.extensions.tooltip.paddingY,
|
|
5033
5037
|
paddingHorizontal: import_tokens29.tokens.extensions.tooltip.paddingX,
|
|
5034
|
-
maxWidth: import_tokens29.tokens.extensions.tooltip.maxWidth,
|
|
5038
|
+
maxWidth: width ? import_tokens29.tokens.extensions.tooltip.maxWidths[width] : import_tokens29.tokens.extensions.tooltip.maxWidth,
|
|
5035
5039
|
backgroundColor: colors.chartTooltipBg
|
|
5036
5040
|
},
|
|
5037
|
-
children:
|
|
5038
|
-
KText,
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
|
|
5041
|
+
children: [
|
|
5042
|
+
!!title && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(KText, { style: { ...typeStyle("controlSmall"), color: colors.chartTooltipText, ...align ? { textAlign: align === "center" ? "center" : "left" } : {} }, children: title }),
|
|
5043
|
+
!!body && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
5044
|
+
KText,
|
|
5045
|
+
{
|
|
5046
|
+
style: {
|
|
5047
|
+
...typeStyle("caption"),
|
|
5048
|
+
color: colors.chartTooltipText,
|
|
5049
|
+
...align ? { textAlign: align === "center" ? "center" : "left" } : {}
|
|
5050
|
+
},
|
|
5051
|
+
children: body
|
|
5052
|
+
}
|
|
5053
|
+
)
|
|
5054
|
+
]
|
|
5047
5055
|
}
|
|
5048
5056
|
)
|
|
5049
5057
|
}
|
|
@@ -10178,9 +10186,13 @@ function KjunListRow({ title, description, leading, trailing, actions, href, dis
|
|
|
10178
10186
|
hasContent(actions) && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react_native59.View, { pointerEvents: disabled ? "none" : "auto", ...disabled && import_react_native59.Platform.OS === "web" ? { inert: true } : {}, style: { maxWidth: "45%", flexDirection: "row", flexWrap: "wrap", gap: import_tokens60.tokens.extensions.list.actionsGap, paddingRight: import_tokens60.tokens.extensions.list.actionsPadding, opacity: disabled ? import_tokens60.tokens.states.opacity.disabled : 1 }, children: content(actions) })
|
|
10179
10187
|
] });
|
|
10180
10188
|
}
|
|
10181
|
-
function KjunListSection({ title, description, actions, children, ariaLabel, surface = true, divider = true, density = "default" }) {
|
|
10189
|
+
function KjunListSection({ title, description, actions, children, ariaLabel, surface = true, divider = true, density = "default", radius = "none" }) {
|
|
10182
10190
|
const { colors } = useKjunStyles();
|
|
10183
|
-
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_react_native59.View, { style: {
|
|
10191
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_react_native59.View, { style: {
|
|
10192
|
+
minWidth: 0,
|
|
10193
|
+
backgroundColor: surface ? colors.surface : "transparent",
|
|
10194
|
+
...radius === "none" ? {} : { borderRadius: import_tokens60.tokens.card.radii[radius], overflow: "hidden" }
|
|
10195
|
+
}, children: [
|
|
10184
10196
|
!!(title || description || actions) && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_react_native59.View, { style: { flexDirection: "row", alignItems: "center", gap: import_tokens60.tokens.extensions.list.gap, padding: import_tokens60.tokens.extensions.list.padding }, children: [
|
|
10185
10197
|
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_react_native59.View, { style: { flex: 1 }, children: [
|
|
10186
10198
|
!!title && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(KText, { accessibilityRole: "header", style: { ...typeStyle("cardTitle") }, children: title }),
|
package/dist/index.web.js
CHANGED
|
@@ -4196,7 +4196,7 @@ function KjunFilterGroup({
|
|
|
4196
4196
|
paddingHorizontal: { xs: tokens22.dimension.value8, sm: tokens22.dimension.value12, md: tokens22.dimension.value12, lg: tokens22.dimension.value14, xl: tokens22.dimension.value16 }[size],
|
|
4197
4197
|
// Corners follow the button scale with the height, so every size keeps the same shape.
|
|
4198
4198
|
borderRadius: tokens22.button.radii[size],
|
|
4199
|
-
backgroundColor: active ? colors.
|
|
4199
|
+
backgroundColor: active ? colors.filterSelectedBg : colors.secondary
|
|
4200
4200
|
},
|
|
4201
4201
|
children: [
|
|
4202
4202
|
option.dot && /* @__PURE__ */ jsx23(
|
|
@@ -4215,7 +4215,7 @@ function KjunFilterGroup({
|
|
|
4215
4215
|
{
|
|
4216
4216
|
name: option.icon,
|
|
4217
4217
|
size: tokens22.extensions.selection.iconSize,
|
|
4218
|
-
color: active ? colors.
|
|
4218
|
+
color: active ? colors.filterSelectedText : colors.textSecondary
|
|
4219
4219
|
}
|
|
4220
4220
|
),
|
|
4221
4221
|
/* @__PURE__ */ jsxs13(View18, { children: [
|
|
@@ -4238,7 +4238,7 @@ function KjunFilterGroup({
|
|
|
4238
4238
|
right: 0,
|
|
4239
4239
|
top: 0,
|
|
4240
4240
|
...selectionTypeStyle(size, active),
|
|
4241
|
-
color: active ? colors.
|
|
4241
|
+
color: active ? colors.filterSelectedText : colors.textSecondary
|
|
4242
4242
|
},
|
|
4243
4243
|
children: option.label
|
|
4244
4244
|
}
|
|
@@ -4939,7 +4939,10 @@ function KjunPopover({
|
|
|
4939
4939
|
] });
|
|
4940
4940
|
}
|
|
4941
4941
|
function KjunTooltip({
|
|
4942
|
-
content:
|
|
4942
|
+
content: body = "",
|
|
4943
|
+
title,
|
|
4944
|
+
align,
|
|
4945
|
+
width,
|
|
4943
4946
|
placement = "top",
|
|
4944
4947
|
delay = 0,
|
|
4945
4948
|
children,
|
|
@@ -4948,6 +4951,7 @@ function KjunTooltip({
|
|
|
4948
4951
|
open: controlled,
|
|
4949
4952
|
onOpenChange
|
|
4950
4953
|
}) {
|
|
4954
|
+
const message = [title, body].filter(Boolean).join(", ");
|
|
4951
4955
|
const { colors } = useKjunStyles(), [internal, setInternal] = useState18(false), open = controlled != null ? controlled : internal, latest = useRef20({ open, onOpenChange }), setOpen = (value) => {
|
|
4952
4956
|
var _a, _b;
|
|
4953
4957
|
if (latest.current.open === value) return;
|
|
@@ -5033,25 +5037,29 @@ function KjunTooltip({
|
|
|
5033
5037
|
triggerRef: ref,
|
|
5034
5038
|
placement,
|
|
5035
5039
|
ariaLabel: message,
|
|
5036
|
-
children: /* @__PURE__ */
|
|
5040
|
+
children: /* @__PURE__ */ jsxs16(
|
|
5037
5041
|
View21,
|
|
5038
5042
|
{
|
|
5039
5043
|
style: {
|
|
5040
5044
|
paddingVertical: tokens26.extensions.tooltip.paddingY,
|
|
5041
5045
|
paddingHorizontal: tokens26.extensions.tooltip.paddingX,
|
|
5042
|
-
maxWidth: tokens26.extensions.tooltip.maxWidth,
|
|
5046
|
+
maxWidth: width ? tokens26.extensions.tooltip.maxWidths[width] : tokens26.extensions.tooltip.maxWidth,
|
|
5043
5047
|
backgroundColor: colors.chartTooltipBg
|
|
5044
5048
|
},
|
|
5045
|
-
children:
|
|
5046
|
-
KText,
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5049
|
+
children: [
|
|
5050
|
+
!!title && /* @__PURE__ */ jsx27(KText, { style: { ...typeStyle("controlSmall"), color: colors.chartTooltipText, ...align ? { textAlign: align === "center" ? "center" : "left" } : {} }, children: title }),
|
|
5051
|
+
!!body && /* @__PURE__ */ jsx27(
|
|
5052
|
+
KText,
|
|
5053
|
+
{
|
|
5054
|
+
style: {
|
|
5055
|
+
...typeStyle("caption"),
|
|
5056
|
+
color: colors.chartTooltipText,
|
|
5057
|
+
...align ? { textAlign: align === "center" ? "center" : "left" } : {}
|
|
5058
|
+
},
|
|
5059
|
+
children: body
|
|
5060
|
+
}
|
|
5061
|
+
)
|
|
5062
|
+
]
|
|
5055
5063
|
}
|
|
5056
5064
|
)
|
|
5057
5065
|
}
|
|
@@ -10221,9 +10229,13 @@ function KjunListRow({ title, description, leading, trailing, actions, href, dis
|
|
|
10221
10229
|
hasContent(actions) && /* @__PURE__ */ jsx56(View49, { pointerEvents: disabled ? "none" : "auto", ...disabled && Platform26.OS === "web" ? { inert: true } : {}, style: { maxWidth: "45%", flexDirection: "row", flexWrap: "wrap", gap: tokens56.extensions.list.actionsGap, paddingRight: tokens56.extensions.list.actionsPadding, opacity: disabled ? tokens56.states.opacity.disabled : 1 }, children: content(actions) })
|
|
10222
10230
|
] });
|
|
10223
10231
|
}
|
|
10224
|
-
function KjunListSection({ title, description, actions, children, ariaLabel, surface = true, divider = true, density = "default" }) {
|
|
10232
|
+
function KjunListSection({ title, description, actions, children, ariaLabel, surface = true, divider = true, density = "default", radius = "none" }) {
|
|
10225
10233
|
const { colors } = useKjunStyles();
|
|
10226
|
-
return /* @__PURE__ */ jsxs42(View49, { style: {
|
|
10234
|
+
return /* @__PURE__ */ jsxs42(View49, { style: {
|
|
10235
|
+
minWidth: 0,
|
|
10236
|
+
backgroundColor: surface ? colors.surface : "transparent",
|
|
10237
|
+
...radius === "none" ? {} : { borderRadius: tokens56.card.radii[radius], overflow: "hidden" }
|
|
10238
|
+
}, children: [
|
|
10227
10239
|
!!(title || description || actions) && /* @__PURE__ */ jsxs42(View49, { style: { flexDirection: "row", alignItems: "center", gap: tokens56.extensions.list.gap, padding: tokens56.extensions.list.padding }, children: [
|
|
10228
10240
|
/* @__PURE__ */ jsxs42(View49, { style: { flex: 1 }, children: [
|
|
10229
10241
|
!!title && /* @__PURE__ */ jsx56(KText, { accessibilityRole: "header", style: { ...typeStyle("cardTitle") }, children: title }),
|
package/dist/styles.css
CHANGED
|
@@ -79,6 +79,8 @@
|
|
|
79
79
|
--_kjun-color-selected-bg: var(--kjun-selected-bg, var(--kjun-active));
|
|
80
80
|
--_kjun-color-on-brand: var(--kjun-on-brand, var(--kjun-inverse));
|
|
81
81
|
--_kjun-color-switch-thumb-on: var(--kjun-switch-thumb-on, var(--kjun-on-brand, var(--kjun-inverse)));
|
|
82
|
+
--_kjun-color-filter-selected-bg: var(--kjun-filter-selected-bg, var(--kjun-text));
|
|
83
|
+
--_kjun-color-filter-selected-text: var(--kjun-filter-selected-text, var(--kjun-inverse));
|
|
82
84
|
--_kjun-color-on-danger: var(--kjun-on-danger, var(--kjun-inverse));
|
|
83
85
|
--_kjun-color-on-success: var(--kjun-on-success, var(--kjun-inverse));
|
|
84
86
|
--_kjun-color-on-warning: var(--kjun-on-warning, var(--kjun-inverse));
|
|
@@ -182,6 +184,8 @@
|
|
|
182
184
|
--_kjun-selected-bg: var(--_kjun-color-selected-bg);
|
|
183
185
|
--_kjun-on-brand: var(--_kjun-color-on-brand);
|
|
184
186
|
--_kjun-switch-thumb-on: var(--_kjun-color-switch-thumb-on);
|
|
187
|
+
--_kjun-filter-selected-bg: var(--_kjun-color-filter-selected-bg);
|
|
188
|
+
--_kjun-filter-selected-text: var(--_kjun-color-filter-selected-text);
|
|
185
189
|
--_kjun-on-danger: var(--_kjun-color-on-danger);
|
|
186
190
|
--_kjun-on-success: var(--_kjun-color-on-success);
|
|
187
191
|
--_kjun-on-warning: var(--_kjun-color-on-warning);
|
|
@@ -532,6 +536,9 @@
|
|
|
532
536
|
--_kjun-extension-switch-label-gap: 8px;
|
|
533
537
|
--_kjun-extension-tooltip-padding-x: 8px;
|
|
534
538
|
--_kjun-extension-tooltip-padding-y: 4px;
|
|
539
|
+
--_kjun-extension-tooltip-max-widths-sm: 192px;
|
|
540
|
+
--_kjun-extension-tooltip-max-widths-md: 256px;
|
|
541
|
+
--_kjun-extension-tooltip-max-widths-lg: 320px;
|
|
535
542
|
--_kjun-extension-tooltip-max-width: 256px;
|
|
536
543
|
--_kjun-extension-tooltip-arrow-size: 8px;
|
|
537
544
|
--_kjun-extension-financial-affix-gap: 4px;
|
|
@@ -833,6 +840,7 @@
|
|
|
833
840
|
--_kjun-geometry-card-radii-sm: 8px;
|
|
834
841
|
--_kjun-geometry-card-radii-md: 12px;
|
|
835
842
|
--_kjun-geometry-card-radii-lg: 16px;
|
|
843
|
+
--_kjun-geometry-card-radii-xl: 24px;
|
|
836
844
|
--_kjun-geometry-card-subtitle-gap: 4px;
|
|
837
845
|
--_kjun-geometry-card-title-gap: 8px;
|
|
838
846
|
--_kjun-geometry-card-glass-blur: 10px;
|
|
@@ -882,6 +890,7 @@
|
|
|
882
890
|
--_kjun-geometry-radius-radius9999: 9999px;
|
|
883
891
|
--_kjun-geometry-radius-radius14: 14px;
|
|
884
892
|
--_kjun-geometry-radius-radius20: 20px;
|
|
893
|
+
--_kjun-geometry-radius-radius24: 24px;
|
|
885
894
|
--_kjun-geometry-native-minimum-touch-target: 44px;
|
|
886
895
|
--_kjun-geometry-space-inline-xs: 4px;
|
|
887
896
|
--_kjun-geometry-space-inline-sm: 8px;
|
|
@@ -2421,8 +2430,8 @@
|
|
|
2421
2430
|
white-space: nowrap;
|
|
2422
2431
|
}
|
|
2423
2432
|
.kjun-filter-chip[aria-pressed="true"] > span {
|
|
2424
|
-
background: var(--_kjun-color-
|
|
2425
|
-
color: var(--_kjun-color-
|
|
2433
|
+
background: var(--_kjun-color-filter-selected-bg);
|
|
2434
|
+
color: var(--_kjun-color-filter-selected-text);
|
|
2426
2435
|
font-weight: var(--_kjun-type-control-weight);
|
|
2427
2436
|
}
|
|
2428
2437
|
.kjun-filter-chip:disabled {
|
|
@@ -2520,6 +2529,17 @@
|
|
|
2520
2529
|
font-weight: var(--_kjun-type-caption-weight);
|
|
2521
2530
|
letter-spacing: var(--_kjun-type-caption-tracking);
|
|
2522
2531
|
}
|
|
2532
|
+
/* Title above the body: a bolder small role in the same tooltip text color. */
|
|
2533
|
+
.kjun-tooltip-title {
|
|
2534
|
+
display: block;
|
|
2535
|
+
font-size: var(--_kjun-type-control-small-size);
|
|
2536
|
+
line-height: var(--_kjun-type-control-small-line);
|
|
2537
|
+
font-weight: var(--_kjun-type-control-small-weight);
|
|
2538
|
+
letter-spacing: var(--_kjun-type-control-small-tracking);
|
|
2539
|
+
}
|
|
2540
|
+
.kjun-tooltip-body { display: block; }
|
|
2541
|
+
.kjun-tooltip[data-align="start"] { text-align: start; }
|
|
2542
|
+
.kjun-tooltip[data-align="center"] { text-align: center; }
|
|
2523
2543
|
.kjun-tooltip svg {
|
|
2524
2544
|
display: block;
|
|
2525
2545
|
color: var(--_kjun-color-chart-tooltip-bg);
|
|
@@ -5023,6 +5043,9 @@
|
|
|
5023
5043
|
|
|
5024
5044
|
/* 0.14.0: plain sections, destructive rows, decorative chevrons and non-row list items share the row inset. */
|
|
5025
5045
|
.kjun-list-section[data-surface="false"]{background:transparent}
|
|
5046
|
+
/* A rounded section clips its rows to the corners; row focus rings move inside so the clip does not cut them. */
|
|
5047
|
+
.kjun-list-section[data-radius]{overflow:hidden;overflow:clip}
|
|
5048
|
+
.kjun-list-section[data-radius] .kjun-list-main:focus-visible{outline-offset:var(--_kjun-state-focus-inset-offset)}
|
|
5026
5049
|
.kjun-list-row[data-destructive] .kjun-list-title{color:var(--_kjun-color-danger)}
|
|
5027
5050
|
.kjun-list-chevron{flex-shrink:0;color:var(--_kjun-color-text-tertiary)}
|
|
5028
5051
|
.kjun-list-item{padding:var(--_kjun-extension-list-padding);border-bottom:var(--_kjun-border-default-width) solid var(--_kjun-color-divider);min-width:0}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type CardRadius } from "@kjun-ui/tokens";
|
|
1
2
|
import { type ReactNode } from "react";
|
|
2
3
|
import { type GestureResponderEvent } from "react-native";
|
|
3
4
|
export interface KjunListRowProps {
|
|
@@ -31,8 +32,10 @@ export interface KjunListSectionProps {
|
|
|
31
32
|
divider?: boolean;
|
|
32
33
|
/** "compact" rows keep the 16px inset but are 44 tall (the touch minimum) instead of 56. */
|
|
33
34
|
density?: "default" | "compact";
|
|
35
|
+
/** Rounds the section on the card radius steps and clips its rows to the corners (default "none"). */
|
|
36
|
+
radius?: CardRadius;
|
|
34
37
|
}
|
|
35
|
-
export declare function KjunListSection({ title, description, actions, children, ariaLabel, surface, divider, density }: KjunListSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
export declare function KjunListSection({ title, description, actions, children, ariaLabel, surface, divider, density, radius }: KjunListSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
36
39
|
export interface KjunListItemProps {
|
|
37
40
|
children: ReactNode;
|
|
38
41
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type CardRadius } from "@kjun-ui/tokens";
|
|
1
2
|
import { type ReactNode } from "react";
|
|
2
3
|
import { type GestureResponderEvent } from "react-native";
|
|
3
4
|
export interface KjunListRowProps {
|
|
@@ -31,8 +32,10 @@ export interface KjunListSectionProps {
|
|
|
31
32
|
divider?: boolean;
|
|
32
33
|
/** "compact" rows keep the 16px inset but are 44 tall (the touch minimum) instead of 56. */
|
|
33
34
|
density?: "default" | "compact";
|
|
35
|
+
/** Rounds the section on the card radius steps and clips its rows to the corners (default "none"). */
|
|
36
|
+
radius?: CardRadius;
|
|
34
37
|
}
|
|
35
|
-
export declare function KjunListSection({ title, description, actions, children, ariaLabel, surface, divider, density }: KjunListSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
export declare function KjunListSection({ title, description, actions, children, ariaLabel, surface, divider, density, radius }: KjunListSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
36
39
|
export interface KjunListItemProps {
|
|
37
40
|
children: ReactNode;
|
|
38
41
|
}
|
|
@@ -21,6 +21,11 @@ export interface KjunPopoverProps {
|
|
|
21
21
|
export declare function KjunPopover({ noPadding, open: controlled, onOpenChange, manualTrigger, matchTriggerWidth, maxHeight, flip, focusOnOpen, ariaLabel, placement, header, modal, trigger, children, }: KjunPopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
22
22
|
export interface KjunTooltipProps extends Pick<PressableProps, "onPress" | "disabled"> {
|
|
23
23
|
content?: string;
|
|
24
|
+
/** A bolder line above content (a file name above its path). Read together with content. */
|
|
25
|
+
title?: string;
|
|
26
|
+
align?: "start" | "center";
|
|
27
|
+
/** Maximum width step (tooltip.maxWidths); default is md, the earlier width. */
|
|
28
|
+
width?: "sm" | "md" | "lg";
|
|
24
29
|
placement?: "top" | "bottom" | "left" | "right";
|
|
25
30
|
delay?: number;
|
|
26
31
|
/** Controlled visibility; omit to let hover and focus drive it. */
|
|
@@ -28,4 +33,4 @@ export interface KjunTooltipProps extends Pick<PressableProps, "onPress" | "disa
|
|
|
28
33
|
onOpenChange?: (open: boolean) => void;
|
|
29
34
|
children: ReactNode;
|
|
30
35
|
}
|
|
31
|
-
export declare function KjunTooltip({ content:
|
|
36
|
+
export declare function KjunTooltip({ content: body, title, align, width, placement, delay, children, onPress, disabled, open: controlled, onOpenChange, }: KjunTooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -21,6 +21,11 @@ export interface KjunPopoverProps {
|
|
|
21
21
|
export declare function KjunPopover({ noPadding, open: controlled, onOpenChange, manualTrigger, matchTriggerWidth, maxHeight, flip, focusOnOpen, ariaLabel, placement, header, modal, trigger, children, }: KjunPopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
22
22
|
export interface KjunTooltipProps extends Pick<PressableProps, "onPress" | "disabled"> {
|
|
23
23
|
content?: string;
|
|
24
|
+
/** A bolder line above content (a file name above its path). Read together with content. */
|
|
25
|
+
title?: string;
|
|
26
|
+
align?: "start" | "center";
|
|
27
|
+
/** Maximum width step (tooltip.maxWidths); default is md, the earlier width. */
|
|
28
|
+
width?: "sm" | "md" | "lg";
|
|
24
29
|
placement?: "top" | "bottom" | "left" | "right";
|
|
25
30
|
delay?: number;
|
|
26
31
|
/** Controlled visibility; omit to let hover and focus drive it. */
|
|
@@ -28,4 +33,4 @@ export interface KjunTooltipProps extends Pick<PressableProps, "onPress" | "disa
|
|
|
28
33
|
onOpenChange?: (open: boolean) => void;
|
|
29
34
|
children: ReactNode;
|
|
30
35
|
}
|
|
31
|
-
export declare function KjunTooltip({ content:
|
|
36
|
+
export declare function KjunTooltip({ content: body, title, align, width, placement, delay, children, onPress, disabled, open: controlled, onOpenChange, }: KjunTooltipProps): import("react/jsx-runtime").JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kjun-ui/native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://ui.kjun.dev",
|
|
6
6
|
"repository": {
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"./package.json": "./package.json"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@kjun-ui/tokens": "0.
|
|
51
|
-
"@kjun-ui/icons": "0.
|
|
50
|
+
"@kjun-ui/tokens": "0.16.0",
|
|
51
|
+
"@kjun-ui/icons": "0.16.0"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"react": "^19.2.3",
|