@janbox/storefront-ui 5.0.2 → 5.0.3

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.
@@ -8,7 +8,7 @@ import { TabIndicator } from "../tab-indicator/tab-indicator.js";
8
8
  import { Primitive } from "../../primitive/primitive.js";
9
9
  const TabList = ({ ref, children, ..._props }) => {
10
10
  const { tabConfig, overflowBehavior, indicator, align, containerProps, ...props } = getTabListProps(_props);
11
- const alignStyle = (() => {
11
+ const containerAlignStyle = (() => {
12
12
  switch (align) {
13
13
  case "end":
14
14
  return {
@@ -26,6 +26,24 @@ const TabList = ({ ref, children, ..._props }) => {
26
26
  return {};
27
27
  }
28
28
  })();
29
+ const innerAlignStyle = (() => {
30
+ switch (align) {
31
+ case "end":
32
+ return {
33
+ justifyContent: "flex-end"
34
+ };
35
+ case "start":
36
+ return {
37
+ justifyContent: "flex-start"
38
+ };
39
+ case "center":
40
+ return {
41
+ justifyContent: "safe center"
42
+ };
43
+ default:
44
+ return {};
45
+ }
46
+ })();
29
47
  const contextValue = useMemo(
30
48
  () => ({
31
49
  tabConfig
@@ -38,7 +56,7 @@ const TabList = ({ ref, children, ..._props }) => {
38
56
  ...containerProps,
39
57
  sx: {
40
58
  display: "flex",
41
- ...alignStyle,
59
+ ...containerAlignStyle,
42
60
  ...containerProps == null ? void 0 : containerProps.sx
43
61
  },
44
62
  children: /* @__PURE__ */ jsxs(
@@ -52,6 +70,7 @@ const TabList = ({ ref, children, ..._props }) => {
52
70
  maxWidth: "100%",
53
71
  alignItems: "center",
54
72
  position: "relative",
73
+ ...innerAlignStyle,
55
74
  ...overflowBehavior === "scroll" ? {
56
75
  overflow: "auto",
57
76
  ...scrollbarNoneStyle
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@janbox/storefront-ui",
3
- "version": "5.0.2",
3
+ "version": "5.0.3",
4
4
  "description": "Storefront UI component library for Janbox",
5
5
  "author": "Janbox",
6
6
  "keywords": [