@grucloud/bau-ui 0.61.2 → 0.62.0

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@grucloud/bau-ui",
3
3
  "description": "Components library built with Bau",
4
- "version": "0.61.2",
4
+ "version": "0.62.0",
5
5
  "type": "module",
6
6
  "license": "BSD",
7
7
  "keywords": [
@@ -20,11 +20,11 @@
20
20
  "directory": "bau-ui"
21
21
  },
22
22
  "dependencies": {
23
- "@grucloud/bau": "^0.61.0",
24
- "@grucloud/bau-css": "^0.61.0"
23
+ "@grucloud/bau": "^0.62.0",
24
+ "@grucloud/bau-css": "^0.62.0"
25
25
  },
26
26
  "devDependencies": {
27
27
  "typedoc": "0.24.8"
28
28
  },
29
- "gitHead": "8e61f7e34ca1c601f3685e92c80e58148fa314ed"
29
+ "gitHead": "ecaa1d232ad3eb48859211b8ffc48f4f4e799e0c"
30
30
  }
package/tabs/index.d.ts CHANGED
@@ -23,7 +23,7 @@ declare module "@grucloud/bau-ui/tabs" {
23
23
 
24
24
  type Option = {
25
25
  tabDefs: Tab[];
26
- tabsName?: string;
26
+ tabsKey?: string;
27
27
  } & ComponentOption;
28
28
 
29
29
  export default function (context: any, option: Option): Component;
package/tabs/tabs.js CHANGED
@@ -27,12 +27,19 @@ export default function (context, options = {}) {
27
27
  align-items: flex-start;
28
28
  padding: 0;
29
29
  margin: 0;
30
+ border-bottom: 1px solid var(--color-emphasis-100);
30
31
  list-style: none;
32
+ & li:not(:last-child) {
33
+ border-right: 1px solid var(--color-emphasis-100);
34
+ }
31
35
  & li {
36
+ display: flex;
37
+ flex-direction: column;
38
+
32
39
  & > a {
40
+ padding: 0.6rem 1rem 0.6rem 1rem;
33
41
  color: inherit;
34
42
  text-decoration: none;
35
- padding: 0.5rem 1rem 0 1rem;
36
43
  }
37
44
  text-align: center;
38
45
  color: inherit;
@@ -43,9 +50,6 @@ export default function (context, options = {}) {
43
50
  &:hover {
44
51
  color: var(--color-primary-light);
45
52
  background-color: var(--color-emphasis-200);
46
- &::after {
47
- transform: translateY(0%);
48
- }
49
53
  }
50
54
  &::after {
51
55
  transition: var(--transition-fast) ease-in-out;
@@ -53,7 +57,6 @@ export default function (context, options = {}) {
53
57
  background: var(--color-primary-light);
54
58
  opacity: 1;
55
59
  content: "";
56
- margin-top: 0.3rem;
57
60
  height: 2px;
58
61
  width: 100%;
59
62
  display: block;
@@ -82,9 +85,9 @@ export default function (context, options = {}) {
82
85
  let [
83
86
  {
84
87
  size = options.size ?? "md",
85
- variant = options.variant ?? "outline",
88
+ variant = options.variant ?? "plain",
86
89
  color = options.color ?? "neutral",
87
- tabsName = "tabs",
90
+ tabsKey = "tabs",
88
91
  ...props
89
92
  },
90
93
  ...children
@@ -97,12 +100,12 @@ export default function (context, options = {}) {
97
100
  const hashchange = () => {
98
101
  //console.log("tabs hashchange");
99
102
  const search = new URLSearchParams(window.location.search);
100
- const tabName = search.get(tabsName) ?? tabDefs[0].name;
103
+ const tabName = search.get(tabsKey) ?? tabDefs[0].name;
101
104
 
102
105
  const nextTab = tabByName(tabName);
103
106
  tabCurrentState.val.exit?.call();
104
107
  tabCurrentState.val = nextTab;
105
- nextTab.enter?.call();
108
+ nextTab?.enter?.call();
106
109
  };
107
110
 
108
111
  hashchange();
@@ -120,8 +123,8 @@ export default function (context, options = {}) {
120
123
 
121
124
  const buildHref = (nextTab) => {
122
125
  const search = new URLSearchParams(window.location.search);
123
- search.delete(tabsName);
124
- search.append(tabsName, nextTab);
126
+ search.delete(tabsKey);
127
+ search.append(tabsKey, nextTab);
125
128
  return `?${search.toString()}`;
126
129
  };
127
130