@udixio/ui-react 1.0.0 → 1.1.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/CHANGELOG.md +16 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +1131 -1126
- package/dist/lib/components/Button.d.ts +1 -1
- package/dist/lib/components/Button.d.ts.map +1 -1
- package/dist/lib/interfaces/button.interface.d.ts +6 -0
- package/dist/lib/interfaces/button.interface.d.ts.map +1 -1
- package/dist/lib/styles/button.style.d.ts +4 -0
- package/dist/lib/styles/button.style.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/lib/components/Button.tsx +2 -0
- package/src/lib/interfaces/button.interface.ts +7 -0
- package/src/lib/styles/button.style.ts +12 -9
|
@@ -5,5 +5,5 @@ import { ButtonInterface } from '../interfaces';
|
|
|
5
5
|
* @status beta
|
|
6
6
|
* @category Action
|
|
7
7
|
*/
|
|
8
|
-
export declare const Button: ({ variant, disabled, icon, href, label, className, iconPosition, loading, shape, onClick, onToggle, activated, ref, size, allowShapeTransformation, transition, children, ...restProps }: ReactProps<ButtonInterface>) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const Button: ({ variant, disabled, icon, href, label, disableTextMargins, className, iconPosition, loading, shape, onClick, onToggle, activated, ref, size, allowShapeTransformation, transition, children, ...restProps }: ReactProps<ButtonInterface>) => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,UAAU,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAOhD;;;;GAIG;AACH,eAAO,MAAM,MAAM,GAAI,
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,UAAU,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAOhD;;;;GAIG;AACH,eAAO,MAAM,MAAM,GAAI,8MAoBpB,UAAU,CAAC,eAAe,CAAC,4CA8I7B,CAAC"}
|
|
@@ -16,6 +16,12 @@ type Props = {
|
|
|
16
16
|
* Disables the button if set to true.
|
|
17
17
|
*/
|
|
18
18
|
disabled?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Controls whether negative margins are applied to text variant buttons.
|
|
21
|
+
* When true, removes the default negative horizontal margins.
|
|
22
|
+
* Only applies to 'text' variant buttons.
|
|
23
|
+
*/
|
|
24
|
+
disableTextMargins?: boolean;
|
|
19
25
|
/**
|
|
20
26
|
* An optional icon to display in the button.
|
|
21
27
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.interface.d.ts","sourceRoot":"","sources":["../../../src/lib/interfaces/button.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,KAAK,KAAK,GAAG;IACX;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;IAE1D;;OAEG;IACH,OAAO,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,CAAC;IAEhE;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IAEtB,YAAY,CAAC,EAAE,MAAM,GAAG,OAA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AAC,EAAE,cAAc,CAAC;IAEtB,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAEhC,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAE9B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IAEnC,UAAU,CAAC,EAAE,UAAU,CAAC;IAExB,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,KAAK,QAAQ,GAAG,CAAC,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AAEzE,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG;IAClD,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,EAAE;QACN,QAAQ,EAAE,OAAO,CAAC;KACnB,CAAC;CACH,CAAC"}
|
|
@@ -5,6 +5,7 @@ export declare const buttonStyle: (states: (({
|
|
|
5
5
|
size: any;
|
|
6
6
|
variant: any;
|
|
7
7
|
disabled: any;
|
|
8
|
+
disableTextMargins: any;
|
|
8
9
|
icon: any;
|
|
9
10
|
iconPosition: any;
|
|
10
11
|
loading: any;
|
|
@@ -20,6 +21,7 @@ export declare const buttonStyle: (states: (({
|
|
|
20
21
|
size: any;
|
|
21
22
|
variant: any;
|
|
22
23
|
disabled: any;
|
|
24
|
+
disableTextMargins: any;
|
|
23
25
|
icon: any;
|
|
24
26
|
iconPosition: any;
|
|
25
27
|
loading: any;
|
|
@@ -35,6 +37,7 @@ export declare const buttonStyle: (states: (({
|
|
|
35
37
|
size?: "xSmall" | "small" | "medium" | "large" | "xLarge";
|
|
36
38
|
variant?: "filled" | "elevated" | "tonal" | "outlined" | "text";
|
|
37
39
|
disabled?: boolean;
|
|
40
|
+
disableTextMargins?: boolean;
|
|
38
41
|
icon?: import('@fortawesome/fontawesome-svg-core').IconDefinition;
|
|
39
42
|
iconPosition?: "left" | "right";
|
|
40
43
|
loading?: boolean;
|
|
@@ -51,6 +54,7 @@ export declare const buttonStyle: (states: (({
|
|
|
51
54
|
size?: "xSmall" | "small" | "medium" | "large" | "xLarge";
|
|
52
55
|
variant?: "filled" | "elevated" | "tonal" | "outlined" | "text";
|
|
53
56
|
disabled?: boolean;
|
|
57
|
+
disableTextMargins?: boolean;
|
|
54
58
|
icon?: import('@fortawesome/fontawesome-svg-core').IconDefinition;
|
|
55
59
|
iconPosition?: "left" | "right";
|
|
56
60
|
loading?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.style.d.ts","sourceRoot":"","sources":["../../../src/lib/styles/button.style.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"button.style.d.ts","sourceRoot":"","sources":["../../../src/lib/styles/button.style.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gFA6IvB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@udixio/ui-react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"react": "^19.1.1",
|
|
37
37
|
"react-dom": "^19.1.1",
|
|
38
38
|
"@udixio/theme": "1.0.0",
|
|
39
|
-
"@udixio/tailwind": "1.2.
|
|
39
|
+
"@udixio/tailwind": "1.2.1"
|
|
40
40
|
},
|
|
41
41
|
"repository": {
|
|
42
42
|
"type": "git",
|
|
@@ -17,6 +17,7 @@ export const Button = ({
|
|
|
17
17
|
icon,
|
|
18
18
|
href,
|
|
19
19
|
label,
|
|
20
|
+
disableTextMargins,
|
|
20
21
|
className,
|
|
21
22
|
iconPosition = 'left',
|
|
22
23
|
loading = false,
|
|
@@ -74,6 +75,7 @@ export const Button = ({
|
|
|
74
75
|
const styles = buttonStyle({
|
|
75
76
|
allowShapeTransformation,
|
|
76
77
|
size,
|
|
78
|
+
disableTextMargins,
|
|
77
79
|
shape,
|
|
78
80
|
href,
|
|
79
81
|
disabled,
|
|
@@ -22,6 +22,13 @@ type Props = {
|
|
|
22
22
|
*/
|
|
23
23
|
disabled?: boolean;
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Controls whether negative margins are applied to text variant buttons.
|
|
27
|
+
* When true, removes the default negative horizontal margins.
|
|
28
|
+
* Only applies to 'text' variant buttons.
|
|
29
|
+
*/
|
|
30
|
+
disableTextMargins?: boolean;
|
|
31
|
+
|
|
25
32
|
/**
|
|
26
33
|
* An optional icon to display in the button.
|
|
27
34
|
*/
|
|
@@ -5,6 +5,7 @@ export const buttonStyle = defaultClassNames<ButtonInterface>(
|
|
|
5
5
|
'button',
|
|
6
6
|
({
|
|
7
7
|
variant,
|
|
8
|
+
disableTextMargins,
|
|
8
9
|
disabled,
|
|
9
10
|
iconPosition,
|
|
10
11
|
icon,
|
|
@@ -76,15 +77,17 @@ export const buttonStyle = defaultClassNames<ButtonInterface>(
|
|
|
76
77
|
'text-primary': !disabled,
|
|
77
78
|
'text-on-surface/[0.38]': disabled,
|
|
78
79
|
},
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
80
|
+
disableTextMargins && [
|
|
81
|
+
size === 'xSmall' && '-mx-3 ',
|
|
82
|
+
size === 'small' && '-mx-4 ',
|
|
83
|
+
size === 'medium' && '-mx-6 ',
|
|
84
|
+
size === 'large' && '-mx-12',
|
|
85
|
+
size === 'xLarge' && '-mx-16 ',
|
|
86
|
+
// size === 'small' && ' -my-2.5',
|
|
87
|
+
// size === 'medium' && ' -my-4',
|
|
88
|
+
// size === 'large' && '-my-8',
|
|
89
|
+
// size === 'xLarge' && ' -my-12',
|
|
90
|
+
],
|
|
88
91
|
],
|
|
89
92
|
disabled && 'cursor-default',
|
|
90
93
|
),
|