@pattern-stack/frontend-patterns 0.2.0-alpha.13 → 0.2.0-alpha.14

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 CHANGED
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.2.0-alpha.14]
11
+
12
+ ### Fixed
13
+ - **`Button` no longer wraps `children` in a `<span>`** when `iconOnlyMobile` is false. The previous unconditional `<span>` (default `display: inline`) broke the parent `inline-flex` layout for any consumer passing multiple children — block-level children inside the inline span would stack vertically instead of sitting beside their siblings. Most visible victim: `SidebarButton`, whose expanded items rendered the icon centered ABOVE the label instead of horizontally next to it. The wrapper `<span>` is now only emitted when `iconOnlyMobile` is true (its sole purpose — applying `hidden sm:inline`); otherwise children are rendered directly so they participate in the button's flex layout.
14
+
10
15
  ## [0.2.0-alpha.13]
11
16
 
12
17
  ### Changed
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../../src/atoms/components/core/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,KAAK,WAAW,IAAI,aAAa,EAClC,MAAM,4BAA4B,CAAC;AAKpC,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC;IAClE,6DAA6D;IAC7D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oCAAoC;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACzC,mCAAmC;IACnC,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,kCAAkC;IAClC,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,8CAA8C;IAC9C,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM,uFAiDlB,CAAC"}
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../../src/atoms/components/core/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,KAAK,WAAW,IAAI,aAAa,EAClC,MAAM,4BAA4B,CAAC;AAKpC,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC;IAClE,6DAA6D;IAC7D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oCAAoC;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACzC,mCAAmC;IACnC,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,kCAAkC;IAClC,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,8CAA8C;IAC9C,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM,uFAkDlB,CAAC"}
package/dist/index.es.js CHANGED
@@ -4121,7 +4121,7 @@ const Button = React__default.forwardRef(
4121
4121
  children: [
4122
4122
  loading && /* @__PURE__ */ jsx(Spinner$1, { className: "w-4 h-4 mr-2" }),
4123
4123
  !loading && icon && /* @__PURE__ */ jsx("span", { className: cn("inline-flex shrink-0", children && "mr-2"), children: icon }),
4124
- children && /* @__PURE__ */ jsx("span", { className: cn(iconOnlyMobile && "hidden sm:inline"), children }),
4124
+ children && (iconOnlyMobile ? /* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children }) : /* @__PURE__ */ jsx(Fragment, { children })),
4125
4125
  !loading && iconAfter && /* @__PURE__ */ jsx("span", { className: cn("inline-flex shrink-0", children && "ml-2"), children: iconAfter })
4126
4126
  ]
4127
4127
  }