@agility/plenum-ui 1.3.50 → 2.0.0-rc10
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/.eslintrc.json +6 -0
- package/.prettierrc +12 -12
- package/.storybook/Layout.jsx +9 -6
- package/.storybook/head.tsx +4 -0
- package/.storybook/main.ts +18 -0
- package/.storybook/manager-head.html +1 -0
- package/.storybook/manager.ts +25 -0
- package/.storybook/plenumTheme.ts +8 -0
- package/.storybook/preview-head.html +4 -0
- package/.storybook/preview.tsx +28 -0
- package/.vscode/settings.json +4 -0
- package/.yarnrc.yml +1 -0
- package/README.md +165 -53
- package/app/globals.css +99 -0
- package/app/head.tsx +59 -0
- package/app/layout.tsx +28 -0
- package/app/page.tsx +7 -0
- package/build.js +41 -0
- package/dist/index.d.ts +1117 -0
- package/dist/index.js +6296 -0
- package/dist/index.js.map +7 -0
- package/dist/lib/tailwind.css +63535 -0
- package/{lib/components → dist/types/stories/atoms}/Avatar/Avatar.d.ts +28 -27
- package/dist/types/stories/atoms/Avatar/index.d.ts +3 -0
- package/dist/types/stories/atoms/badges/Badge.d.ts +21 -0
- package/dist/types/stories/atoms/badges/index.d.ts +3 -0
- package/dist/types/stories/atoms/buttons/Button/Alternative/Alternative.stories.d.ts +14 -0
- package/dist/types/stories/atoms/buttons/Button/Button.d.ts +35 -0
- package/dist/types/stories/atoms/buttons/Button/Danger/Danger.stories.d.ts +14 -0
- package/dist/types/stories/atoms/buttons/Button/Primary/Primary.stories.d.ts +14 -0
- package/dist/types/stories/atoms/buttons/Button/Secondary/Secondary.stories.d.ts +14 -0
- package/dist/types/stories/atoms/buttons/Button/defaultArgs.d.ts +3 -0
- package/dist/types/stories/atoms/buttons/Button/index.d.ts +3 -0
- package/dist/types/stories/atoms/buttons/Capsule/Alternative/Alternative.stories.d.ts +6 -0
- package/dist/types/stories/atoms/buttons/Capsule/Capsule.d.ts +27 -0
- package/dist/types/stories/atoms/buttons/Capsule/Danger/Danger.stories.d.ts +6 -0
- package/dist/types/stories/atoms/buttons/Capsule/Primary/Primary.stories.d.ts +6 -0
- package/dist/types/stories/atoms/buttons/Capsule/Secondary/Secondary.stories.d.ts +6 -0
- package/dist/types/stories/atoms/buttons/Capsule/index.d.ts +3 -0
- package/dist/types/stories/atoms/buttons/index.d.ts +4 -0
- package/{lib/components/DynamicIcons/DynamicIcons.d.ts → dist/types/stories/atoms/icons/DynamicIcon.d.ts} +20 -18
- package/dist/types/stories/atoms/icons/DynamicIcon.stories.d.ts +10 -0
- package/dist/types/stories/atoms/icons/IconWithShadow.d.ts +6 -0
- package/dist/types/stories/atoms/icons/IconWithShadow.stories.d.ts +10 -0
- package/{lib/components/DynamicIcons → dist/types/stories/atoms/icons}/TablerIcon.d.ts +9 -9
- package/dist/types/stories/atoms/icons/index.d.ts +4 -0
- package/dist/types/stories/atoms/icons/tablerIconNames.d.ts +2 -0
- package/dist/types/stories/atoms/index.d.ts +7 -0
- package/dist/types/stories/atoms/loaders/Loader.d.ts +6 -0
- package/dist/types/stories/atoms/loaders/Loader.stories.d.ts +6 -0
- package/dist/types/stories/atoms/loaders/NProgress/RadialProgress.d.ts +11 -0
- package/dist/types/stories/atoms/loaders/NProgress/index.d.ts +3 -0
- package/dist/types/stories/atoms/loaders/index.d.ts +4 -0
- package/dist/types/stories/index.d.ts +5 -0
- package/dist/types/stories/layouts/index.d.ts +0 -0
- package/dist/types/stories/molecules/index.d.ts +3 -0
- package/{lib/components/Forms → dist/types/stories/molecules/inputs}/InputCounter/InputCounter.d.ts +10 -9
- package/dist/types/stories/molecules/inputs/InputCounter/index.d.ts +2 -0
- package/dist/types/stories/molecules/inputs/InputField/InputField.d.ts +30 -0
- package/dist/types/stories/molecules/inputs/InputField/index.d.ts +3 -0
- package/{lib/components/Forms → dist/types/stories/molecules/inputs}/InputLabel/InputLabel.d.ts +15 -14
- package/dist/types/stories/molecules/inputs/InputLabel/index.d.ts +3 -0
- package/dist/types/stories/molecules/inputs/NestedInputButton/NestedInputButton.d.ts +17 -0
- package/dist/types/stories/molecules/inputs/NestedInputButton/index.d.ts +3 -0
- package/{lib/components/Forms → dist/types/stories/molecules/inputs}/TextInput/TextInput.d.ts +39 -39
- package/dist/types/stories/molecules/inputs/TextInput/index.d.ts +4 -0
- package/{lib/components/Forms/Checkbox → dist/types/stories/molecules/inputs/checkbox}/Checkbox.d.ts +28 -27
- package/dist/types/stories/molecules/inputs/checkbox/Checkbox.stories.d.ts +6 -0
- package/dist/types/stories/molecules/inputs/checkbox/index.d.ts +3 -0
- package/{lib/components/Combobox/Combobox.d.ts → dist/types/stories/molecules/inputs/combobox/ComboBox.d.ts} +34 -34
- package/dist/types/stories/molecules/inputs/combobox/ComboBox.stories.d.ts +6 -0
- package/dist/types/stories/molecules/inputs/combobox/index.d.ts +3 -0
- package/dist/types/stories/molecules/inputs/index.d.ts +12 -0
- package/{lib/components/Forms/Radio → dist/types/stories/molecules/inputs/radio}/Radio.d.ts +27 -27
- package/dist/types/stories/molecules/inputs/radio/Radio.stories.d.ts +6 -0
- package/dist/types/stories/molecules/inputs/radio/index.d.ts +3 -0
- package/{lib/components/Forms/Select → dist/types/stories/molecules/inputs/select}/Select.d.ts +27 -27
- package/dist/types/stories/molecules/inputs/select/Select.stories.d.ts +6 -0
- package/dist/types/stories/molecules/inputs/select/index.d.ts +3 -0
- package/{lib/components/Forms/Textarea/Textarea.d.ts → dist/types/stories/molecules/inputs/textArea/TextArea.d.ts} +35 -32
- package/dist/types/stories/molecules/inputs/textArea/TextArea.stories.d.ts +6 -0
- package/dist/types/stories/molecules/inputs/textArea/index.d.ts +3 -0
- package/dist/types/stories/molecules/inputs/toggleSwitch/ToggleSwitch.d.ts +18 -0
- package/dist/types/stories/molecules/inputs/toggleSwitch/index.d.ts +3 -0
- package/dist/types/stories/organisms/AnimatedLabelInput/AnimatedLabelInput.d.ts +18 -0
- package/dist/types/stories/organisms/AnimatedLabelInput/index.d.ts +3 -0
- package/dist/types/stories/organisms/ButtonDropdown/ButtonDropdown.d.ts +14 -0
- package/dist/types/stories/organisms/ButtonDropdown/index.d.ts +3 -0
- package/{lib/components/Dropdown/Dropdown.d.ts → dist/types/stories/organisms/DropdownComponent/DropdownComponent.d.ts} +36 -39
- package/dist/types/stories/organisms/DropdownComponent/dropdownItems.d.ts +3 -0
- package/dist/types/stories/organisms/DropdownComponent/index.d.ts +4 -0
- package/dist/types/stories/organisms/EmptySectionPlaceholder/EmptySectionPlaceholder.d.ts +19 -0
- package/dist/types/stories/organisms/EmptySectionPlaceholder/index.d.ts +3 -0
- package/dist/types/stories/organisms/FormInputWithAddons/FormInputWithAddons.d.ts +21 -0
- package/dist/types/stories/organisms/FormInputWithAddons/index.d.ts +3 -0
- package/{lib/components/Forms/TextInputSelect/InputSelect → dist/types/stories/organisms/TextInputSelect}/InputSelect.d.ts +16 -13
- package/{lib/components/Forms → dist/types/stories/organisms}/TextInputSelect/TextInputSelect.d.ts +48 -48
- package/dist/types/stories/organisms/TextInputSelect/index.d.ts +3 -0
- package/dist/types/stories/organisms/index.d.ts +8 -0
- package/dist/types/utils/types.d.ts +2 -0
- package/dist/types/utils/useId.d.ts +1 -0
- package/next.config.js +8 -0
- package/package.json +55 -78
- package/pages/api/hello.ts +13 -0
- package/postcss.config.js +5 -6
- package/public/next.svg +1 -0
- package/public/thirteen.svg +1 -0
- package/public/vercel.svg +1 -0
- package/scripts/create-component.js +97 -0
- package/stories/Introduction.mdx +314 -0
- package/stories/assets/code-brackets.svg +1 -0
- package/stories/assets/colors.svg +1 -0
- package/stories/assets/comments.svg +1 -0
- package/stories/assets/direction.svg +1 -0
- package/stories/assets/flow.svg +1 -0
- package/stories/assets/plugin.svg +1 -0
- package/stories/assets/repo.svg +1 -0
- package/stories/assets/stackalt.svg +1 -0
- package/stories/atoms/Avatar/Avatar.stories.tsx +96 -0
- package/stories/atoms/Avatar/Avatar.tsx +123 -0
- package/stories/atoms/Avatar/index.ts +3 -0
- package/stories/atoms/badges/Badge.tsx +127 -0
- package/stories/atoms/badges/Pill/Pill.stories.tsx +75 -0
- package/stories/atoms/badges/Rounded/Rounded.stories.tsx +75 -0
- package/stories/atoms/badges/index.ts +3 -0
- package/stories/atoms/buttons/Button/Alternative/Alternative.stories.ts +76 -0
- package/stories/atoms/buttons/Button/Button.tsx +146 -0
- package/stories/atoms/buttons/Button/Danger/Danger.stories.ts +78 -0
- package/stories/atoms/buttons/Button/Primary/Primary.stories.ts +85 -0
- package/stories/atoms/buttons/Button/Secondary/Secondary.stories.ts +81 -0
- package/stories/atoms/buttons/Button/defaultArgs.ts +9 -0
- package/stories/atoms/buttons/Button/index.ts +3 -0
- package/stories/atoms/buttons/Capsule/Alternative/Alternative.stories.ts +27 -0
- package/stories/atoms/buttons/Capsule/Capsule.tsx +87 -0
- package/stories/atoms/buttons/Capsule/Danger/Danger.stories.ts +27 -0
- package/stories/atoms/buttons/Capsule/Primary/Primary.stories.ts +27 -0
- package/stories/atoms/buttons/Capsule/Secondary/Secondary.stories.ts +27 -0
- package/stories/atoms/buttons/Capsule/index.ts +3 -0
- package/stories/atoms/buttons/FloatingActionButton/FloatingActionButton.stories.tsx +15 -0
- package/stories/atoms/buttons/FloatingActionButton/FloatingActionButton.tsx +22 -0
- package/stories/atoms/buttons/FloatingActionButton/index.tsx +3 -0
- package/stories/atoms/buttons/index.ts +4 -0
- package/stories/atoms/crumb/Crumb.stories.tsx +18 -0
- package/stories/atoms/crumb/Crumb.tsx +22 -0
- package/stories/atoms/crumb/index.tsx +3 -0
- package/stories/atoms/icons/DynamicIcon.stories.ts +43 -0
- package/stories/atoms/icons/DynamicIcon.tsx +90 -0
- package/stories/atoms/icons/IconWithShadow.stories.ts +43 -0
- package/stories/atoms/icons/IconWithShadow.tsx +16 -0
- package/stories/atoms/icons/TablerIcon.tsx +22 -0
- package/stories/atoms/icons/index.tsx +14 -0
- package/stories/atoms/icons/tablerIconNames.ts +4336 -0
- package/stories/atoms/index.ts +46 -0
- package/stories/atoms/loaders/Loader.stories.ts +15 -0
- package/stories/atoms/loaders/Loader.tsx +15 -0
- package/stories/atoms/loaders/NProgress/RadialProgress.stories.tsx +19 -0
- package/stories/atoms/loaders/NProgress/RadialProgress.tsx +76 -0
- package/stories/atoms/loaders/NProgress/index.ts +3 -0
- package/stories/atoms/loaders/index.ts +4 -0
- package/stories/index.ts +134 -0
- package/stories/layouts/CardLayout/CardLayout.stories.tsx +18 -0
- package/stories/layouts/CardLayout/CardLayout.tsx +22 -0
- package/stories/layouts/CardLayout/index.tsx +3 -0
- package/stories/layouts/ModalLayout/ModalLayout.stories.tsx +18 -0
- package/stories/layouts/ModalLayout/ModalLayout.tsx +22 -0
- package/stories/layouts/ModalLayout/index.tsx +3 -0
- package/stories/layouts/index.ts +0 -0
- package/stories/molecules/index.ts +51 -0
- package/stories/molecules/inputs/InputCounter/InputCounter.stories.tsx +18 -0
- package/stories/molecules/inputs/InputCounter/InputCounter.tsx +24 -0
- package/stories/molecules/inputs/InputCounter/index.tsx +3 -0
- package/stories/molecules/inputs/InputField/InputField.stories.tsx +29 -0
- package/stories/molecules/inputs/InputField/InputField.tsx +94 -0
- package/stories/molecules/inputs/InputField/index.tsx +3 -0
- package/stories/molecules/inputs/InputLabel/InputLabel.stories.tsx +19 -0
- package/stories/molecules/inputs/InputLabel/InputLabel.tsx +45 -0
- package/stories/molecules/inputs/InputLabel/index.tsx +3 -0
- package/stories/molecules/inputs/NestedInputButton/NestedInputButton.stories.tsx +52 -0
- package/stories/molecules/inputs/NestedInputButton/NestedInputButton.tsx +64 -0
- package/stories/molecules/inputs/NestedInputButton/index.tsx +3 -0
- package/stories/molecules/inputs/TextInput/TextInput.stories.tsx +32 -0
- package/stories/molecules/inputs/TextInput/TextInput.tsx +162 -0
- package/stories/molecules/inputs/TextInput/index.tsx +5 -0
- package/stories/molecules/inputs/checkbox/Checkbox.stories.ts +23 -0
- package/stories/molecules/inputs/checkbox/Checkbox.tsx +99 -0
- package/stories/molecules/inputs/checkbox/index.ts +3 -0
- package/stories/molecules/inputs/combobox/ComboBox.stories.ts +41 -0
- package/stories/molecules/inputs/combobox/ComboBox.tsx +194 -0
- package/stories/molecules/inputs/combobox/index.ts +3 -0
- package/stories/molecules/inputs/index.ts +38 -0
- package/stories/molecules/inputs/radio/Radio.stories.ts +27 -0
- package/stories/molecules/inputs/radio/Radio.tsx +92 -0
- package/stories/molecules/inputs/radio/index.ts +3 -0
- package/stories/molecules/inputs/select/Select.stories.ts +23 -0
- package/stories/molecules/inputs/select/Select.tsx +100 -0
- package/stories/molecules/inputs/select/index.ts +3 -0
- package/stories/molecules/inputs/textArea/TextArea.stories.ts +22 -0
- package/stories/molecules/inputs/textArea/TextArea.tsx +128 -0
- package/stories/molecules/inputs/textArea/index.ts +3 -0
- package/stories/molecules/inputs/toggleSwitch/ToggleSwitch.stories.tsx +119 -0
- package/stories/molecules/inputs/toggleSwitch/ToggleSwitch.tsx +75 -0
- package/stories/molecules/inputs/toggleSwitch/index.ts +3 -0
- package/stories/molecules/tabs/Tabs.stories.tsx +18 -0
- package/stories/molecules/tabs/Tabs.tsx +22 -0
- package/stories/molecules/tabs/index.tsx +3 -0
- package/stories/organisms/AnimatedLabelInput/AnimatedLabelInput.stories.tsx +21 -0
- package/stories/organisms/AnimatedLabelInput/AnimatedLabelInput.tsx +60 -0
- package/stories/organisms/AnimatedLabelInput/index.tsx +3 -0
- package/stories/organisms/ButtonDropdown/ButtonDropdown.stories.tsx +118 -0
- package/stories/organisms/ButtonDropdown/ButtonDropdown.tsx +81 -0
- package/stories/organisms/ButtonDropdown/index.tsx +3 -0
- package/stories/organisms/DropdownComponent/Dropdown.stories.tsx +49 -0
- package/stories/organisms/DropdownComponent/Dropdown.test.tsx +0 -0
- package/stories/organisms/DropdownComponent/DropdownComponent.tsx +300 -0
- package/stories/organisms/DropdownComponent/dropdownItems.ts +101 -0
- package/stories/organisms/DropdownComponent/index.ts +4 -0
- package/stories/organisms/EmptySectionPlaceholder/EmptySectionPlaceholder.stories.tsx +76 -0
- package/stories/organisms/EmptySectionPlaceholder/EmptySectionPlaceholder.tsx +52 -0
- package/stories/organisms/EmptySectionPlaceholder/index.tsx +3 -0
- package/stories/organisms/FormInputWithAddons/FormInputWithAddons.stories.tsx +29 -0
- package/stories/organisms/FormInputWithAddons/FormInputWithAddons.tsx +140 -0
- package/stories/organisms/FormInputWithAddons/index.tsx +3 -0
- package/stories/organisms/TextInputSelect/InputSelect.tsx +59 -0
- package/stories/organisms/TextInputSelect/TextInputSelect.stories.tsx +33 -0
- package/stories/organisms/TextInputSelect/TextInputSelect.tsx +186 -0
- package/stories/organisms/TextInputSelect/index.tsx +3 -0
- package/stories/organisms/index.ts +18 -0
- package/tailwind.config.js +165 -36
- package/tsconfig.json +27 -21
- package/tsconfig.lib.json +19 -0
- package/utils/types.d.ts +2 -0
- package/utils/types.ts +3 -0
- package/utils/useId.d.ts +1 -0
- package/utils/useId.tsx +16 -0
- package/.babelrc +0 -14
- package/.editorconfig +0 -9
- package/.eslintrc +0 -13
- package/.github/workflows/test.yml +0 -27
- package/.storybook/main.js +0 -17
- package/.storybook/manager.js +0 -6
- package/.storybook/plenumTheme.js +0 -8
- package/.storybook/preview.js +0 -44
- package/_templates/component/new/component.ejs.t +0 -18
- package/_templates/component/new/component.stories.ejs.t +0 -21
- package/_templates/component/new/component.test.ejs.t +0 -15
- package/_templates/component/new/index.ejs.t +0 -6
- package/_templates/component/new/prompt.js +0 -7
- package/jest.config.js +0 -8
- package/lib/common/brandCfg.d.ts +0 -3
- package/lib/common/index.d.ts +0 -3
- package/lib/common/storyCfg.d.ts +0 -5
- package/lib/components/Avatar/Avatar.stories.d.ts +0 -6
- package/lib/components/Avatar/Avatar.test.d.ts +0 -1
- package/lib/components/Avatar/index.d.ts +0 -1
- package/lib/components/Button/Button.d.ts +0 -55
- package/lib/components/Button/Button.stories.d.ts +0 -12
- package/lib/components/Button/Button.test.d.ts +0 -1
- package/lib/components/Button/index.d.ts +0 -1
- package/lib/components/ButtonDropdown/ButtonDropdown.d.ts +0 -12
- package/lib/components/ButtonDropdown/ButtonDropdown.stories.d.ts +0 -9
- package/lib/components/ButtonDropdown/index.d.ts +0 -1
- package/lib/components/Combobox/Combobox.stories.d.ts +0 -14
- package/lib/components/Combobox/Combobox.test.d.ts +0 -1
- package/lib/components/Combobox/index.d.ts +0 -1
- package/lib/components/Dropdown/Dropdown.stories.d.ts +0 -8
- package/lib/components/Dropdown/Dropdown.test.d.ts +0 -1
- package/lib/components/Dropdown/data.d.ts +0 -3
- package/lib/components/Dropdown/index.d.ts +0 -1
- package/lib/components/DynamicIcons/DynamicIcons.stories.d.ts +0 -9
- package/lib/components/DynamicIcons/index.d.ts +0 -3
- package/lib/components/DynamicIcons/tablerIconNames.d.ts +0 -2
- package/lib/components/Forms/BaseField/BaseField.d.ts +0 -34
- package/lib/components/Forms/BaseField/BaseField.stories.d.ts +0 -6
- package/lib/components/Forms/BaseField/BaseField.test.d.ts +0 -1
- package/lib/components/Forms/BaseField/index.d.ts +0 -1
- package/lib/components/Forms/Checkbox/Checkbox.stories.d.ts +0 -14
- package/lib/components/Forms/Checkbox/Checkbox.test.d.ts +0 -1
- package/lib/components/Forms/Checkbox/index.d.ts +0 -1
- package/lib/components/Forms/InputCounter/InputCounter.stories.d.ts +0 -6
- package/lib/components/Forms/InputCounter/InputCounter.test.d.ts +0 -1
- package/lib/components/Forms/InputCounter/index.d.ts +0 -1
- package/lib/components/Forms/InputLabel/InputLabel.stories.d.ts +0 -6
- package/lib/components/Forms/InputLabel/InputLabel.test.d.ts +0 -1
- package/lib/components/Forms/InputLabel/index.d.ts +0 -1
- package/lib/components/Forms/Radio/Radio.stories.d.ts +0 -12
- package/lib/components/Forms/Radio/Radio.test.d.ts +0 -1
- package/lib/components/Forms/Radio/index.d.ts +0 -1
- package/lib/components/Forms/Select/Select.stories.d.ts +0 -11
- package/lib/components/Forms/Select/Select.test.d.ts +0 -1
- package/lib/components/Forms/Select/index.d.ts +0 -1
- package/lib/components/Forms/TextInput/TextInput.stories.d.ts +0 -12
- package/lib/components/Forms/TextInput/index.d.ts +0 -1
- package/lib/components/Forms/TextInputAddon/InputCta/InputCta.d.ts +0 -16
- package/lib/components/Forms/TextInputAddon/InputCta/InputCta.stories.d.ts +0 -6
- package/lib/components/Forms/TextInputAddon/InputCta/InputCta.test.d.ts +0 -1
- package/lib/components/Forms/TextInputAddon/InputCta/index.d.ts +0 -1
- package/lib/components/Forms/TextInputAddon/TextInputAddon.d.ts +0 -54
- package/lib/components/Forms/TextInputAddon/TextInputAddon.stories.d.ts +0 -13
- package/lib/components/Forms/TextInputAddon/index.d.ts +0 -1
- package/lib/components/Forms/TextInputSelect/InputSelect/InputSelect.stories.d.ts +0 -6
- package/lib/components/Forms/TextInputSelect/InputSelect/InputSelect.test.d.ts +0 -1
- package/lib/components/Forms/TextInputSelect/InputSelect/index.d.ts +0 -1
- package/lib/components/Forms/TextInputSelect/TextInputSelect.stories.d.ts +0 -8
- package/lib/components/Forms/TextInputSelect/index.d.ts +0 -1
- package/lib/components/Forms/Textarea/Textarea.stories.d.ts +0 -12
- package/lib/components/Forms/Textarea/Textarea.test.d.ts +0 -1
- package/lib/components/Forms/Textarea/index.d.ts +0 -1
- package/lib/components/ToggleSwitch/ToggleSwitch.d.ts +0 -28
- package/lib/components/ToggleSwitch/ToggleSwitch.stories.d.ts +0 -21
- package/lib/components/ToggleSwitch/ToggleSwitch.test.d.ts +0 -1
- package/lib/components/ToggleSwitch/index.d.ts +0 -1
- package/lib/components/TreeView/TreeView.d.ts +0 -36
- package/lib/components/TreeView/TreeView.stories.d.ts +0 -6
- package/lib/components/TreeView/TreeView.test.d.ts +0 -1
- package/lib/components/TreeView/index.d.ts +0 -1
- package/lib/components/TreeView V1/TreeItem/TreeItem.d.ts +0 -16
- package/lib/components/TreeView V1/TreeItem/TreeItem.stories.d.ts +0 -9
- package/lib/components/TreeView V1/TreeItem/TreeItem.test.d.ts +0 -1
- package/lib/components/TreeView V1/TreeItem/index.d.ts +0 -1
- package/lib/components/TreeView V1/TreeView.d.ts +0 -6
- package/lib/components/TreeView V1/TreeView.stories.d.ts +0 -6
- package/lib/components/TreeView V1/TreeView.test.d.ts +0 -1
- package/lib/components/TreeView V1/context.d.ts +0 -9
- package/lib/components/TreeView V1/index.d.ts +0 -1
- package/lib/components/TreeView V1/sampleData.d.ts +0 -71
- package/lib/components/TreeView V1/types/tree.types.d.ts +0 -21
- package/lib/index.d.ts +0 -13
- package/lib/index.esm.js +0 -105883
- package/lib/index.esm.js.map +0 -1
- package/lib/index.js +0 -105922
- package/lib/index.js.map +0 -1
- package/lib/page/TreeNavigation/CustomNode/CustomNode.d.ts +0 -3
- package/lib/page/TreeNavigation/CustomNode/CustomNode.test.d.ts +0 -1
- package/lib/page/TreeNavigation/CustomNode/index.d.ts +0 -1
- package/lib/page/TreeNavigation/TreeNavigation.d.ts +0 -8
- package/lib/page/TreeNavigation/TreeNavigation.stories.d.ts +0 -6
- package/lib/page/TreeNavigation/hooks/useFetch.d.ts +0 -14
- package/lib/page/TreeNavigation/index.d.ts +0 -1
- package/lib/tailwind.css +0 -2023
- package/lib/util/DynamicIcons.d.ts +0 -10
- package/lib/util/Loader.d.ts +0 -5
- package/lib/util/types.d.ts +0 -2
- package/lib/util/useID.d.ts +0 -1
- package/rollup.config.js +0 -37
- package/setupTests.js +0 -6
- package/styleMock.js +0 -2
package/.eslintrc.json
ADDED
package/.prettierrc
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
2
|
+
"singleQuote": false,
|
|
3
|
+
"printWidth": 120,
|
|
4
|
+
"editor.formatOnSave": true,
|
|
5
|
+
"proseWrap": "preserve",
|
|
6
|
+
"tabWidth": 4,
|
|
7
|
+
"requireConfig": false,
|
|
8
|
+
"useTabs": true,
|
|
9
|
+
"trailingComma": "none",
|
|
10
|
+
"bracketSpacing": true,
|
|
11
|
+
"jsxBracketSameLine": false,
|
|
12
|
+
"semi": false
|
|
13
|
+
}
|
package/.storybook/Layout.jsx
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import
|
|
3
|
-
import '../src/font.css';
|
|
1
|
+
import React from "react"
|
|
2
|
+
import "../lib/tailwind.css"
|
|
4
3
|
|
|
5
4
|
const Layout = ({ children }) => {
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
return (
|
|
6
|
+
<div className="p5 min-w-[320px] font-mulish">
|
|
7
|
+
<div className="flex items-center justify-center">{children}</div>
|
|
8
|
+
</div>
|
|
9
|
+
)
|
|
10
|
+
}
|
|
8
11
|
|
|
9
|
-
export default Layout
|
|
12
|
+
export default Layout
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const path = require("path")
|
|
2
|
+
module.exports = {
|
|
3
|
+
stories: ["../stories/**/*.mdx", "../stories/**/*.stories.@(js|jsx|ts|tsx)"],
|
|
4
|
+
addons: [
|
|
5
|
+
"@storybook/addon-links",
|
|
6
|
+
"@storybook/addon-essentials",
|
|
7
|
+
"@storybook/addon-interactions",
|
|
8
|
+
"@storybook/addon-designs"
|
|
9
|
+
],
|
|
10
|
+
framework: {
|
|
11
|
+
name: "@storybook/nextjs",
|
|
12
|
+
options: {}
|
|
13
|
+
},
|
|
14
|
+
staticDirs: ["../public"],
|
|
15
|
+
docs: {
|
|
16
|
+
autodocs: "tag"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<link rel="shortcut icon" href="https://static.agilitycms.com/favicon/purple/128.png">
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// .storybook/manager.js
|
|
2
|
+
|
|
3
|
+
import { addons } from "@storybook/manager-api"
|
|
4
|
+
import plenumTheme from "./plenumTheme"
|
|
5
|
+
|
|
6
|
+
addons.setConfig({
|
|
7
|
+
isFullscreen: false,
|
|
8
|
+
showNav: true,
|
|
9
|
+
showPanel: true,
|
|
10
|
+
panelPosition: "bottom",
|
|
11
|
+
enableShortcuts: true,
|
|
12
|
+
showToolbar: true,
|
|
13
|
+
theme: plenumTheme,
|
|
14
|
+
sidebar: {
|
|
15
|
+
showRoots: false,
|
|
16
|
+
collapsedRoots: ["other", "plenum"]
|
|
17
|
+
},
|
|
18
|
+
toolbar: {
|
|
19
|
+
title: { hidden: false },
|
|
20
|
+
zoom: { hidden: false },
|
|
21
|
+
eject: { hidden: false },
|
|
22
|
+
copy: { hidden: false },
|
|
23
|
+
fullscreen: { hidden: false }
|
|
24
|
+
}
|
|
25
|
+
})
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { create } from "@storybook/theming"
|
|
2
|
+
|
|
3
|
+
export default create({
|
|
4
|
+
base: "light",
|
|
5
|
+
brandTitle: "Agility Plenum UI",
|
|
6
|
+
brandUrl: "https://plenum-ui.vercel.app/",
|
|
7
|
+
brandImage: "https://cdn.agilitycms.com/content-manager/images/logos/agility-logo-storybook-350.png"
|
|
8
|
+
})
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Preview } from "@storybook/react"
|
|
2
|
+
import Layout from "./Layout"
|
|
3
|
+
import React from "react"
|
|
4
|
+
|
|
5
|
+
const preview: Preview = {
|
|
6
|
+
parameters: {
|
|
7
|
+
options: {
|
|
8
|
+
storySort: {
|
|
9
|
+
order: ["atoms", "molecules", "organisms"]
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
actions: { argTypesRegex: "^on[A-Z].*" },
|
|
13
|
+
controls: {
|
|
14
|
+
matchers: {
|
|
15
|
+
color: /(background|color)$/i,
|
|
16
|
+
date: /Date$/
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
decorators: [
|
|
21
|
+
(Story) => (
|
|
22
|
+
<Layout>
|
|
23
|
+
<Story />
|
|
24
|
+
</Layout>
|
|
25
|
+
)
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
export default preview
|
package/.yarnrc.yml
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
nodeLinker: node-modules
|
package/README.md
CHANGED
|
@@ -1,86 +1,198 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
[](https://agilitycms.com/)
|
|
3
|
+
# Agility Plenum UI Library
|
|
4
|
+
|
|
5
|
+
Welcome to Plenum, the definitive UI library for working within the [Agility CMS](https://www.agilitycms.com/) ecosystem. Built with [Next.js 13](https://nextjs.org/) and [Storybook 7.1](https://storybook.js.org/), Plenum is a comprehensive collection of components and patterns designed for building user interfaces in Agility CMS, as well as your own applications within the Agility CMS ecosystem.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## Building for the Agility Marketplace
|
|
9
|
+
|
|
10
|
+
The Plenum library is designed to encourage and facilitate building applications for the Agility CMS Marketplace. Use the rich selection of components and patterns to build consistent, robust, and user-friendly applications for the Agility ecosystem.
|
|
11
|
+
|
|
12
|
+
Contributions to extend and improve this library are welcome! Feel free to fork the repository and submit pull requests.
|
|
2
13
|
|
|
3
14
|
## Features
|
|
4
15
|
|
|
5
|
-
-
|
|
6
|
-
-
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
- Comprehensive UI components library, designed for versatility and consistency.
|
|
17
|
+
- Built with modern technologies like Next.js 13 and Storybook 7.1.
|
|
18
|
+
- Includes automation scripts for efficient component creation.
|
|
19
|
+
- Adopts Tailwind CSS for utility-first styling.
|
|
20
|
+
- Easy to use, install, and integrate into your project.
|
|
21
|
+
|
|
22
|
+
## Prerequisites
|
|
23
|
+
|
|
24
|
+
Before you begin, ensure that Tailwind CSS is installed in your project. Follow the instructions here: [Install Tailwind CSS with Next.js](https://tailwindcss.com/docs/guides/nextjs)
|
|
25
|
+
|
|
26
|
+
In your app entry point (i.e. \`_app.tsx\`), import the \`globals.css\` file from the previous step, and the \`tailwind.css\` file from Plenum:
|
|
16
27
|
|
|
17
|
-
|
|
28
|
+
```jsx
|
|
29
|
+
import "<RELATIVE_PATH>/globals.css";
|
|
30
|
+
import "@agility/plenum-ui/dist/lib/tailwind.css";
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Make sure to add any additional styles before these two import statements to prevent overwriting the Plenum styling.
|
|
34
|
+
|
|
35
|
+
## Installation
|
|
18
36
|
|
|
19
|
-
|
|
37
|
+
You can install the Plenum library using npm or yarn:
|
|
20
38
|
|
|
21
|
-
|
|
22
|
-
|
|
39
|
+
```bash
|
|
40
|
+
# Using npm:
|
|
41
|
+
npm install @agility/plenum-ui
|
|
23
42
|
|
|
43
|
+
# Using yarn:
|
|
44
|
+
yarn add @agility/plenum-ui
|
|
24
45
|
```
|
|
25
|
-
|
|
26
|
-
|
|
46
|
+
|
|
47
|
+
## Usage
|
|
48
|
+
|
|
49
|
+
Import and use the Plenum components in your React components:
|
|
50
|
+
|
|
51
|
+
```jsx
|
|
52
|
+
import { Component } from '@agility/plenum-ui';
|
|
53
|
+
|
|
54
|
+
<Component {...{ComponentProps}} />
|
|
27
55
|
```
|
|
28
56
|
|
|
29
|
-
|
|
57
|
+
## Scripts
|
|
30
58
|
|
|
31
|
-
|
|
59
|
+
### Development and Build Scripts
|
|
32
60
|
|
|
33
|
-
|
|
61
|
+
Run your development server with Storybook:
|
|
34
62
|
|
|
35
63
|
```bash
|
|
36
|
-
|
|
64
|
+
npm run dev
|
|
65
|
+
# or
|
|
66
|
+
yarn dev
|
|
37
67
|
```
|
|
38
68
|
|
|
39
|
-
|
|
69
|
+
Build your project:
|
|
40
70
|
|
|
41
71
|
```bash
|
|
42
|
-
|
|
72
|
+
npm run build
|
|
73
|
+
# or
|
|
74
|
+
yarn build
|
|
43
75
|
```
|
|
44
76
|
|
|
77
|
+
Clean the \`dist\` directory:
|
|
45
78
|
|
|
46
|
-
|
|
79
|
+
```bash
|
|
80
|
+
npm run clean
|
|
81
|
+
# or
|
|
82
|
+
yarn clean
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Lint your project:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
npm run lint
|
|
89
|
+
# or
|
|
90
|
+
yarn lint
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Build Tailwind CSS:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
npm run build:tw
|
|
97
|
+
# or
|
|
98
|
+
yarn build:tw
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Storybook Scripts
|
|
102
|
+
|
|
103
|
+
Build your Storybook:
|
|
47
104
|
|
|
48
|
-
```
|
|
49
|
-
|
|
105
|
+
```bash
|
|
106
|
+
npm run build-storybook
|
|
107
|
+
# or
|
|
108
|
+
yarn build-storybook
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Run your Storybook in development mode:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
npm run storybook:dev
|
|
115
|
+
# or
|
|
116
|
+
yarn storybook:dev
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Generate Tailwind CSS for Storybook and watch for changes:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
npm run storybook:tw
|
|
123
|
+
# or
|
|
124
|
+
yarn storybook:tw
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Build specific parts of Storybook:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
# Build Storybook
|
|
131
|
+
npm run sb-build:storybook
|
|
132
|
+
# or
|
|
133
|
+
yarn sb-build:storybook
|
|
134
|
+
|
|
135
|
+
# Build Tailwind CSS for Storybook
|
|
136
|
+
npm run sb-build:tw
|
|
137
|
+
# or
|
|
138
|
+
yarn sb-build:tw
|
|
139
|
+
```
|
|
50
140
|
|
|
51
|
-
|
|
141
|
+
Compile TypeScript files using custom build script:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
npm run build:tsc
|
|
145
|
+
# or
|
|
146
|
+
yarn build:tsc
|
|
52
147
|
```
|
|
53
148
|
|
|
54
|
-
|
|
55
|
-
If you wish to use yarn link with this project to debug locally:
|
|
149
|
+
These scripts cover various tasks related to development, build processes, linting, and handling specific aspects like Storybook and Tailwind CSS. Make sure to run the appropriate script for the task you want to perform.
|
|
56
150
|
|
|
151
|
+
|
|
152
|
+
### Component Generation Script
|
|
153
|
+
|
|
154
|
+
We have a Node.js script that automates the creation of new components for our Storybook library. This script generates a component directory, along with the necessary files like \`Component.tsx\`, \`Component.stories.tsx\`, and \`index.tsx\`.
|
|
155
|
+
|
|
156
|
+
#### How to use the script
|
|
157
|
+
|
|
158
|
+
To use the script, you should have Node.js installed. From the terminal, you can create a new component by running the following command:
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
node create-component.js ComponentName DestinationDirectory
|
|
57
162
|
```
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
163
|
+
|
|
164
|
+
This command takes two arguments:
|
|
165
|
+
|
|
166
|
+
- \`ComponentName\` - The name of the new component you want to create. This should be in PascalCase (for example, "MyComponent").
|
|
167
|
+
- \`DestinationDirectory\` - The directory where the new component will be created. This should be relative to the 'stories' directory. (for example, "atoms" or "Molecules").
|
|
168
|
+
|
|
169
|
+
The script will create a new directory with the given component name inside the specified destination directory (under the 'stories' directory). Then, it will generate three files in the new directory:
|
|
170
|
+
|
|
171
|
+
- \`ComponentName.tsx\` - This is the component file. It contains a basic React functional component structure.
|
|
172
|
+
- \`ComponentName.stories.tsx\` - This is the Storybook story file. It sets up a basic story for the new component.
|
|
173
|
+
- \`index.tsx\` - This file simply exports the new component. It's used for cleaner imports.
|
|
174
|
+
|
|
175
|
+
#### Example
|
|
176
|
+
|
|
177
|
+
To create a new component named "Button" in the "atoms" directory, you would run:
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
node create-component.js Button atoms
|
|
69
181
|
```
|
|
70
182
|
|
|
71
|
-
|
|
183
|
+
This would create a directory structure like:
|
|
72
184
|
|
|
73
185
|
```
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
186
|
+
- stories
|
|
187
|
+
- atoms
|
|
188
|
+
- Button
|
|
189
|
+
- Button.tsx
|
|
190
|
+
- Button.stories.tsx
|
|
191
|
+
- index.tsx
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Each of the generated files will contain basic boilerplate code that you can start with.
|
|
78
195
|
|
|
79
|
-
|
|
80
|
-
yarn unlink
|
|
81
|
-
cd node_modules/react
|
|
82
|
-
yarn unlink
|
|
83
|
-
cd ../../node_modules/react-dom
|
|
84
|
-
yarn unlink
|
|
196
|
+
##### Notes
|
|
85
197
|
|
|
86
|
-
|
|
198
|
+
This script does prompt the user before overwriting existing directories, so you can run it with confidence. Always use PascalCase for component names, and ensure the destination directory exists or can be created. If you encounter any issues, you can create the component and its files manually
|
package/app/globals.css
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
@tailwind base;
|
|
2
|
+
@tailwind components;
|
|
3
|
+
@tailwind utilities;
|
|
4
|
+
@layer {
|
|
5
|
+
* {
|
|
6
|
+
/* set the default outline color on focus */
|
|
7
|
+
outline-color: #7933dd;
|
|
8
|
+
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
vertical splitter on the InnerContainer component
|
|
13
|
+
|
|
14
|
+
.reflex-container.vertical > .reflex-splitter {
|
|
15
|
+
border-right: 1px solid #f9fafb;
|
|
16
|
+
border-left: 1px solid #f9fafb;
|
|
17
|
+
z-index: 2 !important;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.reflex-container.vertical > .reflex-splitter:hover {
|
|
21
|
+
border-right: 1px solid #eee;
|
|
22
|
+
border-left: 1px solid #eee;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.reflex-container.vertical > .reflex-splitter:active {
|
|
26
|
+
border-right: 1px solid #ddd;
|
|
27
|
+
border-left: 1px solid #ddd;
|
|
28
|
+
} */
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
/*
|
|
32
|
+
scroll bar overrides
|
|
33
|
+
*/
|
|
34
|
+
.scroll-black {
|
|
35
|
+
scrollbar-width: thin; /* "auto" or "thin" */
|
|
36
|
+
scrollbar-color: #aaa; /* scroll thumb and track */
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.scroll-black::-webkit-scrollbar {
|
|
40
|
+
width: 6px; /* width of the entire scrollbar */
|
|
41
|
+
height: 6px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.scroll-black::-webkit-scrollbar-track {
|
|
45
|
+
background: 0; /* color of the tracking area */
|
|
46
|
+
}
|
|
47
|
+
.scroll-black::-webkit-scrollbar-thumb {
|
|
48
|
+
background-color: #aaa; /* color of the scroll thumb */
|
|
49
|
+
border-radius: 20px; /* roundness of the scroll thumb */
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.scroll-transparent {
|
|
53
|
+
scrollbar-width: thin; /* "auto" or "thin" */
|
|
54
|
+
scrollbar-color: #00000000; /* scroll thumb and track */
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.scroll-transparent::-webkit-scrollbar {
|
|
58
|
+
width: 6px; /* width of the entire scrollbar */
|
|
59
|
+
height: 6px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.scroll-transparent::-webkit-scrollbar-track {
|
|
63
|
+
background: 0; /* color of the tracking area */
|
|
64
|
+
}
|
|
65
|
+
.scroll-transparent::-webkit-scrollbar-thumb {
|
|
66
|
+
background-color: #00000000; /* color of the scroll thumb */
|
|
67
|
+
border-radius: 20px; /* roundness of the scroll thumb */
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.scroll-none {
|
|
71
|
+
scrollbar-width: none; /* "auto" or "thin" */
|
|
72
|
+
scrollbar-color: #00000000; /* scroll thumb and track */
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.scroll-none::-webkit-scrollbar {
|
|
76
|
+
width: 0; /* width of the entire scrollbar */
|
|
77
|
+
height: 0;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.scroll-none::-webkit-scrollbar-track {
|
|
81
|
+
background: 0; /* color of the tracking area */
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* .scroll-none::-webkit-scrollbar-thumb {
|
|
85
|
+
} */
|
|
86
|
+
|
|
87
|
+
.scrollbar-gutter {
|
|
88
|
+
scrollbar-gutter: stable;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.content-graph g text {
|
|
92
|
+
font-weight: bold;
|
|
93
|
+
font-size: 13px !important;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
}
|
package/app/head.tsx
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export default function Head() {
|
|
2
|
+
return (
|
|
3
|
+
<>
|
|
4
|
+
<title>Create Next App</title>
|
|
5
|
+
<meta content="width=device-width, initial-scale=1" name="viewport" />
|
|
6
|
+
<meta name="description" content="Generated by create next app" />
|
|
7
|
+
|
|
8
|
+
<link rel="apple-touch-startup-image" href="https://static.agilitycms.com/favicon/purple/128.png" />
|
|
9
|
+
|
|
10
|
+
<link
|
|
11
|
+
rel="apple-touch-icon-precomposed"
|
|
12
|
+
sizes="64x64"
|
|
13
|
+
href="https://static.agilitycms.com/favicon/purple/64.png"
|
|
14
|
+
/>
|
|
15
|
+
<link
|
|
16
|
+
rel="apple-touch-icon-precomposed"
|
|
17
|
+
sizes="128x128"
|
|
18
|
+
href="https://static.agilitycms.com/favicon/purple/128.png"
|
|
19
|
+
/>
|
|
20
|
+
<link
|
|
21
|
+
rel="apple-touch-icon-precomposed"
|
|
22
|
+
sizes="256x256"
|
|
23
|
+
href="https://static.agilitycms.com/favicon/purple/256.png"
|
|
24
|
+
/>
|
|
25
|
+
<link
|
|
26
|
+
rel="apple-touch-icon-precomposed"
|
|
27
|
+
sizes="512x512"
|
|
28
|
+
href="https://static.agilitycms.com/favicon/purple/512.png"
|
|
29
|
+
/>
|
|
30
|
+
|
|
31
|
+
<link
|
|
32
|
+
rel="icon"
|
|
33
|
+
type="image/png"
|
|
34
|
+
href="https://static.agilitycms.com/favicon/purple/32.png"
|
|
35
|
+
sizes="32x32"
|
|
36
|
+
/>
|
|
37
|
+
<link
|
|
38
|
+
rel="icon"
|
|
39
|
+
type="image/png"
|
|
40
|
+
href="https://static.agilitycms.com/favicon/purple/64.png"
|
|
41
|
+
sizes="64x64"
|
|
42
|
+
/>
|
|
43
|
+
<link
|
|
44
|
+
rel="icon"
|
|
45
|
+
type="image/png"
|
|
46
|
+
href="https://static.agilitycms.com/favicon/favicon-128x128.png"
|
|
47
|
+
sizes="128x128"
|
|
48
|
+
/>
|
|
49
|
+
<link
|
|
50
|
+
rel="icon"
|
|
51
|
+
type="image/png"
|
|
52
|
+
href="https://static.agilitycms.com/favicon/favicon-256x256.png"
|
|
53
|
+
sizes="256x256"
|
|
54
|
+
/>
|
|
55
|
+
|
|
56
|
+
<meta name="application-name" content="Agility" />
|
|
57
|
+
</>
|
|
58
|
+
)
|
|
59
|
+
}
|
package/app/layout.tsx
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Mulish } from "@next/font/google"
|
|
2
|
+
import "./globals.css"
|
|
3
|
+
|
|
4
|
+
const mulishFont = Mulish({
|
|
5
|
+
variable: "--mulish",
|
|
6
|
+
weight: ["200", "300", "400", "500", "600", "700", "800", "900", "1000"],
|
|
7
|
+
display: "swap",
|
|
8
|
+
style: ["normal", "italic"],
|
|
9
|
+
subsets: ["latin"],
|
|
10
|
+
fallback: ["Helvetica", "Arial", "sans-serif"]
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
export default function RootLayout({
|
|
14
|
+
children,
|
|
15
|
+
}: {
|
|
16
|
+
children: React.ReactNode
|
|
17
|
+
}) {
|
|
18
|
+
return (
|
|
19
|
+
<html lang="en" className={`${mulishFont.variable}`}>
|
|
20
|
+
{/*
|
|
21
|
+
<head /> will contain the components returned by the nearest parent
|
|
22
|
+
head.tsx. Find out more at https://beta.nextjs.org/docs/api-reference/file-conventions/head
|
|
23
|
+
*/}
|
|
24
|
+
<head />
|
|
25
|
+
<body>{children}</body>
|
|
26
|
+
</html>
|
|
27
|
+
)
|
|
28
|
+
}
|
package/app/page.tsx
ADDED
package/build.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const { execSync } = require("child_process")
|
|
2
|
+
const esbuild = require("esbuild")
|
|
3
|
+
const path = require("path")
|
|
4
|
+
const { Generator } = require('npm-dts');
|
|
5
|
+
|
|
6
|
+
new Generator({
|
|
7
|
+
entry: path.resolve(__dirname, "stories/index.ts"),
|
|
8
|
+
output: path.resolve(__dirname, 'dist/index.d.ts'),
|
|
9
|
+
tsc: "--emitDeclarationOnly --project tsconfig.lib.json"
|
|
10
|
+
}).generate();
|
|
11
|
+
|
|
12
|
+
// Run TypeScript to generate type declarations using the new tsconfig.lib.json
|
|
13
|
+
execSync("tsc --emitDeclarationOnly --project tsconfig.lib.json", { stdio: "inherit" })
|
|
14
|
+
|
|
15
|
+
// Build script using esbuild
|
|
16
|
+
esbuild
|
|
17
|
+
.build({
|
|
18
|
+
entryPoints: [path.resolve(__dirname, "stories/index.ts")],
|
|
19
|
+
bundle: true,
|
|
20
|
+
platform: "browser",
|
|
21
|
+
target: ["es6"],
|
|
22
|
+
//HACK outfile: "dist/index.js,"
|
|
23
|
+
outdir: path.resolve(__dirname, "dist"),
|
|
24
|
+
sourcemap: true,
|
|
25
|
+
external: [
|
|
26
|
+
"react",
|
|
27
|
+
"react-dom",
|
|
28
|
+
"@floating-ui/react",
|
|
29
|
+
"@headlessui/react",
|
|
30
|
+
"@headlessui/tailwindcss",
|
|
31
|
+
"@heroicons/react",
|
|
32
|
+
"@tabler/icons",
|
|
33
|
+
"@tabler/icons-react",
|
|
34
|
+
"classnames",
|
|
35
|
+
"react",
|
|
36
|
+
"react-dom",
|
|
37
|
+
"react-icons"
|
|
38
|
+
],
|
|
39
|
+
format: "esm"
|
|
40
|
+
})
|
|
41
|
+
.catch(() => process.exit(1))
|