Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 33 additions & 9 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
{
"root": true,
"ignorePatterns": [],
"plugins": ["@nx"],
"plugins": [
"@nx"
],
"env": {
"es2020": true
},
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"files": [
"*.ts",
"*.tsx",
"*.js",
"*.jsx"
],
"rules": {
"@nx/enforce-module-boundaries": [
"error",
Expand All @@ -17,24 +24,36 @@
"depConstraints": [
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"]
"onlyDependOnLibsWithTags": [
"*"
]
}
]
}
]
}
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nx/typescript"],
"files": [
"*.ts",
"*.tsx"
],
"extends": [
"plugin:@nx/typescript"
],
"rules": {
"@typescript-eslint/no-extra-semi": "error",
"no-extra-semi": "off"
}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nx/javascript"],
"files": [
"*.js",
"*.jsx"
],
"extends": [
"plugin:@nx/javascript"
],
"rules": {
"@typescript-eslint/no-extra-semi": "error",
"no-extra-semi": "off"
Expand All @@ -51,7 +70,9 @@
"*.test.js",
"*.test.jsx"
],
"extends": ["plugin:@nx/typescript"],
"extends": [
"plugin:@nx/typescript"
],
"env": {},
"rules": {
"@typescript-eslint/no-extra-semi": "error",
Expand All @@ -72,5 +93,8 @@
"jest": true
}
}
],
"extends": [
"plugin:storybook/recommended"
]
}
}
3 changes: 2 additions & 1 deletion .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ jobs:
- name: Unit Test
run: yarn test:affected

- name: Version Bump Dry Run
- name: Version Bump Dry Run (only run for ubuntu-latest-24 matching deploy action)
if: ${{ matrix.node == 24 && matrix.os == 'ubuntu-latest' }}
run: yarn version:dry-run

# - name: Upload coverage report
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,5 @@ Thumbs.db
.nx/workspace-data
vite.config.*.timestamp*
vitest.config.*.timestamp*
.cursor/rules/nx-rules.mdc
.github/instructions/nx.instructions.md
541 changes: 0 additions & 541 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

This file was deleted.

823 changes: 0 additions & 823 deletions .yarn/releases/yarn-3.3.1.cjs

This file was deleted.

942 changes: 942 additions & 0 deletions .yarn/releases/yarn-4.12.0.cjs

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
nodeLinker: node-modules
compressionLevel: mixed

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: '@yarnpkg/plugin-interactive-tools'
enableGlobalCache: false

yarnPath: .yarn/releases/yarn-3.3.1.cjs
nodeLinker: node-modules

npmPublishRegistry: 'https://registry.npmjs.org/'
npmPublishRegistry: "https://registry.npmjs.org/"

npmRegistryServer: 'https://registry.npmjs.org/'
npmRegistryServer: "https://registry.npmjs.org/"

supportedArchitectures:
cpu:
Expand All @@ -24,3 +22,5 @@ supportedArchitectures:
- linux
- darwin
- win32

yarnPath: .yarn/releases/yarn-4.12.0.cjs
2 changes: 1 addition & 1 deletion apps/element-storybook/.storybook/ElementTheme.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { create } from '@storybook/theming';
import { create } from 'storybook/theming';
// eslint-disable-next-line @nx/enforce-module-boundaries
import ElementLogo from '../../../static/availity-Element-Logo.png'
// eslint-disable-next-line @nx/enforce-module-boundaries
Expand Down
9 changes: 6 additions & 3 deletions apps/element-storybook/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
// This file has been automatically migrated to valid ESM format by Storybook.
import { createRequire } from "node:module";
import { dirname, join } from 'path';
import remarkGfm from 'remark-gfm';
import { StorybookConfig } from '@storybook/react-vite';

const require = createRequire(import.meta.url);

const config: StorybookConfig = {
stories: [
'../src/*.mdx',
Expand All @@ -13,19 +17,18 @@ const config: StorybookConfig = {
],

addons: [
getAbsolutePath('@storybook/addon-essentials'),
getAbsolutePath('@storybook/addon-themes'),
getAbsolutePath('@storybook/addon-a11y'),
{
name: '@storybook/addon-docs',
name: getAbsolutePath("@storybook/addon-docs"),
options: {
mdxPluginOptions: {
mdxCompileOptions: {
remarkPlugins: [remarkGfm],
},
},
},
},
}
],

framework: {
Expand Down
10 changes: 1 addition & 9 deletions apps/element-storybook/.storybook/manager.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// .storybook/manager.js

import { addons } from '@storybook/manager-api';
import {API_PreparedIndexEntry, API_StatusObject} from "@storybook/types";
import { addons } from 'storybook/manager-api';
import elementTheme from './ElementTheme';

addons.setConfig({
Expand All @@ -12,12 +11,5 @@ addons.setConfig({
'sample-layouts',
'design-system',
],
filters: {
patterns: (item: API_PreparedIndexEntry & {
status: Record<string, API_StatusObject | null>;
}): boolean => {
return !(item.tags ?? []).includes('hideInSidebar');
}
}
},
});
14 changes: 8 additions & 6 deletions apps/element-storybook/.storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from 'react';
import { themes } from '@storybook/theming';
import { Preview } from '@storybook/react';
import { Title, Subtitle, Description, Primary, Controls, Stories, useOf } from '@storybook/blocks';
import type { StoryContext } from '@storybook/types';
import React from 'react';
import { themes } from 'storybook/theming';
import { Preview } from '@storybook/react-vite';
import { Title, Subtitle, Description, Primary, Controls, Stories, useOf } from '@storybook/addon-docs/blocks';
import type { StoryContext } from 'storybook/internal/types';
import { ThemeProvider } from '@availity/theme-provider';

const withThemeProvider = (Story: () => React.JSX.Element, context: StoryContext) => {
Expand Down Expand Up @@ -93,7 +93,9 @@ if (typeof global.process === 'undefined') {
import('../../../packages/mock/src/lib/browser').then(({ worker }) => {
const config =
process.env.NODE_ENV === 'development'
? undefined
? {
onUnhandledRequest: 'bypass',
}
: {
serviceWorker: { url: '/element/mockServiceWorker.js' },
onUnhandledRequest: 'bypass',
Expand Down
3 changes: 1 addition & 2 deletions apps/element-storybook/src/FormComponents.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Markdown } from '@storybook/blocks';
import { Meta, Source } from '@storybook/blocks';
import { Markdown, Meta, Source } from '@storybook/addon-docs/blocks';
import {
AutocompleteExample,
AsyncAutocompleteExample,
Expand Down
2 changes: 1 addition & 1 deletion apps/element-storybook/src/accessibility.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from '@storybook/addon-docs';
import { Meta } from '@storybook/addon-docs/blocks';
import storybook_accessibility from '../../../static/storybook_accessibility.png';
import level_access_accessibility from '../../../static/level_access_accessibility.png';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Each exported component in the package should have its own stories file
// import React, { useState } from 'react';
import type { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react-vite';
import dayjs from 'dayjs';
import * as yup from 'yup';
import { yupResolver } from '@hookform/resolvers/yup';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ export const Form = () => (
<summary>Code example</summary>

```tsx
import type { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react-vite';
import dayjs from 'dayjs';
import * as yup from 'yup';
import { yupResolver } from '@hookform/resolvers/yup';
Expand Down
3 changes: 1 addition & 2 deletions apps/element-storybook/src/bs4-migration/migration.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Markdown } from '@storybook/blocks';
import { Meta, Source } from '@storybook/blocks';
import { Markdown, Meta, Source } from '@storybook/addon-docs/blocks';
import {
BadgeExample,
ChipExample,
Expand Down
3 changes: 1 addition & 2 deletions apps/element-storybook/src/contributing.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Markdown } from '@storybook/blocks';
import { Meta } from '@storybook/addon-docs';
import { Markdown, Meta } from '@storybook/addon-docs/blocks';
import ReadMe from '../../../.github/CONTRIBUTING.md?raw';

<Meta title="Contributing" />
Expand Down
2 changes: 1 addition & 1 deletion apps/element-storybook/src/layouts/form/Form.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Each exported component in the package should have its own stories file
import React, { useState } from 'react';
import type { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react-vite';
import dayjs from 'dayjs';
import {
BlockUi,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState } from 'react';
import { StoryObj, Meta } from '@storybook/react';
import { StoryObj, Meta } from '@storybook/react-vite';
import { Container, Grid } from '@availity/element';
import { HeaderSection } from './HeaderSection';
import { SearchSection } from './SearchSection';
Expand All @@ -16,7 +16,7 @@ import { DataGridSection } from './DataGridSection';
* Sidebar layout that includes header, sidenav, search section, & tables. */
const meta: Meta = {
title: 'Sample Layouts/Sidebar',
tags: ['autodocs', 'hideInSidebar'],
tags: ['!autodocs', '!dev'],
};

/** */
Expand Down
2 changes: 1 addition & 1 deletion apps/element-storybook/src/support.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from '@storybook/addon-docs';
import { Meta } from '@storybook/addon-docs/blocks';

<Meta title="Support" />

Expand Down
2 changes: 1 addition & 1 deletion apps/element-storybook/src/upgrading-to-v1.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from '@storybook/addon-docs';
import { Meta } from '@storybook/addon-docs/blocks';

<Meta title="Upgrading to v1" />

Expand Down
2 changes: 1 addition & 1 deletion apps/element-storybook/src/upgrading-to-v2.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from '@storybook/addon-docs';
import { Meta } from '@storybook/addon-docs/blocks';

<Meta title="Upgrading to v2" />

Expand Down
3 changes: 1 addition & 2 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,5 @@
}
]
},
"useInferencePlugins": false,
"useLegacyCache": true
"useInferencePlugins": false
}
Loading