pentatrion-design 0.1.2 → 0.2.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/README.md +12 -5
- package/components/autocomplete/Autocomplete.d.ts +1 -0
- package/components/autocomplete/Autocomplete.js +2 -2
- package/components/autocomplete/LazyAutocomplete.d.ts +1 -1
- package/components/autocomplete/SimpleAutocomplete.d.ts +1 -1
- package/components/dropdown-menu/useDropdownMenu.d.ts +1 -1
- package/components/dropdown-menu/useDropdownMenuContext.d.ts +1 -1
- package/components/input/Input.js +1 -1
- package/components/modal/useModal.d.ts +1 -1
- package/components/modal/useModalContext.d.ts +1 -1
- package/components/popover/usePopover.d.ts +1 -1
- package/components/popover/usePopoverContext.d.ts +1 -1
- package/components/tooltip/useTooltip.d.ts +1 -1
- package/components/tooltip/useTooltipContext.d.ts +1 -1
- package/index.d.ts +2 -33
- package/index.js +5 -32
- package/package.json +39 -1
- package/redux/notification/notificationSlice.d.ts +4 -1
- package/.storybook/fontello/config.json +0 -966
- package/components/autocomplete/Autocomplete.stories.d.ts +0 -11
- package/components/autocomplete/Autocomplete.stories.js +0 -55
- package/components/badge/Badge.stories.d.ts +0 -18
- package/components/badge/Badge.stories.js +0 -29
- package/components/button/Button.stories.d.ts +0 -34
- package/components/button/Button.stories.js +0 -52
- package/components/button/ButtonGroup.stories.d.ts +0 -7
- package/components/button/ButtonGroup.stories.js +0 -17
- package/components/card/Card.stories.d.ts +0 -6
- package/components/card/Card.stories.js +0 -12
- package/components/color/ColorPalette.d.ts +0 -1
- package/components/color/ColorPalette.js +0 -4
- package/components/color/utils.d.ts +0 -292
- package/components/color/utils.js +0 -293
- package/components/context-menu/ContextMenu.stories.d.ts +0 -5
- package/components/context-menu/ContextMenu.stories.js +0 -12
- package/components/dialog/Dialog.stories.d.ts +0 -6
- package/components/dialog/Dialog.stories.js +0 -13
- package/components/dropdown-menu/DropdownMenu.stories.d.ts +0 -7
- package/components/dropdown-menu/DropdownMenu.stories.js +0 -8
- package/components/dropdown-menu-nested/DropdownMenuNested.stories.d.ts +0 -6
- package/components/dropdown-menu-nested/DropdownMenuNested.stories.js +0 -11
- package/components/flash/Flash.stories.d.ts +0 -10
- package/components/flash/Flash.stories.js +0 -16
- package/components/highlight/Highlight.stories.d.ts +0 -8
- package/components/highlight/Highlight.stories.js +0 -45
- package/components/href/Href.stories.d.ts +0 -9
- package/components/href/Href.stories.js +0 -15
- package/components/input/Checkbox.stories.d.ts +0 -8
- package/components/input/Checkbox.stories.js +0 -30
- package/components/input/Color.stories.d.ts +0 -6
- package/components/input/Color.stories.js +0 -10
- package/components/input/Input.stories.d.ts +0 -17
- package/components/input/Input.stories.js +0 -31
- package/components/input/RadioGroup.stories.d.ts +0 -7
- package/components/input/RadioGroup.stories.js +0 -26
- package/components/input/Range.stories.d.ts +0 -6
- package/components/input/Range.stories.js +0 -16
- package/components/input/Toggle.stories.d.ts +0 -7
- package/components/input/Toggle.stories.js +0 -13
- package/components/input-field/InputField.stories.d.ts +0 -7
- package/components/input-field/InputField.stories.js +0 -46
- package/components/loader/Loader.stories.d.ts +0 -18
- package/components/loader/Loader.stories.js +0 -22
- package/components/modal/Modal.stories.d.ts +0 -13
- package/components/modal/Modal.stories.js +0 -64
- package/components/notification/Notification.stories.d.ts +0 -10
- package/components/notification/Notification.stories.js +0 -37
- package/components/popover/Popover.stories.d.ts +0 -10
- package/components/popover/Popover.stories.js +0 -22
- package/components/quick-settings/QuickSettings.stories.d.ts +0 -8
- package/components/quick-settings/QuickSettings.stories.js +0 -33
- package/components/resize-area/ResizeArea.stories.d.ts +0 -11
- package/components/resize-area/ResizeArea.stories.js +0 -14
- package/components/scroll/Scroll.stories.d.ts +0 -7
- package/components/scroll/Scroll.stories.js +0 -9
- package/components/select/Select.stories.d.ts +0 -47
- package/components/select/Select.stories.js +0 -77
- package/components/snack/Snack.stories.d.ts +0 -7
- package/components/snack/Snack.stories.js +0 -10
- package/components/sortable/Sortable.stories.d.ts +0 -18
- package/components/sortable/Sortable.stories.js +0 -52
- package/components/steps/Steps.stories.d.ts +0 -8
- package/components/steps/Steps.stories.js +0 -40
- package/components/steps/util.d.ts +0 -1
- package/components/steps/util.js +0 -3
- package/components/table/Table.stories.d.ts +0 -5
- package/components/table/Table.stories.js +0 -13
- package/components/tabs/Tabs.stories.d.ts +0 -7
- package/components/tabs/Tabs.stories.js +0 -29
- package/components/textarea/Textarea.stories.d.ts +0 -9
- package/components/textarea/Textarea.stories.js +0 -11
- package/components/tooltip/Tooltip.stories.d.ts +0 -8
- package/components/tooltip/Tooltip.stories.js +0 -28
- package/redux/index.d.ts +0 -1
- package/redux/index.js +0 -1
- package/styles/Animation.stories.d.ts +0 -6
- package/styles/Animation.stories.js +0 -21
- package/styles/Icons.stories.d.ts +0 -5
- package/styles/Icons.stories.js +0 -17
- package/styles/Shadow.stories.d.ts +0 -5
- package/styles/Shadow.stories.js +0 -27
- package/styles/Themes.stories.d.ts +0 -5
- package/styles/Themes.stories.js +0 -8
- package/styles/Typography.stories.d.ts +0 -7
- package/styles/Typography.stories.js +0 -25
- package/tailwind/base.d.ts +0 -3
- package/tailwind/base.js +0 -105
- package/tailwind/components.d.ts +0 -5
- package/tailwind/components.js +0 -258
- package/tailwind/index.d.ts +0 -2
- package/tailwind/index.js +0 -2
- package/tailwind/keyframes.d.ts +0 -2
- package/tailwind/keyframes.js +0 -67
- package/tailwind/pentatrionTw.d.ts +0 -50
- package/tailwind/pentatrionTw.js +0 -187
- package/tailwind/utilities.d.ts +0 -3
- package/tailwind/utilities.js +0 -61
- package/tailwind/vars.d.ts +0 -2
- package/tailwind/vars.js +0 -104
- package/tsup.config.d.ts +0 -2
- package/tsup.config.js +0 -25
- package/vite.config.d.ts +0 -2
- package/vite.config.js +0 -21
- package/vitest-setup.d.ts +0 -1
- package/vitest-setup.js +0 -1
package/README.md
CHANGED
|
@@ -78,6 +78,13 @@ Mettre à jour le fichier `src/index.css`
|
|
|
78
78
|
@import "tailwindcss/utilities";
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
+
```json
|
|
82
|
+
// .prettierrc
|
|
83
|
+
{
|
|
84
|
+
"plugins": ["prettier-plugin-tailwindcss"]
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
81
88
|
## Installation
|
|
82
89
|
|
|
83
90
|
|
|
@@ -96,13 +103,13 @@ const config = {
|
|
|
96
103
|
content: [
|
|
97
104
|
"./index.html",
|
|
98
105
|
"./src/**/*.{js,ts,jsx,tsx}",
|
|
99
|
-
+ "./node_modules/pentatrion-design/lib/**/*.
|
|
100
|
-
+ "./node_modules/pentatrion-design/components/**/*.
|
|
101
|
-
+ "./node_modules/pentatrion-design/hooks/**/*.
|
|
102
|
-
+ "./node_modules/pentatrion-design/redux/**/*.
|
|
106
|
+
+ "./node_modules/pentatrion-design/lib/**/*.js",
|
|
107
|
+
+ "./node_modules/pentatrion-design/components/**/*.js",
|
|
108
|
+
+ "./node_modules/pentatrion-design/hooks/**/*.js",
|
|
109
|
+
+ "./node_modules/pentatrion-design/redux/**/*.js",
|
|
103
110
|
],
|
|
104
111
|
darkMode: ["class"],
|
|
105
|
-
+ plugins: [pentatrionTw],
|
|
112
|
+
+ plugins: [pentatrionTw()],
|
|
106
113
|
};
|
|
107
114
|
|
|
108
115
|
export default config;
|
|
@@ -5,6 +5,7 @@ import { Placement } from "@floating-ui/react";
|
|
|
5
5
|
import { ThemeColor } from "../../types.js";
|
|
6
6
|
export interface AutocompleteProps<O extends OptionLike = Option> {
|
|
7
7
|
className?: string;
|
|
8
|
+
autoFocus?: boolean;
|
|
8
9
|
icon?: boolean | ReactNode;
|
|
9
10
|
color?: ThemeColor;
|
|
10
11
|
/**
|
|
@@ -11,7 +11,7 @@ import { Button } from "../button/index.js";
|
|
|
11
11
|
import { Dialog } from "../dialog/index.js";
|
|
12
12
|
import { Loader } from "../loader/index.js";
|
|
13
13
|
import { inputConfig } from "../input/Input.js";
|
|
14
|
-
export const Autocomplete = forwardRef(function Autocomplete({ className, icon = true, color = "yellow", noSearchSuffix, suffix, placement = "bottom", placeholder = "Search...", selection = null, onChangeSelection, autocompleteOptionComponent, loading = false, clearSearchButton = false, searchValue, onChangeSearchValue, options, selectOnFocus = true, readOnly = false, }, inputRef) {
|
|
14
|
+
export const Autocomplete = forwardRef(function Autocomplete({ className, autoFocus = false, icon = true, color = "yellow", noSearchSuffix, suffix, placement = "bottom", placeholder = "Search...", selection = null, onChangeSelection, autocompleteOptionComponent, loading = false, clearSearchButton = false, searchValue, onChangeSearchValue, options, selectOnFocus = true, readOnly = false, }, inputRef) {
|
|
15
15
|
const [isOpen, setIsOpen] = useState(false);
|
|
16
16
|
const [activeIndex, setActiveIndex] = useState(null);
|
|
17
17
|
const onChangeSearchValueStable = useEventCallback(onChangeSearchValue);
|
|
@@ -95,7 +95,7 @@ export const Autocomplete = forwardRef(function Autocomplete({ className, icon =
|
|
|
95
95
|
handleSelect,
|
|
96
96
|
}), [activeIndex, selection, getItemProps, handleSelect]);
|
|
97
97
|
const showClearSearchButton = clearSearchButton && (searchValue.trim() !== "" || selection !== null);
|
|
98
|
-
return (_jsxs("div", { className: className, children: [_jsxs("div", { className: clsx(inputConfig.container, readOnly && "readonly"), ref: refs.setReference, "data-color": color, children: [icon !== false && (_jsxs("div", { className: "relative flex-center", children: [loading && _jsx(Loader, { size: "medium", color: "gray", className: "absolute left-0 top-0" }), icon === true ? (_jsx("span", { className: "h-8 w-8 flex-center", children: _jsx("i", { className: "fe-search" }) })) : (icon)] })), _jsx("input", { spellCheck: "false", className: clsx(inputConfig.input, icon === false && "pl-4"), ref: inputRef, type: "search", readOnly: readOnly, value: searchValue, placeholder: placeholder, "aria-autocomplete": "list", ...getReferenceProps({
|
|
98
|
+
return (_jsxs("div", { className: className, children: [_jsxs("div", { className: clsx(inputConfig.container, readOnly && "readonly"), ref: refs.setReference, "data-color": color, children: [icon !== false && (_jsxs("div", { className: "relative flex-center", children: [loading && _jsx(Loader, { size: "medium", color: "gray", className: "absolute left-0 top-0" }), icon === true ? (_jsx("span", { className: "h-8 w-8 flex-center", children: _jsx("i", { className: "fe-search" }) })) : (icon)] })), _jsx("input", { autoFocus: autoFocus, spellCheck: "false", className: clsx(inputConfig.input, icon === false && "pl-4"), ref: inputRef, type: "search", readOnly: readOnly, value: searchValue, placeholder: placeholder, "aria-autocomplete": "list", ...getReferenceProps({
|
|
99
99
|
onClick() {
|
|
100
100
|
if (selectOnFocus) {
|
|
101
101
|
// it's better to listen onClick instead of onFocus. the event is triggered later and there
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AutocompleteProps } from "./Autocomplete.js";
|
|
2
2
|
import { OptionLike, Option } from "../select/index.js";
|
|
3
|
-
interface Props<O extends OptionLike = Option> extends Pick<AutocompleteProps<O>, "className" | "icon" | "color" | "suffix" | "noSearchSuffix" | "placement" | "placeholder" | "selection" | "onChangeSelection" | "autocompleteOptionComponent" | "loading" | "clearSearchButton" | "readOnly"> {
|
|
3
|
+
interface Props<O extends OptionLike = Option> extends Pick<AutocompleteProps<O>, "autoFocus" | "className" | "icon" | "color" | "suffix" | "noSearchSuffix" | "placement" | "placeholder" | "selection" | "onChangeSelection" | "autocompleteOptionComponent" | "loading" | "clearSearchButton" | "readOnly"> {
|
|
4
4
|
onChangeSearchValueCallback: (searchValue: string) => Promise<O[]>;
|
|
5
5
|
debounce?: number;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AutocompleteProps } from "./Autocomplete.js";
|
|
2
2
|
import { Option, OptionLike } from "../select/index.js";
|
|
3
|
-
interface Props<O extends OptionLike = Option> extends Pick<AutocompleteProps<O>, "className" | "icon" | "color" | "suffix" | "noSearchSuffix" | "placement" | "placeholder" | "selection" | "onChangeSelection" | "autocompleteOptionComponent" | "options" | "selection" | "readOnly"> {
|
|
3
|
+
interface Props<O extends OptionLike = Option> extends Pick<AutocompleteProps<O>, "autoFocus" | "className" | "icon" | "color" | "suffix" | "noSearchSuffix" | "placement" | "placeholder" | "selection" | "onChangeSelection" | "autocompleteOptionComponent" | "options" | "selection" | "readOnly"> {
|
|
4
4
|
}
|
|
5
5
|
export declare function SimpleAutocomplete<O extends OptionLike = Option>({ options, selection, onChangeSelection, ...rest }: Props<O>): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -2,7 +2,7 @@ import type { DropdownMenuOptions } from "./interface.js";
|
|
|
2
2
|
export declare function useDropdownMenu({ initialOpen, placement, open: controlledOpen, onOpen: setControlledOpen, color, modal, }: DropdownMenuOptions): {
|
|
3
3
|
elementsRef: import("react").MutableRefObject<(HTMLElement | null)[]>;
|
|
4
4
|
labelsRef: import("react").MutableRefObject<(string | null)[]>;
|
|
5
|
-
color: import("../../
|
|
5
|
+
color: import("../../types.js").ThemeColor | "default";
|
|
6
6
|
modal: boolean;
|
|
7
7
|
activeIndex: number | null;
|
|
8
8
|
handleSelect: () => void;
|
|
@@ -4,7 +4,7 @@ export declare const DropdownMenuContext: import("react").Context<ContextType>;
|
|
|
4
4
|
export declare function useDropdownMenuContext(): {
|
|
5
5
|
elementsRef: import("react").MutableRefObject<(HTMLElement | null)[]>;
|
|
6
6
|
labelsRef: import("react").MutableRefObject<(string | null)[]>;
|
|
7
|
-
color: import("../../
|
|
7
|
+
color: import("../../types.js").ThemeColor | "default";
|
|
8
8
|
modal: boolean;
|
|
9
9
|
activeIndex: number | null;
|
|
10
10
|
handleSelect: () => void;
|
|
@@ -9,7 +9,7 @@ export const Input = forwardRef(({ variant = "normal", color = "yellow", disable
|
|
|
9
9
|
return (_jsxs("div", { "data-color": color, "data-variant": variant, className: clsx(inputConfig.container, disabled && "disabled", readOnly && "readonly", className), children: [prefix && (_jsx("div", { className: clsx([
|
|
10
10
|
"relative flex-center",
|
|
11
11
|
typeof prefix === "string" && "mx-2 select-none text-gray-6",
|
|
12
|
-
]), children: prefix })), _jsx("input", { ref: ref, className: clsx(inputConfig.input, !prefix && "pl-4", !suffix && "pr-4"), disabled: disabled, readOnly: readOnly, onClick: (e) => {
|
|
12
|
+
]), children: prefix })), _jsx("input", { autoFocus: true, ref: ref, className: clsx(inputConfig.input, !prefix && "pl-4", !suffix && "pr-4"), disabled: disabled, readOnly: readOnly, onClick: (e) => {
|
|
13
13
|
if (readOnly) {
|
|
14
14
|
e.target?.select();
|
|
15
15
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Dispatch, SetStateAction } from "react";
|
|
2
2
|
import { ModalOptions } from "./interface.js";
|
|
3
3
|
export declare function useModal({ initialOpen, open: controlledOpen, onOpen: setControlledOpen, color, }?: ModalOptions): {
|
|
4
|
-
color: import("../../
|
|
4
|
+
color: import("../../types.js").ThemeColor | "default";
|
|
5
5
|
labelId: string | undefined;
|
|
6
6
|
descriptionId: string | undefined;
|
|
7
7
|
setLabelId: Dispatch<SetStateAction<string | undefined>>;
|
|
@@ -2,7 +2,7 @@ import { useModal } from "./useModal.js";
|
|
|
2
2
|
type ContextType = ReturnType<typeof useModal> | null;
|
|
3
3
|
export declare const ModalContext: import("react").Context<ContextType>;
|
|
4
4
|
export declare function useModalContext(): {
|
|
5
|
-
color: import("../../
|
|
5
|
+
color: import("../../types.js").ThemeColor | "default";
|
|
6
6
|
labelId: string | undefined;
|
|
7
7
|
descriptionId: string | undefined;
|
|
8
8
|
setLabelId: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PopoverOptions } from "./interface.js";
|
|
2
2
|
export declare function usePopover({ initialOpen, placement, open: controlledOpen, onOpen: setControlledOpen, color, modal, }: PopoverOptions): {
|
|
3
3
|
arrowRef: import("react").RefObject<HTMLDivElement>;
|
|
4
|
-
color: import("../../
|
|
4
|
+
color: import("../../types.js").ThemeColor | undefined;
|
|
5
5
|
modal: boolean;
|
|
6
6
|
labelId: string | undefined;
|
|
7
7
|
descriptionId: string | undefined;
|
|
@@ -3,7 +3,7 @@ type ContextType = ReturnType<typeof usePopover> | null;
|
|
|
3
3
|
export declare const PopoverContext: import("react").Context<ContextType>;
|
|
4
4
|
export declare function usePopoverContext(): {
|
|
5
5
|
arrowRef: import("react").RefObject<HTMLDivElement>;
|
|
6
|
-
color: import("../../
|
|
6
|
+
color: import("../../types.js").ThemeColor | undefined;
|
|
7
7
|
modal: boolean;
|
|
8
8
|
labelId: string | undefined;
|
|
9
9
|
descriptionId: string | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TooltipOptions } from "./interface.js";
|
|
2
2
|
export declare function useTooltip({ initialOpen, placement, open: controlledOpen, onOpen: setControlledOpen, openDelay, closeDelay, color, }?: TooltipOptions): {
|
|
3
3
|
arrowRef: import("react").RefObject<HTMLDivElement>;
|
|
4
|
-
color: import("../../
|
|
4
|
+
color: import("../../types.js").ThemeColor;
|
|
5
5
|
placement: import("@floating-ui/react").Placement;
|
|
6
6
|
strategy: import("@floating-ui/react").Strategy;
|
|
7
7
|
middlewareData: import("@floating-ui/react").MiddlewareData;
|
|
@@ -3,7 +3,7 @@ type ContextType = ReturnType<typeof useTooltip> | null;
|
|
|
3
3
|
export declare const TooltipContext: import("react").Context<ContextType>;
|
|
4
4
|
export declare function useTooltipContext(): {
|
|
5
5
|
arrowRef: import("react").RefObject<HTMLDivElement>;
|
|
6
|
-
color: import("../../
|
|
6
|
+
color: import("../../types.js").ThemeColor;
|
|
7
7
|
placement: import("@floating-ui/react-dom").Placement;
|
|
8
8
|
strategy: import("@floating-ui/react-dom").Strategy;
|
|
9
9
|
middlewareData: import("@floating-ui/react-dom").MiddlewareData;
|
package/index.d.ts
CHANGED
|
@@ -1,33 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
export * from "./components/badge/index.js";
|
|
4
|
-
export * from "./components/button/index.js";
|
|
5
|
-
export * from "./components/card/index.js";
|
|
6
|
-
export * from "./components/code/index.js";
|
|
7
|
-
export * from "./components/context-menu/index.js";
|
|
8
|
-
export * from "./components/dialog/index.js";
|
|
9
|
-
export * from "./components/dropdown-menu/index.js";
|
|
10
|
-
export * from "./components/dropdown-menu-nested/index.js";
|
|
11
|
-
export * from "./components/flash/index.js";
|
|
12
|
-
export * from "./components/highlight/index.js";
|
|
13
|
-
export * from "./components/href/index.js";
|
|
14
|
-
export * from "./components/input/index.js";
|
|
15
|
-
export * from "./components/input-field/index.js";
|
|
16
|
-
export * from "./components/loader/index.js";
|
|
17
|
-
export * from "./components/modal/index.js";
|
|
18
|
-
export * from "./components/notification/index.js";
|
|
19
|
-
export * from "./components/popover/index.js";
|
|
20
|
-
export * from "./components/portal/index.js";
|
|
21
|
-
export * from "./components/resize-area/index.js";
|
|
22
|
-
export * from "./components/scroll/index.js";
|
|
23
|
-
export * from "./components/select/index.js";
|
|
24
|
-
export * from "./components/snack/index.js";
|
|
25
|
-
export * from "./components/sortable/index.js";
|
|
26
|
-
export * from "./components/steps/index.js";
|
|
27
|
-
export * from "./components/table/index.js";
|
|
28
|
-
export * from "./components/tabs/index.js";
|
|
29
|
-
export * from "./components/textarea/index.js";
|
|
30
|
-
export * from "./components/tooltip/index.js";
|
|
31
|
-
export * from "./hooks/index.js";
|
|
32
|
-
export * from "./lib/index.js";
|
|
33
|
-
export { pentatrionTw } from "./tailwind/index.js";
|
|
1
|
+
declare const _default: {};
|
|
2
|
+
export default _default;
|
package/index.js
CHANGED
|
@@ -1,32 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
export * from "./components/context-menu/index.js";
|
|
7
|
-
export * from "./components/dialog/index.js";
|
|
8
|
-
export * from "./components/dropdown-menu/index.js";
|
|
9
|
-
export * from "./components/dropdown-menu-nested/index.js";
|
|
10
|
-
export * from "./components/flash/index.js";
|
|
11
|
-
export * from "./components/highlight/index.js";
|
|
12
|
-
export * from "./components/href/index.js";
|
|
13
|
-
export * from "./components/input/index.js";
|
|
14
|
-
export * from "./components/input-field/index.js";
|
|
15
|
-
export * from "./components/loader/index.js";
|
|
16
|
-
export * from "./components/modal/index.js";
|
|
17
|
-
export * from "./components/notification/index.js";
|
|
18
|
-
export * from "./components/popover/index.js";
|
|
19
|
-
export * from "./components/portal/index.js";
|
|
20
|
-
export * from "./components/resize-area/index.js";
|
|
21
|
-
export * from "./components/scroll/index.js";
|
|
22
|
-
export * from "./components/select/index.js";
|
|
23
|
-
export * from "./components/snack/index.js";
|
|
24
|
-
export * from "./components/sortable/index.js";
|
|
25
|
-
export * from "./components/steps/index.js";
|
|
26
|
-
export * from "./components/table/index.js";
|
|
27
|
-
export * from "./components/tabs/index.js";
|
|
28
|
-
export * from "./components/textarea/index.js";
|
|
29
|
-
export * from "./components/tooltip/index.js";
|
|
30
|
-
export * from "./hooks/index.js";
|
|
31
|
-
export * from "./lib/index.js";
|
|
32
|
-
export { pentatrionTw } from "./tailwind/index.js";
|
|
1
|
+
// This file exists for module resolution purposes.
|
|
2
|
+
// Not exporting anything from the root entry point
|
|
3
|
+
// Please use individual entry points in order to always
|
|
4
|
+
// obtain minimum kbs.
|
|
5
|
+
export default {};
|
package/package.json
CHANGED
|
@@ -1,14 +1,52 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pentatrion-design",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "Hugues Tavernier",
|
|
7
7
|
"license": "ISC",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": "./index.js",
|
|
10
|
+
"./types": "./types.js",
|
|
11
|
+
"./components/autocomplete": "./components/autocomplete.js",
|
|
12
|
+
"./components/badge": "./components/badge.js",
|
|
13
|
+
"./components/button": "./components/button.js",
|
|
14
|
+
"./components/card": "./components/card.js",
|
|
15
|
+
"./components/code": "./components/code.js",
|
|
16
|
+
"./components/context-menu": "./components/context.js",
|
|
17
|
+
"./components/dialog": "./components/dialog.js",
|
|
18
|
+
"./components/dropdown-menu": "./components/dropdown.js",
|
|
19
|
+
"./components/dropdown-menu-nested": "./components/dropdown.js",
|
|
20
|
+
"./components/flash": "./components/flash.js",
|
|
21
|
+
"./components/highlight": "./components/highlight.js",
|
|
22
|
+
"./components/href": "./components/href.js",
|
|
23
|
+
"./components/input": "./components/input.js",
|
|
24
|
+
"./components/input-field": "./components/input.js",
|
|
25
|
+
"./components/loader": "./components/loader.js",
|
|
26
|
+
"./components/modal": "./components/modal.js",
|
|
27
|
+
"./components/notification": "./components/notification.js",
|
|
28
|
+
"./components/popover": "./components/popover.js",
|
|
29
|
+
"./components/portal": "./components/portal.js",
|
|
30
|
+
"./components/resize-area": "./components/resize.js",
|
|
31
|
+
"./components/scroll": "./components/scroll.js",
|
|
32
|
+
"./components/select": "./components/select.js",
|
|
33
|
+
"./components/snack": "./components/snack.js",
|
|
34
|
+
"./components/sortable": "./components/sortable.js",
|
|
35
|
+
"./components/steps": "./components/steps.js",
|
|
36
|
+
"./components/table": "./components/table.js",
|
|
37
|
+
"./components/tabs": "./components/tabs.js",
|
|
38
|
+
"./components/textarea": "./components/textarea.js",
|
|
39
|
+
"./components/tooltip": "./components/tooltip.js",
|
|
40
|
+
"./hooks": "./hooks/index.js",
|
|
41
|
+
"./lib": "./lib/index.js",
|
|
42
|
+
"./redux/notification": "./redux/notification/index.js",
|
|
43
|
+
"./tailwind": "./tailwind/index.js"
|
|
44
|
+
},
|
|
8
45
|
"type": "module",
|
|
9
46
|
"dependencies": {
|
|
10
47
|
"@floating-ui/react": "^0.26.17",
|
|
11
48
|
"clsx": "^2.1.1",
|
|
49
|
+
"pentatrion-design": "link:",
|
|
12
50
|
"react": "^18.3.1",
|
|
13
51
|
"react-dom": "^18.3.1",
|
|
14
52
|
"react-polymorphic-types": "^2.0.0",
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { Message } from "../../types.js";
|
|
2
|
-
|
|
2
|
+
type NotificationState = {
|
|
3
|
+
messages: Message[];
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import("@reduxjs/toolkit").Reducer<NotificationState>;
|
|
3
6
|
export default _default;
|
|
4
7
|
export declare const messageAdded: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[content: string, options?: Partial<Omit<Message, "content" | "id">> | undefined], {
|
|
5
8
|
id: string;
|