uiplex 1.3.0 → 1.3.1

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/README.md CHANGED
@@ -349,7 +349,7 @@ import { Link } from 'uiplex';
349
349
 
350
350
  **Text** - Typography component
351
351
  ```tsx
352
- <Text size="lg" weight="bold" color="primary">Heading</Text>
352
+ <Text size="lg" weight="bold" variant="primary">Heading</Text>
353
353
  ```
354
354
 
355
355
  ## Hooks
@@ -2,14 +2,15 @@ import React from "react";
2
2
  import "./Text.css";
3
3
  export type TextSize = "sm" | "md" | "lg" | "xl";
4
4
  export type TextWeight = "regular" | "medium" | "semibold" | "bold";
5
- export type TextColor = "primary" | "secondary" | "muted" | "danger" | "success" | "warning";
5
+ export type TextVariant = "primary" | "secondary" | "muted" | "danger" | "success" | "warning";
6
6
  export type TextAlign = "left" | "center" | "right";
7
7
  export interface TextProps extends Omit<React.HTMLAttributes<HTMLElement>, "style"> {
8
8
  as?: keyof JSX.IntrinsicElements;
9
9
  size?: TextSize;
10
10
  weight?: TextWeight;
11
- color?: TextColor;
11
+ variant?: TextVariant;
12
12
  align?: TextAlign;
13
+ color?: string;
13
14
  children: React.ReactNode;
14
15
  style?: React.CSSProperties;
15
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../src/Text/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,YAAY,CAAC;AAEpB,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AACjD,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;AACpE,MAAM,MAAM,SAAS,GACjB,SAAS,GACT,WAAW,GACX,OAAO,GACP,QAAQ,GACR,SAAS,GACT,SAAS,CAAC;AACd,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,QAAQ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AC,EAAE,SAAS,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAmCpC,CAAC"}
@@ -1,3 +1,3 @@
1
1
  export { Text } from "./Text";
2
- export type { TextProps, TextSize, TextWeight, TextColor, TextAlign } from "./Text";
2
+ export type { TextProps, TextSize, TextWeight, TextVariant, TextAlign } from "./Text";
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC"}
package/dist/index.cjs CHANGED
@@ -123,19 +123,23 @@ const CheckboxGroup = ({ name, value = [], options, disabled = false, size = "md
123
123
  return (jsxRuntime.jsx("div", { className: groupClasses, children: options.map((option, index) => (jsxRuntime.jsx(Checkbox, { name: name, value: option.value, checked: value.includes(option.value), disabled: disabled || option.disabled, label: option.label, description: option.description, size: size, colorScheme: colorScheme, onChange: handleChange }, `${name}-${option.value}-${index}`))) }));
124
124
  };
125
125
 
126
- const Text = ({ as = "p", size = "md", weight = "regular", color = "primary", align = "left", className = "", children, style, ...props }) => {
126
+ const Text = ({ as = "p", size = "md", weight = "regular", variant = "primary", align = "left", color, className = "", children, style, ...props }) => {
127
127
  const Component = as;
128
128
  const classes = [
129
129
  "ui-text",
130
130
  `ui-text--${size}`,
131
131
  `ui-text--${weight}`,
132
- `ui-text--${color}`,
132
+ `ui-text--${variant}`,
133
133
  `ui-text--align-${align}`,
134
134
  className,
135
135
  ]
136
136
  .filter(Boolean)
137
137
  .join(" ");
138
- return (jsxRuntime.jsx(Component, { className: classes, style: style, ...props, children: children }));
138
+ const mergedStyle = {
139
+ ...(color && { color }),
140
+ ...style,
141
+ };
142
+ return (jsxRuntime.jsx(Component, { className: classes, style: mergedStyle, ...props, children: children }));
139
143
  };
140
144
 
141
145
  const ModalOverlay = ({ onClick, className = "", }) => {
package/dist/index.js CHANGED
@@ -122,19 +122,23 @@ const CheckboxGroup = ({ name, value = [], options, disabled = false, size = "md
122
122
  return (jsx("div", { className: groupClasses, children: options.map((option, index) => (jsx(Checkbox, { name: name, value: option.value, checked: value.includes(option.value), disabled: disabled || option.disabled, label: option.label, description: option.description, size: size, colorScheme: colorScheme, onChange: handleChange }, `${name}-${option.value}-${index}`))) }));
123
123
  };
124
124
 
125
- const Text = ({ as = "p", size = "md", weight = "regular", color = "primary", align = "left", className = "", children, style, ...props }) => {
125
+ const Text = ({ as = "p", size = "md", weight = "regular", variant = "primary", align = "left", color, className = "", children, style, ...props }) => {
126
126
  const Component = as;
127
127
  const classes = [
128
128
  "ui-text",
129
129
  `ui-text--${size}`,
130
130
  `ui-text--${weight}`,
131
- `ui-text--${color}`,
131
+ `ui-text--${variant}`,
132
132
  `ui-text--align-${align}`,
133
133
  className,
134
134
  ]
135
135
  .filter(Boolean)
136
136
  .join(" ");
137
- return (jsx(Component, { className: classes, style: style, ...props, children: children }));
137
+ const mergedStyle = {
138
+ ...(color && { color }),
139
+ ...style,
140
+ };
141
+ return (jsx(Component, { className: classes, style: mergedStyle, ...props, children: children }));
138
142
  };
139
143
 
140
144
  const ModalOverlay = ({ onClick, className = "", }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uiplex",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "A modern React component library with TypeScript support, featuring Button, Loader, Radio components and a comprehensive theme system",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",