flikkui 0.1.0-beta.2 → 0.1.0-beta.4

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.
Files changed (105) hide show
  1. package/README.md +155 -0
  2. package/dist/components/charts/index.d.ts +2 -0
  3. package/dist/components/charts/shared/ChartLegend/ChartLegend.d.ts +7 -0
  4. package/dist/components/charts/shared/ChartLegend/ChartLegendContent.d.ts +7 -0
  5. package/dist/components/charts/shared/ChartLegend/index.d.ts +2 -0
  6. package/dist/components/core/AvatarGroup/AvatarGroup.animations.d.ts +1 -1
  7. package/dist/components/core/AvatarGroup/AvatarGroup.theme.d.ts +1 -0
  8. package/dist/components/core/Breadcrumbs/Breadcrumbs.js +8 -7
  9. package/dist/components/core/Button/Button.animations.d.ts +0 -12
  10. package/dist/components/core/Button/Button.animations.js +4 -19
  11. package/dist/components/core/Button/Button.js +40 -37
  12. package/dist/components/core/Button/Button.theme.d.ts +0 -4
  13. package/dist/components/core/Button/Button.theme.js +14 -9
  14. package/dist/components/core/Button/Button.types.d.ts +1 -1
  15. package/dist/components/core/Divider/Divider.types.d.ts +8 -2
  16. package/dist/components/core/Drawer/Drawer.types.d.ts +1 -1
  17. package/dist/components/core/Modal/Modal.types.d.ts +1 -1
  18. package/dist/components/core/Pagination/Pagination.types.d.ts +25 -13
  19. package/dist/components/core/Popover/Popover.animations.d.ts +34 -3
  20. package/dist/components/core/Popover/Popover.animations.js +19 -0
  21. package/dist/components/core/Popover/Popover.theme.js +2 -2
  22. package/dist/components/core/Popover/PopoverContent.js +5 -14
  23. package/dist/components/core/Segmented/Segmented.types.d.ts +17 -0
  24. package/dist/components/core/Tabs/Tabs.js +2 -8
  25. package/dist/components/core/Tabs/Tabs.theme.d.ts +8 -45
  26. package/dist/components/core/Tabs/Tabs.theme.js +14 -64
  27. package/dist/components/core/Tabs/Tabs.types.d.ts +4 -36
  28. package/dist/components/core/Tabs/TabsContent.js +3 -8
  29. package/dist/components/core/Tabs/TabsList.js +3 -10
  30. package/dist/components/core/Tabs/TabsTrigger.js +3 -15
  31. package/dist/components/core/Tabs/index.d.ts +1 -1
  32. package/dist/components/core/Tooltip/Tooltip.animations.d.ts +1 -1
  33. package/dist/components/core/Tooltip/Tooltip.d.ts +1 -1
  34. package/dist/components/core/Tooltip/Tooltip.theme.d.ts +0 -1
  35. package/dist/components/core/Tooltip/Tooltip.types.d.ts +15 -15
  36. package/dist/components/core/Tooltip/useTooltipPositioning.d.ts +12 -0
  37. package/dist/components/core/Tree/Tree.types.d.ts +8 -45
  38. package/dist/components/core/Tree/index.d.ts +1 -3
  39. package/dist/components/data-display/Table/Table.animations.d.ts +21 -0
  40. package/dist/components/data-display/Table/Table.types.d.ts +56 -13
  41. package/dist/components/data-display/Table/components/TableActionsMenu.d.ts +1 -1
  42. package/dist/components/data-display/Table/components/TableColumnManager/TableColumnManager.theme.d.ts +16 -0
  43. package/dist/components/data-display/Table/components/TablePagination/TablePagination.d.ts +17 -0
  44. package/dist/components/data-display/Table/components/TablePagination/TablePagination.types.d.ts +21 -0
  45. package/dist/components/data-display/Table/components/TablePagination/index.d.ts +2 -0
  46. package/dist/components/data-display/Table/index.d.ts +6 -3
  47. package/dist/components/feedback/Alert/Alert.types.d.ts +4 -0
  48. package/dist/components/feedback/ChatMessage/ChatMessage.types.d.ts +20 -14
  49. package/dist/components/feedback/Empty/Empty.theme.d.ts +4 -14
  50. package/dist/components/feedback/Empty/Empty.types.d.ts +8 -20
  51. package/dist/components/feedback/Empty/index.d.ts +2 -2
  52. package/dist/components/feedback/Notification/Notification.theme.d.ts +16 -1
  53. package/dist/components/feedback/Notification/Notification.types.d.ts +18 -40
  54. package/dist/components/feedback/Notification/index.d.ts +2 -2
  55. package/dist/components/feedback/Toast/Toast.animations.d.ts +31 -0
  56. package/dist/components/feedback/Toast/Toast.types.d.ts +1 -1
  57. package/dist/components/feedback/index.d.ts +3 -3
  58. package/dist/components/forms/Checkbox/Checkbox.js +10 -16
  59. package/dist/components/forms/Checkbox/Checkbox.theme.js +8 -6
  60. package/dist/components/forms/Checkbox/Checkbox.types.d.ts +13 -30
  61. package/dist/components/forms/FormLabel/FormLabel.d.ts +1 -2
  62. package/dist/components/forms/FormLabel/FormLabel.js +7 -14
  63. package/dist/components/forms/FormLabel/FormLabel.theme.d.ts +3 -4
  64. package/dist/components/forms/FormLabel/FormLabel.theme.js +6 -6
  65. package/dist/components/forms/FormLabel/FormLabel.types.d.ts +10 -18
  66. package/dist/components/forms/FormLabel/index.d.ts +3 -3
  67. package/dist/components/forms/Input/Input.d.ts +0 -1
  68. package/dist/components/forms/Input/Input.js +51 -85
  69. package/dist/components/forms/Input/Input.theme.d.ts +4 -4
  70. package/dist/components/forms/Input/Input.theme.js +26 -26
  71. package/dist/components/forms/Input/Input.types.d.ts +41 -64
  72. package/dist/components/forms/Input/index.d.ts +1 -1
  73. package/dist/components/forms/InputAddress/InputAddress.theme.d.ts +2 -2
  74. package/dist/components/forms/InputAddress/InputAddress.types.d.ts +3 -3
  75. package/dist/components/forms/InputCreditCard/InputCreditCard.theme.d.ts +3 -3
  76. package/dist/components/forms/InputCreditCard/InputCreditCard.types.d.ts +4 -4
  77. package/dist/components/forms/Radio/Radio.js +12 -18
  78. package/dist/components/forms/Radio/Radio.theme.d.ts +2 -18
  79. package/dist/components/forms/Radio/Radio.theme.js +10 -19
  80. package/dist/components/forms/Radio/Radio.types.d.ts +16 -32
  81. package/dist/components/forms/Select/Select.js +1 -9
  82. package/dist/components/forms/Signature/Signature.js +5 -4
  83. package/dist/components/forms/Signature/Signature.theme.js +1 -3
  84. package/dist/components/forms/Signature/Signature.types.d.ts +0 -4
  85. package/dist/components/layout/DragDrop/DragDrop.js +62 -0
  86. package/dist/components/layout/DragDrop/DragDrop.theme.js +8 -0
  87. package/dist/components/layout/Sortable/Sortable.animations.js +81 -0
  88. package/dist/components/layout/Sortable/Sortable.js +165 -0
  89. package/dist/components/layout/Sortable/Sortable.theme.js +7 -0
  90. package/dist/components/navigation/index.d.ts +1 -1
  91. package/dist/index.d.ts +1 -0
  92. package/dist/index.js +3 -1
  93. package/dist/node_modules/@heroicons/react/24/outline/esm/Bars3Icon.js +28 -0
  94. package/dist/node_modules/@heroicons/react/24/outline/esm/LockClosedIcon.js +28 -0
  95. package/dist/styles.css +1 -1
  96. package/dist/utils/debounce.d.ts +9 -0
  97. package/dist/utils/index.d.ts +1 -0
  98. package/package.json +4 -4
  99. package/dist/components/core/Popover/test-popover.d.ts +0 -3
  100. package/dist/components/core/Tabs/test-tabs.d.ts +0 -3
  101. package/dist/components/core/Tree/TreeIcon.d.ts +0 -3
  102. package/dist/components/core/Tree/TreeNode.d.ts +0 -6
  103. package/dist/components/forms/Input/Input.AdvancedStories.d.ts +0 -13
  104. package/dist/node_modules/framer-motion/dist/es/animation/hooks/animation-controls.js +0 -80
  105. package/dist/node_modules/framer-motion/dist/es/animation/hooks/use-animation.js +0 -41
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flikkui",
3
- "version": "0.1.0-beta.2",
3
+ "version": "0.1.0-beta.4",
4
4
  "description": "A modern React component library built with TypeScript, Tailwind CSS v4, and Framer Motion. Follows the shadcn philosophy with complete className override support.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -14,8 +14,7 @@
14
14
  "./components/*": {
15
15
  "import": "./dist/components/*.js",
16
16
  "types": "./dist/components/*.d.ts"
17
- },
18
- "./styles.css": "./dist/styles.css"
17
+ }
19
18
  },
20
19
  "files": [
21
20
  "dist",
@@ -24,7 +23,7 @@
24
23
  ],
25
24
  "scripts": {
26
25
  "test": "echo \"Error: no test specified\" && exit 1",
27
- "build": "rollup -c && npm run build:css",
26
+ "build": "rollup -c",
28
27
  "build:css": "tailwindcss -m -i ./src/global.scss -o ./dist/styles.css",
29
28
  "watch": "rollup -c -w",
30
29
  "typecheck": "tsc --noEmit",
@@ -62,6 +61,7 @@
62
61
  },
63
62
  "devDependencies": {
64
63
  "@chromatic-com/storybook": "^4.0.0",
64
+ "@emotion/is-prop-valid": "^1.3.1",
65
65
  "@rollup/plugin-commonjs": "^28.0.2",
66
66
  "@rollup/plugin-node-resolve": "^16.0.0",
67
67
  "@rollup/plugin-typescript": "^12.1.2",
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- export declare const PopoverExample: () => React.JSX.Element;
3
- export declare const CustomStyledPopover: () => React.JSX.Element;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- export declare const TabsExample: () => React.JSX.Element;
3
- export declare const VerticalTabsExample: () => React.JSX.Element;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- import { TreeIconProps } from './Tree.types';
3
- export declare const TreeIcon: React.ForwardRefExoticComponent<TreeIconProps & React.RefAttributes<HTMLSpanElement>>;
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import { TreeNodeProps } from './Tree.types';
3
- export declare const TreeNode: React.ForwardRefExoticComponent<TreeNodeProps & {
4
- expandedKeys?: string[];
5
- selectedKeys?: string[];
6
- } & React.RefAttributes<HTMLDivElement>>;
@@ -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 };