pentatrion-design 1.0.1 → 1.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.
- package/README.md +15 -31
- package/dist/components/accordion/Accordion.js +2 -2
- package/dist/components/accordion/AccordionContent.js +1 -1
- package/dist/components/accordion/AccordionItem.js +1 -1
- package/dist/components/accordion/AccordionTrigger.js +1 -1
- package/dist/components/accordion/index.d.ts +3 -3
- package/dist/components/accordion/index.js +3 -3
- package/dist/components/autocomplete/Autocomplete.d.ts +3 -3
- package/dist/components/autocomplete/Autocomplete.js +8 -8
- package/dist/components/autocomplete/AutocompleteOption.d.ts +1 -1
- package/dist/components/autocomplete/AutocompleteOption.js +2 -2
- package/dist/components/autocomplete/LazyAutocomplete.d.ts +2 -2
- package/dist/components/autocomplete/LazyAutocomplete.js +3 -3
- package/dist/components/autocomplete/SimpleAutocomplete.d.ts +2 -2
- package/dist/components/autocomplete/SimpleAutocomplete.js +3 -3
- package/dist/components/autocomplete/index.d.ts +6 -6
- package/dist/components/autocomplete/index.js +6 -6
- package/dist/components/autocomplete/useAutocompleteContext.d.ts +1 -1
- package/dist/components/autocomplete/util.d.ts +1 -1
- package/dist/components/badge/Badge.d.ts +2 -2
- package/dist/components/badge/Badge.d.ts.map +1 -1
- package/dist/components/badge/Badge.js +5 -11
- package/dist/components/badge/index.d.ts +1 -1
- package/dist/components/badge/index.js +1 -1
- package/dist/components/button/Button.d.ts +4 -4
- package/dist/components/button/Button.d.ts.map +1 -1
- package/dist/components/button/Button.js +10 -9
- package/dist/components/button/HrefButton.d.ts +1 -1
- package/dist/components/button/HrefButton.js +2 -2
- package/dist/components/button/LinkButton.d.ts +1 -1
- package/dist/components/button/LinkButton.js +2 -2
- package/dist/components/button/index.d.ts +3 -3
- package/dist/components/button/index.js +3 -3
- package/dist/components/card/index.d.ts +1 -1
- package/dist/components/card/index.js +1 -1
- package/dist/components/code/index.d.ts +1 -1
- package/dist/components/code/index.js +1 -1
- package/dist/components/context-menu/ContextMenu.js +2 -2
- package/dist/components/context-menu/index.d.ts +2 -2
- package/dist/components/context-menu/index.js +2 -2
- package/dist/components/dialog/Dialog.d.ts +1 -1
- package/dist/components/dialog/index.d.ts +1 -1
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/draggable/index.d.ts +6 -6
- package/dist/components/draggable/index.js +6 -6
- package/dist/components/draggable/useDraggableItem.d.ts +1 -1
- package/dist/components/draggable/useDraggableItem.js +1 -1
- package/dist/components/draggable/useDraggableMonitor.js +2 -2
- package/dist/components/draggable/useDraggableMonitorIndex.js +2 -2
- package/dist/components/draggable/util.d.ts +1 -1
- package/dist/components/draggable/util.js +1 -1
- package/dist/components/draggable-advanced/_fixtures.d.ts +1 -1
- package/dist/components/draggable-advanced/context.d.ts +1 -1
- package/dist/components/draggable-advanced/context.js +1 -1
- package/dist/components/draggable-advanced/registry.js +1 -1
- package/dist/components/dropdown-menu/DropdownMenu.d.ts +2 -2
- package/dist/components/dropdown-menu/DropdownMenu.d.ts.map +1 -1
- package/dist/components/dropdown-menu/DropdownMenu.js +7 -7
- package/dist/components/dropdown-menu/DropdownMenuItem.js +4 -4
- package/dist/components/dropdown-menu/index.d.ts +5 -5
- package/dist/components/dropdown-menu/index.js +4 -4
- package/dist/components/dropdown-menu/interface.d.ts +2 -1
- package/dist/components/dropdown-menu/interface.d.ts.map +1 -1
- package/dist/components/dropdown-menu/useDropdownMenu.d.ts +4 -3
- package/dist/components/dropdown-menu/useDropdownMenu.d.ts.map +1 -1
- package/dist/components/dropdown-menu/useDropdownMenu.js +3 -1
- package/dist/components/dropdown-menu/useDropdownMenuContext.d.ts +3 -2
- package/dist/components/dropdown-menu/useDropdownMenuContext.d.ts.map +1 -1
- package/dist/components/dropdown-menu-nested/DropdownMenuNested.d.ts +1 -1
- package/dist/components/dropdown-menu-nested/DropdownMenuNested.js +1 -1
- package/dist/components/dropdown-menu-nested/MenuItem.js +1 -1
- package/dist/components/dropdown-menu-nested/MenuItemWithChildren.d.ts +1 -1
- package/dist/components/dropdown-menu-nested/MenuItemWithChildren.js +3 -3
- package/dist/components/dropdown-menu-nested/index.d.ts +3 -3
- package/dist/components/dropdown-menu-nested/index.js +3 -3
- package/dist/components/flash/Flash.d.ts +1 -1
- package/dist/components/flash/Flash.d.ts.map +1 -1
- package/dist/components/flash/Flash.js +1 -2
- package/dist/components/flash/index.d.ts +1 -1
- package/dist/components/flash/index.js +1 -1
- package/dist/components/form/InputField.js +1 -1
- package/dist/components/form/SelectField.d.ts +1 -1
- package/dist/components/form/SelectField.js +1 -1
- package/dist/components/form/index.d.ts +2 -2
- package/dist/components/form/index.js +2 -2
- package/dist/components/highlight/index.d.ts +1 -1
- package/dist/components/highlight/index.js +1 -1
- package/dist/components/input/AudioRange.d.ts +1 -1
- package/dist/components/input/Checkbox.d.ts +7 -6
- package/dist/components/input/Checkbox.d.ts.map +1 -1
- package/dist/components/input/Checkbox.js +7 -3
- package/dist/components/input/Color.d.ts +1 -1
- package/dist/components/input/Color.js +1 -1
- package/dist/components/input/Input.d.ts +1 -1
- package/dist/components/input/InputButton.d.ts +1 -1
- package/dist/components/input/InputButton.js +1 -1
- package/dist/components/input/MappedStars.js +2 -2
- package/dist/components/input/Radio.d.ts +2 -2
- package/dist/components/input/Radio.js +1 -1
- package/dist/components/input/Range.d.ts +1 -1
- package/dist/components/input/Stars.js +2 -2
- package/dist/components/input/Toggle.d.ts +1 -1
- package/dist/components/input/TotpInput.js +1 -1
- package/dist/components/input/index.d.ts +11 -11
- package/dist/components/input/index.js +11 -11
- package/dist/components/loader/Loader.d.ts +1 -1
- package/dist/components/loader/Loader.d.ts.map +1 -1
- package/dist/components/loader/Loader.js +1 -2
- package/dist/components/loader/index.d.ts +1 -1
- package/dist/components/loader/index.js +1 -1
- package/dist/components/media-preview/FileIcon.d.ts +1 -1
- package/dist/components/media-preview/FileIcon.js +1 -1
- package/dist/components/media-preview/MediaPreview.d.ts +1 -1
- package/dist/components/media-preview/MediaPreview.js +2 -2
- package/dist/components/media-preview/index.d.ts +5 -5
- package/dist/components/media-preview/index.js +4 -4
- package/dist/components/media-preview/util.d.ts +2 -2
- package/dist/components/media-preview/util.d.ts.map +1 -1
- package/dist/components/modal/Components.js +3 -3
- package/dist/components/modal/Modal.d.ts +1 -1
- package/dist/components/modal/Modal.js +2 -2
- package/dist/components/modal/ModalContent.js +2 -2
- package/dist/components/modal/ModalTrigger.d.ts +1 -1
- package/dist/components/modal/ModalTrigger.js +2 -2
- package/dist/components/modal/index.d.ts +7 -7
- package/dist/components/modal/index.js +6 -6
- package/dist/components/modal/interface.d.ts +1 -1
- package/dist/components/modal/useModal.d.ts +2 -2
- package/dist/components/modal/useModal.d.ts.map +1 -1
- package/dist/components/modal/useModalContext.d.ts +2 -2
- package/dist/components/modal/useModalContext.d.ts.map +1 -1
- package/dist/components/notification/NotificationsContext.d.ts +1 -1
- package/dist/components/notification/NotificationsContext.js +1 -1
- package/dist/components/notification/NotificationsProvider.js +2 -2
- package/dist/components/notification/index.d.ts +4 -4
- package/dist/components/notification/index.js +4 -4
- package/dist/components/notification/useContextNotifications.d.ts +1 -1
- package/dist/components/notification/useContextNotifications.js +1 -1
- package/dist/components/notification/useFetch.d.ts +1 -1
- package/dist/components/notification/useFetch.js +2 -2
- package/dist/components/popover/Components.js +2 -2
- package/dist/components/popover/Popover.d.ts +1 -1
- package/dist/components/popover/Popover.js +1 -1
- package/dist/components/popover/PopoverContent.js +3 -3
- package/dist/components/popover/PopoverTrigger.js +2 -2
- package/dist/components/popover/index.d.ts +7 -7
- package/dist/components/popover/index.js +6 -6
- package/dist/components/popover/interface.d.ts +1 -1
- package/dist/components/popover/usePopover.d.ts +2 -2
- package/dist/components/popover/usePopover.d.ts.map +1 -1
- package/dist/components/popover/usePopoverContext.d.ts +2 -2
- package/dist/components/popover/usePopoverContext.d.ts.map +1 -1
- package/dist/components/portal/index.d.ts +1 -1
- package/dist/components/portal/index.js +1 -1
- package/dist/components/resizable/Resizable.js +1 -1
- package/dist/components/resizable/ResizableHandle.js +1 -1
- package/dist/components/resizable/ResizablePanel.js +1 -1
- package/dist/components/resizable/index.d.ts +3 -3
- package/dist/components/resizable/index.js +3 -3
- package/dist/components/resize-area/index.d.ts +1 -1
- package/dist/components/resize-area/index.js +1 -1
- package/dist/components/scroll/index.d.ts +1 -1
- package/dist/components/scroll/index.js +1 -1
- package/dist/components/select/Select.d.ts +3 -3
- package/dist/components/select/Select.js +6 -6
- package/dist/components/select/SelectOption.d.ts +1 -1
- package/dist/components/select/SelectOption.js +1 -1
- package/dist/components/select/SelectSelection.d.ts +1 -1
- package/dist/components/select/SelectSelection.js +1 -1
- package/dist/components/select/index.d.ts +5 -5
- package/dist/components/select/index.js +4 -4
- package/dist/components/slot/Slot.js +1 -1
- package/dist/components/slot/index.d.ts +1 -1
- package/dist/components/slot/index.js +1 -1
- package/dist/components/snack/Snack.d.ts +1 -1
- package/dist/components/snack/Snack.js +4 -4
- package/dist/components/snack/index.d.ts +1 -1
- package/dist/components/snack/index.js +1 -1
- package/dist/components/steps/index.d.ts +2 -2
- package/dist/components/steps/index.js +2 -2
- package/dist/components/table/index.d.ts +7 -7
- package/dist/components/table/index.js +7 -7
- package/dist/components/tabs/index.d.ts +1 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/textarea/Textarea.d.ts +1 -1
- package/dist/components/textarea/index.d.ts +1 -1
- package/dist/components/textarea/index.js +1 -1
- package/dist/components/toast/Toasts.js +2 -2
- package/dist/components/toast/index.d.ts +3 -3
- package/dist/components/toast/index.js +2 -2
- package/dist/components/toast/toastsManager.d.ts +1 -1
- package/dist/components/toast/toastsManager.js +1 -1
- package/dist/components/tooltip/SimpleTooltip.d.ts +1 -1
- package/dist/components/tooltip/SimpleTooltip.js +3 -3
- package/dist/components/tooltip/Tooltip.d.ts +1 -1
- package/dist/components/tooltip/Tooltip.js +2 -2
- package/dist/components/tooltip/TooltipContent.js +3 -3
- package/dist/components/tooltip/TooltipTrigger.js +1 -1
- package/dist/components/tooltip/index.d.ts +6 -6
- package/dist/components/tooltip/index.js +6 -6
- package/dist/components/tooltip/interface.d.ts +1 -1
- package/dist/components/tooltip/useTooltip.d.ts +2 -2
- package/dist/components/tooltip/useTooltip.d.ts.map +1 -1
- package/dist/components/tooltip/useTooltipContext.d.ts +2 -2
- package/dist/components/tooltip/useTooltipContext.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +12 -12
- package/dist/hooks/index.js +12 -12
- package/dist/hooks/useEventListener.js +1 -1
- package/dist/hooks/useOnClickOutside.js +1 -1
- package/dist/hooks/useRipple.js +1 -1
- package/dist/lib/error.d.ts +1 -1
- package/dist/lib/index.d.ts +5 -6
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +5 -6
- package/dist/lib/tailwindVariants.d.ts +1 -1
- package/eslint.config.js +28 -28
- package/package.json +23 -28
- package/src/components/accordion/Accordion.stories.tsx +1 -1
- package/src/components/autocomplete/Autocomplete.stories.tsx +2 -2
- package/src/components/badge/Badge.stories.tsx +2 -2
- package/src/components/badge/Badge.tsx +9 -11
- package/src/components/button/Button.stories.tsx +2 -2
- package/src/components/button/Button.tsx +8 -7
- package/src/components/button/ButtonGroup.stories.tsx +1 -1
- package/src/components/button/HrefButton.stories.tsx +1 -1
- package/src/components/card/Card.stories.tsx +1 -1
- package/src/components/context-menu/ContextMenu.stories.tsx +2 -2
- package/src/components/dialog/Dialog.stories.tsx +35 -23
- package/src/components/draggable/Draggable.stories.tsx +1 -1
- package/src/components/draggable-advanced/DraggableAdvanced.stories.tsx +1 -1
- package/src/components/dropdown-menu/DropdownMenu.stories.tsx +1 -1
- package/src/components/dropdown-menu/DropdownMenu.tsx +6 -2
- package/src/components/dropdown-menu/DropdownMenuItem.tsx +2 -2
- package/src/components/dropdown-menu/interface.ts +1 -0
- package/src/components/dropdown-menu/useDropdownMenu.ts +3 -0
- package/src/components/dropdown-menu-nested/DropdownMenuNested.stories.tsx +1 -1
- package/src/components/flash/Flash.stories.tsx +1 -1
- package/src/components/flash/Flash.tsx +2 -3
- package/src/components/form/InputField.stories.tsx +1 -1
- package/src/components/form/SelectField.stories.tsx +1 -1
- package/src/components/form/form.stories.tsx +1 -1
- package/src/components/highlight/Highlight.stories.tsx +1 -1
- package/src/components/input/Checkbox.stories.tsx +36 -21
- package/src/components/input/Checkbox.tsx +17 -5
- package/src/components/input/Color.stories.tsx +1 -1
- package/src/components/input/Input.stories.tsx +1 -1
- package/src/components/input/InputButton.stories.tsx +1 -1
- package/src/components/input/MappedStars.stories.tsx +1 -1
- package/src/components/input/Radio.stories.tsx +1 -1
- package/src/components/input/Range.stories.tsx +1 -1
- package/src/components/input/Stars.stories.tsx +1 -1
- package/src/components/input/Toggle.stories.tsx +1 -1
- package/src/components/input/TotpInput.stories.tsx +1 -1
- package/src/components/loader/Loader.stories.tsx +1 -1
- package/src/components/loader/Loader.tsx +2 -2
- package/src/components/media-preview/MediaPreview.stories.tsx +1 -1
- package/src/components/media-preview/util.ts +1 -1
- package/src/components/modal/Modal.stories.tsx +1 -1
- package/src/components/notification/Notification.stories.tsx +2 -2
- package/src/components/popover/Popover.stories.tsx +1 -1
- package/src/components/quick-settings/QuickSettings.stories.tsx +1 -1
- package/src/components/resizable/Resizable.stories.tsx +1 -1
- package/src/components/resize-area/ResizeArea.stories.tsx +1 -1
- package/src/components/select/Select.stories.tsx +2 -2
- package/src/components/snack/Snack.stories.tsx +1 -1
- package/src/components/steps/Steps.stories.tsx +1 -1
- package/src/components/tabs/Tabs.stories.tsx +1 -1
- package/src/components/textarea/Textarea.stories.tsx +1 -1
- package/src/components/toast/Toast.stories.tsx +2 -2
- package/src/components/tooltip/Tooltip.stories.tsx +2 -2
- package/src/lib/index.ts +0 -1
- package/src/styles/Animation.stories.tsx +1 -1
- package/src/styles/Icons.stories.tsx +1 -1
- package/src/styles/Shadow.stories.tsx +1 -1
- package/src/styles/Themes.stories.tsx +1 -1
- package/src/styles/Typography.stories.tsx +1 -1
- package/src/tailwind/base.css +5 -0
- package/src/tailwind/components/index.css +10 -0
- package/src/tailwind/{components.css → components/others.css} +10 -2
- package/src/tailwind/index.css +3 -19
- package/src/tailwind/utilities.css +7 -0
- package/tsconfig.build.json +3 -0
- package/src/lib/tailwindVariants.ts +0 -34
- package/tailwind.config.ts +0 -18
- /package/src/tailwind/{utilities-dialog.css → components/dialog.css} +0 -0
- /package/src/tailwind/{components-input-outline.css → components/input-outline.css} +0 -0
- /package/src/tailwind/{components-range.css → components/range.css} +0 -0
- /package/src/tailwind/{components-resize-area.css → components/resize-area.css} +0 -0
- /package/src/tailwind/{components-step.css → components/step.css} +0 -0
package/README.md
CHANGED
|
@@ -46,19 +46,27 @@ export default defineConfig({
|
|
|
46
46
|
|
|
47
47
|
Mettre à jour le fichier `src/index.css`
|
|
48
48
|
|
|
49
|
+
Configuration recommandée
|
|
50
|
+
|
|
49
51
|
```css
|
|
50
52
|
/* src/index.css */
|
|
51
53
|
@import "tailwindcss";
|
|
52
54
|
|
|
53
|
-
@source "./node_modules/pentatrion-design/dist/lib";
|
|
54
55
|
@source "./node_modules/pentatrion-design/dist/components";
|
|
55
|
-
@source "./node_modules/pentatrion-design/dist/hooks";
|
|
56
|
-
@source "./node_modules/pentatrion-design/dist/redux";
|
|
57
56
|
|
|
58
|
-
@import "pentatrion-design/tailwind
|
|
57
|
+
@import "pentatrion-design/tailwind";
|
|
59
58
|
|
|
60
59
|
/* facultatif */
|
|
61
60
|
@import "pentatrion-design/tailwind/prose.css";
|
|
61
|
+
|
|
62
|
+
html {
|
|
63
|
+
font-size: 16px;
|
|
64
|
+
line-height: 24px;
|
|
65
|
+
color-scheme: normal;
|
|
66
|
+
}
|
|
67
|
+
body {
|
|
68
|
+
@apply bg-gray-0 text-gray-7 font-sans;
|
|
69
|
+
}
|
|
62
70
|
```
|
|
63
71
|
|
|
64
72
|
si on désire plus de contrôle sur nos imports
|
|
@@ -67,24 +75,13 @@ si on désire plus de contrôle sur nos imports
|
|
|
67
75
|
/* src/index.css */
|
|
68
76
|
@import "tailwindcss";
|
|
69
77
|
|
|
70
|
-
@source "./node_modules/pentatrion-design/dist/lib";
|
|
71
78
|
@source "./node_modules/pentatrion-design/dist/components";
|
|
72
|
-
@source "./node_modules/pentatrion-design/dist/hooks";
|
|
73
|
-
@source "./node_modules/pentatrion-design/dist/redux";
|
|
74
79
|
|
|
80
|
+
@import "pentatrion-design/tailwind/theme.css";
|
|
75
81
|
@import "pentatrion-design/tailwind/variants.css";
|
|
76
|
-
|
|
77
|
-
@import "pentatrion-design/tailwind/theme.css" layer(theme);
|
|
78
|
-
@import "pentatrion-design/tailwind/base.css" layer(base);
|
|
79
|
-
|
|
80
|
-
@import "pentatrion-design/tailwind/components-input-outline.css" layer(components);
|
|
81
|
-
@import "pentatrion-design/tailwind/components-range.css" layer(components);
|
|
82
|
-
@import "pentatrion-design/tailwind/components-resize-area.css" layer(components);
|
|
83
|
-
@import "pentatrion-design/tailwind/components-step.css" layer(components);
|
|
84
|
-
@import "pentatrion-design/tailwind/components.css" layer(components);
|
|
85
|
-
|
|
86
82
|
@import "pentatrion-design/tailwind/utilities.css";
|
|
87
|
-
@import "pentatrion-design/tailwind/
|
|
83
|
+
@import "pentatrion-design/tailwind/base.css" layer(base);
|
|
84
|
+
@import "pentatrion-design/tailwind/components/index.css" layer(components);
|
|
88
85
|
|
|
89
86
|
@import "pentatrion-design/tailwind/prose.css";
|
|
90
87
|
```
|
|
@@ -132,19 +129,6 @@ Create a `.vscode/settings.json` file
|
|
|
132
129
|
}
|
|
133
130
|
```
|
|
134
131
|
|
|
135
|
-
## Développement avec watch
|
|
136
|
-
|
|
137
|
-
anciennement dans le `package.json`. plus nécessaire pour le moment
|
|
138
|
-
|
|
139
|
-
```json
|
|
140
|
-
{
|
|
141
|
-
"scripts": {
|
|
142
|
-
"dev:tsc": "tsc -w -p tsconfig.build.json",
|
|
143
|
-
"dev:alias": "tsc-alias -w -p tsconfig.build.json",
|
|
144
|
-
"dev": "run-p dev:tsc dev:alias",
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
```
|
|
148
132
|
|
|
149
133
|
## Inclure le design-system dans un autre projet sans dépendance npm
|
|
150
134
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo, useState } from "react";
|
|
3
|
-
import { AccordionContext } from "./useAccordion";
|
|
4
|
-
import { useEffectEvent } from "../../hooks";
|
|
3
|
+
import { AccordionContext } from "./useAccordion.js";
|
|
4
|
+
import { useEffectEvent } from "../../hooks/index.js";
|
|
5
5
|
const noop = () => { };
|
|
6
6
|
export function Accordion({ value: controlledValue, defaultValue, onChange = noop, children, }) {
|
|
7
7
|
const isControlled = typeof controlledValue !== "undefined";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useRef } from "react";
|
|
3
|
-
import { useAccordion } from "./useAccordion";
|
|
3
|
+
import { useAccordion } from "./useAccordion.js";
|
|
4
4
|
import clsx from "clsx";
|
|
5
5
|
export function AccordionContent({ name, children, ...rest }) {
|
|
6
6
|
const { value } = useAccordion();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useAccordion } from "./useAccordion";
|
|
2
|
+
import { useAccordion } from "./useAccordion.js";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
export function AccordionItem({ name, children, ...rest }) {
|
|
5
5
|
const { value } = useAccordion();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useAccordion } from "./useAccordion";
|
|
2
|
+
import { useAccordion } from "./useAccordion.js";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
export function AccordionTrigger({ name, children, ...rest }) {
|
|
5
5
|
const { value, onChange } = useAccordion();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Accordion } from "./Accordion";
|
|
2
|
-
export { AccordionTrigger } from "./AccordionTrigger";
|
|
3
|
-
export { AccordionContent } from "./AccordionContent";
|
|
1
|
+
export { Accordion } from "./Accordion.js";
|
|
2
|
+
export { AccordionTrigger } from "./AccordionTrigger.js";
|
|
3
|
+
export { AccordionContent } from "./AccordionContent.js";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Accordion } from "./Accordion";
|
|
2
|
-
export { AccordionTrigger } from "./AccordionTrigger";
|
|
3
|
-
export { AccordionContent } from "./AccordionContent";
|
|
1
|
+
export { Accordion } from "./Accordion.js";
|
|
2
|
+
export { AccordionTrigger } from "./AccordionTrigger.js";
|
|
3
|
+
export { AccordionContent } from "./AccordionContent.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ReactNode, ComponentProps, RefObject } from "react";
|
|
2
|
-
import type { OptionLike, Option } from "../select";
|
|
3
|
-
import { AutocompleteOptionProps } from "./AutocompleteOption";
|
|
2
|
+
import type { OptionLike, Option } from "../select/index.js";
|
|
3
|
+
import { AutocompleteOptionProps } from "./AutocompleteOption.js";
|
|
4
4
|
import { Placement } from "@floating-ui/react";
|
|
5
|
-
import { ThemeColor } from "../../types";
|
|
5
|
+
import { ThemeColor } from "../../types.js";
|
|
6
6
|
export interface AutocompleteProps<O extends OptionLike = Option> extends ComponentProps<"input"> {
|
|
7
7
|
icon?: boolean | ReactNode;
|
|
8
8
|
color?: ThemeColor;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { createElement as _createElement } from "react";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useCallback, useMemo, useRef, useState, } from "react";
|
|
4
|
-
import { AutocompleteOption } from "./AutocompleteOption";
|
|
4
|
+
import { AutocompleteOption } from "./AutocompleteOption.js";
|
|
5
5
|
import { FloatingFocusManager, FloatingList, FloatingPortal, autoUpdate, flip, offset, size, useDismiss, useFloating, useInteractions, useListNavigation, useRole, } from "@floating-ui/react";
|
|
6
|
-
import { AutocompleteContext } from "./useAutocompleteContext";
|
|
6
|
+
import { AutocompleteContext } from "./useAutocompleteContext.js";
|
|
7
7
|
import clsx from "clsx";
|
|
8
|
-
import { useEffectEvent } from "../../hooks";
|
|
9
|
-
import { getOptionLabel, getOptionValue } from "./util";
|
|
10
|
-
import { Button } from "../button";
|
|
11
|
-
import { Dialog } from "../dialog";
|
|
12
|
-
import { Loader } from "../loader";
|
|
13
|
-
import { inputConfig, sizeVariant } from "../input/Input";
|
|
8
|
+
import { useEffectEvent } from "../../hooks/index.js";
|
|
9
|
+
import { getOptionLabel, getOptionValue } from "./util.js";
|
|
10
|
+
import { Button } from "../button/index.js";
|
|
11
|
+
import { Dialog } from "../dialog/index.js";
|
|
12
|
+
import { Loader } from "../loader/index.js";
|
|
13
|
+
import { inputConfig, sizeVariant } from "../input/Input.js";
|
|
14
14
|
export 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, ref, ...rest }) {
|
|
15
15
|
const [isOpen, setIsOpen] = useState(false);
|
|
16
16
|
const [activeIndex, setActiveIndex] = useState(null);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OptionLike } from "../select";
|
|
1
|
+
import { OptionLike } from "../select/index.js";
|
|
2
2
|
export type AutocompleteOptionProps<O extends OptionLike> = O;
|
|
3
3
|
export declare const AutocompleteOption: import("react").MemoExoticComponent<(<O extends OptionLike>(props: AutocompleteOptionProps<O>) => import("react/jsx-runtime").JSX.Element)>;
|
|
4
4
|
//# sourceMappingURL=AutocompleteOption.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { memo, useId } from "react";
|
|
3
3
|
import { useListItem } from "@floating-ui/react";
|
|
4
|
-
import { useAutocomplete } from "./useAutocompleteContext";
|
|
4
|
+
import { useAutocomplete } from "./useAutocompleteContext.js";
|
|
5
5
|
import clsx from "clsx";
|
|
6
|
-
import { getOptionLabel, getOptionValue } from "./util";
|
|
6
|
+
import { getOptionLabel, getOptionValue } from "./util.js";
|
|
7
7
|
export const AutocompleteOption = memo(function AutocompleteOption(props) {
|
|
8
8
|
const label = getOptionLabel(props);
|
|
9
9
|
const id = useId();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AutocompleteProps } from "./Autocomplete";
|
|
2
|
-
import { OptionLike, Option } from "../select";
|
|
1
|
+
import { AutocompleteProps } from "./Autocomplete.js";
|
|
2
|
+
import { OptionLike, Option } from "../select/index.js";
|
|
3
3
|
interface Props<O extends OptionLike = Option> extends Omit<AutocompleteProps<O>, "searchValue" | "onChangeSearchValue" | "options" | "selectOnFocus"> {
|
|
4
4
|
onChangeSearchValueCallback: (searchValue: string) => Promise<O[]>;
|
|
5
5
|
debounce?: number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
3
|
-
import { Autocomplete } from "./Autocomplete";
|
|
4
|
-
import { getOptionLabel } from "./util";
|
|
5
|
-
import { useStateDebounce, useEffectEvent, useIsomorphicLayoutEffect } from "../../hooks";
|
|
3
|
+
import { Autocomplete } from "./Autocomplete.js";
|
|
4
|
+
import { getOptionLabel } from "./util.js";
|
|
5
|
+
import { useStateDebounce, useEffectEvent, useIsomorphicLayoutEffect } from "../../hooks/index.js";
|
|
6
6
|
export function LazyAutocomplete({ onChangeSearchValueCallback, debounce = 5000, selection = null, onChangeSelection, ...rest }) {
|
|
7
7
|
const onChangeSelectionStable = useEffectEvent(onChangeSelection);
|
|
8
8
|
const onChangeSearchValueCallbackStable = useEffectEvent(onChangeSearchValueCallback);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AutocompleteProps } from "./Autocomplete";
|
|
2
|
-
import { Option, OptionLike } from "../select";
|
|
1
|
+
import { AutocompleteProps } from "./Autocomplete.js";
|
|
2
|
+
import { Option, OptionLike } from "../select/index.js";
|
|
3
3
|
interface Props<O extends OptionLike = Option> extends Omit<AutocompleteProps<O>, "searchValue" | "onChangeSearchValue" | "loading" | "clearSearchButton" | "selectOnFocus"> {
|
|
4
4
|
}
|
|
5
5
|
export declare function SimpleAutocomplete<O extends OptionLike = Option>({ options, selection, onChangeSelection, ...rest }: Props<O>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useRef, useState } from "react";
|
|
3
|
-
import { Autocomplete } from "./Autocomplete";
|
|
4
|
-
import { useEffectEvent, useIsomorphicLayoutEffect } from "../../hooks";
|
|
5
|
-
import { getOptionLabel } from "./util";
|
|
3
|
+
import { Autocomplete } from "./Autocomplete.js";
|
|
4
|
+
import { useEffectEvent, useIsomorphicLayoutEffect } from "../../hooks/index.js";
|
|
5
|
+
import { getOptionLabel } from "./util.js";
|
|
6
6
|
export function SimpleAutocomplete({ options, selection = null, onChangeSelection, ...rest }) {
|
|
7
7
|
const onChangeSelectionStable = useEffectEvent(onChangeSelection);
|
|
8
8
|
const [searchValue, setSearchValue] = useState(selection ? getOptionLabel(selection) : "");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { Autocomplete, type AutocompleteProps } from "./Autocomplete";
|
|
2
|
-
export { SimpleAutocomplete } from "./SimpleAutocomplete";
|
|
3
|
-
export { AutocompleteOption } from "./AutocompleteOption";
|
|
4
|
-
export { LazyAutocomplete } from "./LazyAutocomplete";
|
|
5
|
-
export { useAutocomplete } from "./useAutocompleteContext";
|
|
6
|
-
export { getOptionValue, getOptionLabel } from "./util";
|
|
1
|
+
export { Autocomplete, type AutocompleteProps } from "./Autocomplete.js";
|
|
2
|
+
export { SimpleAutocomplete } from "./SimpleAutocomplete.js";
|
|
3
|
+
export { AutocompleteOption } from "./AutocompleteOption.js";
|
|
4
|
+
export { LazyAutocomplete } from "./LazyAutocomplete.js";
|
|
5
|
+
export { useAutocomplete } from "./useAutocompleteContext.js";
|
|
6
|
+
export { getOptionValue, getOptionLabel } from "./util.js";
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { Autocomplete } from "./Autocomplete";
|
|
2
|
-
export { SimpleAutocomplete } from "./SimpleAutocomplete";
|
|
3
|
-
export { AutocompleteOption } from "./AutocompleteOption";
|
|
4
|
-
export { LazyAutocomplete } from "./LazyAutocomplete";
|
|
5
|
-
export { useAutocomplete } from "./useAutocompleteContext";
|
|
6
|
-
export { getOptionValue, getOptionLabel } from "./util";
|
|
1
|
+
export { Autocomplete } from "./Autocomplete.js";
|
|
2
|
+
export { SimpleAutocomplete } from "./SimpleAutocomplete.js";
|
|
3
|
+
export { AutocompleteOption } from "./AutocompleteOption.js";
|
|
4
|
+
export { LazyAutocomplete } from "./LazyAutocomplete.js";
|
|
5
|
+
export { useAutocomplete } from "./useAutocompleteContext.js";
|
|
6
|
+
export { getOptionValue, getOptionLabel } from "./util.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OptionLike } from "../select";
|
|
1
|
+
import { OptionLike } from "../select/index.js";
|
|
2
2
|
export declare function getOptionLabel(option: OptionLike): string;
|
|
3
3
|
export declare function getOptionValue(option: OptionLike): string | number;
|
|
4
4
|
//# sourceMappingURL=util.d.ts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
import { ThemeColor } from "../../types";
|
|
2
|
+
import { ThemeColor } from "../../types.js";
|
|
3
3
|
interface Props {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
className?: string;
|
|
6
6
|
tooltip?: string;
|
|
7
7
|
url?: string;
|
|
8
|
-
color?: ThemeColor;
|
|
8
|
+
color?: ThemeColor | "yellow-alpha" | "gray-alpha";
|
|
9
9
|
onClick?: () => void;
|
|
10
10
|
onRemove?: () => void;
|
|
11
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../src/components/badge/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../src/components/badge/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAMzC,UAAU,KAAK;IACb,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,UAAU,GAAG,cAAc,GAAG,YAAY,CAAC;IACnD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,wBAAgB,KAAK,CAAC,EACpB,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,OAAO,EACP,OAAO,EACP,GAAG,EACH,KAAgB,GACjB,EAAE,KAAK,2CAyCP"}
|
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import clsx from "clsx";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { TooltipTrigger } from "../tooltip/TooltipTrigger";
|
|
3
|
+
import { Tooltip } from "../tooltip/Tooltip.js";
|
|
4
|
+
import { TooltipContent } from "../tooltip/TooltipContent.js";
|
|
5
|
+
import { TooltipTrigger } from "../tooltip/TooltipTrigger.js";
|
|
7
6
|
export function Badge({ children, className, onRemove, onClick, tooltip, url, color = "yellow", }) {
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
icon: null,
|
|
11
|
-
size: null,
|
|
12
|
-
clickable: onClick !== undefined,
|
|
13
|
-
width: "custom",
|
|
14
|
-
}), className), children: [onClick ? (_jsx("button", { className: "px-2", onClick: onClick, children: children })) : (_jsx("span", { className: "px-2", children: children })), onRemove && (_jsx("button", { className: "remove rounded-r-full pr-1 pl-0.5", onClick: onRemove, children: _jsx("i", { className: "fe-cancel" }) }))] }));
|
|
7
|
+
const clickable = onClick !== undefined || url !== undefined;
|
|
8
|
+
const badge = (_jsxs("span", { "data-color": color, className: clsx("bg-custom-2/50 text-gray-text relative box-border inline-flex h-(--h-button) items-center truncate leading-5 no-underline [--h-button:1.5rem]", clickable && "cursor-pointer active:translate-y-[1px]", "text-body-xs w-fit rounded-full", className), children: [onClick ? (_jsx("button", { className: "cursor-pointer px-2", onClick: onClick, children: children })) : (_jsx("span", { className: "px-2", children: children })), onRemove && (_jsx("button", { className: "remove cursor-pointer rounded-r-full pr-1 pl-0.5 active:translate-y-[1px]", onClick: onRemove, children: _jsx("i", { className: "fe-cancel" }) }))] }));
|
|
15
9
|
const wrappedBadge = url ? _jsx("a", { href: url, children: badge }) : badge;
|
|
16
10
|
if (!tooltip) {
|
|
17
11
|
return wrappedBadge;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Badge } from "./Badge";
|
|
1
|
+
export { Badge } from "./Badge.js";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Badge } from "./Badge";
|
|
1
|
+
export { Badge } from "./Badge.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ComponentProps, RefObject } from "react";
|
|
2
|
-
import { ThemeColor } from "../../types";
|
|
2
|
+
import { ThemeColor } from "../../types.js";
|
|
3
3
|
export interface ButtonProps extends Omit<ComponentProps<"button">, "color"> {
|
|
4
4
|
withRipple?: boolean;
|
|
5
5
|
variant?: "contained" | "light" | "outlined" | "text" | "ghost";
|
|
6
|
-
size?: "small" | "medium" | "large" | "custom" | "input";
|
|
6
|
+
size?: "small" | "medium" | "large" | "custom" | "input" | "scalable";
|
|
7
7
|
color?: ThemeColor | "yellow-alpha" | "gray-alpha";
|
|
8
8
|
width?: "fit" | "full" | "custom";
|
|
9
9
|
loading?: boolean;
|
|
@@ -19,10 +19,10 @@ export interface ButtonProps extends Omit<ComponentProps<"button">, "color"> {
|
|
|
19
19
|
}
|
|
20
20
|
export declare const buttonVariants: (props?: ({
|
|
21
21
|
clickable?: boolean | null | undefined;
|
|
22
|
-
size?: "small" | "input" | "medium" | "large" | "custom" | null | undefined;
|
|
22
|
+
size?: "small" | "input" | "medium" | "large" | "custom" | "scalable" | null | undefined;
|
|
23
23
|
icon?: boolean | "custom" | null | undefined;
|
|
24
24
|
width?: "custom" | "fit" | "full" | null | undefined;
|
|
25
|
-
variant?: "light" | "text" | "
|
|
25
|
+
variant?: "light" | "text" | "ghost" | "contained" | "outlined" | null | undefined;
|
|
26
26
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
27
27
|
export declare function Button({ withRipple, variant, loading, color, size, focusable, className, disabled, children, selected, icon, asChild, width, ref, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
28
28
|
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAA+B,MAAM,OAAO,CAAC;AAM/E,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAazC,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC1E,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,CAAC;IAEhE,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAA+B,MAAM,OAAO,CAAC;AAM/E,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAazC,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC1E,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,CAAC;IAEhE,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,CAAC;IAEtE,KAAK,CAAC,EAAE,UAAU,GAAG,cAAc,GAAG,YAAY,CAAC;IAEnD,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAC;IAElC,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,GAAG,CAAC,EAAE,SAAS,CAAC,iBAAiB,CAAC,CAAC;CACpC;AAED,eAAO,MAAM,cAAc;;;;;;8EAqD1B,CAAC;AAEF,wBAAgB,MAAM,CAAC,EACrB,UAAiB,EACjB,OAAqB,EACrB,OAAe,EACf,KAAgB,EAChB,IAAe,EACf,SAAgB,EAChB,SAAS,EACT,QAAgB,EAChB,QAAQ,EACR,QAAgB,EAChB,IAAY,EACZ,OAAe,EACf,KAAa,EACb,GAAG,EACH,GAAG,KAAK,EACT,EAAE,WAAW,2CAyDb"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useImperativeHandle, useRef } from "react";
|
|
3
3
|
import clsx from "clsx";
|
|
4
|
-
import { Loader } from "../loader";
|
|
5
|
-
import { useRipple } from "../../hooks";
|
|
6
|
-
import { Slot } from "../slot";
|
|
4
|
+
import { Loader } from "../loader/index.js";
|
|
5
|
+
import { useRipple } from "../../hooks/index.js";
|
|
6
|
+
import { Slot } from "../slot/index.js";
|
|
7
7
|
import { cva } from "class-variance-authority";
|
|
8
8
|
function loaderColor(color) {
|
|
9
9
|
switch (color) {
|
|
@@ -15,18 +15,19 @@ function loaderColor(color) {
|
|
|
15
15
|
return color;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
export const buttonVariants = cva("relative box-border inline-flex items-center leading-5 no-underline focus-visible-has:outline-2
|
|
18
|
+
export const buttonVariants = cva("relative box-border inline-flex items-center leading-5 no-underline focus-visible-has:outline-2", {
|
|
19
19
|
variants: {
|
|
20
20
|
clickable: {
|
|
21
21
|
true: "cursor-pointer active:translate-y-[1px] focus-visible-has:z-10",
|
|
22
22
|
false: "pointer-events-none",
|
|
23
23
|
},
|
|
24
24
|
size: {
|
|
25
|
-
small: "[--h-button:1.5rem] h-(--h-button)",
|
|
26
|
-
medium: "[--h-button:2rem] h-(--h-button)",
|
|
27
|
-
large: "[--h-button:3rem] h-(--h-button)",
|
|
28
|
-
input: "[--h-button:calc(var(--h-input)-2px)] h-(--h-button)",
|
|
29
|
-
custom: "",
|
|
25
|
+
small: "[--h-button:1.5rem] h-(--h-button) truncate",
|
|
26
|
+
medium: "[--h-button:2rem] h-(--h-button) truncate",
|
|
27
|
+
large: "[--h-button:3rem] h-(--h-button) truncate",
|
|
28
|
+
input: "[--h-button:calc(var(--h-input)-2px)] h-(--h-button) truncate",
|
|
29
|
+
custom: "truncate",
|
|
30
|
+
scalable: "",
|
|
30
31
|
},
|
|
31
32
|
icon: {
|
|
32
33
|
true: "rounded-[calc(var(--h-button)/2)] min-w-(--h-button) [&_i,&_img,&_svg]:w-(--h-button) justify-center [&_:last-child:not(i,img,svg,strong)]:pr-4",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentProps, RefObject } from "react";
|
|
2
|
-
import { ButtonProps } from "./Button";
|
|
2
|
+
import { ButtonProps } from "./Button.js";
|
|
3
3
|
export type HrefButtonProps = ComponentProps<"a"> & Pick<ButtonProps, "withRipple" | "variant" | "size" | "color" | "selected" | "icon" | "disabled" | "width"> & {
|
|
4
4
|
ref?: RefObject<HTMLAnchorElement>;
|
|
5
5
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useImperativeHandle, useRef } from "react";
|
|
3
3
|
import clsx from "clsx";
|
|
4
|
-
import { useRipple } from "../../hooks/useRipple";
|
|
5
|
-
import { buttonVariants } from "./Button";
|
|
4
|
+
import { useRipple } from "../../hooks/useRipple.js";
|
|
5
|
+
import { buttonVariants } from "./Button.js";
|
|
6
6
|
export function HrefButton({ withRipple = true, variant = "contained", color = "yellow", size = "medium", width = "fit", className, disabled, children, selected = false, icon = false, href, ref, ...props }) {
|
|
7
7
|
const anchorRef = useRef(null);
|
|
8
8
|
useImperativeHandle(ref, () => anchorRef.current);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentProps, RefObject } from "react";
|
|
2
|
-
import { ButtonProps } from "./Button";
|
|
2
|
+
import { ButtonProps } from "./Button.js";
|
|
3
3
|
export type HrefButtonProps = ComponentProps<"a"> & Pick<ButtonProps, "withRipple" | "variant" | "size" | "color" | "selected" | "icon" | "disabled" | "width"> & {
|
|
4
4
|
ref?: RefObject<HTMLAnchorElement>;
|
|
5
5
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useImperativeHandle, useRef } from "react";
|
|
3
3
|
import clsx from "clsx";
|
|
4
|
-
import { useRipple } from "../../hooks/useRipple";
|
|
5
|
-
import { buttonVariants } from "./Button";
|
|
4
|
+
import { useRipple } from "../../hooks/useRipple.js";
|
|
5
|
+
import { buttonVariants } from "./Button.js";
|
|
6
6
|
export function HrefButton({ withRipple = true, variant = "contained", color = "yellow", size = "medium", width = "fit", className, disabled, children, selected = false, icon = false, href, ref, ...props }) {
|
|
7
7
|
const anchorRef = useRef(null);
|
|
8
8
|
useImperativeHandle(ref, () => anchorRef.current);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Button, type ButtonProps, buttonVariants } from "./Button";
|
|
2
|
-
export { ButtonGroup, buttonGroupVariants } from "./ButtonGroup";
|
|
3
|
-
export { HrefButton } from "./HrefButton";
|
|
1
|
+
export { Button, type ButtonProps, buttonVariants } from "./Button.js";
|
|
2
|
+
export { ButtonGroup, buttonGroupVariants } from "./ButtonGroup.js";
|
|
3
|
+
export { HrefButton } from "./HrefButton.js";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Button, buttonVariants } from "./Button";
|
|
2
|
-
export { ButtonGroup, buttonGroupVariants } from "./ButtonGroup";
|
|
3
|
-
export { HrefButton } from "./HrefButton";
|
|
1
|
+
export { Button, buttonVariants } from "./Button.js";
|
|
2
|
+
export { ButtonGroup, buttonGroupVariants } from "./ButtonGroup.js";
|
|
3
|
+
export { HrefButton } from "./HrefButton.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { cardConfig } from "./config";
|
|
1
|
+
export { cardConfig } from "./config.js";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { cardConfig } from "./config";
|
|
1
|
+
export { cardConfig } from "./config.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Code } from "./Code";
|
|
1
|
+
export { Code } from "./Code.js";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Code } from "./Code";
|
|
1
|
+
export { Code } from "./Code.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Children, cloneElement, isValidElement, useEffect, useRef, useState, } from "react";
|
|
3
3
|
import { FloatingFocusManager, FloatingPortal, autoUpdate, flip, offset, shift, size, useDismiss, useFloating, useInteractions, useListNavigation, useRole, useTypeahead, } from "@floating-ui/react";
|
|
4
|
-
import { Dialog } from "../dialog/Dialog";
|
|
5
|
-
import { useEffectEvent, useRefDebounce } from "../../hooks";
|
|
4
|
+
import { Dialog } from "../dialog/Dialog.js";
|
|
5
|
+
import { useEffectEvent, useRefDebounce } from "../../hooks/index.js";
|
|
6
6
|
export function ContextMenu({ targetRef, children, style, eventName = "contextmenu" }) {
|
|
7
7
|
const [activeIndex, setActiveIndex] = useState(null);
|
|
8
8
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { ContextMenu } from "./ContextMenu";
|
|
2
|
-
export { ContextMenuItem, type ContextMenuItemMouseEvent } from "./ContextMenuItem";
|
|
1
|
+
export { ContextMenu } from "./ContextMenu.js";
|
|
2
|
+
export { ContextMenuItem, type ContextMenuItemMouseEvent } from "./ContextMenuItem.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ContextMenu } from "./ContextMenu";
|
|
2
|
-
export { ContextMenuItem } from "./ContextMenuItem";
|
|
1
|
+
export { ContextMenu } from "./ContextMenu.js";
|
|
2
|
+
export { ContextMenuItem } from "./ContextMenuItem.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Placement } from "@floating-ui/react";
|
|
2
2
|
import { ComponentProps, ReactNode } from "react";
|
|
3
|
-
import type { ThemeColor } from "../../types";
|
|
3
|
+
import type { ThemeColor } from "../../types.js";
|
|
4
4
|
interface Props extends ComponentProps<"div"> {
|
|
5
5
|
color?: ThemeColor;
|
|
6
6
|
placement?: Placement;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Dialog, dialogVariants } from "./Dialog";
|
|
1
|
+
export { Dialog, dialogVariants } from "./Dialog.js";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Dialog, dialogVariants } from "./Dialog";
|
|
1
|
+
export { Dialog, dialogVariants } from "./Dialog.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { DropIndicator } from "./DropIndicator";
|
|
2
|
-
export { useDraggableItem } from "./useDraggableItem";
|
|
3
|
-
export { useDraggableMonitor } from "./useDraggableMonitor";
|
|
4
|
-
export { useDraggableMonitorIndex } from "./useDraggableMonitorIndex";
|
|
5
|
-
export { dragStateStyles, isItemData, getItemData, triggerPostMoveFlash } from "./util";
|
|
6
|
-
export { draggableItemDataKey, type DraggableState, type DraggableItemData } from "./types";
|
|
1
|
+
export { DropIndicator } from "./DropIndicator.js";
|
|
2
|
+
export { useDraggableItem } from "./useDraggableItem.js";
|
|
3
|
+
export { useDraggableMonitor } from "./useDraggableMonitor.js";
|
|
4
|
+
export { useDraggableMonitorIndex } from "./useDraggableMonitorIndex.js";
|
|
5
|
+
export { dragStateStyles, isItemData, getItemData, triggerPostMoveFlash } from "./util.js";
|
|
6
|
+
export { draggableItemDataKey, type DraggableState, type DraggableItemData } from "./types.js";
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { DropIndicator } from "./DropIndicator";
|
|
2
|
-
export { useDraggableItem } from "./useDraggableItem";
|
|
3
|
-
export { useDraggableMonitor } from "./useDraggableMonitor";
|
|
4
|
-
export { useDraggableMonitorIndex } from "./useDraggableMonitorIndex";
|
|
5
|
-
export { dragStateStyles, isItemData, getItemData, triggerPostMoveFlash } from "./util";
|
|
6
|
-
export { draggableItemDataKey } from "./types";
|
|
1
|
+
export { DropIndicator } from "./DropIndicator.js";
|
|
2
|
+
export { useDraggableItem } from "./useDraggableItem.js";
|
|
3
|
+
export { useDraggableMonitor } from "./useDraggableMonitor.js";
|
|
4
|
+
export { useDraggableMonitorIndex } from "./useDraggableMonitorIndex.js";
|
|
5
|
+
export { dragStateStyles, isItemData, getItemData, triggerPostMoveFlash } from "./util.js";
|
|
6
|
+
export { draggableItemDataKey } from "./types.js";
|
|
@@ -4,7 +4,7 @@ import { setCustomNativeDragPreview } from "@atlaskit/pragmatic-drag-and-drop/el
|
|
|
4
4
|
import { pointerOutsideOfPreview } from "@atlaskit/pragmatic-drag-and-drop/element/pointer-outside-of-preview";
|
|
5
5
|
import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine";
|
|
6
6
|
import { useEffect, useRef, useState } from "react";
|
|
7
|
-
import { getItemData, isItemData } from "./util";
|
|
7
|
+
import { getItemData, isItemData } from "./util.js";
|
|
8
8
|
const idle = { type: "idle" };
|
|
9
9
|
export const useDraggableItem = ({ id, customPreview = false }) => {
|
|
10
10
|
const ref = useRef(null);
|
|
@@ -3,8 +3,8 @@ import { monitorForElements } from "@atlaskit/pragmatic-drag-and-drop/element/ad
|
|
|
3
3
|
import { extractClosestEdge } from "@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge";
|
|
4
4
|
import { reorderWithEdge } from "@atlaskit/pragmatic-drag-and-drop-hitbox/util/reorder-with-edge";
|
|
5
5
|
import { flushSync } from "react-dom";
|
|
6
|
-
import { isItemData, triggerPostMoveFlash } from "./util";
|
|
7
|
-
import { useEffectEvent } from "../../hooks";
|
|
6
|
+
import { isItemData, triggerPostMoveFlash } from "./util.js";
|
|
7
|
+
import { useEffectEvent } from "../../hooks/index.js";
|
|
8
8
|
function defaultGetItemIndexById(list, id) {
|
|
9
9
|
return list.findIndex((item) => item.id === id);
|
|
10
10
|
}
|