@udixio/ui-react 0.1.2 → 0.2.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 +0 -10
- package/dist/index.cjs +2 -2
- package/dist/index.js +1164 -1181
- package/dist/lib/components/Button.d.ts +4 -2
- package/dist/lib/components/Button.d.ts.map +1 -1
- package/dist/lib/components/Card.d.ts +5 -0
- package/dist/lib/components/Card.d.ts.map +1 -1
- package/dist/lib/components/Carousel.d.ts +6 -0
- package/dist/lib/components/Carousel.d.ts.map +1 -1
- package/dist/lib/components/CarouselItem.d.ts +4 -0
- package/dist/lib/components/CarouselItem.d.ts.map +1 -1
- package/dist/lib/components/{Divided.d.ts → Divider.d.ts} +6 -1
- package/dist/lib/components/Divider.d.ts.map +1 -0
- package/dist/lib/components/Fab.d.ts +5 -0
- package/dist/lib/components/Fab.d.ts.map +1 -1
- package/dist/lib/components/IconButton.d.ts +6 -1
- package/dist/lib/components/IconButton.d.ts.map +1 -1
- package/dist/lib/components/NavigationRail.d.ts +5 -0
- package/dist/lib/components/NavigationRail.d.ts.map +1 -1
- package/dist/lib/components/NavigationRailItem.d.ts +8 -0
- package/dist/lib/components/NavigationRailItem.d.ts.map +1 -1
- package/dist/lib/components/ProgressIndicator.d.ts +4 -0
- package/dist/lib/components/ProgressIndicator.d.ts.map +1 -1
- package/dist/lib/components/Slider.d.ts +5 -0
- package/dist/lib/components/Slider.d.ts.map +1 -1
- package/dist/lib/components/Snackbar.d.ts +5 -0
- package/dist/lib/components/Snackbar.d.ts.map +1 -1
- package/dist/lib/components/Switch.d.ts +5 -0
- package/dist/lib/components/Switch.d.ts.map +1 -1
- package/dist/lib/components/Tab.d.ts +4 -0
- package/dist/lib/components/Tab.d.ts.map +1 -1
- package/dist/lib/components/Tabs.d.ts +5 -0
- package/dist/lib/components/Tabs.d.ts.map +1 -1
- package/dist/lib/components/TextField.d.ts +5 -0
- package/dist/lib/components/TextField.d.ts.map +1 -1
- package/dist/lib/components/ToolTip.d.ts +5 -0
- package/dist/lib/components/ToolTip.d.ts.map +1 -1
- package/dist/lib/components/index.d.ts +1 -1
- package/dist/lib/effects/SyncedFixedWrapper.d.ts.map +1 -1
- package/dist/lib/interfaces/button.interface.d.ts +5 -0
- package/dist/lib/interfaces/button.interface.d.ts.map +1 -1
- package/dist/lib/interfaces/icon-button.interface.d.ts +1 -1
- package/dist/lib/interfaces/icon-button.interface.d.ts.map +1 -1
- package/dist/lib/styles/button.style.d.ts +14 -4
- package/dist/lib/styles/button.style.d.ts.map +1 -1
- package/dist/lib/styles/icon-button.style.d.ts +4 -4
- package/package.json +2 -2
- package/src/lib/components/Button.tsx +42 -15
- package/src/lib/components/Card.tsx +5 -0
- package/src/lib/components/Carousel.tsx +12 -6
- package/src/lib/components/CarouselItem.tsx +6 -1
- package/src/lib/components/{Divided.tsx → Divider.tsx} +5 -0
- package/src/lib/components/Fab.tsx +6 -1
- package/src/lib/components/IconButton.tsx +12 -7
- package/src/lib/components/NavigationRail.tsx +40 -41
- package/src/lib/components/NavigationRailItem.tsx +8 -0
- package/src/lib/components/ProgressIndicator.tsx +8 -2
- package/src/lib/components/Slider.tsx +5 -0
- package/src/lib/components/Snackbar.tsx +7 -2
- package/src/lib/components/Switch.tsx +5 -0
- package/src/lib/components/Tab.tsx +4 -0
- package/src/lib/components/Tabs.tsx +8 -3
- package/src/lib/components/TextField.tsx +8 -3
- package/src/lib/components/ToolTip.tsx +8 -8
- package/src/lib/components/index.ts +1 -1
- package/src/lib/effects/SyncedFixedWrapper.tsx +0 -2
- package/src/lib/interfaces/button.interface.ts +6 -0
- package/src/lib/interfaces/icon-button.interface.ts +1 -1
- package/src/lib/styles/button.style.ts +27 -48
- package/dist/lib/components/Divided.d.ts.map +0 -1
|
@@ -8,6 +8,7 @@ export const buttonStyle = defaultClassNames<ButtonInterface>(
|
|
|
8
8
|
disabled,
|
|
9
9
|
iconPosition,
|
|
10
10
|
icon,
|
|
11
|
+
isActive,
|
|
11
12
|
loading,
|
|
12
13
|
shape,
|
|
13
14
|
size,
|
|
@@ -45,20 +46,40 @@ export const buttonStyle = defaultClassNames<ButtonInterface>(
|
|
|
45
46
|
'group-active:rounded-[16px]': size === 'medium',
|
|
46
47
|
'group-active:rounded-[28px]': size === 'large' || size == 'xLarge',
|
|
47
48
|
},
|
|
49
|
+
allowShapeTransformation &&
|
|
50
|
+
isActive && {
|
|
51
|
+
'rounded-[12px]': size === 'xSmall' || size == 'small',
|
|
52
|
+
'rounded-[16px]': size === 'medium',
|
|
53
|
+
'rounded-[28px]': size === 'large' || size == 'xLarge',
|
|
54
|
+
},
|
|
48
55
|
variant === 'elevated' && {
|
|
49
|
-
'
|
|
56
|
+
'shadow-1 hover:shadow-2': !disabled,
|
|
57
|
+
'bg-surface-container-low text-primary': !disabled && !isActive,
|
|
58
|
+
'bg-primary text-on-primary': !disabled && isActive,
|
|
59
|
+
'text-on-surface/[38%]': disabled,
|
|
50
60
|
},
|
|
51
61
|
variant === 'filled' && {
|
|
52
|
-
'
|
|
62
|
+
'hover:shadow-1': !disabled,
|
|
63
|
+
'bg-surface-container text-on-surface-variant': !disabled && !isActive,
|
|
64
|
+
'bg-primary text-on-primary': !disabled && isActive,
|
|
65
|
+
'text-on-surface/[38%]': disabled,
|
|
53
66
|
},
|
|
54
67
|
variant === 'filledTonal' && {
|
|
55
|
-
'
|
|
68
|
+
'hover:shadow-1': !disabled,
|
|
69
|
+
'bg-secondary-container text-on-secondary-container':
|
|
70
|
+
!disabled && !isActive,
|
|
71
|
+
'bg-secondary text-on-secondary': !disabled && isActive,
|
|
72
|
+
'text-on-surface/[0.38]': disabled,
|
|
56
73
|
},
|
|
57
74
|
variant === 'outlined' && [
|
|
58
75
|
' border',
|
|
59
76
|
{
|
|
60
|
-
'border-on-surface/[0.12]': disabled,
|
|
61
|
-
|
|
77
|
+
'border-on-surface/[0.12] text-on-surface/[0.38]': disabled,
|
|
78
|
+
|
|
79
|
+
'text-primary border-outline focus:border-primary':
|
|
80
|
+
!disabled && !isActive,
|
|
81
|
+
'text-inverse-on-surface bg-inverse-surface border-inverse-surface':
|
|
82
|
+
!disabled && isActive,
|
|
62
83
|
},
|
|
63
84
|
],
|
|
64
85
|
variant === 'text' && [
|
|
@@ -100,29 +121,7 @@ export const buttonStyle = defaultClassNames<ButtonInterface>(
|
|
|
100
121
|
'group-state-primary': !disabled,
|
|
101
122
|
},
|
|
102
123
|
),
|
|
103
|
-
label: classNames(
|
|
104
|
-
{ invisible: loading },
|
|
105
|
-
variant === 'elevated' && {
|
|
106
|
-
'text-primary': !disabled,
|
|
107
|
-
'text-on-surface/[38%]': disabled,
|
|
108
|
-
},
|
|
109
|
-
variant === 'filled' && {
|
|
110
|
-
'text-on-primary': !disabled,
|
|
111
|
-
'text-on-surface/[38%]': disabled,
|
|
112
|
-
},
|
|
113
|
-
variant === 'filledTonal' && {
|
|
114
|
-
'text-on-secondary-container': !disabled,
|
|
115
|
-
'text-on-surface/[0.38]': disabled,
|
|
116
|
-
},
|
|
117
|
-
variant === 'outlined' && {
|
|
118
|
-
'text-primary': !disabled,
|
|
119
|
-
'text-on-surface/[0.38]': disabled,
|
|
120
|
-
},
|
|
121
|
-
variant === 'text' && {
|
|
122
|
-
'text-primary': !disabled,
|
|
123
|
-
'text-on-surface/[0.38]': disabled,
|
|
124
|
-
},
|
|
125
|
-
),
|
|
124
|
+
label: classNames({ invisible: loading }),
|
|
126
125
|
icon: classNames(
|
|
127
126
|
{ invisible: loading },
|
|
128
127
|
size === 'xSmall' && 'size-5',
|
|
@@ -130,26 +129,6 @@ export const buttonStyle = defaultClassNames<ButtonInterface>(
|
|
|
130
129
|
size === 'medium' && 'size-6',
|
|
131
130
|
size === 'large' && 'size-8',
|
|
132
131
|
size === 'xLarge' && 'size-10',
|
|
133
|
-
variant === 'elevated' && {
|
|
134
|
-
'text-primary': !disabled,
|
|
135
|
-
'text-on-surface/[38%]': disabled,
|
|
136
|
-
},
|
|
137
|
-
variant === 'filled' && {
|
|
138
|
-
'text-on-primary': !disabled,
|
|
139
|
-
'text-on-surface/[38%]': disabled,
|
|
140
|
-
},
|
|
141
|
-
variant === 'filledTonal' && {
|
|
142
|
-
'text-on-secondary-container': !disabled,
|
|
143
|
-
'text-on-surface/[0.38]': disabled,
|
|
144
|
-
},
|
|
145
|
-
variant === 'outlined' && {
|
|
146
|
-
'text-primary': !disabled,
|
|
147
|
-
'text-on-surface/[0.38]': disabled,
|
|
148
|
-
},
|
|
149
|
-
variant === 'text' && {
|
|
150
|
-
'text-primary': !disabled,
|
|
151
|
-
'text-on-surface/[0.38]': disabled,
|
|
152
|
-
},
|
|
153
132
|
),
|
|
154
133
|
}),
|
|
155
134
|
);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Divided.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Divided.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,eAAO,MAAM,OAAO,GAAI,0CAIrB,UAAU,CAAC,gBAAgB,CAAC,4CAI9B,CAAC"}
|