diff --git a/.env b/.env new file mode 100644 index 0000000..bbcd15b --- /dev/null +++ b/.env @@ -0,0 +1 @@ +STORYBOOK_DISABLE_TELEMETRY=true \ No newline at end of file diff --git a/.github/workflows.yml b/.github/workflows.yml new file mode 100644 index 0000000..e69de29 diff --git a/.storybook/main.ts b/.storybook/main.ts new file mode 100644 index 0000000..768d6e6 --- /dev/null +++ b/.storybook/main.ts @@ -0,0 +1,20 @@ +import type { StorybookConfig } from "@storybook/react-vite" +const config: StorybookConfig = { + stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"], + addons: [ + "@storybook/addon-links", + "@storybook/addon-essentials", + "@storybook/addon-interactions", + ], + framework: { + name: "@storybook/react-vite", + options: {}, + }, + docs: { + autodocs: "tag", + }, + core: { + disableTelemetry: true, + }, +} +export default config diff --git a/.storybook/preview.ts b/.storybook/preview.ts new file mode 100644 index 0000000..b75131b --- /dev/null +++ b/.storybook/preview.ts @@ -0,0 +1,15 @@ +import type { Preview } from "@storybook/react" + +const preview: Preview = { + parameters: { + actions: { argTypesRegex: "^on[A-Z].*" }, + controls: { + matchers: { + color: /(background|color)$/i, + date: /Date$/, + }, + }, + }, +} + +export default preview diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..1ad78da --- /dev/null +++ b/build.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +COMPONENT_CATEGORIES=( index atoms molecules ) +FORMATS=( es cjs ) + +for format in "${FORMATS[@]}" +do + # Order is important else index overrides atoms and molecules + for component_type in "${COMPONENT_CATEGORIES[@]}" + do + COMPONENT_CATEGORY=$component_type FORMAT=$format npm run build:publish + done +done + +npm run build:types \ No newline at end of file diff --git a/bulkgen.sh b/bulkgen.sh index 6c46f80..f19bd3e 100644 --- a/bulkgen.sh +++ b/bulkgen.sh @@ -1,6 +1,6 @@ #!/bin/zsh -declare -a arr=("Alert", "Badge" "Breadcrumb" "BrowserIncompatibility" "Button" "Checkbox" "ColorPicker" "ContextMenu" "DateInput" "DatePicker" "DateRange" "Calendar" "PickerRange" "DetailsPanel" "Dialog" "FacetedFilter" "InlineMenu" "LabelValue" "LearnLink" "Link" "List" "Modal" "Notification" "NumericStepper" "Pagination" "Picklist" "Pill" "Pillbox" "Popover" "ProgressIndicator" "ProgressStepper" "Radio" "SearchField" "SecondaryNavigation" "SegmentedControl" "Select" "Slider" "Splitter" "Tab" "TabBar" "Table" "Tag" "TextArea" "TextInput" "Mask" "TimeEntry" "Toggle" "Toolbar" "Tooltip" "TypeAhead" "Uploader" "Widget") +declare -a arr=("Alert", "Badge" "Breadcrumb" "BrowserIncompatibility" "Button" "Checkbox" "ColorPicker" "ContextMenu" "DateInput" "DatePicker" "DateRange" "Calendar" "PickerRange" "DetailsPanel" "Dialog" "FacetedFilter" "Icon" "InlineMenu" "LabelValue" "LearnLink" "Link" "List" "Modal" "Notification" "NumericStepper" "Pagination" "Picklist" "Pill" "Pillbox" "Popover" "ProgressIndicator" "ProgressStepper" "Radio" "SearchField" "SecondaryNavigation" "SegmentedControl" "Select" "Slider" "Splitter" "Tab" "TabBar" "Table" "Tag" "TextArea" "TextInput" "Mask" "TimeEntry" "Toggle" "Toolbar" "Tooltip" "TypeAhead" "Uploader" "Widget") for i in "${arr[@]}" do npm run component "$i" diff --git a/index.html b/index.html index 1c49225..b94e68b 100644 --- a/index.html +++ b/index.html @@ -4,11 +4,11 @@ -