aidos-ui 3.0.0 → 3.0.2
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/README.md +2 -2
- package/dist/Badge.d.ts +1 -2
- package/dist/BaseLink.d.ts +1 -1
- package/dist/BaseList.d.ts +1 -1
- package/dist/BaseListAddOn.d.ts +1 -1
- package/dist/BaseListItem.d.ts +1 -2
- package/dist/BaseListItem.js +3 -1
- package/dist/BaseListItem.js.map +1 -1
- package/dist/BaseView.d.ts +1 -1
- package/dist/Box.d.ts +1 -2
- package/dist/Card.d.ts +1 -1
- package/dist/Checkbox.d.ts +1 -2
- package/dist/Circle.d.ts +1 -2
- package/dist/Column.d.ts +1 -1
- package/dist/DarkMode.d.ts +2 -2
- package/dist/DatePicker.d.ts +1 -2
- package/dist/DesignBook.d.ts +1 -2
- package/dist/Dialog.d.ts +2 -2
- package/dist/Dropdown.d.ts +1 -2
- package/dist/FlexLayout.d.ts +1 -1
- package/dist/Icon.d.ts +1 -1
- package/dist/List.d.ts +5 -2
- package/dist/List.js +22 -10
- package/dist/List.js.map +1 -1
- package/dist/ListButtonItem.d.ts +1 -2
- package/dist/ListButtonItem.js +4 -2
- package/dist/ListButtonItem.js.map +1 -1
- package/dist/ListDivider.d.ts +1 -2
- package/dist/ListHeaderItem.d.ts +2 -3
- package/dist/ListHeaderItem.js +4 -2
- package/dist/ListHeaderItem.js.map +1 -1
- package/dist/ListItem.d.ts +1 -2
- package/dist/ListItem.js +3 -1
- package/dist/ListItem.js.map +1 -1
- package/dist/ListLinkItem.d.ts +1 -2
- package/dist/ListLinkItem.js +4 -2
- package/dist/ListLinkItem.js.map +1 -1
- package/dist/ListSpacer.d.ts +1 -2
- package/dist/Popover.d.ts +2 -2
- package/dist/ProgressBar.d.ts +1 -2
- package/dist/ProgressCircle.d.ts +1 -2
- package/dist/Providers.d.ts +1 -1
- package/dist/RootView.d.ts +1 -1
- package/dist/Router.d.ts +1 -2
- package/dist/RouterState.d.ts +1 -1
- package/dist/Row.d.ts +1 -1
- package/dist/StackContext.d.ts +1 -1
- package/dist/StaticCheckbox.d.ts +1 -2
- package/dist/Sublist.d.ts +3 -3
- package/dist/Sublist.js +2 -2
- package/dist/Sublist.js.map +1 -1
- package/dist/SubmitIconInput.d.ts +1 -2
- package/dist/Tabs.d.ts +1 -1
- package/dist/Text.d.ts +8 -8
- package/dist/TextInputWithState.d.ts +1 -1
- package/dist/TextPairing.d.ts +1 -1
- package/dist/Tooltip.d.ts +1 -1
- package/dist/jss.d.ts +2 -2
- package/dist/stateMachineContextFactory.d.ts +1 -1
- package/package.json +10 -3
- package/scripts/embeddings.js +93 -0
- package/scripts/openai_embeddings.js +100 -0
- package/scripts/publish.js +1 -0
- package/scripts/test_embeddings.js +47 -0
- package/src/BaseListItem.tsx +3 -2
- package/src/List.tsx +33 -16
- package/src/ListButtonItem.tsx +3 -3
- package/src/ListHeaderItem.tsx +3 -3
- package/src/ListItem.tsx +4 -2
- package/src/ListLinkItem.tsx +3 -3
- package/src/Sublist.tsx +4 -4
- package/src/docs/mdx.tsx +99 -0
- package/src/docs/pages.ts +112 -0
- package/src/docs/searchIndex.ts +1 -0
- package/src/pages/Badge.mdx +1 -1
- package/src/pages/Button.mdx +4 -4
- package/src/pages/Link.mdx +3 -3
- package/src/pages/List.mdx +107 -21
- package/src/pages/ListHeader.mdx +12 -16
- package/src/pages/_app.tsx +117 -240
- package/src/pages/index.mdx +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
This is a React design system library with many utilities and zero dependencies. It was built with the aim to be simple, lightweight and beautiful.
|
|
4
4
|
|
|
5
|
-
Documentation can be found [here](https://
|
|
5
|
+
Documentation can be found [here](https://aidos-ui.vercel.app);
|
|
6
6
|
|
|
7
7
|
## Why?
|
|
8
8
|
|
|
@@ -48,7 +48,7 @@ npm install --save aidos-ui
|
|
|
48
48
|
|
|
49
49
|
## How to use
|
|
50
50
|
|
|
51
|
-
- Import components from the `dist` folder (e.g. `import {Button} from '
|
|
51
|
+
- Import components from the `dist` folder (e.g. `import {Button} from 'aidos-ui/dist`)
|
|
52
52
|
- The `Providers` component somewhere in the application.
|
|
53
53
|
- If the application is running in nextjs, the `JSServerStyles` component has to be used in the \_document `<Head />`, this enables jss to work also server side.
|
|
54
54
|
|
package/dist/Badge.d.ts
CHANGED
package/dist/BaseLink.d.ts
CHANGED
|
@@ -13,5 +13,5 @@ export interface BaseLinkProps extends React.LinkHTMLAttributes<HTMLAnchorElemen
|
|
|
13
13
|
animateInteraction?: boolean;
|
|
14
14
|
padding?: Padding;
|
|
15
15
|
}
|
|
16
|
-
export declare const BaseLinkComponentOverrideContext: React.Context<(props: any) => JSX.Element>;
|
|
16
|
+
export declare const BaseLinkComponentOverrideContext: React.Context<(props: any) => import("react/jsx-runtime").JSX.Element>;
|
|
17
17
|
export declare const BaseLink: React.ForwardRefExoticComponent<BaseLinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
package/dist/BaseList.d.ts
CHANGED
|
@@ -3,4 +3,4 @@ import { ColumnProps } from "./Column";
|
|
|
3
3
|
export interface BaseListProps extends ColumnProps {
|
|
4
4
|
tag?: undefined;
|
|
5
5
|
}
|
|
6
|
-
export declare const BaseList: React.ForwardRefExoticComponent<
|
|
6
|
+
export declare const BaseList: React.ForwardRefExoticComponent<Omit<BaseListProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
package/dist/BaseListAddOn.d.ts
CHANGED
|
@@ -2,4 +2,4 @@ import React from "react";
|
|
|
2
2
|
import { BaseViewProps } from "./BaseView";
|
|
3
3
|
export interface BaseListAddOnProps extends BaseViewProps {
|
|
4
4
|
}
|
|
5
|
-
export declare const BaseListAddOn: React.ForwardRefExoticComponent<
|
|
5
|
+
export declare const BaseListAddOn: React.ForwardRefExoticComponent<Omit<BaseListAddOnProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
package/dist/BaseListItem.d.ts
CHANGED
|
@@ -22,6 +22,5 @@ export interface BaseListItemProps extends RowProps {
|
|
|
22
22
|
role?: undefined;
|
|
23
23
|
gap?: Spacing;
|
|
24
24
|
selected?: boolean;
|
|
25
|
-
bare?: boolean;
|
|
26
25
|
}
|
|
27
|
-
export declare const BaseListItem: React.ForwardRefExoticComponent<
|
|
26
|
+
export declare const BaseListItem: React.ForwardRefExoticComponent<Omit<BaseListItemProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
package/dist/BaseListItem.js
CHANGED
|
@@ -5,7 +5,9 @@ import { Row } from "./Row";
|
|
|
5
5
|
import { cssVar } from "./jss";
|
|
6
6
|
import { TextPairing } from "./TextPairing";
|
|
7
7
|
import { BaseView } from "./BaseView";
|
|
8
|
-
|
|
8
|
+
import { useListContext } from "./List";
|
|
9
|
+
export const BaseListItem = React.forwardRef(({ children, jsStyle, withDivider = true, headline, headlineSize = "medium", headlineColor = "primary", headlineAddOn, body, bodySize = "small", bodyColor = "secondary", addOn, addOnPosition, outerAddOn, disabled = false, padding = "medium", gap = "medium", selected, headlineBold, ...otherProps }, ref) => {
|
|
10
|
+
const { bare } = useListContext();
|
|
9
11
|
const content = (_jsx(TextPairing, { headlineBold: headlineBold, padding: padding, gap: gap, addOn: addOn, addOnPosition: addOnPosition, headline: headline, headlineSize: headlineSize, headlineColor: disabled ? "subtle" : bare && selected ? "highlight" : headlineColor, headlineAddOn: headlineAddOn, body: body, bodySize: bodySize, bodyColor: disabled ? "subtle" : bodyColor, grow: true, shrink: false }));
|
|
10
12
|
return (_jsxs(_Fragment, { children: [_jsxs(Row, { ...otherProps, ref: ref, relative: true, tag: "li", role: "row", jsStyle: [
|
|
11
13
|
!bare && {
|
package/dist/BaseListItem.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseListItem.js","sourceRoot":"","sources":["../src/BaseListItem.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,WAAW,EAAE,MAAM,e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ANGED
|
@@ -9,4 +9,4 @@ export interface BaseViewProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
9
9
|
relative?: boolean;
|
|
10
10
|
tag?: keyof HTMLElementTagNameMap;
|
|
11
11
|
}
|
|
12
|
-
export declare const BaseView: React.ForwardRefExoticComponent<
|
|
12
|
+
export declare const BaseView: React.ForwardRefExoticComponent<Omit<BaseViewProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
package/dist/Box.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { FlexLayoutProps } from "./FlexLayout";
|
|
3
2
|
export interface BoxProps extends FlexLayoutProps {
|
|
4
3
|
}
|
|
5
|
-
export declare function Box({ padding, align, justify, ...otherProps }: BoxProps): JSX.Element;
|
|
4
|
+
export declare function Box({ padding, align, justify, ...otherProps }: BoxProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/Card.d.ts
CHANGED
package/dist/Checkbox.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { BaseInputProps } from "./BaseInput";
|
|
3
2
|
import { Size } from "./jss";
|
|
4
3
|
interface CheckboxProps extends BaseInputProps {
|
|
@@ -8,5 +7,5 @@ interface CheckboxProps extends BaseInputProps {
|
|
|
8
7
|
value?: undefined;
|
|
9
8
|
onChange?: undefined;
|
|
10
9
|
}
|
|
11
|
-
export declare function Checkbox({ checked, onClick, size, ...inputProps }: CheckboxProps): JSX.Element;
|
|
10
|
+
export declare function Checkbox({ checked, onClick, size, ...inputProps }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
12
11
|
export {};
|
package/dist/Circle.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { BoxProps } from "./Box";
|
|
3
2
|
interface CircleProps extends BoxProps {
|
|
4
3
|
}
|
|
5
|
-
export declare function Circle({ jsStyle, padding, ...otherProps }: CircleProps): JSX.Element;
|
|
4
|
+
export declare function Circle({ jsStyle, padding, ...otherProps }: CircleProps): import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
export {};
|
package/dist/Column.d.ts
CHANGED
|
@@ -3,4 +3,4 @@ import { FlexLayoutProps } from "./FlexLayout";
|
|
|
3
3
|
export interface ColumnProps extends FlexLayoutProps {
|
|
4
4
|
direction?: "column";
|
|
5
5
|
}
|
|
6
|
-
export declare const Column: React.ForwardRefExoticComponent<
|
|
6
|
+
export declare const Column: React.ForwardRefExoticComponent<Omit<ColumnProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
package/dist/DarkMode.d.ts
CHANGED
|
@@ -8,6 +8,6 @@ export declare function DarkModeProvider({ children, enabled, toggle, }: {
|
|
|
8
8
|
children: ReactNode;
|
|
9
9
|
enabled: boolean;
|
|
10
10
|
toggle: () => void;
|
|
11
|
-
}): JSX.Element;
|
|
12
|
-
export declare function DarkModeToggle(): JSX.Element;
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function DarkModeToggle(): import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export {};
|
package/dist/DatePicker.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { TextColor } from "./jss";
|
|
3
2
|
export interface DatePickerProps {
|
|
4
3
|
id: string;
|
|
@@ -9,4 +8,4 @@ export interface DatePickerProps {
|
|
|
9
8
|
max?: string;
|
|
10
9
|
onDateChange: (date: Date) => void;
|
|
11
10
|
}
|
|
12
|
-
export declare function DatePicker({ id, label, color, date, onDateChange, }: DatePickerProps): JSX.Element;
|
|
11
|
+
export declare function DatePicker({ id, label, color, date, onDateChange, }: DatePickerProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/DesignBook.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function DesignBook(): JSX.Element;
|
|
1
|
+
export declare function DesignBook(): import("react/jsx-runtime").JSX.Element;
|
package/dist/Dialog.d.ts
CHANGED
|
@@ -3,10 +3,10 @@ export declare const Dialog: ({ label, children, close, }: {
|
|
|
3
3
|
label: string;
|
|
4
4
|
children: JSX.Element;
|
|
5
5
|
close: () => void;
|
|
6
|
-
}) => JSX.Element;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export declare function DialogProvider({ children }: {
|
|
8
8
|
children: any;
|
|
9
|
-
}): JSX.Element;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export declare function useDialog<Input>(DialogComponent: (props: {
|
|
11
11
|
close: () => void;
|
|
12
12
|
} & Input) => JSX.Element, options: {
|
package/dist/Dropdown.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { JSStyle } from "./jss";
|
|
3
2
|
export declare function Dropdown<T>({ id, label, options, selection, setSelection, jsStyle, }: {
|
|
4
3
|
id?: string;
|
|
@@ -7,4 +6,4 @@ export declare function Dropdown<T>({ id, label, options, selection, setSelectio
|
|
|
7
6
|
setSelection: (selection: T) => void;
|
|
8
7
|
selection: T;
|
|
9
8
|
jsStyle?: JSStyle;
|
|
10
|
-
}): JSX.Element;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
package/dist/FlexLayout.d.ts
CHANGED
|
@@ -8,4 +8,4 @@ export interface FlexLayoutProps extends BaseViewProps {
|
|
|
8
8
|
padding?: Padding;
|
|
9
9
|
direction?: FlexDirection;
|
|
10
10
|
}
|
|
11
|
-
export declare const FlexLayout: React.ForwardRefExoticComponent<
|
|
11
|
+
export declare const FlexLayout: React.ForwardRefExoticComponent<Omit<FlexLayoutProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
package/dist/Icon.d.ts
CHANGED
package/dist/List.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { BaseListProps } from "./BaseList";
|
|
3
2
|
interface ListProps extends BaseListProps {
|
|
4
3
|
ariaLabel: string;
|
|
@@ -6,6 +5,10 @@ interface ListProps extends BaseListProps {
|
|
|
6
5
|
autofocus?: boolean;
|
|
7
6
|
role?: undefined;
|
|
8
7
|
navigation?: boolean;
|
|
8
|
+
carded?: boolean;
|
|
9
9
|
}
|
|
10
|
-
export declare function List({ ariaLabel, jsStyle, autofocus, navigation, bare, ...otherProps }: ListProps): JSX.Element;
|
|
10
|
+
export declare function List({ ariaLabel, jsStyle, autofocus, navigation, bare, carded, ...otherProps }: ListProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const useListContext: () => {
|
|
12
|
+
bare: boolean;
|
|
13
|
+
};
|
|
11
14
|
export {};
|
package/dist/List.js
CHANGED
|
@@ -1,17 +1,29 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React, { useContext, useMemo } from "react";
|
|
2
3
|
import { BaseList } from "./BaseList";
|
|
3
4
|
import { useNavigation } from "./useNavigation";
|
|
4
5
|
import { cssVar } from "./jss";
|
|
5
|
-
|
|
6
|
+
const ListContext = React.createContext({ bare: false });
|
|
7
|
+
export function List({ ariaLabel, jsStyle, autofocus = false, navigation = true, bare, carded = true, ...otherProps }) {
|
|
6
8
|
const rootRef = useNavigation({ autofocus, enabled: navigation });
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
const contextValue = useMemo(() => ({ bare }), [bare]);
|
|
10
|
+
return (_jsx(ListContext.Provider, { value: contextValue, children: _jsx(BaseList, { role: "grid", "aria-label": ariaLabel, ref: rootRef, jsStyle: [
|
|
11
|
+
{ overflow: "hidden" },
|
|
12
|
+
!bare && {
|
|
13
|
+
backgroundColor: cssVar("--overlay-background"),
|
|
14
|
+
},
|
|
15
|
+
!bare &&
|
|
16
|
+
!carded && {
|
|
17
|
+
borderBottom: `1px solid ${cssVar("--divider")}`,
|
|
18
|
+
borderTop: `1px solid ${cssVar("--divider")}`,
|
|
19
|
+
},
|
|
20
|
+
!bare &&
|
|
21
|
+
carded && {
|
|
22
|
+
border: `1px solid ${cssVar("--divider")}`,
|
|
23
|
+
borderRadius: cssVar("--border-radius-l"),
|
|
24
|
+
},
|
|
25
|
+
jsStyle,
|
|
26
|
+
], ...otherProps }) }));
|
|
16
27
|
}
|
|
28
|
+
export const useListContext = () => useContext(ListContext);
|
|
17
29
|
//# sourceMappingURL=List.js.map
|
package/dist/List.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.js","sourceRoot":"","sources":["../src/List.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"List.js","sourceRoot":"","sources":["../src/List.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAW/B,MAAM,WAAW,GAAG,KAAK,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;AAEzD,MAAM,UAAU,IAAI,CAAC,EACnB,SAAS,EACT,OAAO,EACP,SAAS,GAAG,KAAK,EACjB,UAAU,GAAG,IAAI,EACjB,IAAI,EACJ,MAAM,GAAG,IAAI,EACb,GAAG,UAAU,EACH;IACV,MAAM,OAAO,GAAG,aAAa,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC;IAClE,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAEvD,OAAO,CACL,KAAC,WAAW,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,YACvC,KAAC,QAAQ,IACP,IAAI,EAAC,MAAM,gBACC,SAAS,EACrB,GAAG,EAAE,OAAO,EACZ,OAAO,EAAE;gBACP,EAAE,QAAQ,EAAE,QAAQ,EAAE;gBACtB,CAAC,IAAI,IAAI;oBACP,eAAe,EAAE,MAAM,CAAC,sBAAsB,CAAC;iBAChD;gBACD,CAAC,IAAI;oBACH,CAAC,MAAM,IAAI;oBACT,YAAY,EAAE,aAAa,MAAM,CAAC,WAAW,CAAC,EAAE;oBAChD,SAAS,EAAE,aAAa,MAAM,CAAC,WAAW,CAAC,EAAE;iBAC9C;gBACH,CAAC,IAAI;oBACH,MAAM,IAAI;oBACR,MAAM,EAAE,aAAa,MAAM,CAAC,WAAW,CAAC,EAAE;oBAC1C,YAAY,EAAE,MAAM,CAAC,mBAAmB,CAAC;iBAC1C;gBACH,OAAO;aACR,KACG,UAAU,GACd,GACmB,CACxB,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC"}
|
package/dist/ListButtonItem.d.ts
CHANGED
|
@@ -8,8 +8,7 @@ interface ListButtonItemProps extends BaseListItemProps {
|
|
|
8
8
|
body?: string;
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
selected?: boolean;
|
|
11
|
-
bare?: boolean;
|
|
12
11
|
children?: void;
|
|
13
12
|
}
|
|
14
|
-
export declare const ListButtonItem: React.ForwardRefExoticComponent<
|
|
13
|
+
export declare const ListButtonItem: React.ForwardRefExoticComponent<Omit<ListButtonItemProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
15
14
|
export {};
|
package/dist/ListButtonItem.js
CHANGED
|
@@ -3,7 +3,9 @@ import React from "react";
|
|
|
3
3
|
import { BaseListItem } from "./BaseListItem";
|
|
4
4
|
import { getGlyphColor, getInteractableListItemJSStyles, } from "./Interactable";
|
|
5
5
|
import { BaseButton } from "./BaseButton";
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
import { useListContext } from "./List";
|
|
7
|
+
export const ListButtonItem = React.forwardRef(({ onClick, color = "secondary", disabled = false, padding = "medium", jsStyle, gap, selected, ...otherProps }, ref) => {
|
|
8
|
+
const { bare } = useListContext();
|
|
9
|
+
return (_jsx(BaseListItem, { withDivider: !bare, disabled: disabled, padding: "none", gap: gap, headlineColor: getGlyphColor(color, disabled, true), bodyColor: getGlyphColor(color, disabled, true), selected: selected, "aria-selected": selected, ...otherProps, jsStyle: jsStyle, children: ({ content }) => (_jsx(BaseButton, { padding: padding, disabled: disabled, animateInteraction: false, bare: true, color: bare ? "secondary" : color, ref: ref, jsStyle: getInteractableListItemJSStyles({ bare, selected }), onClick: onClick, children: content })) }));
|
|
8
10
|
});
|
|
9
11
|
//# sourceMappingURL=ListButtonItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListButtonItem.js","sourceRoot":"","sources":["../src/ListButtonItem.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAqB,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAEL,aAAa,EACb,+BAA+B,GAChC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"ListButtonItem.js","sourceRoot":"","sources":["../src/ListButtonItem.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAqB,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAEL,aAAa,EACb,+BAA+B,GAChC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAaxC,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAC5C,CACE,EACE,OAAO,EACP,KAAK,GAAG,WAAW,EACnB,QAAQ,GAAG,KAAK,EAChB,OAAO,GAAG,QAAQ,EAClB,OAAO,EACP,GAAG,EACH,QAAQ,EACR,GAAG,UAAU,EACO,EACtB,GAAkC,EAClC,EAAE;IACF,MAAM,EAAE,IAAI,EAAE,GAAG,cAAc,EAAE,CAAC;IAElC,OAAO,CACL,KAAC,YAAY,IACX,WAAW,EAAE,CAAC,IAAI,EAClB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAC,MAAM,EACd,GAAG,EAAE,GAAG,EACR,aAAa,EAAE,aAAa,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,EACnD,SAAS,EAAE,aAAa,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,EAC/C,QAAQ,EAAE,QAAQ,mBACH,QAAQ,KACnB,UAAU,EACd,OAAO,EAAE,OAAO,YAEf,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAChB,KAAC,UAAU,IACT,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,kBAAkB,EAAE,KAAK,EACzB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,EACjC,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,+BAA+B,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,EAC5D,OAAO,EAAE,OAAO,YAEf,OAAO,GACG,CACd,GACY,CAChB,CAAC;AACJ,CAAC,CACF,CAAC"}
|
package/dist/ListDivider.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function ListDivider(): JSX.Element;
|
|
1
|
+
export declare function ListDivider(): import("react/jsx-runtime").JSX.Element;
|
package/dist/ListHeaderItem.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
import { Position } from "./jss";
|
|
3
|
-
export declare function ListHeaderItem({
|
|
4
|
-
bare?: boolean;
|
|
3
|
+
export declare function ListHeaderItem({ highlight, headline, body, withDivider, addOn, addOnPosition, }: {
|
|
5
4
|
highlight?: boolean;
|
|
6
5
|
headline: string;
|
|
7
6
|
body?: string;
|
|
8
7
|
withDivider?: boolean;
|
|
9
8
|
addOn?: ReactNode;
|
|
10
9
|
addOnPosition?: Position;
|
|
11
|
-
}): JSX.Element;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
package/dist/ListHeaderItem.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { BaseListItem } from "./BaseListItem";
|
|
3
3
|
import { cssVar } from "./jss";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import { useListContext } from "./List";
|
|
5
|
+
export function ListHeaderItem({ highlight, headline, body, withDivider, addOn, addOnPosition, }) {
|
|
6
|
+
const { bare } = useListContext();
|
|
7
|
+
return (_jsx(BaseListItem, { headline: headline, headlineColor: highlight ? (bare ? "highlight" : "light") : "primary", headlineBold: true, body: body, addOn: addOn, addOnPosition: addOnPosition, withDivider: bare ? false : withDivider, jsStyle: bare
|
|
6
8
|
? null
|
|
7
9
|
: {
|
|
8
10
|
backgroundColor: highlight
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListHeaderItem.js","sourceRoot":"","sources":["../src/ListHeaderItem.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAY,MAAM,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ListHeaderItem.js","sourceRoot":"","sources":["../src/ListHeaderItem.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAY,MAAM,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAExC,MAAM,UAAU,cAAc,CAAC,EAC7B,SAAS,EACT,QAAQ,EACR,IAAI,EACJ,WAAW,EACX,KAAK,EACL,aAAa,GAQd;IACC,MAAM,EAAE,IAAI,EAAE,GAAG,cAAc,EAAE,CAAC;IAElC,OAAO,CACL,KAAC,YAAY,IACX,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,EACrE,YAAY,EAAE,IAAI,EAClB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,aAAa,EAC5B,WAAW,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,WAAW,EACvC,OAAO,EACL,IAAI;YACF,CAAC,CAAC,IAAI;YACN,CAAC,CAAC;gBACE,eAAe,EAAE,SAAS;oBACxB,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;oBACvB,CAAC,CAAC,MAAM,CAAC,wBAAwB,CAAC;aACrC,YAGN,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,GACZ,CAChB,CAAC;AACJ,CAAC"}
|
package/dist/ListItem.d.ts
CHANGED
|
@@ -3,8 +3,7 @@ import { BaseListItemProps } from "./BaseListItem";
|
|
|
3
3
|
interface ListItemProps extends BaseListItemProps {
|
|
4
4
|
headline: string;
|
|
5
5
|
body?: string;
|
|
6
|
-
bare?: boolean;
|
|
7
6
|
children?: void;
|
|
8
7
|
}
|
|
9
|
-
export declare const ListItem: React.ForwardRefExoticComponent<
|
|
8
|
+
export declare const ListItem: React.ForwardRefExoticComponent<Omit<ListItemProps, "ref"> & React.RefAttributes<HTMLLIElement>>;
|
|
10
9
|
export {};
|
package/dist/ListItem.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { BaseListItem } from "./BaseListItem";
|
|
4
|
+
import { useListContext } from "./List";
|
|
4
5
|
export const ListItem = React.forwardRef((props, ref) => {
|
|
5
|
-
|
|
6
|
+
const { bare } = useListContext();
|
|
7
|
+
return (_jsx(BaseListItem, { withDivider: !bare, ...props, jsStyle: props.jsStyle, ref: ref, children: ({ content }) => content }));
|
|
6
8
|
});
|
|
7
9
|
//# sourceMappingURL=ListItem.js.map
|
package/dist/ListItem.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.js","sourceRoot":"","sources":["../src/ListItem.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAqB,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"ListItem.js","sourceRoot":"","sources":["../src/ListItem.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAqB,MAAM,gBAAgB,CAAC;AAEjE,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AASxC,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CACtC,CAAC,KAAoB,EAAE,GAA8B,EAAE,EAAE;IACvD,MAAM,EAAE,IAAI,EAAE,GAAG,cAAc,EAAE,CAAC;IAElC,OAAO,CACL,KAAC,YAAY,IACX,WAAW,EAAE,CAAC,IAAI,KACd,KAAK,EACT,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,GAAG,EAAE,GAAG,YAEP,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,GACZ,CAChB,CAAC;AACJ,CAAC,CACF,CAAC"}
|
package/dist/ListLinkItem.d.ts
CHANGED
|
@@ -10,8 +10,7 @@ interface ListLinkItemProps extends BaseListItemProps {
|
|
|
10
10
|
body?: string;
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
selected?: boolean;
|
|
13
|
-
bare?: boolean;
|
|
14
13
|
target?: string;
|
|
15
14
|
}
|
|
16
|
-
export declare const ListLinkItem: React.ForwardRefExoticComponent<
|
|
15
|
+
export declare const ListLinkItem: React.ForwardRefExoticComponent<Omit<ListLinkItemProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
17
16
|
export {};
|
package/dist/ListLinkItem.js
CHANGED
|
@@ -3,7 +3,9 @@ import React from "react";
|
|
|
3
3
|
import { BaseListItem } from "./BaseListItem";
|
|
4
4
|
import { getGlyphColor, getInteractableListItemJSStyles, } from "./Interactable";
|
|
5
5
|
import { BaseLink } from "./BaseLink";
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
import { useListContext } from "./List";
|
|
7
|
+
export const ListLinkItem = React.forwardRef(({ onClick, href, disabled = false, padding = "medium", jsStyle, gap, selected, color = "secondary", target, ...otherProps }, ref) => {
|
|
8
|
+
const { bare } = useListContext();
|
|
9
|
+
return (_jsx(BaseListItem, { withDivider: !bare, disabled: disabled, "aria-selected": selected, padding: "none", gap: gap, headlineColor: getGlyphColor(color, disabled, true), bodyColor: getGlyphColor(color, disabled, true), selected: selected, ...otherProps, jsStyle: jsStyle, children: ({ content }) => (_jsx(BaseLink, { target: target, padding: padding, "aria-current": selected ? "page" : undefined, disabled: disabled, animateInteraction: false, bare: true, color: color, href: href, ref: ref, jsStyle: getInteractableListItemJSStyles({ bare, selected }), onClick: onClick, children: content })) }));
|
|
8
10
|
});
|
|
9
11
|
//# sourceMappingURL=ListLinkItem.js.map
|
package/dist/ListLinkItem.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListLinkItem.js","sourceRoot":"","sources":["../src/ListLinkItem.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,YAAY,EAA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O,kBACF,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EAC3C,QAAQ,EAAE,QAAQ,EAClB,kBAAkB,EAAE,KAAK,EACzB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,+BAA+B,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,EAC5D,OAAO,EAAE,OAAO,YAEf,OAAO,GACC,CACZ,GACY,CAChB,CAAC;AACJ,CAAC,CACF,CAAC"}
|
package/dist/ListSpacer.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function ListSpacer(): JSX.Element;
|
|
1
|
+
export declare function ListSpacer(): import("react/jsx-runtime").JSX.Element;
|