@liner-fe/prism 4.0.1 → 4.0.2
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/lib/index.js +14 -3
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -190,6 +190,16 @@ var buttonFillLevelIconTypeMap = {
|
|
|
190
190
|
static: "label-neutral-static",
|
|
191
191
|
"inverse-static": "label-on-inverse-static-base"
|
|
192
192
|
};
|
|
193
|
+
var buttonDisabledIconTypeMap = {
|
|
194
|
+
primary: "label-neutral-tertiary",
|
|
195
|
+
secondary: "label-neutral-tertiary",
|
|
196
|
+
tertiary: "label-neutral-tertiary",
|
|
197
|
+
quaternary: "label-neutral-tertiary",
|
|
198
|
+
quinary: "label-neutral-quaternary",
|
|
199
|
+
negative: "label-neutral-tertiary",
|
|
200
|
+
static: "label-neutral-tertiary",
|
|
201
|
+
"inverse-static": "label-on-inverse-tertiary"
|
|
202
|
+
};
|
|
193
203
|
var defaultButtonVariants = cva2({
|
|
194
204
|
base: style_module_default.button,
|
|
195
205
|
variants: {
|
|
@@ -250,13 +260,14 @@ var DefaultButton = forwardRef(
|
|
|
250
260
|
disabled,
|
|
251
261
|
...rest
|
|
252
262
|
}, ref) => {
|
|
263
|
+
const isLoadingWithDisabled = isLoading && disabled;
|
|
264
|
+
const isLoadingOrDisabled = isLoading || disabled;
|
|
265
|
+
const isDisabledStyle = !!disabled && !isLoading;
|
|
253
266
|
const iconProps = {
|
|
254
267
|
size: buttonIconSizeMap[size],
|
|
255
|
-
type: buttonFillLevelIconTypeMap[level],
|
|
268
|
+
type: isDisabledStyle ? buttonDisabledIconTypeMap[level] : buttonFillLevelIconTypeMap[level],
|
|
256
269
|
fillType: fillTypeMap[level]
|
|
257
270
|
};
|
|
258
|
-
const isLoadingWithDisabled = isLoading && disabled;
|
|
259
|
-
const isLoadingOrDisabled = isLoading || disabled;
|
|
260
271
|
const renderContent = /* @__PURE__ */ __name((children2) => /* @__PURE__ */ jsxs2("span", { className: clsx(defaultButtonChildrenVariants({ size })), children: [
|
|
261
272
|
!!leftIcon && /* @__PURE__ */ jsx2(
|
|
262
273
|
leftIcon.icon,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liner-fe/prism",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"dependencies": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"react-dom": "^19.1.0",
|
|
22
22
|
"sonner": "2.0.7",
|
|
23
23
|
"vaul": "1.1.2",
|
|
24
|
-
"@liner-fe/design-token": "^4.0.
|
|
24
|
+
"@liner-fe/design-token": "^4.0.1",
|
|
25
25
|
"@liner-fe/design-token-primitive": "^1.0.0",
|
|
26
26
|
"@liner-fe/icon": "^2.0.27"
|
|
27
27
|
},
|