aidos-ui 3.0.1 → 3.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.
@@ -7,6 +7,7 @@ import {
7
7
  getInteractableListItemJSStyles,
8
8
  } from "./Interactable";
9
9
  import { BaseLink } from "./BaseLink";
10
+ import { useListContext } from "./List";
10
11
 
11
12
  // @ts-ignore
12
13
  interface ListLinkItemProps extends BaseListItemProps {
@@ -18,7 +19,6 @@ interface ListLinkItemProps extends BaseListItemProps {
18
19
  body?: string;
19
20
  disabled?: boolean;
20
21
  selected?: boolean;
21
- bare?: boolean;
22
22
  target?: string;
23
23
  }
24
24
 
@@ -32,13 +32,14 @@ export const ListLinkItem = React.forwardRef(
32
32
  jsStyle,
33
33
  gap,
34
34
  selected,
35
- bare,
36
35
  color = "secondary",
37
36
  target,
38
37
  ...otherProps
39
38
  }: ListLinkItemProps,
40
39
  ref?: React.Ref<HTMLAnchorElement>
41
40
  ) => {
41
+ const { bare } = useListContext();
42
+
42
43
  return (
43
44
  <BaseListItem
44
45
  withDivider={!bare}
@@ -49,7 +50,6 @@ export const ListLinkItem = React.forwardRef(
49
50
  headlineColor={getGlyphColor(color, disabled, true)}
50
51
  bodyColor={getGlyphColor(color, disabled, true)}
51
52
  selected={selected}
52
- bare={bare}
53
53
  {...otherProps}
54
54
  jsStyle={jsStyle}
55
55
  >
package/src/Sublist.tsx CHANGED
@@ -4,6 +4,7 @@ import { Icon } from "./Icon";
4
4
  import { Box } from "./Box";
5
5
  import { Row } from "./Row";
6
6
  import { JSStyle } from "./jss";
7
+ import { useListContext } from "./List";
7
8
 
8
9
  export function Sublist({
9
10
  children,
@@ -12,9 +13,7 @@ export function Sublist({
12
13
  initialState = { collapsed: false },
13
14
  jsStyle,
14
15
  secondaryAddOn,
15
- bare,
16
16
  }: {
17
- bare?: boolean;
18
17
  children: React.ReactNode;
19
18
  label: string;
20
19
  labelBold?: boolean;
@@ -25,11 +24,9 @@ export function Sublist({
25
24
  secondaryAddOn?: ReactNode;
26
25
  }) {
27
26
  const [collapsed, setCollapsed] = React.useState(initialState.collapsed);
28
-
29
27
  return (
30
28
  <>
31
29
  <ListButtonItem
32
- bare={bare}
33
30
  headline={label}
34
31
  headlineBold={labelBold}
35
32
  onClick={() => setCollapsed((x) => !x)}
package/src/docs/pages.ts CHANGED
@@ -31,9 +31,13 @@ export const pages: Array<Page> = [
31
31
  },
32
32
  {
33
33
  type: "section",
34
- label: "Primary components",
34
+ label: "Layout",
35
+ content: [{ type: "link", page: "FlexLayout" }],
36
+ },
37
+ {
38
+ type: "section",
39
+ label: "Text",
35
40
  content: [
36
- { type: "link", page: "FlexLayout" },
37
41
  { type: "link", page: "Text" },
38
42
  { type: "link", page: "TextPairing" },
39
43
  { type: "link", page: "Icon" },
@@ -41,11 +45,12 @@ export const pages: Array<Page> = [
41
45
  },
42
46
  {
43
47
  type: "section",
44
- label: "Buttons and links",
48
+ label: "Actions",
45
49
  content: [
46
50
  { type: "link", page: "Button" },
47
51
  { type: "link", page: "Link" },
48
52
  { type: "link", page: "IconButton" },
53
+ { type: "link", page: "Tabs" },
49
54
  ],
50
55
  },
51
56
  {
@@ -87,11 +92,8 @@ export const pages: Array<Page> = [
87
92
  },
88
93
  {
89
94
  type: "section",
90
- label: "Complex components",
91
- content: [
92
- { type: "link", page: "Tabs" },
93
- { type: "link", page: "Calendar" },
94
- ],
95
+ label: "Time",
96
+ content: [{ type: "link", page: "Calendar" }],
95
97
  },
96
98
  {
97
99
  type: "section",