Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! fixup! Rename JavaScript files to TypeScr…
Browse files Browse the repository at this point in the history
…ipt files
  • Loading branch information
radek.stary committed Apr 28, 2023
1 parent fa713b8 commit 516cbc4
Show file tree
Hide file tree
Showing 38 changed files with 2,001 additions and 1,588 deletions.
2 changes: 2 additions & 0 deletions declaration.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
declare module '*.css';
declare module '*.scss';
31 changes: 31 additions & 0 deletions definitions.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
declare type Color = 'primary' | 'secondary' | 'selected' | 'success' | 'warning' | 'danger' | 'help' | 'info' | 'note' | 'light' | 'dark';
declare type Scrolling = 'auto' | 'custom' | 'none';
declare type Type = 'button' | 'submit';
declare type Align = 'top' | 'middle' | 'bottom' | 'baseline';
declare type Justify = 'start' | 'center' | 'end' | 'space-between' | 'stretch';
declare type InputType = 'email' | 'number' | 'password' | 'tel' | 'text';
declare type Breakpoint = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'x2l' | 'x3l' | 'none';
declare type Priority = 'filled' | 'outline' | 'flat';
declare type Size = 'small' | 'medium' | 'large';
declare type Position = 'before' | 'after';
declare type Validation = 'invalid' | 'valid' | 'warning';
declare type Layout = 'horizontal' | 'vertical';
declare type Placement = 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
declare type AutoScroll = 'always' | 'detectEnd' | 'off';
declare type Direction = 'asc' | 'desc';
declare type Hyphens = 'none' | 'auto' | 'manual';
declare type WordWrapping = 'normal' | 'long-words' | 'anywhere';
declare type VerticalModalPosition = 'top' | 'center';

declare type PredefinedLabelWidthValues = 'auto' | 'default' | 'limited';

// Test types

declare type AssertFn = (rootElement: HTMLElement) => void;

declare interface NonMandatoryProps {
[key: string]: unknown;
}

declare type TestingProps = [nonMandatoryProps, AssertFn];

6 changes: 6 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,25 @@ module.exports = {
moduleFileExtensions: [
'js',
'jsx',
'ts',
'tsx',
],
moduleNameMapper: {
'\\.scss$': 'identity-obj-proxy',
},
modulePathIgnorePatterns: [
'<rootDir>/.docz/',
],
preset: 'ts-jest',
setupFiles: [
'<rootDir>/tests/setupJest.js',
],
setupFilesAfterEnv: [
'<rootDir>/tests/setupTestingLibrary.js',
],
testEnvironment: 'jsdom',
transform: {
'^.+\\.(t|j)sx?$': 'ts-jest',
},
verbose: true,
};
Loading

0 comments on commit 516cbc4

Please sign in to comment.