@agility/plenum-ui 2.0.0-rc47 → 2.0.0-rc49

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 (141) hide show
  1. package/.eslintrc.json +6 -6
  2. package/.prettierrc +13 -13
  3. package/.storybook/Layout.jsx +12 -12
  4. package/.storybook/head.tsx +4 -4
  5. package/.storybook/main.ts +18 -18
  6. package/.storybook/manager-head.html +1 -1
  7. package/.storybook/manager.ts +25 -25
  8. package/.storybook/plenumTheme.ts +8 -8
  9. package/.storybook/preview-head.html +3 -3
  10. package/.storybook/preview.tsx +28 -28
  11. package/.vscode/settings.json +3 -3
  12. package/README.md +271 -271
  13. package/app/globals.css +99 -99
  14. package/app/head.tsx +59 -59
  15. package/app/layout.tsx +28 -28
  16. package/app/page.tsx +7 -7
  17. package/build.js +45 -45
  18. package/dist/index.d.ts +232 -230
  19. package/dist/index.js +1 -1
  20. package/dist/index.js.map +3 -3
  21. package/dist/types/stories/molecules/inputs/select/Select.d.ts +2 -0
  22. package/local.sh +100 -100
  23. package/next.config.js +8 -8
  24. package/package.json +82 -82
  25. package/pages/api/hello.ts +13 -13
  26. package/postcss.config.js +6 -6
  27. package/rollup.config.mjs +41 -41
  28. package/scripts/create-component.js +97 -97
  29. package/stories/Introduction.mdx +314 -314
  30. package/stories/assets/stackalt.svg +1 -1
  31. package/stories/atoms/Avatar/Avatar.stories.tsx +96 -96
  32. package/stories/atoms/Avatar/Avatar.tsx +123 -123
  33. package/stories/atoms/Avatar/index.ts +3 -3
  34. package/stories/atoms/badges/Badge.tsx +127 -127
  35. package/stories/atoms/badges/Pill/Pill.stories.tsx +75 -75
  36. package/stories/atoms/badges/Rounded/Rounded.stories.tsx +75 -75
  37. package/stories/atoms/badges/index.ts +3 -3
  38. package/stories/atoms/buttons/Button/Alternative/Alternative.stories.ts +86 -86
  39. package/stories/atoms/buttons/Button/Button.tsx +232 -232
  40. package/stories/atoms/buttons/Button/Danger/Danger.stories.ts +90 -90
  41. package/stories/atoms/buttons/Button/Primary/Primary.stories.ts +97 -97
  42. package/stories/atoms/buttons/Button/Secondary/Secondary.stories.ts +93 -93
  43. package/stories/atoms/buttons/Button/defaultArgs.ts +9 -9
  44. package/stories/atoms/buttons/Button/index.ts +3 -3
  45. package/stories/atoms/buttons/Capsule/Alternative/Alternative.stories.ts +27 -27
  46. package/stories/atoms/buttons/Capsule/Capsule.tsx +88 -88
  47. package/stories/atoms/buttons/Capsule/Danger/Danger.stories.ts +27 -27
  48. package/stories/atoms/buttons/Capsule/Primary/Primary.stories.ts +27 -27
  49. package/stories/atoms/buttons/Capsule/Secondary/Secondary.stories.ts +27 -27
  50. package/stories/atoms/buttons/Capsule/index.ts +3 -3
  51. package/stories/atoms/buttons/FloatingActionButton/FloatingActionButton.stories.tsx +15 -15
  52. package/stories/atoms/buttons/FloatingActionButton/FloatingActionButton.tsx +22 -22
  53. package/stories/atoms/buttons/FloatingActionButton/index.tsx +3 -3
  54. package/stories/atoms/buttons/index.ts +4 -4
  55. package/stories/atoms/crumb/Crumb.stories.tsx +18 -18
  56. package/stories/atoms/crumb/Crumb.tsx +22 -22
  57. package/stories/atoms/crumb/index.tsx +3 -3
  58. package/stories/atoms/icons/DynamicIcon.stories.ts +43 -43
  59. package/stories/atoms/icons/DynamicIcon.tsx +90 -90
  60. package/stories/atoms/icons/IconWithShadow.stories.ts +43 -43
  61. package/stories/atoms/icons/IconWithShadow.tsx +16 -16
  62. package/stories/atoms/icons/TablerIcon.tsx +22 -22
  63. package/stories/atoms/icons/index.tsx +14 -14
  64. package/stories/atoms/icons/tablerIconNames.ts +4336 -4336
  65. package/stories/atoms/index.ts +46 -46
  66. package/stories/atoms/loaders/Loader.stories.ts +15 -15
  67. package/stories/atoms/loaders/Loader.tsx +21 -21
  68. package/stories/atoms/loaders/NProgress/RadialProgress.stories.tsx +19 -19
  69. package/stories/atoms/loaders/NProgress/RadialProgress.tsx +74 -74
  70. package/stories/atoms/loaders/NProgress/index.ts +3 -3
  71. package/stories/atoms/loaders/index.ts +4 -4
  72. package/stories/index.ts +136 -136
  73. package/stories/molecules/index.ts +51 -51
  74. package/stories/molecules/inputs/InputCounter/InputCounter.stories.tsx +18 -18
  75. package/stories/molecules/inputs/InputCounter/InputCounter.tsx +24 -24
  76. package/stories/molecules/inputs/InputCounter/index.tsx +3 -3
  77. package/stories/molecules/inputs/InputField/InputField.stories.tsx +29 -29
  78. package/stories/molecules/inputs/InputField/InputField.tsx +96 -96
  79. package/stories/molecules/inputs/InputField/index.tsx +3 -3
  80. package/stories/molecules/inputs/InputLabel/InputLabel.stories.tsx +19 -19
  81. package/stories/molecules/inputs/InputLabel/InputLabel.tsx +45 -45
  82. package/stories/molecules/inputs/InputLabel/index.tsx +3 -3
  83. package/stories/molecules/inputs/NestedInputButton/NestedInputButton.stories.tsx +52 -52
  84. package/stories/molecules/inputs/NestedInputButton/NestedInputButton.tsx +64 -64
  85. package/stories/molecules/inputs/NestedInputButton/index.tsx +3 -3
  86. package/stories/molecules/inputs/TextInput/TextInput.stories.tsx +32 -32
  87. package/stories/molecules/inputs/TextInput/TextInput.tsx +165 -165
  88. package/stories/molecules/inputs/TextInput/index.tsx +5 -5
  89. package/stories/molecules/inputs/checkbox/Checkbox.stories.ts +23 -23
  90. package/stories/molecules/inputs/checkbox/Checkbox.tsx +98 -98
  91. package/stories/molecules/inputs/checkbox/index.ts +3 -3
  92. package/stories/molecules/inputs/combobox/ComboBox.stories.ts +41 -41
  93. package/stories/molecules/inputs/combobox/ComboBox.tsx +185 -185
  94. package/stories/molecules/inputs/combobox/index.ts +3 -3
  95. package/stories/molecules/inputs/index.ts +38 -38
  96. package/stories/molecules/inputs/radio/Radio.stories.ts +27 -27
  97. package/stories/molecules/inputs/radio/Radio.tsx +92 -92
  98. package/stories/molecules/inputs/radio/index.ts +3 -3
  99. package/stories/molecules/inputs/select/Select.stories.ts +23 -23
  100. package/stories/molecules/inputs/select/Select.tsx +108 -100
  101. package/stories/molecules/inputs/select/index.ts +3 -3
  102. package/stories/molecules/inputs/textArea/TextArea.stories.ts +22 -22
  103. package/stories/molecules/inputs/textArea/TextArea.tsx +158 -158
  104. package/stories/molecules/inputs/textArea/index.ts +3 -3
  105. package/stories/molecules/inputs/toggleSwitch/ToggleSwitch.stories.tsx +118 -118
  106. package/stories/molecules/inputs/toggleSwitch/ToggleSwitch.tsx +81 -81
  107. package/stories/molecules/inputs/toggleSwitch/index.ts +3 -3
  108. package/stories/molecules/tabs/Tabs.stories.tsx +18 -18
  109. package/stories/molecules/tabs/Tabs.tsx +22 -22
  110. package/stories/molecules/tabs/index.tsx +2 -2
  111. package/stories/organisms/AnimatedLabelInput/AnimatedLabelInput.stories.tsx +30 -30
  112. package/stories/organisms/AnimatedLabelInput/AnimatedLabelInput.tsx +66 -66
  113. package/stories/organisms/AnimatedLabelInput/index.tsx +3 -3
  114. package/stories/organisms/AnimatedLabelTextArea/AnimatedLabelTextArea.stories.tsx +26 -26
  115. package/stories/organisms/AnimatedLabelTextArea/AnimatedLabelTextArea.tsx +61 -61
  116. package/stories/organisms/AnimatedLabelTextArea/index.tsx +3 -3
  117. package/stories/organisms/ButtonDropdown/ButtonDropdown.stories.tsx +125 -125
  118. package/stories/organisms/ButtonDropdown/ButtonDropdown.tsx +86 -86
  119. package/stories/organisms/ButtonDropdown/index.tsx +3 -3
  120. package/stories/organisms/DropdownComponent/Dropdown.stories.tsx +73 -73
  121. package/stories/organisms/DropdownComponent/DropdownComponent.tsx +346 -346
  122. package/stories/organisms/DropdownComponent/dropdownItems.ts +122 -122
  123. package/stories/organisms/DropdownComponent/index.ts +4 -4
  124. package/stories/organisms/EmptySectionPlaceholder/EmptySectionPlaceholder.stories.tsx +76 -76
  125. package/stories/organisms/EmptySectionPlaceholder/EmptySectionPlaceholder.tsx +52 -52
  126. package/stories/organisms/EmptySectionPlaceholder/index.tsx +4 -4
  127. package/stories/organisms/FormInputWithAddons/FormInputWithAddons.stories.tsx +29 -29
  128. package/stories/organisms/FormInputWithAddons/FormInputWithAddons.tsx +145 -145
  129. package/stories/organisms/FormInputWithAddons/index.tsx +3 -3
  130. package/stories/organisms/TextInputSelect/InputSelect.tsx +59 -59
  131. package/stories/organisms/TextInputSelect/TextInputSelect.stories.tsx +33 -33
  132. package/stories/organisms/TextInputSelect/TextInputSelect.tsx +186 -186
  133. package/stories/organisms/TextInputSelect/index.tsx +3 -3
  134. package/stories/organisms/index.ts +27 -27
  135. package/tailwind.config.js +192 -192
  136. package/tsconfig.json +29 -29
  137. package/tsconfig.lib.json +25 -25
  138. package/utils/types.d.ts +2 -2
  139. package/utils/types.ts +3 -3
  140. package/utils/useId.d.ts +1 -1
  141. package/utils/useId.tsx +16 -16
@@ -22,6 +22,8 @@ export interface ISelectProps {
22
22
  isRequired?: boolean;
23
23
  value?: string;
24
24
  className?: string;
25
+ onFocus?: () => void;
26
+ onBlur?: () => void;
25
27
  }
26
28
  declare const Select: React.FC<ISelectProps>;
27
29
  export default Select;
package/local.sh CHANGED
@@ -1,100 +1,100 @@
1
- #! /usr/bin/bash
2
-
3
- # ANSI escape codes for formatting
4
- GREEN_BOLD='\033[1;32m'
5
- ORANGE_BOLD='\033[1;33m'
6
- RED_BOLD='\033[1;31m'
7
- BLUE_BOLD='\033[1;34m'
8
- RESET='\033[0m'
9
- DIR="$PWD"
10
-
11
- # The required yarn version to use this script
12
- REQUIRED_YARN_VERSION="1.22.19"
13
-
14
- # Get the installed Yarn version
15
- INSTALLED_YARN_VERSION=$(yarn --version 2>/dev/null)
16
-
17
- unlink_package() {
18
- local package_name="${1:-@agility/plenum-ui}"
19
- if [ -z "$1" ]; then
20
- yarn unlink
21
- else
22
- cd "$DIR/node_modules/$package_name"
23
- yarn unlink
24
- fi
25
- unlink_exit_code=$?
26
- if [ $unlink_exit_code -ne 0 ]; then
27
- echo -e "${ORANGE_BOLD}agility-cms-manager-app-react:warning${RESET} yarn unlink for '$package_name' encountered an error, but script will continue. \n"
28
- fi
29
-
30
- cd "$DIR"
31
- echo -e "\n"
32
- }
33
-
34
- link_package() {
35
- local package_name="${1:-@agility/plenum-ui}"
36
- if [ -z "$1" ]; then
37
- yarn link
38
- else
39
- cd "$DIR/node_modules/$package_name"
40
- yarn link
41
- fi
42
- unlink_exit_code=$?
43
- if [ $unlink_exit_code -ne 0 ]; then
44
- echo -e "${RED_BOLD}agility-cms-manager-app-react:error${RESET} yarn link for '$package_name' failed. Script cannot continue, exiting script."
45
- exit 1
46
- else
47
- echo -e "${GREEN_BOLD}@agility/plenum-ui:success${RESET} yarn link for '$package_name' successful\n"
48
- fi
49
-
50
- cd "$DIR"
51
- }
52
-
53
- check_yarn_version() {
54
- # Check if Yarn is installed and compare the version
55
- if [ -n "$INSTALLED_YARN_VERSION" ] && [ "$INSTALLED_YARN_VERSION" != "$REQUIRED_YARN_VERSION" ]; then
56
- echo -e "${RED_BOLD}error${RESET} Yarn version $required_version is required, but found version $INSTALLED_YARN_VERSION."
57
- exit 1
58
- fi
59
-
60
- echo -e "${BLUE_BOLD}info${RESET} Yarn version is $INSTALLED_YARN_VERSION. Proceeding with the script...\n"
61
- }
62
-
63
- ### START SCRIPT
64
-
65
- check_yarn_version
66
-
67
- echo -e "Starting @agility/plenum-ui local watch script \n"
68
- echo -e "${BLUE_BOLD}@agility/plenum-ui:info${RESET} unlinking existing symlink"
69
- yarn unlink
70
- if [ $? -ne 0 ]; then
71
- echo "yarn unlink for @agility/plenum-ui encountered an error, but script will continue. \n"
72
- fi
73
-
74
- if [ ! -d "node_modules" ] || [ ! -d "node_modules/react" ] || [ ! -d "node_modules/react-dom" ]; then
75
- echo -e "${ORANGE_BOLD}@agility/plenum-ui:warning${RESET} Could not find node_modules."
76
- echo -e "${BLUE_BOLD}@agility/plenum-ui:info${RESET} installing dependencies...\n"
77
-
78
- yarn install
79
-
80
- if [ $? -eq 0 ]; then
81
- echo -e "${GREEN_BOLD}@agility/plenum-ui:success${RESET} Finished installing dependencies"
82
- else
83
- echo -e "${RED_BOLD}@agility/plenum-ui:error${RESET} Couldn't install dependencies. Exiting script."
84
- exit 1
85
- fi
86
- fi
87
-
88
- echo -e "${BLUE_BOLD}@agility/plenum-ui:info${RESET} unlinking existing symlinks"
89
- unlink_package react
90
- unlink_package react-dom
91
- unlink_package
92
-
93
- echo -e "${BLUE_BOLD}@agility/plenum-ui:info${RESET} setting up symlinks...\n"
94
-
95
- link_package react
96
- link_package react-dom
97
- link_package
98
-
99
- echo -e "${GREEN_BOLD}@agility/plenum-ui:success${RESET} You can now run 'yarn start-cms:local' in agility-cms-manager-app-react\n"
100
- yarn start:watch
1
+ #! /usr/bin/bash
2
+
3
+ # ANSI escape codes for formatting
4
+ GREEN_BOLD='\033[1;32m'
5
+ ORANGE_BOLD='\033[1;33m'
6
+ RED_BOLD='\033[1;31m'
7
+ BLUE_BOLD='\033[1;34m'
8
+ RESET='\033[0m'
9
+ DIR="$PWD"
10
+
11
+ # The required yarn version to use this script
12
+ REQUIRED_YARN_VERSION="1.22.19"
13
+
14
+ # Get the installed Yarn version
15
+ INSTALLED_YARN_VERSION=$(yarn --version 2>/dev/null)
16
+
17
+ unlink_package() {
18
+ local package_name="${1:-@agility/plenum-ui}"
19
+ if [ -z "$1" ]; then
20
+ yarn unlink
21
+ else
22
+ cd "$DIR/node_modules/$package_name"
23
+ yarn unlink
24
+ fi
25
+ unlink_exit_code=$?
26
+ if [ $unlink_exit_code -ne 0 ]; then
27
+ echo -e "${ORANGE_BOLD}agility-cms-manager-app-react:warning${RESET} yarn unlink for '$package_name' encountered an error, but script will continue. \n"
28
+ fi
29
+
30
+ cd "$DIR"
31
+ echo -e "\n"
32
+ }
33
+
34
+ link_package() {
35
+ local package_name="${1:-@agility/plenum-ui}"
36
+ if [ -z "$1" ]; then
37
+ yarn link
38
+ else
39
+ cd "$DIR/node_modules/$package_name"
40
+ yarn link
41
+ fi
42
+ unlink_exit_code=$?
43
+ if [ $unlink_exit_code -ne 0 ]; then
44
+ echo -e "${RED_BOLD}agility-cms-manager-app-react:error${RESET} yarn link for '$package_name' failed. Script cannot continue, exiting script."
45
+ exit 1
46
+ else
47
+ echo -e "${GREEN_BOLD}@agility/plenum-ui:success${RESET} yarn link for '$package_name' successful\n"
48
+ fi
49
+
50
+ cd "$DIR"
51
+ }
52
+
53
+ check_yarn_version() {
54
+ # Check if Yarn is installed and compare the version
55
+ if [ -n "$INSTALLED_YARN_VERSION" ] && [ "$INSTALLED_YARN_VERSION" != "$REQUIRED_YARN_VERSION" ]; then
56
+ echo -e "${RED_BOLD}error${RESET} Yarn version $required_version is required, but found version $INSTALLED_YARN_VERSION."
57
+ exit 1
58
+ fi
59
+
60
+ echo -e "${BLUE_BOLD}info${RESET} Yarn version is $INSTALLED_YARN_VERSION. Proceeding with the script...\n"
61
+ }
62
+
63
+ ### START SCRIPT
64
+
65
+ check_yarn_version
66
+
67
+ echo -e "Starting @agility/plenum-ui local watch script \n"
68
+ echo -e "${BLUE_BOLD}@agility/plenum-ui:info${RESET} unlinking existing symlink"
69
+ yarn unlink
70
+ if [ $? -ne 0 ]; then
71
+ echo "yarn unlink for @agility/plenum-ui encountered an error, but script will continue. \n"
72
+ fi
73
+
74
+ if [ ! -d "node_modules" ] || [ ! -d "node_modules/react" ] || [ ! -d "node_modules/react-dom" ]; then
75
+ echo -e "${ORANGE_BOLD}@agility/plenum-ui:warning${RESET} Could not find node_modules."
76
+ echo -e "${BLUE_BOLD}@agility/plenum-ui:info${RESET} installing dependencies...\n"
77
+
78
+ yarn install
79
+
80
+ if [ $? -eq 0 ]; then
81
+ echo -e "${GREEN_BOLD}@agility/plenum-ui:success${RESET} Finished installing dependencies"
82
+ else
83
+ echo -e "${RED_BOLD}@agility/plenum-ui:error${RESET} Couldn't install dependencies. Exiting script."
84
+ exit 1
85
+ fi
86
+ fi
87
+
88
+ echo -e "${BLUE_BOLD}@agility/plenum-ui:info${RESET} unlinking existing symlinks"
89
+ unlink_package react
90
+ unlink_package react-dom
91
+ unlink_package
92
+
93
+ echo -e "${BLUE_BOLD}@agility/plenum-ui:info${RESET} setting up symlinks...\n"
94
+
95
+ link_package react
96
+ link_package react-dom
97
+ link_package
98
+
99
+ echo -e "${GREEN_BOLD}@agility/plenum-ui:success${RESET} You can now run 'yarn start-cms:local' in agility-cms-manager-app-react\n"
100
+ yarn start:watch
package/next.config.js CHANGED
@@ -1,8 +1,8 @@
1
- /** @type {import('next').NextConfig} */
2
- const nextConfig = {
3
- experimental: {
4
- appDir: true,
5
- },
6
- }
7
-
8
- module.exports = nextConfig
1
+ /** @type {import('next').NextConfig} */
2
+ const nextConfig = {
3
+ experimental: {
4
+ appDir: true,
5
+ },
6
+ }
7
+
8
+ module.exports = nextConfig
package/package.json CHANGED
@@ -1,83 +1,83 @@
1
- {
2
- "name": "@agility/plenum-ui",
3
- "version": "2.0.0-rc47",
4
- "license": "MIT",
5
- "main": "dist/index.js",
6
- "module": "dist/index.js",
7
- "types": "dist/index.d.ts",
8
- "engines": {
9
- "node": ">= 18.0.0"
10
- },
11
- "scripts": {
12
- "lint": "next lint",
13
- "build-storybook": "npm-run-all -p \"sb-build:*\"",
14
- "sb-build:storybook": "storybook build",
15
- "sb-build:tw": "tailwindcss -o ./lib/tailwind.css",
16
- "storybook:dev": "storybook dev -p 6006",
17
- "storybook:tw": "tailwindcss -o ./lib/tailwind.css -w ",
18
- "storybook": "npm-run-all -p \"storybook:*\" ",
19
- "dev": "yarn storybook",
20
- "build:tw": "tailwindcss -o ./dist/tailwind.css",
21
- "build:tsc": "yarn node build.js",
22
- "prepare": "yarn build",
23
- "build": "yarn clean && npm-run-all -s \"build:*\" ",
24
- "clean": "rimraf dist",
25
- "create-component": "node scripts/create-component.js",
26
- "start:local": "bash ./local.sh",
27
- "start:watch": "yarn node watch.js"
28
- },
29
- "dependencies": {
30
- "@floating-ui/react": "^0.25.0",
31
- "@headlessui/react": "^1.7.10",
32
- "@headlessui/tailwindcss": "^0.1.2",
33
- "@heroicons/react": "^1.0.5",
34
- "@next/font": "^13.4.12",
35
- "@tabler/icons": "^2.26.0",
36
- "@tabler/icons-react": "^2.27.0",
37
- "@tailwindcss/forms": "^0.5.3",
38
- "@tailwindcss/typography": "^0.5.9",
39
- "classnames": "^2.3.2",
40
- "concurrently": "^7.6.0",
41
- "next": "13.1.6",
42
- "npm-dts": "^1.3.12",
43
- "npm-run-all": "^4.1.5",
44
- "postcss": "^8.4.21",
45
- "tailwindcss": "^3.2.4",
46
- "typescript": "^5.1.6"
47
- },
48
- "devDependencies": {
49
- "@storybook/addon-designs": "^7.0.1",
50
- "@storybook/addon-essentials": "^7.1.1",
51
- "@storybook/addon-interactions": "^7.1.1",
52
- "@storybook/addon-links": "^7.1.1",
53
- "@storybook/blocks": "^7.1.1",
54
- "@storybook/manager-api": "^7.1.1",
55
- "@storybook/nextjs": "^7.1.1",
56
- "@storybook/react": "^7.1.1",
57
- "@storybook/testing-library": "^0.2.0",
58
- "@storybook/theming": "^7.1.1",
59
- "@types/node": "18.11.18",
60
- "autoprefixer": "^10.4.13",
61
- "esbuild": "^0.18.19",
62
- "eslint": "8.32.0",
63
- "eslint-config-next": "13.1.6",
64
- "eslint-plugin-storybook": "^0.6.13",
65
- "react": "18.2.0",
66
- "react-dom": "18.2.0",
67
- "react-icons": "^4.10.1",
68
- "rimraf": "^5.0.1",
69
- "storybook": "^7.1.1"
70
- },
71
- "peerDependencies": {
72
- "@floating-ui/react": "^0.25.0",
73
- "@headlessui/react": "^1.7.10",
74
- "@headlessui/tailwindcss": "^0.1.2",
75
- "@heroicons/react": "^1.0.5",
76
- "@tabler/icons": "^2.26.0",
77
- "@tabler/icons-react": "^2.27.0",
78
- "classnames": "^2.3.2",
79
- "react": "18.2.0",
80
- "react-dom": "18.2.0",
81
- "react-icons": "^4.10.1"
82
- }
1
+ {
2
+ "name": "@agility/plenum-ui",
3
+ "version": "2.0.0-rc49",
4
+ "license": "MIT",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "engines": {
9
+ "node": ">= 18.0.0"
10
+ },
11
+ "scripts": {
12
+ "lint": "next lint",
13
+ "build-storybook": "npm-run-all -p \"sb-build:*\"",
14
+ "sb-build:storybook": "storybook build",
15
+ "sb-build:tw": "tailwindcss -o ./lib/tailwind.css",
16
+ "storybook:dev": "storybook dev -p 6006",
17
+ "storybook:tw": "tailwindcss -o ./lib/tailwind.css -w ",
18
+ "storybook": "npm-run-all -p \"storybook:*\" ",
19
+ "dev": "yarn storybook",
20
+ "build:tw": "tailwindcss -o ./dist/tailwind.css",
21
+ "build:tsc": "yarn node build.js",
22
+ "prepare": "yarn build",
23
+ "build": "yarn clean && npm-run-all -s \"build:*\" ",
24
+ "clean": "rimraf dist",
25
+ "create-component": "node scripts/create-component.js",
26
+ "start:local": "bash ./local.sh",
27
+ "start:watch": "yarn node watch.js"
28
+ },
29
+ "dependencies": {
30
+ "@floating-ui/react": "^0.25.0",
31
+ "@headlessui/react": "^1.7.10",
32
+ "@headlessui/tailwindcss": "^0.1.2",
33
+ "@heroicons/react": "^1.0.5",
34
+ "@next/font": "^13.4.12",
35
+ "@tabler/icons": "^2.26.0",
36
+ "@tabler/icons-react": "^2.27.0",
37
+ "@tailwindcss/forms": "^0.5.3",
38
+ "@tailwindcss/typography": "^0.5.9",
39
+ "classnames": "^2.3.2",
40
+ "concurrently": "^7.6.0",
41
+ "next": "13.1.6",
42
+ "npm-dts": "^1.3.12",
43
+ "npm-run-all": "^4.1.5",
44
+ "postcss": "^8.4.21",
45
+ "tailwindcss": "^3.2.4",
46
+ "typescript": "^5.1.6"
47
+ },
48
+ "devDependencies": {
49
+ "@storybook/addon-designs": "^7.0.1",
50
+ "@storybook/addon-essentials": "^7.1.1",
51
+ "@storybook/addon-interactions": "^7.1.1",
52
+ "@storybook/addon-links": "^7.1.1",
53
+ "@storybook/blocks": "^7.1.1",
54
+ "@storybook/manager-api": "^7.1.1",
55
+ "@storybook/nextjs": "^7.1.1",
56
+ "@storybook/react": "^7.1.1",
57
+ "@storybook/testing-library": "^0.2.0",
58
+ "@storybook/theming": "^7.1.1",
59
+ "@types/node": "18.11.18",
60
+ "autoprefixer": "^10.4.13",
61
+ "esbuild": "^0.18.19",
62
+ "eslint": "8.32.0",
63
+ "eslint-config-next": "13.1.6",
64
+ "eslint-plugin-storybook": "^0.6.13",
65
+ "react": "18.2.0",
66
+ "react-dom": "18.2.0",
67
+ "react-icons": "^4.10.1",
68
+ "rimraf": "^5.0.1",
69
+ "storybook": "^7.1.1"
70
+ },
71
+ "peerDependencies": {
72
+ "@floating-ui/react": "^0.25.0",
73
+ "@headlessui/react": "^1.7.10",
74
+ "@headlessui/tailwindcss": "^0.1.2",
75
+ "@heroicons/react": "^1.0.5",
76
+ "@tabler/icons": "^2.26.0",
77
+ "@tabler/icons-react": "^2.27.0",
78
+ "classnames": "^2.3.2",
79
+ "react": "18.2.0",
80
+ "react-dom": "18.2.0",
81
+ "react-icons": "^4.10.1"
82
+ }
83
83
  }
@@ -1,13 +1,13 @@
1
- // Next.js API route support: https://nextjs.org/docs/api-routes/introduction
2
- import type { NextApiRequest, NextApiResponse } from 'next'
3
-
4
- type Data = {
5
- name: string
6
- }
7
-
8
- export default function handler(
9
- req: NextApiRequest,
10
- res: NextApiResponse<Data>
11
- ) {
12
- res.status(200).json({ name: 'John Doe' })
13
- }
1
+ // Next.js API route support: https://nextjs.org/docs/api-routes/introduction
2
+ import type { NextApiRequest, NextApiResponse } from 'next'
3
+
4
+ type Data = {
5
+ name: string
6
+ }
7
+
8
+ export default function handler(
9
+ req: NextApiRequest,
10
+ res: NextApiResponse<Data>
11
+ ) {
12
+ res.status(200).json({ name: 'John Doe' })
13
+ }
package/postcss.config.js CHANGED
@@ -1,6 +1,6 @@
1
- module.exports = {
2
- plugins: {
3
- tailwindcss: {},
4
- autoprefixer: {},
5
- },
6
- }
1
+ module.exports = {
2
+ plugins: {
3
+ tailwindcss: {},
4
+ autoprefixer: {},
5
+ },
6
+ }
package/rollup.config.mjs CHANGED
@@ -1,42 +1,42 @@
1
- import peerDepsExternal from 'rollup-plugin-peer-deps-external';
2
- import resolve from '@rollup/plugin-node-resolve';
3
- import commonjs from '@rollup/plugin-commonjs';
4
- import typescript from '@rollup/plugin-typescript';
5
-
6
-
7
- const config = [
8
- {
9
-
10
- input: 'stories/index.ts',
11
-
12
- output: [
13
- {
14
- file: "lib/index.js",
15
- format: 'cjs',
16
- sourcemap: true
17
- },
18
- {
19
- file: "lib/index.esm.js",
20
- format: 'esm',
21
- sourcemap: true
22
- }
23
- ],
24
- external: ["react", "react-dom"],
25
- plugins: [
26
- peerDepsExternal(),
27
- resolve(),
28
- commonjs(),
29
- typescript({
30
- tsconfig: "./tsconfig.lib.json",
31
- })
32
- ]
33
- },
34
- {
35
- input: "lib/esm/types/index.d.ts",
36
- output: [{ file: "dist/index.d.ts", format: "esm" }],
37
- plugins: [dts()],
38
- external: ["react", "react-dom"],
39
- },
40
- ];
41
-
1
+ import peerDepsExternal from 'rollup-plugin-peer-deps-external';
2
+ import resolve from '@rollup/plugin-node-resolve';
3
+ import commonjs from '@rollup/plugin-commonjs';
4
+ import typescript from '@rollup/plugin-typescript';
5
+
6
+
7
+ const config = [
8
+ {
9
+
10
+ input: 'stories/index.ts',
11
+
12
+ output: [
13
+ {
14
+ file: "lib/index.js",
15
+ format: 'cjs',
16
+ sourcemap: true
17
+ },
18
+ {
19
+ file: "lib/index.esm.js",
20
+ format: 'esm',
21
+ sourcemap: true
22
+ }
23
+ ],
24
+ external: ["react", "react-dom"],
25
+ plugins: [
26
+ peerDepsExternal(),
27
+ resolve(),
28
+ commonjs(),
29
+ typescript({
30
+ tsconfig: "./tsconfig.lib.json",
31
+ })
32
+ ]
33
+ },
34
+ {
35
+ input: "lib/esm/types/index.d.ts",
36
+ output: [{ file: "dist/index.d.ts", format: "esm" }],
37
+ plugins: [dts()],
38
+ external: ["react", "react-dom"],
39
+ },
40
+ ];
41
+
42
42
  export default config;