@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
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React, { FC, useState } from "react"
|
|
2
|
+
import { default as cn } from "classnames"
|
|
3
|
+
|
|
4
|
+
export type SelectOptions = {
|
|
5
|
+
label: string
|
|
6
|
+
value: string
|
|
7
|
+
}
|
|
8
|
+
export interface InputSelectProps {
|
|
9
|
+
align: "left" | "right"
|
|
10
|
+
/** Show the CTA without Background color and a border seperator */
|
|
11
|
+
inputOptions: SelectOptions[]
|
|
12
|
+
/** Onclick callback */
|
|
13
|
+
onSelectOption?(value: string): void
|
|
14
|
+
className?: string
|
|
15
|
+
isDisabled?: boolean
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** Comment */
|
|
19
|
+
export const InputSelect: FC<InputSelectProps> = ({
|
|
20
|
+
inputOptions,
|
|
21
|
+
onSelectOption,
|
|
22
|
+
align = "right",
|
|
23
|
+
className,
|
|
24
|
+
isDisabled
|
|
25
|
+
}: InputSelectProps): JSX.Element | null => {
|
|
26
|
+
const [selectedOption, setSelectedOption] = useState<string>(inputOptions[0].value)
|
|
27
|
+
|
|
28
|
+
const handleChange = (e: React.ChangeEvent<HTMLSelectElement>) => {
|
|
29
|
+
const targetValue = e.target.value
|
|
30
|
+
onSelectOption && onSelectOption(targetValue)
|
|
31
|
+
setSelectedOption(targetValue)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (!inputOptions?.length) return null
|
|
35
|
+
return (
|
|
36
|
+
<select
|
|
37
|
+
className={cn(
|
|
38
|
+
"relative z-10 inline-flex items-center space-x-2 border border-gray-300 bg-white px-4 py-2 pr-7 text-sm font-medium",
|
|
39
|
+
"focus:border-purple-500 focus:outline-none focus:ring-1 focus:ring-purple-500",
|
|
40
|
+
align === "right"
|
|
41
|
+
? "-ml-px rounded-r border-l-white text-gray-700"
|
|
42
|
+
: align === "left"
|
|
43
|
+
? "-mr-px rounded-l border-r-white text-gray-500 focus-within:z-10"
|
|
44
|
+
: "",
|
|
45
|
+
!onSelectOption ? "cursor-default" : "",
|
|
46
|
+
className
|
|
47
|
+
)}
|
|
48
|
+
onChange={handleChange}
|
|
49
|
+
value={selectedOption}
|
|
50
|
+
disabled={isDisabled}
|
|
51
|
+
>
|
|
52
|
+
{inputOptions.map((option) => (
|
|
53
|
+
<option key={option.value} value={option.value}>
|
|
54
|
+
{option.label}
|
|
55
|
+
</option>
|
|
56
|
+
))}
|
|
57
|
+
</select>
|
|
58
|
+
)
|
|
59
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import TextInputSelect from "."
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof TextInputSelect> = {
|
|
5
|
+
title: "Design System/organisms/TextInputSelect",
|
|
6
|
+
component: TextInputSelect,
|
|
7
|
+
tags: ["autodocs"],
|
|
8
|
+
argTypes: {}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default meta
|
|
12
|
+
type Story = StoryObj<typeof TextInputSelect>
|
|
13
|
+
export const DefaultTextInputSelectStory: Story = {
|
|
14
|
+
args: {
|
|
15
|
+
isFocused: false,
|
|
16
|
+
isError: false,
|
|
17
|
+
id: "input",
|
|
18
|
+
name: "input",
|
|
19
|
+
defaultValue: "",
|
|
20
|
+
isRequired: false,
|
|
21
|
+
isDisabled: false,
|
|
22
|
+
isShowCounter: false,
|
|
23
|
+
label: "Currency",
|
|
24
|
+
placeholder: "420.69",
|
|
25
|
+
type: "currency",
|
|
26
|
+
inputOptions: [
|
|
27
|
+
{ label: "USD", value: "USD" },
|
|
28
|
+
{ label: "CAD", value: "CAD" },
|
|
29
|
+
{ label: "EUR", value: "EUR" }
|
|
30
|
+
],
|
|
31
|
+
prefix: "$"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import React, { FC, useEffect, useId, useRef, useState } from "react"
|
|
2
|
+
import { default as cn } from "classnames"
|
|
3
|
+
|
|
4
|
+
import { InputSelect } from "./InputSelect"
|
|
5
|
+
import { AcceptedInputTypes, InputField } from "@/stories/molecules"
|
|
6
|
+
import InputCounter from "@/stories/molecules/inputs/InputCounter"
|
|
7
|
+
|
|
8
|
+
export type SelectOptions = {
|
|
9
|
+
label: string
|
|
10
|
+
value: string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface ITextInputSelectProps {
|
|
14
|
+
/** Input type*/
|
|
15
|
+
type: AcceptedInputTypes
|
|
16
|
+
/** Input ID */
|
|
17
|
+
id?: string
|
|
18
|
+
/** Input Name */
|
|
19
|
+
name?: string
|
|
20
|
+
/** Label for the input */
|
|
21
|
+
label?: string
|
|
22
|
+
/** placeholder for the input */
|
|
23
|
+
placeholder?: string
|
|
24
|
+
/** Force the focus state on the input */
|
|
25
|
+
isFocused?: boolean
|
|
26
|
+
/** Error state */
|
|
27
|
+
isError?: boolean
|
|
28
|
+
/** If field is required */
|
|
29
|
+
isRequired?: boolean
|
|
30
|
+
/** Disabled state */
|
|
31
|
+
isDisabled?: boolean
|
|
32
|
+
/** Set default value */
|
|
33
|
+
defaultValue?: string
|
|
34
|
+
/** Set value */
|
|
35
|
+
value: string
|
|
36
|
+
/** Message shown under the text field */
|
|
37
|
+
message?: string
|
|
38
|
+
/** Input character counter */
|
|
39
|
+
isShowCounter?: boolean
|
|
40
|
+
/** Max length of input character */
|
|
41
|
+
maxLength?: number
|
|
42
|
+
/** Select input location */
|
|
43
|
+
selectLocation?: "left" | "right"
|
|
44
|
+
/** Prefix */
|
|
45
|
+
prefix?: string
|
|
46
|
+
/** List of options to show on the select field */
|
|
47
|
+
inputOptions?: SelectOptions[]
|
|
48
|
+
/** Callback on base input */
|
|
49
|
+
onChange?(value: string): void
|
|
50
|
+
/** Callback on input select field */
|
|
51
|
+
onSelectOption?(value: string): void
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const TextInputSelect: FC<ITextInputSelectProps> = ({
|
|
55
|
+
label,
|
|
56
|
+
isFocused,
|
|
57
|
+
isError,
|
|
58
|
+
id,
|
|
59
|
+
name,
|
|
60
|
+
isRequired,
|
|
61
|
+
type,
|
|
62
|
+
defaultValue,
|
|
63
|
+
isDisabled,
|
|
64
|
+
message,
|
|
65
|
+
isShowCounter,
|
|
66
|
+
maxLength,
|
|
67
|
+
placeholder,
|
|
68
|
+
inputOptions,
|
|
69
|
+
selectLocation = "right",
|
|
70
|
+
prefix,
|
|
71
|
+
onChange,
|
|
72
|
+
onSelectOption,
|
|
73
|
+
value: externalValue
|
|
74
|
+
}: ITextInputSelectProps) => {
|
|
75
|
+
const [isFocus, setIsFocus] = useState<boolean>(Boolean(isFocused))
|
|
76
|
+
const [value, setValue] = useState<string>(defaultValue || "")
|
|
77
|
+
const inputRef = useRef<HTMLInputElement>(null)
|
|
78
|
+
|
|
79
|
+
const uniqueID = useId()
|
|
80
|
+
if (!id) id = `select-${uniqueID}`
|
|
81
|
+
if (!name) name = id
|
|
82
|
+
|
|
83
|
+
useEffect(() => {
|
|
84
|
+
setValue(externalValue)
|
|
85
|
+
}, [externalValue])
|
|
86
|
+
|
|
87
|
+
// set force focus
|
|
88
|
+
useEffect(() => {
|
|
89
|
+
const input = inputRef.current
|
|
90
|
+
if (!input || isFocus === undefined || isFocused === undefined || isDisabled) return
|
|
91
|
+
if (isFocus || isFocused) {
|
|
92
|
+
input.focus()
|
|
93
|
+
} else {
|
|
94
|
+
input.blur()
|
|
95
|
+
}
|
|
96
|
+
}, [isFocus, isFocused])
|
|
97
|
+
|
|
98
|
+
// set label as active if default value is set
|
|
99
|
+
useEffect(() => {
|
|
100
|
+
const input = inputRef.current
|
|
101
|
+
if (!input || defaultValue === undefined || defaultValue === "") return
|
|
102
|
+
}, [defaultValue])
|
|
103
|
+
|
|
104
|
+
const handleInputFocus = (): void => {
|
|
105
|
+
setIsFocus(true)
|
|
106
|
+
// add other focus effects here
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
const handleInputBlur = (): void => {
|
|
110
|
+
setIsFocus(false)
|
|
111
|
+
// add other focus effects here
|
|
112
|
+
}
|
|
113
|
+
const labelStyles = cn("block inline-block font-medium transition-all text-sm text-gray-700 mb-1", {
|
|
114
|
+
"text-red-500 bg-white": isError
|
|
115
|
+
})
|
|
116
|
+
|
|
117
|
+
const discriptionStyles = cn("text-sm mt-1 block", { "text-gray-500": !isError }, { "text-red-500": isError })
|
|
118
|
+
|
|
119
|
+
return (
|
|
120
|
+
<div>
|
|
121
|
+
{label && (
|
|
122
|
+
<label htmlFor={id} className={labelStyles}>
|
|
123
|
+
{label}
|
|
124
|
+
{isRequired && <span className="text-red-500"> *</span>}
|
|
125
|
+
</label>
|
|
126
|
+
)}
|
|
127
|
+
<div className="flex">
|
|
128
|
+
{inputOptions?.length && selectLocation === "left" && (
|
|
129
|
+
<InputSelect
|
|
130
|
+
inputOptions={inputOptions}
|
|
131
|
+
align="left"
|
|
132
|
+
onSelectOption={onSelectOption}
|
|
133
|
+
className={cn(isError ? "border-red-500" : "")}
|
|
134
|
+
isDisabled={isDisabled}
|
|
135
|
+
/>
|
|
136
|
+
)}
|
|
137
|
+
<div className="relative flex-grow focus-within:z-20">
|
|
138
|
+
{prefix && (
|
|
139
|
+
<div className="pointer-events-none pr-10 absolute inset-y-0 left-0 flex items-center pl-3">
|
|
140
|
+
<span className="text-gray-500 sm:text-sm">{prefix}</span>
|
|
141
|
+
</div>
|
|
142
|
+
)}
|
|
143
|
+
<InputField
|
|
144
|
+
onFocus={handleInputFocus}
|
|
145
|
+
onBlur={handleInputBlur}
|
|
146
|
+
handleChange={(v) => onChange && onChange(v)}
|
|
147
|
+
ref={inputRef}
|
|
148
|
+
type={type}
|
|
149
|
+
name={name}
|
|
150
|
+
id={id}
|
|
151
|
+
className={cn(
|
|
152
|
+
"w-full border border-gray-300 py-2 px-3 text-sm font-normal leading-5",
|
|
153
|
+
"focus:border-purple-500 focus:outline-none focus:ring-1 focus:ring-purple-500 sm:text-sm",
|
|
154
|
+
selectLocation === "right" ? `rounded-l` : `rounded-r`,
|
|
155
|
+
isError ? "border-red-500" : "",
|
|
156
|
+
prefix ? `pl-7` : ""
|
|
157
|
+
)}
|
|
158
|
+
isDisabled={isDisabled}
|
|
159
|
+
defaultValue={defaultValue}
|
|
160
|
+
value={value}
|
|
161
|
+
maxLength={maxLength}
|
|
162
|
+
placeholder={placeholder}
|
|
163
|
+
/>
|
|
164
|
+
</div>
|
|
165
|
+
{inputOptions?.length && selectLocation === "right" && (
|
|
166
|
+
<InputSelect
|
|
167
|
+
inputOptions={inputOptions}
|
|
168
|
+
align={"right"}
|
|
169
|
+
onSelectOption={onSelectOption}
|
|
170
|
+
isDisabled={isDisabled}
|
|
171
|
+
className={cn(isError ? "border-red-500" : "")}
|
|
172
|
+
/>
|
|
173
|
+
)}
|
|
174
|
+
</div>
|
|
175
|
+
<div className="flex flex-row space-x-3">
|
|
176
|
+
<div className="grow">{message && <span className={discriptionStyles}>{message}</span>}</div>
|
|
177
|
+
{isShowCounter && (
|
|
178
|
+
<div className="shrink-0">
|
|
179
|
+
<InputCounter current={Number(value?.length)} limit={maxLength} />
|
|
180
|
+
</div>
|
|
181
|
+
)}
|
|
182
|
+
</div>
|
|
183
|
+
</div>
|
|
184
|
+
)
|
|
185
|
+
}
|
|
186
|
+
export default TextInputSelect
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import AnimatedLabelInput, { IAnimatedLabelInputProps } from "./AnimatedLabelInput"
|
|
2
|
+
import ButtonDropdown, { IButtonDropdownProps } from "./ButtonDropdown"
|
|
3
|
+
import Dropdown, { IDropdownClassnames, IDropdownProps, IItemProp } from "./DropdownComponent"
|
|
4
|
+
import EmptySectionPlaceholder, { IEmptySectionPlaceholderProps } from "./EmptySectionPlaceholder"
|
|
5
|
+
import FormInputWithAddons, { IFormInputWithAddonsProps } from "./FormInputWithAddons"
|
|
6
|
+
import TextInputSelect, { ITextInputSelectProps } from "./TextInputSelect"
|
|
7
|
+
|
|
8
|
+
export type {
|
|
9
|
+
IAnimatedLabelInputProps,
|
|
10
|
+
IButtonDropdownProps,
|
|
11
|
+
IDropdownClassnames,
|
|
12
|
+
IDropdownProps,
|
|
13
|
+
IEmptySectionPlaceholderProps,
|
|
14
|
+
IItemProp,
|
|
15
|
+
IFormInputWithAddonsProps,
|
|
16
|
+
ITextInputSelectProps
|
|
17
|
+
}
|
|
18
|
+
export { AnimatedLabelInput, ButtonDropdown, Dropdown, EmptySectionPlaceholder, FormInputWithAddons, TextInputSelect }
|
package/tailwind.config.js
CHANGED
|
@@ -1,11 +1,42 @@
|
|
|
1
|
-
|
|
1
|
+
/** @type {import('tailwindcss').Config} */
|
|
2
2
|
module.exports = {
|
|
3
|
-
mode:
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
mode: "development",
|
|
4
|
+
|
|
5
|
+
content: [
|
|
6
|
+
"./app/**/*.{js,ts,jsx,tsx}",
|
|
7
|
+
"./pages/**/*.{js,ts,jsx,tsx}",
|
|
8
|
+
"./components/**/*/.{js,ts,jsx,tsx}",
|
|
9
|
+
"./stories/**/*.{js,ts,jsx,tsx}",
|
|
10
|
+
"./.storybook/*.{js,ts,jsx,tsx}"
|
|
11
|
+
],
|
|
12
|
+
safelist: [
|
|
13
|
+
"text-xs",
|
|
14
|
+
"text-sm",
|
|
15
|
+
"text-base",
|
|
16
|
+
"text-lg",
|
|
17
|
+
"text-xl",
|
|
18
|
+
"text-2xl",
|
|
19
|
+
"text-3xl",
|
|
20
|
+
"text-4xl",
|
|
21
|
+
"text-5xl",
|
|
22
|
+
"text-6xl",
|
|
23
|
+
"font-thin",
|
|
24
|
+
"font-extralight",
|
|
25
|
+
"font-light",
|
|
26
|
+
"font-normal",
|
|
27
|
+
"font-medium",
|
|
28
|
+
"font-semibold",
|
|
29
|
+
"font-bold",
|
|
30
|
+
"font-extrabold",
|
|
31
|
+
"font-black",
|
|
32
|
+
{
|
|
33
|
+
pattern:
|
|
34
|
+
/^(bg|text|border(-(t|r|b|l))?)-((gray)|(red)|(orange)|(yellow)|(blue)|(light-blue)|(cyan)|(green)|(purple)|(teal)|(violet)|(pink)|(rose))-(50|100|200|300|400|500|600|700|800|900)|(mx|my|m|px|py|p)-\d.$/
|
|
35
|
+
}
|
|
36
|
+
],
|
|
6
37
|
theme: {
|
|
7
38
|
fontFamily: {
|
|
8
|
-
|
|
39
|
+
mulish: ["Mulish", "sans-serif"]
|
|
9
40
|
},
|
|
10
41
|
extend: {
|
|
11
42
|
gridTemplateColumns: {
|
|
@@ -17,47 +48,145 @@ module.exports = {
|
|
|
17
48
|
header: "max-content 1fr 1fr"
|
|
18
49
|
},
|
|
19
50
|
colors: {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
'purple-500': '#7933DD',
|
|
26
|
-
'purple-600': '#692CD8',
|
|
27
|
-
'purple-700': '#5800D4',
|
|
28
|
-
'purple-800': '#4F00BF',
|
|
29
|
-
'purple-900': '#4600AA',
|
|
30
|
-
|
|
51
|
+
"gray-50": "#F9FAFB",
|
|
52
|
+
"gray-100": "#F3F4F6",
|
|
53
|
+
"gray-200": "#E5E7EB",
|
|
54
|
+
"gray-300": "#D1D5DB",
|
|
55
|
+
"gray-400": "#9CA3AF",
|
|
31
56
|
"gray-500": "#6B7280",
|
|
57
|
+
"gray-600": "#4B5563",
|
|
32
58
|
"gray-700": "#374151",
|
|
59
|
+
"gray-800": "#1F2937",
|
|
33
60
|
"gray-900": "#111827",
|
|
34
61
|
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
62
|
+
"red-50": "#FEF2F2",
|
|
63
|
+
"red-100": "#FEE2E2",
|
|
64
|
+
"red-200": "#FECACA",
|
|
65
|
+
"red-300": "#FCA5A5",
|
|
66
|
+
"red-400": "#F87171",
|
|
67
|
+
"red-500": "#EF4444",
|
|
68
|
+
"red-600": "#DC2626",
|
|
69
|
+
"red-700": "#B91C1C",
|
|
70
|
+
"red-800": "#991B1B",
|
|
71
|
+
"red-900": "#7F1D1D",
|
|
72
|
+
|
|
73
|
+
"orange-50": "#FFF7ED",
|
|
74
|
+
"orange-100": "#FFEDD5",
|
|
75
|
+
"orange-200": "#FED7AA",
|
|
76
|
+
"orange-300": "#FDBA74",
|
|
77
|
+
"orange-400": "#FB923C",
|
|
78
|
+
"orange-500": "#F97316",
|
|
79
|
+
"orange-600": "#EA580C",
|
|
80
|
+
"orange-700": "#C2410C",
|
|
81
|
+
"orange-800": "#9A3412",
|
|
82
|
+
"orange-900": "#7C2D12",
|
|
45
83
|
|
|
84
|
+
"yellow-50": "#FFFAEA",
|
|
46
85
|
"yellow-100": "#FFF5D4",
|
|
47
|
-
"yellow-
|
|
86
|
+
"yellow-200": "#FFEAA9",
|
|
87
|
+
"yellow-300": "#FFE07E",
|
|
88
|
+
"yellow-400": "#FFD553",
|
|
89
|
+
"yellow-500": "#FFCB28",
|
|
90
|
+
"yellow-600": "#E6B724",
|
|
91
|
+
"yellow-700": "#B38E1C",
|
|
92
|
+
"yellow-800": "#997A18",
|
|
93
|
+
"yellow-900": "#806614",
|
|
94
|
+
|
|
95
|
+
"teal-50": "#F0FDFA",
|
|
96
|
+
"teal-100": "#CCFBF1",
|
|
97
|
+
"teal-200": "#99F6E4",
|
|
98
|
+
"teal-300": "#5EEAD4",
|
|
99
|
+
"teal-400": "#2DD4BF",
|
|
100
|
+
"teal-500": "#14B8A6",
|
|
101
|
+
"teal-600": "#0D9488",
|
|
102
|
+
"teal-700": "#0F766E",
|
|
103
|
+
"teal-800": "#115E59",
|
|
104
|
+
"teal-900": "#134E4A",
|
|
105
|
+
|
|
106
|
+
"cyan-50": "#CFFAFE",
|
|
107
|
+
"cyan-100": "#A5F3FC",
|
|
108
|
+
"cyan-200": "#67E8F9",
|
|
109
|
+
"cyan-300": "#22D3EE",
|
|
110
|
+
"cyan-400": "#ECFEFF",
|
|
111
|
+
"cyan-500": "#06B6D4",
|
|
112
|
+
"cyan-600": "#0891B2",
|
|
113
|
+
"cyan-700": "#0E7490",
|
|
114
|
+
"cyan-800": "#155E75",
|
|
115
|
+
"cyan-900": "#164E63",
|
|
116
|
+
|
|
117
|
+
"light-blue-50": "#E0F2FE",
|
|
118
|
+
"light-blue-100": "#BAE6FD",
|
|
119
|
+
"light-blue-200": "#7DD3FC",
|
|
120
|
+
"light-blue-300": "#38BDF8",
|
|
121
|
+
"light-blue-400": "#F0F9FF",
|
|
122
|
+
"light-blue-500": "#0EA5E9",
|
|
123
|
+
"light-blue-600": "#0284C7",
|
|
124
|
+
"light-blue-700": "#0369A1",
|
|
125
|
+
"light-blue-800": "#075985",
|
|
126
|
+
"light-blue-900": "#0C4A6E",
|
|
48
127
|
|
|
49
|
-
"
|
|
50
|
-
"
|
|
128
|
+
"blue-50": "#DBEAFE",
|
|
129
|
+
"blue-100": "#BFDBFE",
|
|
130
|
+
"blue-200": "#93C5FD",
|
|
131
|
+
"blue-300": "#60A5FA",
|
|
132
|
+
"blue-400": "#EFF6FF",
|
|
133
|
+
"blue-500": "#3B82F6",
|
|
134
|
+
"blue-600": "#2563EB",
|
|
135
|
+
"blue-700": "#1D4ED8",
|
|
136
|
+
"blue-800": "#1E40AF",
|
|
137
|
+
"blue-900": "#1E3A8A",
|
|
138
|
+
|
|
139
|
+
"purple-50": "#EEE6FB",
|
|
140
|
+
"purple-100": "#DECCF6",
|
|
141
|
+
"purple-200": "#CDB3F2",
|
|
142
|
+
"purple-300": "#BC99EE",
|
|
143
|
+
"purple-400": "#9B66E5",
|
|
144
|
+
"purple-500": "#7933DD",
|
|
145
|
+
"purple-600": "#691AD8",
|
|
146
|
+
"purple-700": "#5800D4",
|
|
147
|
+
"purple-800": "#4F00BF",
|
|
148
|
+
"purple-900": "#4600AA",
|
|
149
|
+
|
|
150
|
+
"violet-50": "#EDE9FE",
|
|
151
|
+
"violet-100": "#DDD6FE",
|
|
152
|
+
"violet-200": "#C4B5FD",
|
|
153
|
+
"violet-300": "#A78BFA",
|
|
154
|
+
"violet-400": "#F5F3FF",
|
|
155
|
+
"violet-500": "#8B5CF6",
|
|
156
|
+
"violet-600": "#7C3AED",
|
|
157
|
+
"violet-700": "#6D28D9",
|
|
158
|
+
"violet-800": "#5B21B6",
|
|
159
|
+
"violet-900": "#4C1D95",
|
|
160
|
+
|
|
161
|
+
"pink-50": "#FCE7F3",
|
|
162
|
+
"pink-100": "#FCE7F3",
|
|
163
|
+
"pink-200": "#FBCFE8",
|
|
164
|
+
"pink-400": "#F472B6",
|
|
165
|
+
"pink-500": "#EC4899",
|
|
166
|
+
"pink-600": "#DB2777",
|
|
167
|
+
"pink-700": "#BE185D",
|
|
168
|
+
"pink-800": "#9D174D",
|
|
169
|
+
"pink-900": "#831843",
|
|
170
|
+
|
|
171
|
+
"rose-50": "#FFE4E6",
|
|
172
|
+
"rose-100": "#FECDD3",
|
|
173
|
+
"rose-200": "#FDA4AF",
|
|
174
|
+
"rose-300": "#FB7185",
|
|
175
|
+
"rose-400": "#FFF1F2",
|
|
176
|
+
"rose-500": "#F43F5E",
|
|
177
|
+
"rose-600": "#E11D48",
|
|
178
|
+
"rose-700": "#BE123C",
|
|
179
|
+
"rose-800": "#9F1239",
|
|
180
|
+
"rose-900": "#881337"
|
|
51
181
|
},
|
|
52
182
|
fontWeight: {
|
|
53
183
|
medium: 600
|
|
54
184
|
}
|
|
55
185
|
}
|
|
56
186
|
},
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
};
|
|
187
|
+
plugins: [
|
|
188
|
+
require("@tailwindcss/forms"),
|
|
189
|
+
require("@tailwindcss/typography"),
|
|
190
|
+
require("@headlessui/tailwindcss")
|
|
191
|
+
]
|
|
192
|
+
}
|
package/tsconfig.json
CHANGED
|
@@ -1,23 +1,29 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es5",
|
|
4
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
5
|
+
"allowJs": true,
|
|
6
|
+
"skipLibCheck": true,
|
|
7
|
+
"strict": true,
|
|
8
|
+
"forceConsistentCasingInFileNames": true,
|
|
9
|
+
"noEmit": true,
|
|
10
|
+
"esModuleInterop": true,
|
|
11
|
+
"module": "esnext",
|
|
12
|
+
"moduleResolution": "node",
|
|
13
|
+
"resolveJsonModule": true,
|
|
14
|
+
"isolatedModules": true,
|
|
15
|
+
"jsx": "preserve",
|
|
16
|
+
"incremental": true,
|
|
17
|
+
"plugins": [
|
|
18
|
+
{
|
|
19
|
+
"name": "next"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"baseUrl": ".",
|
|
23
|
+
"paths": {
|
|
24
|
+
"@/*": ["./*"]
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
|
28
|
+
"exclude": ["node_modules"]
|
|
23
29
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"declaration": true,
|
|
4
|
+
"declarationDir": "./dist/types",
|
|
5
|
+
"outDir": "./dist",
|
|
6
|
+
"module": "esnext",
|
|
7
|
+
"rootDir": "./",
|
|
8
|
+
"target": "es2021",
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"moduleResolution": "node",
|
|
11
|
+
"baseUrl": ".",
|
|
12
|
+
"paths": {
|
|
13
|
+
"@/*": ["./*"]
|
|
14
|
+
},
|
|
15
|
+
"jsx": "react-jsx"
|
|
16
|
+
},
|
|
17
|
+
"include": ["stories/**/*.ts", "utils/**/*.ts"],
|
|
18
|
+
"exclude": ["node_modules"]
|
|
19
|
+
}
|
package/utils/types.d.ts
ADDED
package/utils/types.ts
ADDED
package/utils/useId.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useId: () => string;
|
package/utils/useId.tsx
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useLayoutEffect, useState } from "react"
|
|
2
|
+
|
|
3
|
+
let id = 0
|
|
4
|
+
function generateId() {
|
|
5
|
+
return ++id
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const useId = () => {
|
|
9
|
+
const [id, setId] = useState(generateId)
|
|
10
|
+
|
|
11
|
+
useLayoutEffect(() => {
|
|
12
|
+
if (id === null) setId(generateId())
|
|
13
|
+
}, [id])
|
|
14
|
+
|
|
15
|
+
return id != null ? "" + id : undefined
|
|
16
|
+
}
|
package/.babelrc
DELETED
package/.editorconfig
DELETED
package/.eslintrc
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"root": true,
|
|
3
|
-
"parser": "@typescript-eslint/parser",
|
|
4
|
-
"plugins": [
|
|
5
|
-
"@typescript-eslint"
|
|
6
|
-
],
|
|
7
|
-
"extends": [
|
|
8
|
-
"eslint:recommended",
|
|
9
|
-
"plugin:@typescript-eslint/eslint-recommended",
|
|
10
|
-
"plugin:@typescript-eslint/recommended",
|
|
11
|
-
"prettier"
|
|
12
|
-
]
|
|
13
|
-
}
|