@vaneui/ui 0.2.1-alpha.20250810102219.51053cf → 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/index.js CHANGED
@@ -93,6 +93,33 @@ const CHECKBOX_CATEGORIES = [...LAYOUT_CORE, ...VISUAL_CORE, ...VISUAL_DECORATIO
93
93
  const LABEL_CATEGORIES = [...TYPOGRAPHY_FULL, ...LAYOUT_FULL, ...VISUAL_CORE];
94
94
  // Media component categories
95
95
  const IMG_CATEGORIES = [...LAYOUT_CORE, ...VISUAL_CORE, ...VISUAL_DECORATION, ...SHAPE];
96
+ const COMPONENT = ['button', 'badge', 'chip', 'code', 'card', 'divider', 'container', 'row', 'col', 'stack', 'section',
97
+ 'grid3', 'grid4', 'pageTitle', 'sectionTitle', 'title', 'text', 'link', 'list', 'listItem', 'checkbox', 'label', 'img'];
98
+ const ComponentCategories = {
99
+ badge: BADGE_CATEGORIES,
100
+ button: BUTTON_CATEGORIES,
101
+ card: CARD_CATEGORIES,
102
+ checkbox: CHECKBOX_CATEGORIES,
103
+ chip: CHIP_CATEGORIES,
104
+ code: CODE_CATEGORIES,
105
+ col: COL_CATEGORIES,
106
+ container: CONTAINER_CATEGORIES,
107
+ divider: DIVIDER_CATEGORIES,
108
+ grid3: GRID_CATEGORIES,
109
+ grid4: GRID_CATEGORIES,
110
+ img: IMG_CATEGORIES,
111
+ label: LABEL_CATEGORIES,
112
+ link: TYPOGRAPHY_CATEGORIES,
113
+ list: LIST_CATEGORIES,
114
+ listItem: TYPOGRAPHY_CATEGORIES,
115
+ pageTitle: TYPOGRAPHY_CATEGORIES,
116
+ row: ROW_CATEGORIES,
117
+ section: SECTION_CATEGORIES,
118
+ sectionTitle: TYPOGRAPHY_CATEGORIES,
119
+ stack: STACK_CATEGORIES,
120
+ text: TYPOGRAPHY_CATEGORIES,
121
+ title: TYPOGRAPHY_CATEGORIES
122
+ };
96
123
 
97
124
  class HideTheme extends BaseTheme {
98
125
  constructor(initialConfig) {
@@ -4734,8 +4761,6 @@ const defaultImgTheme = new ComponentTheme("img", "object-cover", // Default to
4734
4761
  noRing: true,
4735
4762
  }, IMG_CATEGORIES);
4736
4763
 
4737
- const COMPONENT = ['button', 'badge', 'chip', 'code', 'card', 'divider', 'container', 'row', 'col', 'stack', 'section',
4738
- 'grid3', 'grid4', 'pageTitle', 'sectionTitle', 'title', 'text', 'link', 'list', 'listItem', 'checkbox', 'label', 'img'];
4739
4764
  const defaultTheme = {
4740
4765
  button: defaultButtonTheme,
4741
4766
  badge: defaultBadgeTheme,
@@ -4857,41 +4882,41 @@ function useTheme() {
4857
4882
  return react.useContext(ThemeContext);
4858
4883
  }
4859
4884
 
4860
- function ThemedComponent(allProps) {
4885
+ const ThemedComponent = react.forwardRef(function ThemedComponent(allProps, ref) {
4861
4886
  const { theme, ...props } = allProps;
4862
4887
  const { Tag, finalClasses, finalProps } = react.useMemo(() => {
4863
4888
  // Pass the full allProps and let getComponentConfig handle filtering
4864
4889
  return theme.getComponentConfig(allProps);
4865
4890
  }, [theme, allProps]);
4866
- return (jsxRuntime.jsx(Tag, { className: finalClasses, ...finalProps, children: props.children }));
4867
- }
4891
+ return (jsxRuntime.jsx(Tag, { ref: ref, className: finalClasses, ...finalProps, children: props.children }));
4892
+ });
4868
4893
 
4869
- const Button = (props) => {
4894
+ const Button = react.forwardRef(function Button(props, ref) {
4870
4895
  const theme = useTheme();
4871
- return jsxRuntime.jsx(ThemedComponent, { theme: theme.button, ...props });
4872
- };
4896
+ return jsxRuntime.jsx(ThemedComponent, { ref: ref, theme: theme.button, ...props });
4897
+ });
4873
4898
 
4874
- const Badge = (props) => {
4899
+ const Badge = react.forwardRef(function Badge(props, ref) {
4875
4900
  const theme = useTheme();
4876
- return jsxRuntime.jsx(ThemedComponent, { theme: theme.badge, ...props });
4877
- };
4901
+ return jsxRuntime.jsx(ThemedComponent, { theme: theme.badge, ref: ref, ...props });
4902
+ });
4878
4903
 
4879
- const Divider = (props) => {
4904
+ const Divider = react.forwardRef(function Divider(props, ref) {
4880
4905
  const theme = useTheme();
4881
- return jsxRuntime.jsx(ThemedComponent, { theme: theme.divider, ...props });
4882
- };
4906
+ return jsxRuntime.jsx(ThemedComponent, { theme: theme.divider, ref: ref, ...props });
4907
+ });
4883
4908
 
4884
- const Chip = (props) => {
4909
+ const Chip = react.forwardRef(function Chip(props, ref) {
4885
4910
  const theme = useTheme();
4886
- return jsxRuntime.jsx(ThemedComponent, { theme: theme.chip, ...props });
4887
- };
4911
+ return jsxRuntime.jsx(ThemedComponent, { theme: theme.chip, ref: ref, ...props });
4912
+ });
4888
4913
 
4889
- const Code = (props) => {
4914
+ const Code = react.forwardRef(function Code(props, ref) {
4890
4915
  const theme = useTheme();
4891
- return jsxRuntime.jsx(ThemedComponent, { theme: theme.code, ...props });
4892
- };
4916
+ return jsxRuntime.jsx(ThemedComponent, { theme: theme.code, ref: ref, ...props });
4917
+ });
4893
4918
 
4894
- const Checkbox = (props) => {
4919
+ const Checkbox = react.forwardRef(function Checkbox(props, ref) {
4895
4920
  const theme = useTheme();
4896
4921
  // Extract only theme-relevant props for wrapper and check components
4897
4922
  const {
@@ -4911,87 +4936,87 @@ const Checkbox = (props) => {
4911
4936
  filled, outline,
4912
4937
  pill, sharp, rounded
4913
4938
  };
4914
- 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() })] }));
4915
- };
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
+ });
4916
4941
 
4917
- const Label = (props) => {
4942
+ const Label = react.forwardRef(function Label(props, ref) {
4918
4943
  const theme = useTheme();
4919
- return jsxRuntime.jsx(ThemedComponent, { theme: theme.label, ...props });
4920
- };
4944
+ return jsxRuntime.jsx(ThemedComponent, { theme: theme.label, ref: ref, ...props });
4945
+ });
4921
4946
 
4922
- const Img = (props) => {
4947
+ const Img = react.forwardRef(function Img(props, ref) {
4923
4948
  const theme = useTheme();
4924
- return (jsxRuntime.jsx(ThemedComponent, { theme: theme.img, ...props }));
4925
- };
4949
+ return (jsxRuntime.jsx(ThemedComponent, { theme: theme.img, ref: ref, ...props }));
4950
+ });
4926
4951
 
4927
- const Section = (props) => {
4952
+ const Section = react.forwardRef(function Section(props, ref) {
4928
4953
  const theme = useTheme();
4929
- return jsxRuntime.jsx(ThemedComponent, { theme: theme.section, ...props });
4930
- };
4954
+ return jsxRuntime.jsx(ThemedComponent, { theme: theme.section, ref: ref, ...props });
4955
+ });
4931
4956
 
4932
- const Container = (props) => {
4957
+ const Container = react.forwardRef(function Container(props, ref) {
4933
4958
  const theme = useTheme();
4934
- return jsxRuntime.jsx(ThemedComponent, { theme: theme.container, ...props });
4935
- };
4959
+ return jsxRuntime.jsx(ThemedComponent, { theme: theme.container, ref: ref, ...props });
4960
+ });
4936
4961
 
4937
- const Col = (props) => {
4962
+ const Col = react.forwardRef(function Col(props, ref) {
4938
4963
  const theme = useTheme();
4939
- return jsxRuntime.jsx(ThemedComponent, { theme: theme.col, ...props });
4940
- };
4964
+ return jsxRuntime.jsx(ThemedComponent, { theme: theme.col, ref: ref, ...props });
4965
+ });
4941
4966
 
4942
- const Row = (props) => {
4967
+ const Row = react.forwardRef(function Row(props, ref) {
4943
4968
  const theme = useTheme();
4944
- return jsxRuntime.jsx(ThemedComponent, { theme: theme.row, ...props });
4945
- };
4969
+ return jsxRuntime.jsx(ThemedComponent, { theme: theme.row, ref: ref, ...props });
4970
+ });
4946
4971
 
4947
- const Grid3 = (props) => {
4972
+ const Grid3 = react.forwardRef(function Grid3(props, ref) {
4948
4973
  const theme = useTheme();
4949
- return jsxRuntime.jsx(ThemedComponent, { theme: theme.grid3, ...props });
4950
- };
4951
- const Grid4 = (props) => {
4974
+ return jsxRuntime.jsx(ThemedComponent, { theme: theme.grid3, ref: ref, ...props });
4975
+ });
4976
+ const Grid4 = react.forwardRef(function Grid4(props, ref) {
4952
4977
  const theme = useTheme();
4953
- return jsxRuntime.jsx(ThemedComponent, { theme: theme.grid4, ...props });
4954
- };
4978
+ return jsxRuntime.jsx(ThemedComponent, { theme: theme.grid4, ref: ref, ...props });
4979
+ });
4955
4980
 
4956
- const Card = (props) => {
4981
+ const Card = react.forwardRef(function Card(props, ref) {
4957
4982
  const theme = useTheme();
4958
- return jsxRuntime.jsx(ThemedComponent, { theme: theme.card, ...props });
4959
- };
4983
+ return jsxRuntime.jsx(ThemedComponent, { ref: ref, theme: theme.card, ...props });
4984
+ });
4960
4985
 
4961
- const Stack = (props) => {
4986
+ const Stack = react.forwardRef(function Stack(props, ref) {
4962
4987
  const theme = useTheme();
4963
4988
  const stackTheme = theme.stack;
4964
- return jsxRuntime.jsx(ThemedComponent, { theme: stackTheme, ...props });
4965
- };
4989
+ return jsxRuntime.jsx(ThemedComponent, { theme: stackTheme, ref: ref, ...props });
4990
+ });
4966
4991
 
4967
- const PageTitle = (props) => {
4992
+ const PageTitle = react.forwardRef(function PageTitle(props, ref) {
4968
4993
  const theme = useTheme();
4969
- return jsxRuntime.jsx(ThemedComponent, { theme: theme.pageTitle, ...props });
4970
- };
4971
- const SectionTitle = (props) => {
4994
+ return jsxRuntime.jsx(ThemedComponent, { ref: ref, theme: theme.pageTitle, ...props });
4995
+ });
4996
+ const SectionTitle = react.forwardRef(function SectionTitle(props, ref) {
4972
4997
  const theme = useTheme();
4973
- return jsxRuntime.jsx(ThemedComponent, { theme: theme.sectionTitle, ...props });
4974
- };
4975
- const Title = (props) => {
4998
+ return jsxRuntime.jsx(ThemedComponent, { ref: ref, theme: theme.sectionTitle, ...props });
4999
+ });
5000
+ const Title = react.forwardRef(function Title(props, ref) {
4976
5001
  const theme = useTheme();
4977
- return jsxRuntime.jsx(ThemedComponent, { theme: theme.title, ...props });
4978
- };
4979
- const Text = (props) => {
5002
+ return jsxRuntime.jsx(ThemedComponent, { ref: ref, theme: theme.title, ...props });
5003
+ });
5004
+ const Text = react.forwardRef(function Text(props, ref) {
4980
5005
  const theme = useTheme();
4981
- return jsxRuntime.jsx(ThemedComponent, { theme: theme.text, ...props });
4982
- };
4983
- const Link = (props) => {
5006
+ return jsxRuntime.jsx(ThemedComponent, { ref: ref, theme: theme.text, ...props });
5007
+ });
5008
+ const Link = react.forwardRef(function Link(props, ref) {
4984
5009
  const theme = useTheme();
4985
- return jsxRuntime.jsx(ThemedComponent, { theme: theme.link, ...props });
4986
- };
4987
- const ListItem = (props) => {
5010
+ return jsxRuntime.jsx(ThemedComponent, { ref: ref, theme: theme.link, ...props });
5011
+ });
5012
+ const ListItem = react.forwardRef(function ListItem(props, ref) {
4988
5013
  const theme = useTheme();
4989
- return jsxRuntime.jsx(ThemedComponent, { theme: theme.listItem, ...props });
4990
- };
4991
- const List = (props) => {
5014
+ return jsxRuntime.jsx(ThemedComponent, { ref: ref, theme: theme.listItem, ...props });
5015
+ });
5016
+ const List = react.forwardRef(function List(props, ref) {
4992
5017
  const theme = useTheme();
4993
- return jsxRuntime.jsx(ThemedComponent, { theme: theme.list, ...props });
4994
- };
5018
+ return jsxRuntime.jsx(ThemedComponent, { ref: ref, theme: theme.list, ...props });
5019
+ });
4995
5020
 
4996
5021
  exports.BADGE_CATEGORIES = BADGE_CATEGORIES;
4997
5022
  exports.BREAKPOINT = BREAKPOINT;
@@ -5011,6 +5036,7 @@ exports.Checkbox = Checkbox;
5011
5036
  exports.Chip = Chip;
5012
5037
  exports.Code = Code;
5013
5038
  exports.Col = Col;
5039
+ exports.ComponentCategories = ComponentCategories;
5014
5040
  exports.ComponentKeys = ComponentKeys;
5015
5041
  exports.Container = Container;
5016
5042
  exports.DIVIDER_CATEGORIES = DIVIDER_CATEGORIES;