@liner-fe/prism 3.0.7 → 3.0.8

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.d.ts CHANGED
@@ -472,7 +472,7 @@ declare const useSnackbar: () => {
472
472
 
473
473
  declare const defaultLabelVariants: (props?: ({
474
474
  level?: "primary" | "secondary" | undefined;
475
- position?: "top" | "right" | undefined;
475
+ position?: "right" | "top" | undefined;
476
476
  size?: "l" | "m" | "s" | undefined;
477
477
  offset?: "medium" | "high" | "low" | undefined;
478
478
  disabled?: boolean | undefined;
package/lib/index.js CHANGED
@@ -251,11 +251,15 @@ var DefaultButton = forwardRef(
251
251
  const isLoadingWithDisabled = isLoading && disabled;
252
252
  const isLoadingOrDisabled = isLoading || disabled;
253
253
  const renderContent = /* @__PURE__ */ __name((children2) => /* @__PURE__ */ jsxs2("span", { className: clsx(defaultButtonChildrenVariants({ size })), children: [
254
- !!leftIcon && !isLoading && /* @__PURE__ */ jsx2(leftIcon.icon, { ...iconProps, ...leftIcon }),
255
- isLoading ? !!leftIcon || !!rightIcon ? /* @__PURE__ */ jsxs2(Fragment, { children: [
256
- /* @__PURE__ */ jsx2(Loading, { size: buttonIconSizeMap[size], level: buttonLoadingLevelMap[level] }),
257
- /* @__PURE__ */ jsx2("p", { className: style_module_default.content, children: children2 })
258
- ] }) : /* @__PURE__ */ jsxs2(Fragment, { children: [
254
+ !!leftIcon && /* @__PURE__ */ jsx2(
255
+ leftIcon.icon,
256
+ {
257
+ ...iconProps,
258
+ ...leftIcon,
259
+ ...isLoading && { style: { opacity: 0 } }
260
+ }
261
+ ),
262
+ isLoading ? /* @__PURE__ */ jsxs2(Fragment, { children: [
259
263
  /* @__PURE__ */ jsx2(
260
264
  Loading,
261
265
  {
@@ -281,7 +285,14 @@ var DefaultButton = forwardRef(
281
285
  }
282
286
  )
283
287
  ] }) : /* @__PURE__ */ jsx2("p", { className: style_module_default.content, children: children2 }),
284
- !!rightIcon && !isLoading && /* @__PURE__ */ jsx2(rightIcon.icon, { ...iconProps, ...rightIcon })
288
+ !!rightIcon && /* @__PURE__ */ jsx2(
289
+ rightIcon.icon,
290
+ {
291
+ ...iconProps,
292
+ ...rightIcon,
293
+ ...isLoading && { style: { opacity: 0 } }
294
+ }
295
+ )
285
296
  ] }), "renderContent");
286
297
  if (asChild) {
287
298
  const parent = Children.only(children);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liner-fe/prism",
3
- "version": "3.0.7",
3
+ "version": "3.0.8",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "dependencies": {