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
28 changes: 0 additions & 28 deletions .eslintrc

This file was deleted.

13 changes: 3 additions & 10 deletions .github/workflows/deploy-storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,17 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set Git user identity
run: |
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"

- name: Setup Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: '18.x'

- name: Configure npm for GitHub Packages
run: |
echo "registry=https://registry.yarnpkg.com/" > .npmrc
echo "@internxt:registry=https://npm.pkg.github.com" >> .npmrc
echo "//npm.pkg.github.com/:_authToken=${{ secrets.PERSONAL_ACCESS_TOKEN }}" >> .npmrc
echo "always-auth=true" >> .npmrc
node-version: '22.x'

- name: Install dependencies
run: yarn install
Expand Down
4 changes: 1 addition & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn run lint; npx lint-staged; yarn run test
yarn run lint; npx lint-staged; yarn run test
6 changes: 2 additions & 4 deletions .npmrc.template
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
registry=https://registry.yarnpkg.com/

@internxt:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=TOKEN
always-auth=true

@internxt:registry=https://registry.yarnpkg.com/
10 changes: 4 additions & 6 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,18 @@ import type { StorybookConfig } from '@storybook/react-vite';

const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],

addons: [
'@storybook/addon-onboarding',
'@storybook/addon-links',
'@storybook/addon-essentials',
'@chromatic-com/storybook',
'@storybook/addon-interactions',
'@storybook/addon-themes',
'@storybook/addon-docs'
],

framework: {
name: '@storybook/react-vite',
options: {},
},
docs: {
autodocs: 'tag',
},
}
};
export default config;
2 changes: 1 addition & 1 deletion .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Preview } from '@storybook/react';
import type { Preview } from '@storybook/react-vite';
import { withThemeByClassName } from '@storybook/addon-themes';

import '../src/index.scss';
Expand Down
19 changes: 19 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import eslintConfigInternxt from '@internxt/eslint-config-internxt';
import eslintPluginStorybook from 'eslint-plugin-storybook';
import typescriptParser from '@typescript-eslint/parser';

export default [
...eslintPluginStorybook.configs['flat/recommended'],
...eslintConfigInternxt,
{
languageOptions: {
parser: typescriptParser
},
rules: {
'@typescript-eslint/no-explicit-any': 'warn',
'react/react-in-jsx-scope': 'off',
},
ignores: ['dist', 'tmp', 'scripts', 'node_modules', '!.storybook'],
}
];

94 changes: 44 additions & 50 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@internxt/ui",
"version": "0.0.27",
"version": "0.1.0",
"description": "Library of Internxt components",
"repository": {
"type": "git",
Expand All @@ -17,63 +17,57 @@
"/dist"
],
"peerDependencies": {
"@phosphor-icons/react": "^2.1.7",
"@phosphor-icons/react": "^2.1.10",
"react": "^18.3.1",
"react-dnd": "14.0.5",
"react-dnd-html5-backend": "^14.1.0"
},
"resolutions": {
"jackspeak": "2.1.1"
"react-dnd": "16.0.1",
"react-dnd-html5-backend": "^16.0.1"
},
"devDependencies": {
"@chromatic-com/storybook": "^1.9.0",
"@internxt/eslint-config-internxt": "^1.0.10",
"@chromatic-com/storybook": "4.1.3",
"@internxt/eslint-config-internxt": "2.0.1",
"@internxt/prettier-config": "internxt/prettier-config#v1.0.2",
"@storybook/addon-essentials": "^8.5.3",
"@storybook/addon-interactions": "^8.5.3",
"@storybook/addon-links": "^8.5.3",
"@storybook/addon-onboarding": "^8.5.3",
"@storybook/addon-themes": "^8.5.3",
"@storybook/blocks": "^8.5.3",
"@storybook/react": "^8.5.3",
"@storybook/react-vite": "^8.5.3",
"@storybook/test": "^8.5.3",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.2.0",
"@storybook/addon-links": "^10.1.3",
"@storybook/addon-onboarding": "^10.1.3",
"@storybook/addon-themes": "^10.1.3",
"@storybook/blocks": "^8.6.14",
"@storybook/preview-api": "^8.6.14",
"@storybook/react": "^10.1.3",
"@storybook/react-vite": "^10.1.3",
"@storybook/test": "^8.6.14",
"@tailwindcss/postcss": "^4.1.17",
"@testing-library/dom": "^10.4.1",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.0",
"@testing-library/user-event": "^14.6.1",
"@types/lodash": "^4.17.15",
"@types/lodash": "^4.17.21",
"@types/react": "^18.3.18",
"@types/react-dom": "^18.3.5",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@vitest/coverage-istanbul": "^2.1.9",
"@vitest/ui": "^2.1.9",
"eslint": "^8.57.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.3",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-storybook": "^0.8.0",
"@typescript-eslint/parser": "^8.48.1",
"@vitest/coverage-istanbul": "^3.2.4",
"@vitest/ui": "^3.2.4",
"eslint": "^9.39.1",
"eslint-plugin-storybook": "^10.1.3",
"gh-pages": "^6.3.0",
"husky": "^9.1.7",
"jsdom": "^24.1.3",
"lint-staged": "^15.4.3",
"prettier": "^3.4.2",
"prettier-plugin-tailwindcss": "^0.5.14",
"jsdom": "^27.2.0",
"lint-staged": "^16.2.7",
"postcss": "^8.5.6",
"prettier": "^3.7.3",
"react": "^18.3.1",
"react-dnd": "16.0.1",
"react-dnd-html5-backend": "^14.1.0",
"sass": "^1.84.0",
"storybook": "^8.5.3",
"tailwindcss": "^3.4.17",
"typescript": "^5.7.3",
"vite": "^5.4.19",
"react-dnd-html5-backend": "^16.0.1",
"react-dom": "^18.3.1",
"sass": "^1.94.2",
"storybook": "^10.1.3",
"tailwindcss": "^4.1.17",
"typescript": "^5.9.3",
"vite": "^7.2.6",
"vite-plugin-css-injected-by-js": "^3.5.2",
"vite-plugin-dts": "^3.9.1",
"vite-plugin-svgr": "^4.3.0",
"vite-plugin-dts": "^4.5.4",
"vite-plugin-svgr": "^4.5.0",
"vite-tsconfig-paths": "^5.1.4",
"vitest": "^2.1.9"
"vitest": "^3.2.4",
"@storybook/addon-docs": "^10.1.3"
},
"scripts": {
"build:tsc": "tsc",
Expand All @@ -83,7 +77,7 @@
"predeploy": "yarn storybook:build",
"deploy": "gh-pages -d storybook-static -b storybook-ui",
"format": "prettier --write --parser typescript '**/*.{ts,tsx}'",
"lint": "eslint . --ext .ts,.tsx --ignore-path .gitignore --fix",
"lint": "eslint ./src --ext .ts,.tsx --fix",
"test": "vitest run",
"test:update": "vitest run -u",
"test:watch": "vitest",
Expand All @@ -93,10 +87,10 @@
"storybook:build": "storybook build"
},
"dependencies": {
"@internxt/css-config": "1.0.5",
"@phosphor-icons/react": "^2.1.7",
"@radix-ui/react-switch": "^1.1.3",
"@radix-ui/themes": "^3.2.0"
"@internxt/css-config": "1.1.0",
"@phosphor-icons/react": "^2.1.10",
"@radix-ui/react-switch": "^1.2.6",
"@radix-ui/themes": "^3.2.1"
},
"lint-staged": {
"*.{ts,tsx}": [
Expand Down
5 changes: 0 additions & 5 deletions postcss.config.js

This file was deleted.

5 changes: 5 additions & 0 deletions postcss.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default {
plugins: {
'@tailwindcss/postcss': {},
}
};
3 changes: 1 addition & 2 deletions src/components/loader/__test__/Loader.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import { render } from '@testing-library/react';
import { expect } from 'chai';
import { afterEach, describe, it, vi } from 'vitest';
import { afterEach, describe, expect, it, vi } from 'vitest';
import { Loader } from '../';

describe('Loader Component', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`__default_name_ 1`] = `
exports[`Loader Component > should match snapshot 1`] = `
{
"asFragment": [Function],
"baseElement": <body>
Expand Down
10 changes: 5 additions & 5 deletions src/components/slider/__test__/RangeSlider.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ import { render, screen, fireEvent } from '@testing-library/react';
import { RangeSlider } from '../';

describe('RangeSlider component', () => {
it('should match snapshot', () => {
const loader = render(<RangeSlider value={50} max={100} onChange={() => { }} />);
expect(loader).toMatchSnapshot();
});

it('RangeSlider onChange should work correctly', () => {
const handleChange = vi.fn();
render(<RangeSlider value={50} max={100} onChange={handleChange} />);
Expand All @@ -15,9 +20,4 @@ describe('RangeSlider component', () => {
expect(handleChange).toHaveBeenCalledOnce();
expect(handleChange).toHaveBeenCalledWith(75);
});

it('RangeSlider component should render correctly', () => {
const { container } = render(<RangeSlider value={50} max={100} onChange={() => {}} />);
expect(container).toMatchSnapshot();
});
});
Loading