@agility/plenum-ui 1.3.48 → 2.0.0-rc1
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 +33 -0
- package/dist/index.js +5936 -0
- package/dist/index.js.map +7 -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 +13 -0
- package/dist/types/stories/atoms/buttons/Button/Button.d.ts +33 -0
- package/dist/types/stories/atoms/buttons/Button/Danger/Danger.stories.d.ts +13 -0
- package/dist/types/stories/atoms/buttons/Button/Primary/Primary.stories.d.ts +13 -0
- package/dist/types/stories/atoms/buttons/Button/Secondary/Secondary.stories.d.ts +13 -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 -17
- 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/dist/types/stories/molecules/inputs/InputField/InputField.d.ts +28 -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/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 +11 -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/dist/types/stories/molecules/inputs/textArea/TextArea.d.ts +26 -0
- 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} +40 -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/dist/types/stories/organisms/index.d.ts +7 -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 +53 -77
- 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 +69 -0
- package/stories/atoms/buttons/Button/Button.tsx +123 -0
- package/stories/atoms/buttons/Button/Danger/Danger.stories.ts +71 -0
- package/stories/atoms/buttons/Button/Primary/Primary.stories.ts +78 -0
- package/stories/atoms/buttons/Button/Secondary/Secondary.stories.ts +74 -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 +124 -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 +35 -0
- package/stories/molecules/inputs/InputField/InputField.stories.tsx +29 -0
- package/stories/molecules/inputs/InputField/InputField.tsx +88 -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/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 +24 -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 +20 -0
- package/stories/molecules/inputs/textArea/TextArea.tsx +67 -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 +269 -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/index.ts +16 -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 -11
- 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.d.ts +0 -9
- 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.d.ts +0 -39
- 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.d.ts +0 -13
- 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.d.ts +0 -48
- 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.d.ts +0 -32
- 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 -105874
- package/lib/index.esm.js.map +0 -1
- package/lib/index.js +0 -105913
- 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
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import { FC } from
|
|
2
|
-
export interface
|
|
3
|
-
/**
|
|
4
|
-
* source url for the avatar
|
|
5
|
-
*/
|
|
6
|
-
src?: string;
|
|
7
|
-
/**
|
|
8
|
-
* Initials we use as fallback if no src is passed
|
|
9
|
-
*/
|
|
10
|
-
initials?: string;
|
|
11
|
-
/**
|
|
12
|
-
* optional status
|
|
13
|
-
*/
|
|
14
|
-
status?:
|
|
15
|
-
/**
|
|
16
|
-
* avatar picture size (also affects status indicator)
|
|
17
|
-
*/
|
|
18
|
-
size?:
|
|
19
|
-
/**
|
|
20
|
-
* avatar img alt
|
|
21
|
-
*/
|
|
22
|
-
alt?: string;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Avatar component that shows profile image or name initials of the user
|
|
26
|
-
*/
|
|
27
|
-
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
export interface IAvatarProps {
|
|
3
|
+
/**
|
|
4
|
+
* source url for the avatar
|
|
5
|
+
*/
|
|
6
|
+
src?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Initials we use as fallback if no src is passed
|
|
9
|
+
*/
|
|
10
|
+
initials?: string;
|
|
11
|
+
/**
|
|
12
|
+
* optional status
|
|
13
|
+
*/
|
|
14
|
+
status?: "offline" | "online" | "busy";
|
|
15
|
+
/**
|
|
16
|
+
* avatar picture size (also affects status indicator)
|
|
17
|
+
*/
|
|
18
|
+
size?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl";
|
|
19
|
+
/**
|
|
20
|
+
* avatar img alt
|
|
21
|
+
*/
|
|
22
|
+
alt?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Avatar component that shows profile image or name initials of the user
|
|
26
|
+
*/
|
|
27
|
+
declare const Avatar: FC<IAvatarProps>;
|
|
28
|
+
export default Avatar;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface IBadgeProps {
|
|
3
|
+
/** The content scheme of the badge */
|
|
4
|
+
color: "primary" | "secondary" | "danger" | "warning" | "success" | "info" | "basic" | "pink";
|
|
5
|
+
/** Render with slightly rounded corners or as a pill shape */
|
|
6
|
+
variant: "rounded" | "pill";
|
|
7
|
+
/** The text content of the badge */
|
|
8
|
+
label: string;
|
|
9
|
+
/** The size of the badge */
|
|
10
|
+
size?: "sm" | "lg";
|
|
11
|
+
/** Render a loader inside the badge */
|
|
12
|
+
loading?: boolean;
|
|
13
|
+
/** Render with a small circle in a darker shade of the color chosen*/
|
|
14
|
+
statusDot?: boolean;
|
|
15
|
+
/** Render with a button to remove the badge */
|
|
16
|
+
removeButton?: React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
|
|
17
|
+
/** Render the badge as a clickable button */
|
|
18
|
+
actionButton?: React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
|
|
19
|
+
}
|
|
20
|
+
declare const Badge: React.FC<IBadgeProps>;
|
|
21
|
+
export default Badge;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import Button from "../Button";
|
|
3
|
+
declare const meta: Meta<typeof Button>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Button>;
|
|
6
|
+
export declare const Alternative: Story;
|
|
7
|
+
export declare const AlternativeTrailingIcon: Story;
|
|
8
|
+
export declare const AlternativeLeadingIcon: Story;
|
|
9
|
+
export declare const AlternativeExtraSmall: Story;
|
|
10
|
+
export declare const AlternativeSmall: Story;
|
|
11
|
+
export declare const AlternativeMedium: Story;
|
|
12
|
+
export declare const AlternativeLarge: Story;
|
|
13
|
+
export declare const AlternativeExtraLarge: Story;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { HTMLAttributeAnchorTarget } from "react";
|
|
2
|
+
import { IDynamicIconProps } from "../../icons";
|
|
3
|
+
export type BTNActionType = "primary" | "secondary" | "alternative" | "danger";
|
|
4
|
+
export interface IButtonProps extends React.ComponentPropsWithoutRef<"button"> {
|
|
5
|
+
/** Is the button a Primary CTA, alternative or danger button? */
|
|
6
|
+
actionType: BTNActionType;
|
|
7
|
+
/** How lg should the button be? - Defaults to 'base'. */
|
|
8
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
9
|
+
/** The Button's text content. */
|
|
10
|
+
label: string;
|
|
11
|
+
/** The Icon to be displayed inside the button. */
|
|
12
|
+
icon?: IDynamicIconProps;
|
|
13
|
+
/** Does the button width grow to fill it's container? */
|
|
14
|
+
fullWidth?: boolean;
|
|
15
|
+
/** Optionally render as anchor tag */
|
|
16
|
+
asLink?: {
|
|
17
|
+
href: string;
|
|
18
|
+
target: HTMLAttributeAnchorTarget;
|
|
19
|
+
title?: string;
|
|
20
|
+
};
|
|
21
|
+
/** The placement of the icon relative to the text content. */
|
|
22
|
+
iconPosition?: "trailing" | "leading";
|
|
23
|
+
/** Use an custom svg element */
|
|
24
|
+
CustomSVGIcon?: JSX.Element;
|
|
25
|
+
/** Is the associated content loading? */
|
|
26
|
+
isLoading?: boolean;
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Primary UI component for user interaction
|
|
31
|
+
*/
|
|
32
|
+
declare const Button: ({ actionType, size, label, icon, CustomSVGIcon, fullWidth, iconPosition, asLink, isLoading, className, ...props }: IButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export default Button;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import Button from "../Button";
|
|
3
|
+
declare const meta: Meta<typeof Button>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Button>;
|
|
6
|
+
export declare const Danger: Story;
|
|
7
|
+
export declare const DangerTrailingIcon: Story;
|
|
8
|
+
export declare const DangerLeadingIcon: Story;
|
|
9
|
+
export declare const DangerExtraSmall: Story;
|
|
10
|
+
export declare const DangerSmall: Story;
|
|
11
|
+
export declare const DangerMedium: Story;
|
|
12
|
+
export declare const DangerLarge: Story;
|
|
13
|
+
export declare const DangerExtraLarge: Story;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import Button from "../Button";
|
|
3
|
+
declare const meta: Meta<typeof Button>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Button>;
|
|
6
|
+
export declare const Primary: Story;
|
|
7
|
+
export declare const PrimaryLeadingIcon: Story;
|
|
8
|
+
export declare const PrimaryTrailingIcon: Story;
|
|
9
|
+
export declare const PrimaryExtraSmall: Story;
|
|
10
|
+
export declare const PrimarySmall: Story;
|
|
11
|
+
export declare const PrimaryMedium: Story;
|
|
12
|
+
export declare const PrimaryLarge: Story;
|
|
13
|
+
export declare const PrimaryExtraLarge: Story;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import Button from "../Button";
|
|
3
|
+
declare const meta: Meta<typeof Button>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Button>;
|
|
6
|
+
export declare const Secondary: Story;
|
|
7
|
+
export declare const SecondaryTrailingIcon: Story;
|
|
8
|
+
export declare const SecondaryLeadingIcon: Story;
|
|
9
|
+
export declare const SecondaryExtraSmall: Story;
|
|
10
|
+
export declare const SecondarySmall: Story;
|
|
11
|
+
export declare const SecondaryMedium: Story;
|
|
12
|
+
export declare const SecondaryLarge: Story;
|
|
13
|
+
export declare const SecondaryExtraLarge: Story;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { HTMLAttributeAnchorTarget } from "react";
|
|
2
|
+
import { BTNActionType } from "../Button/Button";
|
|
3
|
+
/**
|
|
4
|
+
* Capsule Style Button
|
|
5
|
+
*/
|
|
6
|
+
export interface ICapsuleProps extends React.ComponentPropsWithoutRef<"button"> {
|
|
7
|
+
/** Is the button a Primary CTA, alternative or danger button? */
|
|
8
|
+
actionType: BTNActionType;
|
|
9
|
+
/** How lg should the button be? - Defaults to 'base'. */
|
|
10
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
11
|
+
/** The Button's text content. */
|
|
12
|
+
label: string;
|
|
13
|
+
/** Does the button width grow to fill it's container? */
|
|
14
|
+
fullWidth?: boolean;
|
|
15
|
+
/** Optionally render as anchor tag */
|
|
16
|
+
asLink?: {
|
|
17
|
+
href: string;
|
|
18
|
+
target: HTMLAttributeAnchorTarget;
|
|
19
|
+
title?: string;
|
|
20
|
+
};
|
|
21
|
+
/** Is the associated content loading? */
|
|
22
|
+
isLoading?: boolean;
|
|
23
|
+
/**Optional Classname String*/
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
declare const Capsule: ({ actionType, size, label, fullWidth, asLink, isLoading, className, ...props }: ICapsuleProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export default Capsule;
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import * as SolidIcons from "@heroicons/react/solid";
|
|
3
|
-
import * as OutlineIcons from "@heroicons/react/outline";
|
|
4
|
-
import * as FA from "react-icons/fa";
|
|
5
|
-
import { TablerIconName } from "./tablerIconNames";
|
|
6
|
-
|
|
7
|
-
export type
|
|
8
|
-
export type
|
|
9
|
-
export
|
|
10
|
-
export declare function
|
|
11
|
-
export declare function
|
|
12
|
-
export
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import * as SolidIcons from "@heroicons/react/solid";
|
|
3
|
+
import * as OutlineIcons from "@heroicons/react/outline";
|
|
4
|
+
import * as FA from "react-icons/fa";
|
|
5
|
+
import { TablerIconName } from "./tablerIconNames";
|
|
6
|
+
import { ClassNameWithAutocomplete } from "@/utils/types";
|
|
7
|
+
export type IconName = keyof typeof SolidIcons | keyof typeof OutlineIcons;
|
|
8
|
+
export type FAIconName = keyof typeof FA;
|
|
9
|
+
export type UnifiedIconName = IconName | TablerIconName | FAIconName;
|
|
10
|
+
export declare function isHeroIcon(name: UnifiedIconName): name is keyof typeof SolidIcons | keyof typeof OutlineIcons;
|
|
11
|
+
export declare function isTablerIcon(name: UnifiedIconName): name is TablerIconName;
|
|
12
|
+
export declare function isFAIcon(name: UnifiedIconName): name is keyof typeof FA;
|
|
13
|
+
export declare function isUnifiedIconName(name: UnifiedIconName): name is UnifiedIconName;
|
|
14
|
+
export interface IDynamicIconProps extends React.ComponentProps<"i"> {
|
|
15
|
+
icon: UnifiedIconName;
|
|
16
|
+
className?: ClassNameWithAutocomplete;
|
|
17
|
+
outline?: boolean;
|
|
18
|
+
CustomSVG?: React.ReactNode;
|
|
19
|
+
}
|
|
20
|
+
export declare const DynamicIcon: ({ icon, className, outline, CustomSVG, ...props }: IDynamicIconProps) => JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { DynamicIcon } from "./DynamicIcon";
|
|
3
|
+
declare const meta: Meta<typeof DynamicIcon>;
|
|
4
|
+
type Story = StoryObj<typeof DynamicIcon>;
|
|
5
|
+
export declare const HeroIconSolid: Story;
|
|
6
|
+
export declare const HeroIconOutline: Story;
|
|
7
|
+
export declare const TablerIconSolid: Story;
|
|
8
|
+
export declare const TablerIconOutline: Story;
|
|
9
|
+
export declare const FAIcon: Story;
|
|
10
|
+
export default meta;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import IconWithShadow from "./IconWithShadow";
|
|
3
|
+
declare const meta: Meta<typeof IconWithShadow>;
|
|
4
|
+
type Story = StoryObj<typeof IconWithShadow>;
|
|
5
|
+
export declare const HeroIconSolid: Story;
|
|
6
|
+
export declare const HeroIconOutline: Story;
|
|
7
|
+
export declare const TablerIconSolid: Story;
|
|
8
|
+
export declare const TablerIconOutline: Story;
|
|
9
|
+
export declare const FAIcon: Story;
|
|
10
|
+
export default meta;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { TablerIconName } from "./tablerIconNames";
|
|
3
|
-
import { ClassNameWithAutocomplete } from "
|
|
4
|
-
export interface ITablerIconProps extends React.ComponentProps<"i"> {
|
|
5
|
-
icon: TablerIconName;
|
|
6
|
-
className?: ClassNameWithAutocomplete;
|
|
7
|
-
}
|
|
8
|
-
declare const TablerIcon: React.FC<ITablerIconProps>;
|
|
9
|
-
export default TablerIcon;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { TablerIconName } from "./tablerIconNames";
|
|
3
|
+
import { ClassNameWithAutocomplete } from "@/utils/types";
|
|
4
|
+
export interface ITablerIconProps extends React.ComponentProps<"i"> {
|
|
5
|
+
icon: TablerIconName;
|
|
6
|
+
className?: ClassNameWithAutocomplete;
|
|
7
|
+
}
|
|
8
|
+
declare const TablerIcon: React.FC<ITablerIconProps>;
|
|
9
|
+
export default TablerIcon;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DynamicIcon, FAIconName, IDynamicIconProps, IconName, UnifiedIconName, isFAIcon, isHeroIcon, isTablerIcon, isUnifiedIconName } from "./DynamicIcon";
|
|
2
|
+
import IconWithShadow, { IIconWithShadowProps } from "./IconWithShadow";
|
|
3
|
+
export { DynamicIcon, isFAIcon, isHeroIcon, isTablerIcon, isUnifiedIconName, IconWithShadow };
|
|
4
|
+
export type { FAIconName, IDynamicIconProps, IconName, UnifiedIconName, IIconWithShadowProps };
|