flikkui 0.1.0-beta.2 → 0.1.0-beta.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/dist/components/charts/index.d.ts +2 -0
- package/dist/components/charts/shared/ChartLegend/ChartLegend.d.ts +7 -0
- package/dist/components/charts/shared/ChartLegend/ChartLegendContent.d.ts +7 -0
- package/dist/components/charts/shared/ChartLegend/index.d.ts +2 -0
- package/dist/components/core/AvatarGroup/AvatarGroup.animations.d.ts +1 -1
- package/dist/components/core/AvatarGroup/AvatarGroup.theme.d.ts +1 -0
- package/dist/components/core/Breadcrumbs/Breadcrumbs.js +8 -7
- package/dist/components/core/Button/Button.animations.d.ts +0 -12
- package/dist/components/core/Button/Button.animations.js +4 -19
- package/dist/components/core/Button/Button.js +40 -37
- package/dist/components/core/Button/Button.theme.d.ts +0 -4
- package/dist/components/core/Button/Button.theme.js +14 -9
- package/dist/components/core/Button/Button.types.d.ts +1 -1
- package/dist/components/core/Divider/Divider.types.d.ts +8 -2
- package/dist/components/core/Drawer/Drawer.types.d.ts +1 -1
- package/dist/components/core/Modal/Modal.types.d.ts +1 -1
- package/dist/components/core/Pagination/Pagination.types.d.ts +25 -13
- package/dist/components/core/Popover/Popover.animations.d.ts +34 -3
- package/dist/components/core/Popover/Popover.animations.js +19 -0
- package/dist/components/core/Popover/Popover.theme.js +2 -2
- package/dist/components/core/Popover/PopoverContent.js +5 -14
- package/dist/components/core/Segmented/Segmented.types.d.ts +17 -0
- package/dist/components/core/Tabs/Tabs.js +2 -8
- package/dist/components/core/Tabs/Tabs.theme.d.ts +8 -45
- package/dist/components/core/Tabs/Tabs.theme.js +14 -64
- package/dist/components/core/Tabs/Tabs.types.d.ts +4 -36
- package/dist/components/core/Tabs/TabsContent.js +3 -8
- package/dist/components/core/Tabs/TabsList.js +3 -10
- package/dist/components/core/Tabs/TabsTrigger.js +3 -15
- package/dist/components/core/Tabs/index.d.ts +1 -1
- package/dist/components/core/Tooltip/Tooltip.animations.d.ts +1 -1
- package/dist/components/core/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/core/Tooltip/Tooltip.theme.d.ts +0 -1
- package/dist/components/core/Tooltip/Tooltip.types.d.ts +15 -15
- package/dist/components/core/Tooltip/useTooltipPositioning.d.ts +12 -0
- package/dist/components/core/Tree/Tree.types.d.ts +8 -45
- package/dist/components/core/Tree/index.d.ts +1 -3
- package/dist/components/data-display/Table/Table.animations.d.ts +21 -0
- package/dist/components/data-display/Table/Table.types.d.ts +56 -13
- package/dist/components/data-display/Table/components/TableActionsMenu.d.ts +1 -1
- package/dist/components/data-display/Table/components/TableColumnManager/TableColumnManager.theme.d.ts +16 -0
- package/dist/components/data-display/Table/components/TablePagination/TablePagination.d.ts +17 -0
- package/dist/components/data-display/Table/components/TablePagination/TablePagination.types.d.ts +21 -0
- package/dist/components/data-display/Table/components/TablePagination/index.d.ts +2 -0
- package/dist/components/data-display/Table/index.d.ts +6 -3
- package/dist/components/feedback/Alert/Alert.types.d.ts +4 -0
- package/dist/components/feedback/ChatMessage/ChatMessage.types.d.ts +20 -14
- package/dist/components/feedback/Empty/Empty.theme.d.ts +4 -14
- package/dist/components/feedback/Empty/Empty.types.d.ts +8 -20
- package/dist/components/feedback/Empty/index.d.ts +2 -2
- package/dist/components/feedback/Notification/Notification.theme.d.ts +16 -1
- package/dist/components/feedback/Notification/Notification.types.d.ts +18 -40
- package/dist/components/feedback/Notification/index.d.ts +2 -2
- package/dist/components/feedback/Toast/Toast.animations.d.ts +31 -0
- package/dist/components/feedback/Toast/Toast.types.d.ts +1 -1
- package/dist/components/feedback/index.d.ts +3 -3
- package/dist/components/forms/Checkbox/Checkbox.js +10 -16
- package/dist/components/forms/Checkbox/Checkbox.theme.js +8 -6
- package/dist/components/forms/Checkbox/Checkbox.types.d.ts +13 -30
- package/dist/components/forms/FormLabel/FormLabel.d.ts +1 -2
- package/dist/components/forms/FormLabel/FormLabel.js +7 -14
- package/dist/components/forms/FormLabel/FormLabel.theme.d.ts +3 -4
- package/dist/components/forms/FormLabel/FormLabel.theme.js +6 -6
- package/dist/components/forms/FormLabel/FormLabel.types.d.ts +10 -18
- package/dist/components/forms/FormLabel/index.d.ts +3 -3
- package/dist/components/forms/Input/Input.d.ts +0 -1
- package/dist/components/forms/Input/Input.js +51 -85
- package/dist/components/forms/Input/Input.theme.d.ts +4 -4
- package/dist/components/forms/Input/Input.theme.js +26 -26
- package/dist/components/forms/Input/Input.types.d.ts +41 -64
- package/dist/components/forms/Input/index.d.ts +1 -1
- package/dist/components/forms/InputAddress/InputAddress.theme.d.ts +2 -2
- package/dist/components/forms/InputAddress/InputAddress.types.d.ts +3 -3
- package/dist/components/forms/InputCreditCard/InputCreditCard.theme.d.ts +3 -3
- package/dist/components/forms/InputCreditCard/InputCreditCard.types.d.ts +4 -4
- package/dist/components/forms/Radio/Radio.js +12 -18
- package/dist/components/forms/Radio/Radio.theme.d.ts +2 -18
- package/dist/components/forms/Radio/Radio.theme.js +10 -19
- package/dist/components/forms/Radio/Radio.types.d.ts +16 -32
- package/dist/components/forms/Select/Select.js +1 -9
- package/dist/components/forms/Signature/Signature.js +5 -4
- package/dist/components/forms/Signature/Signature.theme.js +1 -3
- package/dist/components/forms/Signature/Signature.types.d.ts +0 -4
- package/dist/components/layout/DragDrop/DragDrop.js +62 -0
- package/dist/components/layout/DragDrop/DragDrop.theme.js +8 -0
- package/dist/components/layout/Sortable/Sortable.animations.js +81 -0
- package/dist/components/layout/Sortable/Sortable.js +165 -0
- package/dist/components/layout/Sortable/Sortable.theme.js +7 -0
- package/dist/components/navigation/index.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -1
- package/dist/node_modules/@heroicons/react/24/outline/esm/Bars3Icon.js +28 -0
- package/dist/node_modules/@heroicons/react/24/outline/esm/LockClosedIcon.js +28 -0
- package/dist/styles.css +1 -1
- package/dist/utils/debounce.d.ts +9 -0
- package/dist/utils/index.d.ts +1 -0
- package/package.json +2 -1
- package/dist/components/core/Popover/test-popover.d.ts +0 -3
- package/dist/components/core/Tabs/test-tabs.d.ts +0 -3
- package/dist/components/core/Tree/TreeIcon.d.ts +0 -3
- package/dist/components/core/Tree/TreeNode.d.ts +0 -6
- package/dist/components/forms/Input/Input.AdvancedStories.d.ts +0 -13
- package/dist/node_modules/framer-motion/dist/es/animation/hooks/animation-controls.js +0 -80
- package/dist/node_modules/framer-motion/dist/es/animation/hooks/use-animation.js +0 -41
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from "@storybook/react-webpack5";
|
|
2
|
-
import { Input } from "./Input";
|
|
3
|
-
declare const meta: Meta<typeof Input>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof Input>;
|
|
6
|
-
export declare const PasswordWithToggle: Story;
|
|
7
|
-
export declare const PasswordWithToggleAndIcon: Story;
|
|
8
|
-
export declare const DisabledPasswordWithToggle: Story;
|
|
9
|
-
export declare const NumberInput: Story;
|
|
10
|
-
export declare const NumberInputWithLimits: Story;
|
|
11
|
-
export declare const NumberInputWithIcon: Story;
|
|
12
|
-
export declare const NumberInputWithAddon: Story;
|
|
13
|
-
export declare const DisabledNumberInput: Story;
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { setTarget } from '../../render/utils/setters.js';
|
|
2
|
-
import { animateVisualElement } from '../interfaces/visual-element.js';
|
|
3
|
-
import { invariant } from '../../../../../motion-utils/dist/es/errors.js';
|
|
4
|
-
|
|
5
|
-
function stopAnimation(visualElement) {
|
|
6
|
-
visualElement.values.forEach((value) => value.stop());
|
|
7
|
-
}
|
|
8
|
-
function setVariants(visualElement, variantLabels) {
|
|
9
|
-
const reversedLabels = [...variantLabels].reverse();
|
|
10
|
-
reversedLabels.forEach((key) => {
|
|
11
|
-
const variant = visualElement.getVariant(key);
|
|
12
|
-
variant && setTarget(visualElement, variant);
|
|
13
|
-
if (visualElement.variantChildren) {
|
|
14
|
-
visualElement.variantChildren.forEach((child) => {
|
|
15
|
-
setVariants(child, variantLabels);
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
function setValues(visualElement, definition) {
|
|
21
|
-
if (Array.isArray(definition)) {
|
|
22
|
-
return setVariants(visualElement, definition);
|
|
23
|
-
}
|
|
24
|
-
else if (typeof definition === "string") {
|
|
25
|
-
return setVariants(visualElement, [definition]);
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
setTarget(visualElement, definition);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* @public
|
|
33
|
-
*/
|
|
34
|
-
function animationControls() {
|
|
35
|
-
/**
|
|
36
|
-
* Track whether the host component has mounted.
|
|
37
|
-
*/
|
|
38
|
-
let hasMounted = false;
|
|
39
|
-
/**
|
|
40
|
-
* A collection of linked component animation controls.
|
|
41
|
-
*/
|
|
42
|
-
const subscribers = new Set();
|
|
43
|
-
const controls = {
|
|
44
|
-
subscribe(visualElement) {
|
|
45
|
-
subscribers.add(visualElement);
|
|
46
|
-
return () => void subscribers.delete(visualElement);
|
|
47
|
-
},
|
|
48
|
-
start(definition, transitionOverride) {
|
|
49
|
-
invariant(hasMounted, "controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.");
|
|
50
|
-
const animations = [];
|
|
51
|
-
subscribers.forEach((visualElement) => {
|
|
52
|
-
animations.push(animateVisualElement(visualElement, definition, {
|
|
53
|
-
transitionOverride,
|
|
54
|
-
}));
|
|
55
|
-
});
|
|
56
|
-
return Promise.all(animations);
|
|
57
|
-
},
|
|
58
|
-
set(definition) {
|
|
59
|
-
invariant(hasMounted, "controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook.");
|
|
60
|
-
return subscribers.forEach((visualElement) => {
|
|
61
|
-
setValues(visualElement, definition);
|
|
62
|
-
});
|
|
63
|
-
},
|
|
64
|
-
stop() {
|
|
65
|
-
subscribers.forEach((visualElement) => {
|
|
66
|
-
stopAnimation(visualElement);
|
|
67
|
-
});
|
|
68
|
-
},
|
|
69
|
-
mount() {
|
|
70
|
-
hasMounted = true;
|
|
71
|
-
return () => {
|
|
72
|
-
hasMounted = false;
|
|
73
|
-
controls.stop();
|
|
74
|
-
};
|
|
75
|
-
},
|
|
76
|
-
};
|
|
77
|
-
return controls;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export { animationControls, setValues };
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { useConstant } from '../../utils/use-constant.js';
|
|
2
|
-
import { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.js';
|
|
3
|
-
import { animationControls } from './animation-controls.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Creates `LegacyAnimationControls`, which can be used to manually start, stop
|
|
7
|
-
* and sequence animations on one or more components.
|
|
8
|
-
*
|
|
9
|
-
* The returned `LegacyAnimationControls` should be passed to the `animate` property
|
|
10
|
-
* of the components you want to animate.
|
|
11
|
-
*
|
|
12
|
-
* These components can then be animated with the `start` method.
|
|
13
|
-
*
|
|
14
|
-
* ```jsx
|
|
15
|
-
* import * as React from 'react'
|
|
16
|
-
* import { motion, useAnimation } from 'framer-motion'
|
|
17
|
-
*
|
|
18
|
-
* export function MyComponent(props) {
|
|
19
|
-
* const controls = useAnimation()
|
|
20
|
-
*
|
|
21
|
-
* controls.start({
|
|
22
|
-
* x: 100,
|
|
23
|
-
* transition: { duration: 0.5 },
|
|
24
|
-
* })
|
|
25
|
-
*
|
|
26
|
-
* return <motion.div animate={controls} />
|
|
27
|
-
* }
|
|
28
|
-
* ```
|
|
29
|
-
*
|
|
30
|
-
* @returns Animation controller with `start` and `stop` methods
|
|
31
|
-
*
|
|
32
|
-
* @public
|
|
33
|
-
*/
|
|
34
|
-
function useAnimationControls() {
|
|
35
|
-
const controls = useConstant(animationControls);
|
|
36
|
-
useIsomorphicLayoutEffect(controls.mount, []);
|
|
37
|
-
return controls;
|
|
38
|
-
}
|
|
39
|
-
const useAnimation = useAnimationControls;
|
|
40
|
-
|
|
41
|
-
export { useAnimation, useAnimationControls };
|