@vaneui/ui 0.2.1-alpha.20250810113755.26a118a → 0.2.1-alpha.20250811191248.a18a87d
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/components/examples/ref-usage-examples.d.ts +29 -0
- package/dist/components/examples/theme-types-strictness-compile-check.d.ts +5 -0
- package/dist/components/tests/ref-support-comprehensive.test.d.ts +1 -0
- package/dist/components/tests/ref-support.test.d.ts +1 -0
- package/dist/components/tests/theme-types-strictness.test.d.ts +1 -0
- package/dist/components/themeContext.d.ts +67 -50
- package/dist/components/themedComponent.d.ts +1 -1
- package/dist/components/ui/badge.d.ts +2 -2
- package/dist/components/ui/button.d.ts +2 -2
- package/dist/components/ui/card.d.ts +2 -2
- package/dist/components/ui/checkbox.d.ts +83 -3
- package/dist/components/ui/chip.d.ts +2 -2
- package/dist/components/ui/code.d.ts +121 -3
- package/dist/components/ui/col.d.ts +2 -2
- package/dist/components/ui/container.d.ts +2 -2
- package/dist/components/ui/divider.d.ts +74 -3
- package/dist/components/ui/grid.d.ts +3 -3
- package/dist/components/ui/img.d.ts +81 -3
- package/dist/components/ui/label.d.ts +109 -3
- package/dist/components/ui/row.d.ts +2 -2
- package/dist/components/ui/section.d.ts +2 -2
- package/dist/components/ui/stack.d.ts +2 -2
- package/dist/components/ui/typography.d.ts +110 -9
- package/dist/index.esm.js +73 -73
- package/dist/index.js +72 -72
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4882,41 +4882,41 @@ function useTheme() {
|
|
|
4882
4882
|
return react.useContext(ThemeContext);
|
|
4883
4883
|
}
|
|
4884
4884
|
|
|
4885
|
-
function ThemedComponent(allProps) {
|
|
4885
|
+
const ThemedComponent = react.forwardRef(function ThemedComponent(allProps, ref) {
|
|
4886
4886
|
const { theme, ...props } = allProps;
|
|
4887
4887
|
const { Tag, finalClasses, finalProps } = react.useMemo(() => {
|
|
4888
4888
|
// Pass the full allProps and let getComponentConfig handle filtering
|
|
4889
4889
|
return theme.getComponentConfig(allProps);
|
|
4890
4890
|
}, [theme, allProps]);
|
|
4891
|
-
return (jsxRuntime.jsx(Tag, { className: finalClasses, ...finalProps, children: props.children }));
|
|
4892
|
-
}
|
|
4891
|
+
return (jsxRuntime.jsx(Tag, { ref: ref, className: finalClasses, ...finalProps, children: props.children }));
|
|
4892
|
+
});
|
|
4893
4893
|
|
|
4894
|
-
const Button = (props)
|
|
4894
|
+
const Button = react.forwardRef(function Button(props, ref) {
|
|
4895
4895
|
const theme = useTheme();
|
|
4896
|
-
return jsxRuntime.jsx(ThemedComponent, { theme: theme.button, ...props });
|
|
4897
|
-
};
|
|
4896
|
+
return jsxRuntime.jsx(ThemedComponent, { ref: ref, theme: theme.button, ...props });
|
|
4897
|
+
});
|
|
4898
4898
|
|
|
4899
|
-
const Badge = (props)
|
|
4899
|
+
const Badge = react.forwardRef(function Badge(props, ref) {
|
|
4900
4900
|
const theme = useTheme();
|
|
4901
|
-
return jsxRuntime.jsx(ThemedComponent, { theme: theme.badge, ...props });
|
|
4902
|
-
};
|
|
4901
|
+
return jsxRuntime.jsx(ThemedComponent, { theme: theme.badge, ref: ref, ...props });
|
|
4902
|
+
});
|
|
4903
4903
|
|
|
4904
|
-
const Divider = (props)
|
|
4904
|
+
const Divider = react.forwardRef(function Divider(props, ref) {
|
|
4905
4905
|
const theme = useTheme();
|
|
4906
|
-
return jsxRuntime.jsx(ThemedComponent, { theme: theme.divider, ...props });
|
|
4907
|
-
};
|
|
4906
|
+
return jsxRuntime.jsx(ThemedComponent, { theme: theme.divider, ref: ref, ...props });
|
|
4907
|
+
});
|
|
4908
4908
|
|
|
4909
|
-
const Chip = (props)
|
|
4909
|
+
const Chip = react.forwardRef(function Chip(props, ref) {
|
|
4910
4910
|
const theme = useTheme();
|
|
4911
|
-
return jsxRuntime.jsx(ThemedComponent, { theme: theme.chip, ...props });
|
|
4912
|
-
};
|
|
4911
|
+
return jsxRuntime.jsx(ThemedComponent, { theme: theme.chip, ref: ref, ...props });
|
|
4912
|
+
});
|
|
4913
4913
|
|
|
4914
|
-
const Code = (props)
|
|
4914
|
+
const Code = react.forwardRef(function Code(props, ref) {
|
|
4915
4915
|
const theme = useTheme();
|
|
4916
|
-
return jsxRuntime.jsx(ThemedComponent, { theme: theme.code, ...props });
|
|
4917
|
-
};
|
|
4916
|
+
return jsxRuntime.jsx(ThemedComponent, { theme: theme.code, ref: ref, ...props });
|
|
4917
|
+
});
|
|
4918
4918
|
|
|
4919
|
-
const Checkbox = (props)
|
|
4919
|
+
const Checkbox = react.forwardRef(function Checkbox(props, ref) {
|
|
4920
4920
|
const theme = useTheme();
|
|
4921
4921
|
// Extract only theme-relevant props for wrapper and check components
|
|
4922
4922
|
const {
|
|
@@ -4936,87 +4936,87 @@ const Checkbox = (props) => {
|
|
|
4936
4936
|
filled, outline,
|
|
4937
4937
|
pill, sharp, rounded
|
|
4938
4938
|
};
|
|
4939
|
-
return (jsxRuntime.jsxs(ThemedComponent, { theme: theme.checkbox.wrapper, ...themeProps, children: [jsxRuntime.jsx(ThemedComponent, { theme: theme.checkbox.input, ...props, type: "checkbox" }), jsxRuntime.jsx(ThemedComponent, { theme: theme.checkbox.check, ...themeProps, children: theme.checkbox.check.themes.checkElement() })] }));
|
|
4940
|
-
};
|
|
4939
|
+
return (jsxRuntime.jsxs(ThemedComponent, { theme: theme.checkbox.wrapper, ref: ref, ...themeProps, children: [jsxRuntime.jsx(ThemedComponent, { theme: theme.checkbox.input, ...props, type: "checkbox" }), jsxRuntime.jsx(ThemedComponent, { theme: theme.checkbox.check, ...themeProps, children: theme.checkbox.check.themes.checkElement() })] }));
|
|
4940
|
+
});
|
|
4941
4941
|
|
|
4942
|
-
const Label = (props)
|
|
4942
|
+
const Label = react.forwardRef(function Label(props, ref) {
|
|
4943
4943
|
const theme = useTheme();
|
|
4944
|
-
return jsxRuntime.jsx(ThemedComponent, { theme: theme.label, ...props });
|
|
4945
|
-
};
|
|
4944
|
+
return jsxRuntime.jsx(ThemedComponent, { theme: theme.label, ref: ref, ...props });
|
|
4945
|
+
});
|
|
4946
4946
|
|
|
4947
|
-
const Img = (props)
|
|
4947
|
+
const Img = react.forwardRef(function Img(props, ref) {
|
|
4948
4948
|
const theme = useTheme();
|
|
4949
|
-
return (jsxRuntime.jsx(ThemedComponent, { theme: theme.img, ...props }));
|
|
4950
|
-
};
|
|
4949
|
+
return (jsxRuntime.jsx(ThemedComponent, { theme: theme.img, ref: ref, ...props }));
|
|
4950
|
+
});
|
|
4951
4951
|
|
|
4952
|
-
const Section = (props)
|
|
4952
|
+
const Section = react.forwardRef(function Section(props, ref) {
|
|
4953
4953
|
const theme = useTheme();
|
|
4954
|
-
return jsxRuntime.jsx(ThemedComponent, { theme: theme.section, ...props });
|
|
4955
|
-
};
|
|
4954
|
+
return jsxRuntime.jsx(ThemedComponent, { theme: theme.section, ref: ref, ...props });
|
|
4955
|
+
});
|
|
4956
4956
|
|
|
4957
|
-
const Container = (props)
|
|
4957
|
+
const Container = react.forwardRef(function Container(props, ref) {
|
|
4958
4958
|
const theme = useTheme();
|
|
4959
|
-
return jsxRuntime.jsx(ThemedComponent, { theme: theme.container, ...props });
|
|
4960
|
-
};
|
|
4959
|
+
return jsxRuntime.jsx(ThemedComponent, { theme: theme.container, ref: ref, ...props });
|
|
4960
|
+
});
|
|
4961
4961
|
|
|
4962
|
-
const Col = (props)
|
|
4962
|
+
const Col = react.forwardRef(function Col(props, ref) {
|
|
4963
4963
|
const theme = useTheme();
|
|
4964
|
-
return jsxRuntime.jsx(ThemedComponent, { theme: theme.col, ...props });
|
|
4965
|
-
};
|
|
4964
|
+
return jsxRuntime.jsx(ThemedComponent, { theme: theme.col, ref: ref, ...props });
|
|
4965
|
+
});
|
|
4966
4966
|
|
|
4967
|
-
const Row = (props)
|
|
4967
|
+
const Row = react.forwardRef(function Row(props, ref) {
|
|
4968
4968
|
const theme = useTheme();
|
|
4969
|
-
return jsxRuntime.jsx(ThemedComponent, { theme: theme.row, ...props });
|
|
4970
|
-
};
|
|
4969
|
+
return jsxRuntime.jsx(ThemedComponent, { theme: theme.row, ref: ref, ...props });
|
|
4970
|
+
});
|
|
4971
4971
|
|
|
4972
|
-
const Grid3 = (props)
|
|
4972
|
+
const Grid3 = react.forwardRef(function Grid3(props, ref) {
|
|
4973
4973
|
const theme = useTheme();
|
|
4974
|
-
return jsxRuntime.jsx(ThemedComponent, { theme: theme.grid3, ...props });
|
|
4975
|
-
};
|
|
4976
|
-
const Grid4 = (props)
|
|
4974
|
+
return jsxRuntime.jsx(ThemedComponent, { theme: theme.grid3, ref: ref, ...props });
|
|
4975
|
+
});
|
|
4976
|
+
const Grid4 = react.forwardRef(function Grid4(props, ref) {
|
|
4977
4977
|
const theme = useTheme();
|
|
4978
|
-
return jsxRuntime.jsx(ThemedComponent, { theme: theme.grid4, ...props });
|
|
4979
|
-
};
|
|
4978
|
+
return jsxRuntime.jsx(ThemedComponent, { theme: theme.grid4, ref: ref, ...props });
|
|
4979
|
+
});
|
|
4980
4980
|
|
|
4981
|
-
const Card = (props)
|
|
4981
|
+
const Card = react.forwardRef(function Card(props, ref) {
|
|
4982
4982
|
const theme = useTheme();
|
|
4983
|
-
return jsxRuntime.jsx(ThemedComponent, { theme: theme.card, ...props });
|
|
4984
|
-
};
|
|
4983
|
+
return jsxRuntime.jsx(ThemedComponent, { ref: ref, theme: theme.card, ...props });
|
|
4984
|
+
});
|
|
4985
4985
|
|
|
4986
|
-
const Stack = (props)
|
|
4986
|
+
const Stack = react.forwardRef(function Stack(props, ref) {
|
|
4987
4987
|
const theme = useTheme();
|
|
4988
4988
|
const stackTheme = theme.stack;
|
|
4989
|
-
return jsxRuntime.jsx(ThemedComponent, { theme: stackTheme, ...props });
|
|
4990
|
-
};
|
|
4989
|
+
return jsxRuntime.jsx(ThemedComponent, { theme: stackTheme, ref: ref, ...props });
|
|
4990
|
+
});
|
|
4991
4991
|
|
|
4992
|
-
const PageTitle = (props)
|
|
4992
|
+
const PageTitle = react.forwardRef(function PageTitle(props, ref) {
|
|
4993
4993
|
const theme = useTheme();
|
|
4994
|
-
return jsxRuntime.jsx(ThemedComponent, { theme: theme.pageTitle, ...props });
|
|
4995
|
-
};
|
|
4996
|
-
const SectionTitle = (props)
|
|
4994
|
+
return jsxRuntime.jsx(ThemedComponent, { ref: ref, theme: theme.pageTitle, ...props });
|
|
4995
|
+
});
|
|
4996
|
+
const SectionTitle = react.forwardRef(function SectionTitle(props, ref) {
|
|
4997
4997
|
const theme = useTheme();
|
|
4998
|
-
return jsxRuntime.jsx(ThemedComponent, { theme: theme.sectionTitle, ...props });
|
|
4999
|
-
};
|
|
5000
|
-
const Title = (props)
|
|
4998
|
+
return jsxRuntime.jsx(ThemedComponent, { ref: ref, theme: theme.sectionTitle, ...props });
|
|
4999
|
+
});
|
|
5000
|
+
const Title = react.forwardRef(function Title(props, ref) {
|
|
5001
5001
|
const theme = useTheme();
|
|
5002
|
-
return jsxRuntime.jsx(ThemedComponent, { theme: theme.title, ...props });
|
|
5003
|
-
};
|
|
5004
|
-
const Text = (props)
|
|
5002
|
+
return jsxRuntime.jsx(ThemedComponent, { ref: ref, theme: theme.title, ...props });
|
|
5003
|
+
});
|
|
5004
|
+
const Text = react.forwardRef(function Text(props, ref) {
|
|
5005
5005
|
const theme = useTheme();
|
|
5006
|
-
return jsxRuntime.jsx(ThemedComponent, { theme: theme.text, ...props });
|
|
5007
|
-
};
|
|
5008
|
-
const Link = (props)
|
|
5006
|
+
return jsxRuntime.jsx(ThemedComponent, { ref: ref, theme: theme.text, ...props });
|
|
5007
|
+
});
|
|
5008
|
+
const Link = react.forwardRef(function Link(props, ref) {
|
|
5009
5009
|
const theme = useTheme();
|
|
5010
|
-
return jsxRuntime.jsx(ThemedComponent, { theme: theme.link, ...props });
|
|
5011
|
-
};
|
|
5012
|
-
const ListItem = (props)
|
|
5010
|
+
return jsxRuntime.jsx(ThemedComponent, { ref: ref, theme: theme.link, ...props });
|
|
5011
|
+
});
|
|
5012
|
+
const ListItem = react.forwardRef(function ListItem(props, ref) {
|
|
5013
5013
|
const theme = useTheme();
|
|
5014
|
-
return jsxRuntime.jsx(ThemedComponent, { theme: theme.listItem, ...props });
|
|
5015
|
-
};
|
|
5016
|
-
const List = (props)
|
|
5014
|
+
return jsxRuntime.jsx(ThemedComponent, { ref: ref, theme: theme.listItem, ...props });
|
|
5015
|
+
});
|
|
5016
|
+
const List = react.forwardRef(function List(props, ref) {
|
|
5017
5017
|
const theme = useTheme();
|
|
5018
|
-
return jsxRuntime.jsx(ThemedComponent, { theme: theme.list, ...props });
|
|
5019
|
-
};
|
|
5018
|
+
return jsxRuntime.jsx(ThemedComponent, { ref: ref, theme: theme.list, ...props });
|
|
5019
|
+
});
|
|
5020
5020
|
|
|
5021
5021
|
exports.BADGE_CATEGORIES = BADGE_CATEGORIES;
|
|
5022
5022
|
exports.BREAKPOINT = BREAKPOINT;
|
package/package.json
CHANGED