@jetbrains/ring-ui 7.0.107 → 7.0.109

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.
Files changed (38) hide show
  1. package/components/alert-service/alert-service.d.ts +2 -2
  2. package/components/alert-service/alert-service.js +2 -2
  3. package/components/button-group/button-group.js +14 -4
  4. package/components/checkbox/checkbox.d.ts +1 -0
  5. package/components/checkbox/checkbox.js +3 -2
  6. package/components/date-picker/animate-date.d.ts +1 -0
  7. package/components/date-picker/animate-date.js +33 -0
  8. package/components/date-picker/consts.d.ts +21 -4
  9. package/components/date-picker/consts.js +16 -0
  10. package/components/date-picker/date-picker.css +27 -12
  11. package/components/date-picker/date-picker.d.ts +48 -1
  12. package/components/date-picker/date-picker.js +27 -1
  13. package/components/date-picker/date-popup.d.ts +3 -9
  14. package/components/date-picker/date-popup.js +27 -56
  15. package/components/date-picker/day.js +19 -15
  16. package/components/date-picker/month-names.js +28 -15
  17. package/components/date-picker/month-slider.d.ts +5 -20
  18. package/components/date-picker/month-slider.js +41 -43
  19. package/components/date-picker/month.d.ts +4 -0
  20. package/components/date-picker/month.js +34 -20
  21. package/components/date-picker/months.js +28 -81
  22. package/components/date-picker/scroll-arith.d.ts +35 -0
  23. package/components/date-picker/scroll-arith.js +65 -0
  24. package/components/date-picker/use-intersection-observer.d.ts +6 -0
  25. package/components/date-picker/use-intersection-observer.js +48 -0
  26. package/components/date-picker/use-scroll-behavior.d.ts +8 -0
  27. package/components/date-picker/use-scroll-behavior.js +94 -0
  28. package/components/date-picker/years.d.ts +1 -18
  29. package/components/date-picker/years.js +90 -70
  30. package/components/footer/footer.d.ts +1 -1
  31. package/components/global/dom.d.ts +1 -1
  32. package/components/global/dom.js +1 -1
  33. package/components/global/theme.js +2 -2
  34. package/components/heading/heading.d.ts +4 -4
  35. package/components/util-stories.d.ts +1 -0
  36. package/components/util-stories.js +1 -0
  37. package/package.json +40 -39
  38. package/typings.d.ts +5 -0
@@ -1,19 +1,2 @@
1
- import { PureComponent } from 'react';
2
1
  import { type CalendarProps } from './consts';
3
- interface YearsState {
4
- scrollDate: Date | null;
5
- }
6
- export default class Years extends PureComponent<CalendarProps> {
7
- state: {
8
- scrollDate: null;
9
- };
10
- componentDidMount(): void;
11
- componentDidUpdate(prevProps: CalendarProps, prevState: YearsState): void;
12
- componentWillUnmount(): void;
13
- stoppedScrolling?: boolean;
14
- setYear(date: number): void;
15
- componentRef: import("react").RefObject<HTMLDivElement | null>;
16
- handleWheel: (e: WheelEvent) => void;
17
- render(): import("react").JSX.Element;
18
- }
19
- export {};
2
+ export default function Years({ scrollDate, setScrollDate }: CalendarProps): import("react").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { createRef, PureComponent } from 'react';
1
+ import { useCallback, useEffect, useRef, useState } from 'react';
2
2
  import classNames from 'classnames';
3
3
  import { addYears } from 'date-fns/addYears';
4
4
  import { getYear } from 'date-fns/getYear';
@@ -7,75 +7,95 @@ import { isSameYear } from 'date-fns/isSameYear';
7
7
  import { isThisYear } from 'date-fns/isThisYear';
8
8
  import { setYear } from 'date-fns/setYear';
9
9
  import { startOfYear } from 'date-fns/startOfYear';
10
- import { subYears } from 'date-fns/subYears';
11
- import linearFunction from '../global/linear-function';
12
- import units, { DOUBLE, HALF, yearDuration } from './consts';
10
+ import units, { calendarSyncOnYearScrollUpdateDelay, yearsAnimationDuration, } from './consts';
11
+ import { ScrollArith } from './scroll-arith';
12
+ import { useScrollBehavior } from './use-scroll-behavior';
13
+ import { animateDate } from './animate-date';
14
+ import scheduleRAF from '../global/schedule-raf';
15
+ import { useIntersectionObserver, useVisibility } from './use-intersection-observer';
13
16
  import styles from './date-picker.css';
14
- const { yearHeight, calHeight } = units;
15
- let scrollTO;
16
- const YEARSBACK = 5;
17
- const scrollDelay = 100;
18
- export default class Years extends PureComponent {
19
- state = { scrollDate: null };
20
- componentDidMount() {
21
- if (this.componentRef.current) {
22
- this.componentRef.current.addEventListener('wheel', this.handleWheel);
23
- }
24
- }
25
- componentDidUpdate(prevProps, prevState) {
26
- this.stoppedScrolling = !!prevState.scrollDate && !this.state.scrollDate;
27
- }
28
- componentWillUnmount() {
29
- if (this.componentRef.current) {
30
- this.componentRef.current.removeEventListener('wheel', this.handleWheel);
31
- }
32
- }
33
- stoppedScrolling;
34
- setYear(date) {
35
- if (scrollTO) {
36
- window.clearTimeout(scrollTO);
37
- scrollTO = null;
38
- }
39
- this.setState({ scrollDate: null });
40
- this.props.onScroll(Number(setYear(this.props.scrollDate, getYear(date))));
41
- }
42
- componentRef = createRef();
43
- handleWheel = (e) => {
44
- const { scrollDate } = this.props;
45
- const date = this.state.scrollDate || scrollDate;
46
- e.preventDefault();
47
- const newScrollDate = linearFunction(0, Number(date), yearDuration / yearHeight).y(e.deltaY);
48
- this.setState({
49
- scrollDate: newScrollDate,
17
+ const { yearHeight } = units;
18
+ const scrollArith = new ScrollArith({
19
+ itemsAround: 100,
20
+ floorToItem: startOfYear,
21
+ shiftItems: addYears,
22
+ getItemHeight: () => yearHeight,
23
+ });
24
+ const scheduleScroll = scheduleRAF();
25
+ /**
26
+ * Reduces "empty" years during fast scrolling.
27
+ */
28
+ const intersectionObserverScrollMargin = units.calHeight / 2;
29
+ export default function Years({ scrollDate, setScrollDate }) {
30
+ const [localScrollDate, setLocalScrollDate] = useState(scrollDate);
31
+ const syncCleanupRef = useRef(null);
32
+ const animationCleanupRef = useRef(null);
33
+ const syncCalendarScrollDate = useCallback((newLocalScrollDate) => {
34
+ syncCleanupRef.current?.();
35
+ animationCleanupRef.current?.();
36
+ let timerId = window.setTimeout(() => {
37
+ const newScrollDateWithPreservedMonthAndDay = setYear(scrollDate.date, getYear(newLocalScrollDate.date));
38
+ setScrollDate({
39
+ date: newScrollDateWithPreservedMonthAndDay,
40
+ source: 'yearsScroll',
41
+ });
42
+ animationCleanupRef.current = animateDate(newLocalScrollDate.date, newScrollDateWithPreservedMonthAndDay, date => {
43
+ setLocalScrollDate({
44
+ date,
45
+ source: 'other',
46
+ });
47
+ }, yearsAnimationDuration);
48
+ }, calendarSyncOnYearScrollUpdateDelay);
49
+ syncCleanupRef.current = () => {
50
+ if (timerId != null) {
51
+ window.clearTimeout(timerId);
52
+ timerId = null;
53
+ }
54
+ };
55
+ }, [scrollDate, setScrollDate, setLocalScrollDate]);
56
+ useEffect(() => function cleanup() {
57
+ syncCleanupRef.current?.();
58
+ animationCleanupRef.current?.();
59
+ }, []);
60
+ useEffect(function syncLocalScrollDate() {
61
+ if (scrollDate.source === 'yearsScroll')
62
+ return;
63
+ let timerId = window.setTimeout(() => {
64
+ setLocalScrollDate(scrollDate);
65
+ timerId = null;
50
66
  });
51
- if (scrollTO) {
52
- window.clearTimeout(scrollTO);
53
- }
54
- scrollTO = window.setTimeout(() => this.setYear(newScrollDate), scrollDelay);
55
- };
56
- render() {
57
- const { onScrollChange, scrollDate } = this.props;
58
- const date = this.state.scrollDate || scrollDate;
59
- const yearStart = startOfYear(date);
60
- let year = subYears(yearStart, YEARSBACK);
61
- const years = [year];
62
- for (let i = 0; i < YEARSBACK * DOUBLE; i++) {
63
- year = addYears(year, 1);
64
- years.push(year);
65
- }
66
- const pxToDate = linearFunction(0, Number(years[0]), yearDuration / yearHeight);
67
- return (<div className={styles.years} ref={this.componentRef} style={{
68
- transition: this.stoppedScrolling ? 'top .2s ease-out 0s' : 'none',
69
- top: Math.floor(calHeight * HALF - pxToDate.x(Number(date))),
70
- }}>
71
- {years.map(item => (<button type='button' key={+item} className={classNames(styles.year, {
72
- [styles.currentYear]: isSameYear(item, date),
73
- [styles.today]: isThisYear(item),
74
- })} onClick={function handleClick() {
75
- onScrollChange(Number(setYear(scrollDate, getYear(item))));
76
- }}>
77
- {format(item, 'yyyy')}
78
- </button>))}
79
- </div>);
80
- }
67
+ return () => {
68
+ if (timerId != null) {
69
+ window.clearTimeout(timerId);
70
+ timerId = null;
71
+ }
72
+ };
73
+ }, [scrollDate, setLocalScrollDate]);
74
+ const handleYearClick = useCallback((year) => {
75
+ const newScrollDate = setYear(localScrollDate.date, getYear(year));
76
+ setScrollDate({
77
+ date: newScrollDate,
78
+ source: 'yearsScroll',
79
+ });
80
+ syncCleanupRef.current?.();
81
+ animationCleanupRef.current?.();
82
+ animationCleanupRef.current = animateDate(localScrollDate.date, newScrollDate, date => {
83
+ setLocalScrollDate({
84
+ date,
85
+ source: 'other',
86
+ });
87
+ }, yearsAnimationDuration);
88
+ }, [localScrollDate.date, setScrollDate]);
89
+ const { containerRef, items } = useScrollBehavior(localScrollDate, syncCalendarScrollDate, undefined, 'yearsScroll', scrollArith, scheduleScroll);
90
+ const intersectionObserverHandle = useIntersectionObserver(containerRef, intersectionObserverScrollMargin);
91
+ return (<div className={styles.years} ref={containerRef} data-test='ring-date-popup--years'>
92
+ {items.map(year => (<Year year={year} scrollDate={localScrollDate.date} handleYearClick={handleYearClick} key={+year} intersectionObserverHandle={intersectionObserverHandle}/>))}
93
+ </div>);
94
+ }
95
+ function Year({ year, scrollDate, handleYearClick, intersectionObserverHandle, }) {
96
+ const buttonRef = useRef(null);
97
+ const visible = useVisibility(intersectionObserverHandle, buttonRef);
98
+ return (<button type='button' ref={buttonRef} key={+year} disabled={!visible} className={classNames(styles.year, visible && isSameYear(year, scrollDate) && styles.currentYear, visible && isThisYear(year) && styles.today)} onClick={visible ? () => handleYearClick(year) : undefined}>
99
+ {visible ? format(year, 'yyyy') : '\u00A0'}
100
+ </button>);
81
101
  }
@@ -24,5 +24,5 @@ export interface FooterProps {
24
24
  center?: FooterItems | null | undefined;
25
25
  right?: FooterItems | null | undefined;
26
26
  }
27
- declare const Footer: import("react").NamedExoticComponent<FooterProps>;
27
+ declare const Footer: import("react").MemoExoticComponent<({ floating, className, left, center, right }: FooterProps) => import("react").JSX.Element>;
28
28
  export default Footer;
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { type SyntheticEvent } from 'react';
5
5
  import type { PropertiesHyphen } from 'csstype';
6
- export declare const getStyles: ((elt: Element, pseudoElt?: string | null) => CSSStyleDeclaration) & typeof getComputedStyle;
6
+ export declare const getStyles: typeof window.getComputedStyle;
7
7
  export declare function isMounted(node: Node | Range | null | undefined): boolean;
8
8
  export interface Rect {
9
9
  top: number;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @name DOM
3
3
  */
4
- export const getStyles = window.getComputedStyle.bind(window);
4
+ export const getStyles = (...args) => window.getComputedStyle(...args);
5
5
  export function isMounted(node) {
6
6
  if (node === document) {
7
7
  return true;
@@ -12,9 +12,9 @@ export const ThemeContext = createContext({
12
12
  theme: Theme.LIGHT,
13
13
  });
14
14
  export const GLOBAL_DARK_CLASS_NAME = 'ring-ui-theme-dark';
15
- const darkMatcher = window.matchMedia('(prefers-color-scheme: dark)');
15
+ const darkMatcher = typeof window !== 'undefined' ? window.matchMedia('(prefers-color-scheme: dark)') : undefined;
16
16
  export function useTheme() {
17
- const [dark, setDark] = useState(darkMatcher.matches);
17
+ const [dark, setDark] = useState(darkMatcher?.matches ?? false);
18
18
  useEffect(() => {
19
19
  const onChange = (e) => setDark(e.matches);
20
20
  darkMatcher.addEventListener('change', onChange);
@@ -15,11 +15,11 @@ declare const Heading: ComponentType<HeadingProps> & {
15
15
  Levels: typeof Levels;
16
16
  };
17
17
  export default Heading;
18
- declare const H1: import("react").NamedExoticComponent<HTMLAttributes<HTMLHeadingElement>>;
19
- declare const H2: import("react").NamedExoticComponent<HTMLAttributes<HTMLHeadingElement>>;
20
- declare const H3: import("react").NamedExoticComponent<HTMLAttributes<HTMLHeadingElement>>;
18
+ declare const H1: import("react").MemoExoticComponent<(props: HTMLAttributes<HTMLHeadingElement>) => import("react").JSX.Element>;
19
+ declare const H2: import("react").MemoExoticComponent<(props: HTMLAttributes<HTMLHeadingElement>) => import("react").JSX.Element>;
20
+ declare const H3: import("react").MemoExoticComponent<(props: HTMLAttributes<HTMLHeadingElement>) => import("react").JSX.Element>;
21
21
  export interface H4Props extends HTMLAttributes<HTMLHeadingElement> {
22
22
  bold?: boolean | null | undefined;
23
23
  }
24
- declare const H4: import("react").NamedExoticComponent<H4Props>;
24
+ declare const H4: import("react").MemoExoticComponent<({ className, bold, ...restProps }: H4Props) => import("react").JSX.Element>;
25
25
  export { H1, H2, H3, H4 };
@@ -0,0 +1 @@
1
+ export declare const hideAddonsPanelParam = "hideAddonsPanel";
@@ -0,0 +1 @@
1
+ export const hideAddonsPanelParam = 'hideAddonsPanel';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetbrains/ring-ui",
3
- "version": "7.0.107",
3
+ "version": "7.0.109",
4
4
  "description": "JetBrains UI library",
5
5
  "author": {
6
6
  "name": "JetBrains"
@@ -103,26 +103,26 @@
103
103
  "@babel/eslint-parser": "^7.28.6",
104
104
  "@csstools/css-parser-algorithms": "^4.0.0",
105
105
  "@csstools/stylelint-no-at-nest-rule": "^5.0.0",
106
- "@eslint/compat": "^2.0.3",
106
+ "@eslint/compat": "^2.1.0",
107
107
  "@eslint/eslintrc": "^3.3.5",
108
108
  "@eslint/js": "^10.0.1",
109
- "@figma/code-connect": "^1.4.1",
109
+ "@figma/code-connect": "^1.4.4",
110
110
  "@jetbrains/eslint-config": "^6.0.5",
111
111
  "@jetbrains/logos": "3.0.0-canary.734b213.0",
112
112
  "@jetbrains/rollup-css-plugin": "./packages/rollup-css-plugin",
113
113
  "@jetbrains/stylelint-config": "^4.0.2",
114
114
  "@jetbrains/typescript-plugin-css-modules": "^5.3.1",
115
- "@primer/octicons": "^19.22.0",
115
+ "@primer/octicons": "^19.25.0",
116
116
  "@rollup/plugin-babel": "^7.0.0",
117
117
  "@rollup/plugin-json": "^6.1.0",
118
118
  "@rollup/plugin-node-resolve": "^16.0.3",
119
119
  "@rollup/plugin-replace": "^6.0.3",
120
- "@storybook/addon-a11y": "10.2.16",
121
- "@storybook/addon-docs": "^10.2.16",
122
- "@storybook/addon-themes": "^10.2.16",
120
+ "@storybook/addon-a11y": "10.3.6",
121
+ "@storybook/addon-docs": "^10.3.6",
122
+ "@storybook/addon-themes": "^10.3.6",
123
123
  "@storybook/csf": "^0.1.13",
124
- "@storybook/react-webpack5": "10.2.16",
125
- "@storybook/test-runner": "^0.24.2",
124
+ "@storybook/react-webpack5": "10.3.6",
125
+ "@storybook/test-runner": "^0.24.3",
126
126
  "@testing-library/dom": "^10.4.1",
127
127
  "@testing-library/react": "^16.3.2",
128
128
  "@testing-library/user-event": "^14.6.1",
@@ -132,15 +132,15 @@
132
132
  "@types/react": "^19.2.14",
133
133
  "@types/react-dom": "^19.2.3",
134
134
  "@types/webpack-env": "^1.18.8",
135
- "@vitejs/plugin-react": "^5.1.4",
136
- "@vitest/eslint-plugin": "^1.6.9",
135
+ "@vitejs/plugin-react": "^6.0.1",
136
+ "@vitest/eslint-plugin": "^1.6.17",
137
137
  "acorn": "^8.16.0",
138
138
  "babel-plugin-require-context-hook": "^1.0.0",
139
139
  "caniuse-lite": "^1.0.30001777",
140
140
  "chai-as-promised": "^8.0.2",
141
141
  "chai-dom": "^1.12.1",
142
142
  "cheerio": "^1.2.0",
143
- "core-js": "^3.48.0",
143
+ "core-js": "^3.49.0",
144
144
  "cpy-cli": "^7.0.0",
145
145
  "dotenv-cli": "^11.0.0",
146
146
  "eslint": "^9.39.2",
@@ -148,50 +148,51 @@
148
148
  "eslint-formatter-jslint-xml": "^9.0.1",
149
149
  "eslint-import-resolver-exports": "^1.0.0-beta.5",
150
150
  "eslint-import-resolver-typescript": "^4.4.4",
151
- "eslint-import-resolver-webpack": "^0.13.10",
151
+ "eslint-import-resolver-webpack": "^0.13.11",
152
152
  "eslint-plugin-import": "^2.32.0",
153
153
  "eslint-plugin-jsx-a11y": "^6.10.2",
154
154
  "eslint-plugin-prettier": "^5.5.5",
155
155
  "eslint-plugin-react": "^7.37.5",
156
- "eslint-plugin-react-hooks": "^7.0.1",
157
- "eslint-plugin-storybook": "^10.2.16",
158
- "eslint-plugin-unicorn": "^63.0.0",
156
+ "eslint-plugin-react-hooks": "^7.1.1",
157
+ "eslint-plugin-storybook": "^10.3.6",
158
+ "eslint-plugin-unicorn": "^64.0.0",
159
159
  "events": "^3.3.0",
160
160
  "glob": "^13.0.6",
161
- "globals": "^17.4.0",
162
- "html-webpack-plugin": "^5.6.6",
161
+ "globals": "^17.6.0",
162
+ "html-webpack-plugin": "^5.6.7",
163
163
  "http-server": "^14.1.1",
164
164
  "husky": "^9.1.7",
165
165
  "identity-obj-proxy": "^3.0.0",
166
- "jest": "~30.2.0",
167
- "jest-environment-jsdom": "^30.2.0",
166
+ "jest": "~30.4.2",
167
+ "jest-environment-jsdom": "^30.4.1",
168
168
  "jest-teamcity": "^1.12.0",
169
- "lint-staged": "^16.3.2",
169
+ "lint-staged": "^17.0.4",
170
170
  "markdown-it": "^14.1.1",
171
171
  "merge-options": "^3.0.4",
172
172
  "pinst": "^3.0.0",
173
- "prettier": "^3.8.1",
173
+ "prettier": "^3.8.3",
174
174
  "raw-loader": "^4.0.2",
175
- "react": "^19.2.4",
176
- "react-dom": "^19.2.4",
175
+ "react": "^19.2.6",
176
+ "react-dom": "^19.2.6",
177
177
  "regenerator-runtime": "^0.14.1",
178
178
  "rimraf": "^6.1.3",
179
- "rollup": "^4.59.0",
179
+ "rollup": "^4.60.3",
180
180
  "rollup-plugin-clear": "^2.0.7",
181
181
  "storage-mock": "^2.1.0",
182
- "storybook": "10.2.16",
183
- "stylelint": "^17.4.0",
182
+ "storybook": "10.3.6",
183
+ "stylelint": "^17.11.0",
184
184
  "stylelint-config-sass-guidelines": "^13.0.0",
185
185
  "svg-inline-loader": "^0.8.2",
186
186
  "teamcity-service-messages": "^0.1.14",
187
- "terser-webpack-plugin": "^5.3.17",
187
+ "terser-webpack-plugin": "^5.6.0",
188
188
  "typed-css-modules": "^0.9.1",
189
- "typescript": "~5.9.3",
190
- "typescript-eslint": "^8.56.1",
191
- "vitest": "^4.0.18",
189
+ "typescript": "~6.0.3",
190
+ "typescript-eslint": "^8.59.3",
191
+ "vite": "^8.0.11",
192
+ "vitest": "^4.1.5",
192
193
  "vitest-teamcity-reporter": "^0.4.1",
193
- "webpack": "^5.105.4",
194
- "webpack-cli": "^7.0.0",
194
+ "webpack": "^5.106.2",
195
+ "webpack-cli": "^7.0.2",
195
196
  "xmlappend": "^1.0.4"
196
197
  },
197
198
  "peerDependencies": {
@@ -217,16 +218,16 @@
217
218
  "@babel/core": "^7.29.0",
218
219
  "@babel/preset-typescript": "^7.28.5",
219
220
  "@jetbrains/babel-preset-jetbrains": "^2.4.0",
220
- "@jetbrains/icons": "^5.17.0",
221
+ "@jetbrains/icons": "^5.22.0",
221
222
  "@jetbrains/postcss-require-hover": "^0.2.0",
222
223
  "@types/combokeys": "^2.4.9",
223
224
  "@types/element-resize-detector": "^1.1.6",
224
225
  "@types/react-virtualized": "9.22.3",
225
226
  "@types/util-deprecate": "^1.0.4",
226
- "babel-loader": "10.1.0",
227
+ "babel-loader": "10.1.1",
227
228
  "babel-plugin-react-compiler": "^1.0.0",
228
229
  "babel-plugin-transform-define": "^2.1.4",
229
- "browserslist": "^4.28.1",
230
+ "browserslist": "^4.28.2",
230
231
  "change-case": "^4.1.1",
231
232
  "classnames": "^2.5.1",
232
233
  "combokeys": "^3.0.1",
@@ -237,16 +238,16 @@
237
238
  "element-resize-detector": "^1.2.4",
238
239
  "fastdom": "^1.0.12",
239
240
  "file-loader": "^6.2.0",
240
- "focus-trap": "^8.0.0",
241
+ "focus-trap": "^8.2.0",
241
242
  "highlight.js": "^10.7.2",
242
243
  "just-debounce-it": "^3.2.0",
243
244
  "memoize-one": "^6.0.0",
244
- "postcss": "^8.5.8",
245
+ "postcss": "^8.5.14",
245
246
  "postcss-calc": "^10.1.1",
246
247
  "postcss-font-family-system-ui": "^5.0.0",
247
248
  "postcss-loader": "^8.2.1",
248
249
  "postcss-modules-values-replace": "^4.2.2",
249
- "postcss-preset-env": "^11.2.0",
250
+ "postcss-preset-env": "^11.2.1",
250
251
  "react-compiler-runtime": "^1.0.0",
251
252
  "react-movable": "^3.4.1",
252
253
  "react-virtualized": "^9.22.6",
package/typings.d.ts CHANGED
@@ -3,6 +3,11 @@ declare module '*.svg' {
3
3
  export default source;
4
4
  }
5
5
 
6
+ declare module 'file-loader?*' {
7
+ const source: string;
8
+ export default source;
9
+ }
10
+
6
11
  declare module '*.png' {
7
12
  const source: string;
8
13
  export default source;