@liner-fe/prism 4.0.0 → 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.css +2 -0
- package/lib/index.js +14 -5
- package/package.json +2 -2
package/lib/index.css
CHANGED
package/lib/index.js
CHANGED
|
@@ -80,8 +80,6 @@ var style_module_default2 = {
|
|
|
80
80
|
import { cva } from "cva";
|
|
81
81
|
|
|
82
82
|
// src/components/Box/index.tsx
|
|
83
|
-
import "@radix-ui/themes/layout/components.css";
|
|
84
|
-
import "@radix-ui/themes/layout/utilities.css";
|
|
85
83
|
import { Box } from "@radix-ui/themes";
|
|
86
84
|
|
|
87
85
|
// src/components/Flex/index.tsx
|
|
@@ -192,6 +190,16 @@ var buttonFillLevelIconTypeMap = {
|
|
|
192
190
|
static: "label-neutral-static",
|
|
193
191
|
"inverse-static": "label-on-inverse-static-base"
|
|
194
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
|
+
};
|
|
195
203
|
var defaultButtonVariants = cva2({
|
|
196
204
|
base: style_module_default.button,
|
|
197
205
|
variants: {
|
|
@@ -252,13 +260,14 @@ var DefaultButton = forwardRef(
|
|
|
252
260
|
disabled,
|
|
253
261
|
...rest
|
|
254
262
|
}, ref) => {
|
|
263
|
+
const isLoadingWithDisabled = isLoading && disabled;
|
|
264
|
+
const isLoadingOrDisabled = isLoading || disabled;
|
|
265
|
+
const isDisabledStyle = !!disabled && !isLoading;
|
|
255
266
|
const iconProps = {
|
|
256
267
|
size: buttonIconSizeMap[size],
|
|
257
|
-
type: buttonFillLevelIconTypeMap[level],
|
|
268
|
+
type: isDisabledStyle ? buttonDisabledIconTypeMap[level] : buttonFillLevelIconTypeMap[level],
|
|
258
269
|
fillType: fillTypeMap[level]
|
|
259
270
|
};
|
|
260
|
-
const isLoadingWithDisabled = isLoading && disabled;
|
|
261
|
-
const isLoadingOrDisabled = isLoading || disabled;
|
|
262
271
|
const renderContent = /* @__PURE__ */ __name((children2) => /* @__PURE__ */ jsxs2("span", { className: clsx(defaultButtonChildrenVariants({ size })), children: [
|
|
263
272
|
!!leftIcon && /* @__PURE__ */ jsx2(
|
|
264
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
|
},
|