@lumx/core 3.20.1-alpha.2 → 3.20.1-alpha.21

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.
package/CONTRIBUTING.md CHANGED
@@ -4,7 +4,7 @@ We'd love for you to contribute to our source code and to make it even better th
4
4
 
5
5
  ## Getting the source code
6
6
 
7
- To be able to contribute, you will have to use the global LumX package from our [GitHub repository](https://github.com/lumapps/design-system). You won't be able to contribute from the distributed packages `@lumx/<angularjs|react>`, so be sure to clone the repository before starting contributing:
7
+ To be able to contribute, you will have to use the global LumX package from our [GitHub repository](https://github.com/lumapps/design-system). You won't be able to contribute from the distributed packages, so be sure to clone the repository before starting contributing:
8
8
 
9
9
  ```bash
10
10
  git clone git@github.com:lumapps/design-system.git
@@ -25,10 +25,6 @@ Here are the guidelines we'd like you to follow.
25
25
  - [Coding rules](#coding-rules)
26
26
  - [Git commit guidelines](#git-commit-guidelines)
27
27
 
28
- ## <a name="code-of-conduct"></a> Code of Conduct
29
-
30
- As heavy users of [AngularJS](https://github.com/angular/angular.js) and [React](https://github.com/facebook/react/), we encourage you to read and follow the [AngularJS Code of Conduct](https://github.com/angular/code-of-conduct/blob/master/CODE_OF_CONDUCT.md) and the [React Code of Conduct](https://github.com/facebook/react/blob/master/CODE_OF_CONDUCT.md).
31
-
32
28
  ## <a name="got-a-question-or-a-problem-"></a> Got a question or a problem?
33
29
 
34
30
  If you have questions about how to use LumX, please direct these to [StackOverflow](http://stackoverflow.com/questions/tagged/LumX).
package/package.json CHANGED
@@ -6,7 +6,6 @@
6
6
  "url": "https://github.com/lumapps/design-system/issues"
7
7
  },
8
8
  "dependencies": {
9
- "@lumx/icons": "^3.20.1-alpha.2",
10
9
  "classnames": "^2.3.2",
11
10
  "focus-visible": "^5.0.2",
12
11
  "lodash": "4.17.21",
@@ -34,18 +33,15 @@
34
33
  "update-version-changelog": "yarn version-changelog ../../CHANGELOG.md"
35
34
  },
36
35
  "sideEffects": false,
37
- "version": "3.20.1-alpha.2",
36
+ "version": "3.20.1-alpha.21",
38
37
  "devDependencies": {
39
38
  "@rollup/plugin-commonjs": "^19.0.2",
40
39
  "@rollup/plugin-terser": "^0.4.4",
41
40
  "@rollup/plugin-typescript": "^12.1.4",
42
- "@testing-library/dom": "^9.3.4",
43
- "@testing-library/jest-dom": "^5.16.4",
44
41
  "@types/react": "^17.0.2",
45
42
  "autoprefixer": "^9.7.4",
46
43
  "glob": "^7.1.6",
47
44
  "postcss": "^8.5.6",
48
- "react": "^17.0.2",
49
45
  "rollup": "^2.79.1",
50
46
  "rollup-plugin-cleaner": "^1.0.0",
51
47
  "rollup-plugin-copy": "^3.5.0",
@@ -53,9 +49,5 @@
53
49
  "style-dictionary": "^3.9.0",
54
50
  "tinycolor2": "^1.4.1",
55
51
  "version-changelog": "^3.1.1"
56
- },
57
- "peerDependencies": {
58
- "moment": ">= 2",
59
- "moment-range": "^4.0.2"
60
52
  }
61
53
  }
@@ -1,40 +0,0 @@
1
- import { mdiEmail } from '@lumx/icons';
2
-
3
- import { Size } from '@lumx/core/js/constants';
4
- import { iconArgType } from '@lumx/core/stories/controls/icons';
5
- import { colorArgType, colorVariantArgType } from '@lumx/react/stories/controls/color';
6
- import { withUndefined } from '@lumx/react/stories/controls/withUndefined';
7
- import { Icon } from '.';
8
-
9
- const iconSizes = [Size.xxs, Size.xs, Size.s, Size.m, Size.l, Size.xl, Size.xxl];
10
-
11
- export default {
12
- argTypes: {
13
- icon: iconArgType,
14
- hasShape: { control: 'boolean' },
15
- color: colorArgType,
16
- colorVariant: colorVariantArgType,
17
- },
18
- args: Icon.defaultProps,
19
- };
20
-
21
- export const SizeAndShape = {
22
- args: {
23
- icon: mdiEmail,
24
- },
25
- argTypes: {
26
- hasShape: { control: false },
27
- size: { control: false },
28
- },
29
- getDecorators: ({ withCombinations }) => [
30
- withCombinations({
31
- combinations: {
32
- cols: { key: 'size', options: withUndefined(iconSizes) },
33
- rows: {
34
- Default: {},
35
- 'Has shape': { hasShape: true },
36
- },
37
- },
38
- }),
39
- ],
40
- };
@@ -1,120 +0,0 @@
1
- import { mdiAlertCircle } from '@lumx/icons';
2
- import { ColorPalette, ColorVariant, Size, Theme } from '@lumx/core/js/constants';
3
-
4
- import { getByClassName, getByTagName } from '@lumx/react/testing/utils/queries';
5
- import { IconProps, Icon } from '.';
6
-
7
- const CLASSNAME = Icon.className as string;
8
-
9
- type SetupProps = Partial<IconProps>;
10
-
11
- /**
12
- * Mounts the component and returns common DOM elements / data needed in multiple tests further down.
13
- */
14
- const setup = (propsOverride: SetupProps = {}, { wrapper, render }: any = {}) => {
15
- const props: IconProps = {
16
- icon: 'mdiPlus',
17
- ...propsOverride,
18
- };
19
-
20
- render(props, { wrapper });
21
-
22
- const i = getByClassName(document.body, CLASSNAME);
23
- const svg = getByTagName(i, 'svg');
24
- const path = getByTagName(svg, 'path');
25
-
26
- return { i, svg, path, props };
27
- };
28
-
29
- export default (render: any) => {
30
- describe(`<${Icon.displayName}>`, () => {
31
- describe('Props', () => {
32
- it('should render default', () => {
33
- const { i, svg, path, props } = setup({}, { render });
34
- expect(i).toBeInTheDocument();
35
- expect(i).toHaveClass(CLASSNAME);
36
- expect(i?.className).toMatchInlineSnapshot('"lumx-icon lumx-icon--no-shape lumx-icon--path"');
37
-
38
- expect(svg).toBeInTheDocument();
39
- expect(svg).toHaveAttribute('aria-hidden', 'true');
40
- expect(svg).not.toHaveAttribute('role');
41
-
42
- expect(path).toBeInTheDocument();
43
- expect(path).toHaveAttribute('d', props.icon);
44
- });
45
-
46
- it('should adapt svg with alternate text', () => {
47
- const { svg, props } = setup({ alt: 'Alternate text' }, { render });
48
- expect(svg).toHaveAttribute('aria-label', props.alt);
49
- expect(svg).not.toHaveAttribute('aria-hidden');
50
- expect(svg).toHaveAttribute('role');
51
- });
52
-
53
- describe('size', () => {
54
- it('should render size', () => {
55
- const { i } = setup({ size: Size.s }, { render });
56
- expect(i).toHaveClass('lumx-icon--size-s');
57
- });
58
-
59
- it('should adapt xxs size with hasShape', () => {
60
- const { i } = setup({ hasShape: true, size: Size.xxs }, { render });
61
- expect(i).toHaveClass('lumx-icon--size-s');
62
- });
63
-
64
- it('should adapt xs size with hasShape', () => {
65
- const { i } = setup({ hasShape: true, size: Size.xs }, { render });
66
- expect(i).toHaveClass('lumx-icon--size-s');
67
- });
68
-
69
- it('should adapt xxl size with hasShape', () => {
70
- const { i } = setup({ hasShape: true, size: Size.xxl }, { render });
71
- expect(i).toHaveClass('lumx-icon--size-xl');
72
- });
73
-
74
- it('should add default size with hasShape', () => {
75
- const { i } = setup({ hasShape: true }, { render });
76
- expect(i).toHaveClass('lumx-icon--size-m');
77
- });
78
- });
79
-
80
- describe('color', () => {
81
- it('should render color and color variant', () => {
82
- const { i } = setup(
83
- {
84
- color: ColorPalette.primary,
85
- colorVariant: ColorVariant.D1,
86
- },
87
- { render },
88
- );
89
- expect(i).toHaveClass('lumx-icon--color-primary lumx-icon--color-variant-D1');
90
- });
91
-
92
- it('should improve yellow icon color contrast with alert circle icon', () => {
93
- const { i } = setup(
94
- {
95
- color: ColorPalette.yellow,
96
- icon: mdiAlertCircle,
97
- },
98
- { render },
99
- );
100
- expect(i).toHaveClass('lumx-icon--color-yellow lumx-icon--has-dark-layer');
101
- });
102
-
103
- it('should set a default color on dark theme', () => {
104
- const { i } = setup({ theme: Theme.dark }, { render });
105
- expect(i).toHaveClass('lumx-icon--color-light lumx-icon--theme-dark');
106
- });
107
-
108
- it('should set a default color on has shape', () => {
109
- const { i } = setup({ hasShape: true }, { render });
110
- expect(i).toHaveClass('lumx-icon--color-dark lumx-icon--has-shape');
111
- });
112
-
113
- it('should set a default color variant on has shape & dark color', () => {
114
- const { i } = setup({ color: ColorPalette.dark, hasShape: true }, { render });
115
- expect(i).toHaveClass('lumx-icon--color-variant-L2 lumx-icon--color-dark lumx-icon--has-shape');
116
- });
117
- });
118
- });
119
- });
120
- };
@@ -1,134 +0,0 @@
1
- import classNames from 'classnames';
2
-
3
- import { mdiAlertCircle } from '@lumx/icons';
4
-
5
- import { GenericProps, HasTheme } from '../../types';
6
- import { getRootClassName, handleBasicClasses, resolveColorWithVariants } from '../../utils/className';
7
- import { ColorPalette, ColorVariant, ColorWithVariants, Size, Theme } from '../../constants';
8
-
9
- export type IconSizes = Extract<Size, 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl'>;
10
-
11
- /**
12
- * Defines the props of the component.
13
- */
14
- export interface IconProps extends GenericProps, HasTheme {
15
- /** Color variant. */
16
- color?: ColorWithVariants;
17
- /** Lightened or darkened variant of the selected icon color. */
18
- colorVariant?: ColorVariant;
19
- /** Whether the icon has a shape. */
20
- hasShape?: boolean;
21
- /**
22
- * Icon (SVG path) draw code (`d` property of the `<path>` SVG element).
23
- * See https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths
24
- */
25
- icon: string;
26
- /** Size variant. */
27
- size?: IconSizes;
28
- /** Sets an alternative text on the svg. Will set an `img` role to the svg. */
29
- alt?: string;
30
- }
31
-
32
- /**
33
- * Component display name.
34
- */
35
- const COMPONENT_NAME = 'Icon';
36
-
37
- /**
38
- * Component default class name and class prefix.
39
- */
40
- const CLASSNAME = getRootClassName(COMPONENT_NAME);
41
-
42
- /**
43
- * Component default props.
44
- */
45
- const DEFAULT_PROPS: Partial<IconProps> = {};
46
-
47
- /**
48
- * Icon component.
49
- *
50
- * @param props Component props.
51
- * @param ref Component ref.
52
- * @return React element.
53
- */
54
- export const Icon = (props: IconProps) => {
55
- const {
56
- className,
57
- color: propColor,
58
- colorVariant: propColorVariant,
59
- hasShape,
60
- icon,
61
- size,
62
- theme,
63
- alt,
64
- ref,
65
- ...forwardedProps
66
- } = props;
67
-
68
- const [color, colorVariant] = resolveColorWithVariants(propColor, propColorVariant);
69
-
70
- // Color
71
- let iconColor = color;
72
- if (!iconColor && (hasShape || theme)) {
73
- iconColor = theme === Theme.dark ? ColorPalette.light : ColorPalette.dark;
74
- }
75
-
76
- // Color variant
77
- let iconColorVariant = colorVariant;
78
- if (!iconColorVariant && hasShape && iconColor === ColorPalette.dark) {
79
- iconColorVariant = 'L2';
80
- }
81
-
82
- // Size
83
- let iconSize = size;
84
- if (size && hasShape) {
85
- if (size === Size.xxs || size === Size.xs) {
86
- iconSize = Size.s;
87
- } else if (size === Size.xxl) {
88
- iconSize = Size.xl;
89
- }
90
- } else if (hasShape) {
91
- iconSize = Size.m;
92
- }
93
-
94
- return (
95
- <i
96
- ref={ref}
97
- {...forwardedProps}
98
- className={classNames(
99
- className,
100
- handleBasicClasses({
101
- color: iconColor,
102
- colorVariant: iconColorVariant,
103
- hasShape,
104
- prefix: CLASSNAME,
105
- theme,
106
- size: iconSize,
107
- }),
108
- !hasShape && `${CLASSNAME}--no-shape`,
109
- !hasShape &&
110
- iconColor === ColorPalette.yellow &&
111
- icon === mdiAlertCircle &&
112
- `${CLASSNAME}--has-dark-layer`,
113
- `${CLASSNAME}--path`,
114
- )}
115
- >
116
- <svg
117
- aria-hidden={alt ? undefined : 'true'}
118
- role={alt ? 'img' : undefined}
119
- aria-label={alt}
120
- height="1em"
121
- preserveAspectRatio="xMidYMid meet"
122
- style={{ verticalAlign: '-0.125em' }}
123
- viewBox="0 0 24 24"
124
- width="1em"
125
- >
126
- <path d={icon} fill="currentColor" />
127
- </svg>
128
- </i>
129
- );
130
- };
131
-
132
- Icon.displayName = COMPONENT_NAME;
133
- Icon.className = CLASSNAME;
134
- Icon.defaultProps = DEFAULT_PROPS;
package/js/date-picker.js DELETED
@@ -1,71 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var range = require('lodash/range');
6
- var mMoment = require('moment');
7
- var momentRange = require('moment-range');
8
-
9
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
10
-
11
- var range__default = /*#__PURE__*/_interopDefaultLegacy(range);
12
- var mMoment__default = /*#__PURE__*/_interopDefaultLegacy(mMoment);
13
-
14
- const moment = momentRange.extendMoment(mMoment__default["default"]);
15
- const DAYS_PER_WEEK = 7;
16
- /**
17
- * Get the list of days in a week based on locale.
18
- *
19
- * @deprecated will be removed in next major version along with the removal of moment (no replacement planned)
20
- *
21
- * @param locale The locale using to generate the order of days in a week.
22
- * @return The list of days in a week based on locale.
23
- */
24
- function getWeekDays(locale) {
25
- return range__default["default"](DAYS_PER_WEEK).map((_, i) => moment().locale(locale).weekday(i));
26
- }
27
- /**
28
- * Get month calendar based on locale and start date.
29
- *
30
- * @deprecated will be removed in next major version along with the removal of moment (no replacement planned)
31
- *
32
- * @param locale The locale using to generate the order of days in a week.
33
- * @param selectedMonth The selected month.
34
- * @return The list of days in a week based on locale.
35
- */
36
- function getMonthCalendar(locale, selectedMonth) {
37
- const firstDayOfMonth = moment(selectedMonth).startOf('month');
38
- const endDayOfMonth = moment(selectedMonth).endOf('month');
39
- // The first day of the week depends on the locale used. In FR the first day is a monday but in EN the first day is sunday
40
- const firstDay = firstDayOfMonth.locale(locale).startOf('week');
41
- const monthRange = moment.range(firstDay.toDate(), endDayOfMonth.toDate());
42
- return Array.from(monthRange.by('day'));
43
- }
44
- /**
45
- * Get month calendar based on locale and start date.
46
- * Each day is annotated to know if they are displayed and/or clickable.
47
- *
48
- * @deprecated will be removed in next major version along with the removal of moment (no replacement planned)
49
- *
50
- * @param locale The locale using to generate the order of days in a week.
51
- * @param minDate The first selectable date.
52
- * @param maxDate The last selectable date.
53
- * @param selectedMonth The selected month.
54
- * @return The list of days in a week based on locale.
55
- */
56
- function getAnnotatedMonthCalendar(locale, minDate, maxDate, selectedMonth) {
57
- const month = moment(selectedMonth).locale(locale).month();
58
- const clickableRange = moment.range(minDate, maxDate);
59
- return getMonthCalendar(locale, selectedMonth).map((date) => {
60
- return {
61
- date,
62
- isClickable: clickableRange.contains(date),
63
- isDisplayed: date.month() === month,
64
- isToday: date.isSame(moment(), 'day'),
65
- };
66
- });
67
- }
68
-
69
- exports.getAnnotatedMonthCalendar = getAnnotatedMonthCalendar;
70
- exports.getMonthCalendar = getMonthCalendar;
71
- exports.getWeekDays = getWeekDays;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("lodash/range"),t=require("moment"),n=require("moment-range");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=a(e),r=a(t);const s=n.extendMoment(r.default);function d(e,t){const n=s(t).startOf("month"),a=s(t).endOf("month"),o=n.locale(e).startOf("week"),r=s.range(o.toDate(),a.toDate());return Array.from(r.by("day"))}exports.getAnnotatedMonthCalendar=function(e,t,n,a){const o=s(a).locale(e).month(),r=s.range(t,n);return d(e,a).map(e=>({date:e,isClickable:r.contains(e),isDisplayed:e.month()===o,isToday:e.isSame(s(),"day")}))},exports.getMonthCalendar=d,exports.getWeekDays=function(e){return o.default(7).map((t,n)=>s().locale(e).weekday(n))};
package/js/date-picker.ts DELETED
@@ -1,77 +0,0 @@
1
- import range from 'lodash/range';
2
- import mMoment, { Moment } from 'moment';
3
- import { extendMoment } from 'moment-range';
4
-
5
- const moment = extendMoment(mMoment as any);
6
-
7
- const DAYS_PER_WEEK = 7;
8
-
9
- interface AnnotatedDate {
10
- date: Moment;
11
- isDisplayed: boolean;
12
- isClickable: boolean;
13
- isToday: boolean;
14
- }
15
-
16
- /**
17
- * Get the list of days in a week based on locale.
18
- *
19
- * @deprecated will be removed in next major version along with the removal of moment (no replacement planned)
20
- *
21
- * @param locale The locale using to generate the order of days in a week.
22
- * @return The list of days in a week based on locale.
23
- */
24
- export function getWeekDays(locale: string): Moment[] {
25
- return range(DAYS_PER_WEEK).map((_, i) => moment().locale(locale).weekday(i));
26
- }
27
-
28
- /**
29
- * Get month calendar based on locale and start date.
30
- *
31
- * @deprecated will be removed in next major version along with the removal of moment (no replacement planned)
32
- *
33
- * @param locale The locale using to generate the order of days in a week.
34
- * @param selectedMonth The selected month.
35
- * @return The list of days in a week based on locale.
36
- */
37
- export function getMonthCalendar(locale: string, selectedMonth?: Moment): Moment[] {
38
- const firstDayOfMonth = moment(selectedMonth).startOf('month');
39
- const endDayOfMonth = moment(selectedMonth).endOf('month');
40
- // The first day of the week depends on the locale used. In FR the first day is a monday but in EN the first day is sunday
41
- const firstDay = firstDayOfMonth.locale(locale).startOf('week');
42
- const monthRange = moment.range(firstDay.toDate(), endDayOfMonth.toDate());
43
-
44
- return Array.from(monthRange.by('day'));
45
- }
46
-
47
- /**
48
- * Get month calendar based on locale and start date.
49
- * Each day is annotated to know if they are displayed and/or clickable.
50
- *
51
- * @deprecated will be removed in next major version along with the removal of moment (no replacement planned)
52
- *
53
- * @param locale The locale using to generate the order of days in a week.
54
- * @param minDate The first selectable date.
55
- * @param maxDate The last selectable date.
56
- * @param selectedMonth The selected month.
57
- * @return The list of days in a week based on locale.
58
- */
59
- export function getAnnotatedMonthCalendar(
60
- locale: string,
61
- minDate?: Date,
62
- maxDate?: Date,
63
- selectedMonth?: Moment,
64
- ): AnnotatedDate[] {
65
- const month = moment(selectedMonth).locale(locale).month();
66
-
67
- const clickableRange = moment.range(minDate as Date, maxDate as Date);
68
-
69
- return getMonthCalendar(locale, selectedMonth).map((date) => {
70
- return {
71
- date,
72
- isClickable: clickableRange.contains(date),
73
- isDisplayed: date.month() === month,
74
- isToday: date.isSame(moment(), 'day'),
75
- };
76
- });
77
- }
@@ -1,7 +0,0 @@
1
- import { ColorPalette, ColorVariant } from '@lumx/core/js/constants';
2
- import { getSelectArgType } from '@lumx/react/stories/controls/selectArgType';
3
- import { withUndefined } from '@lumx/react/stories/controls/withUndefined';
4
-
5
- export const ALL_COLORS = Object.values(ColorPalette);
6
- export const colorArgType = getSelectArgType(withUndefined(ALL_COLORS));
7
- export const colorVariantArgType = getSelectArgType(ColorVariant);
@@ -1,126 +0,0 @@
1
- import {
2
- mdiAbTesting,
3
- mdiAbjadArabic,
4
- mdiAccount,
5
- mdiAccountBox,
6
- mdiAlert,
7
- mdiAlertCircle,
8
- mdiArrowDown,
9
- mdiArrowUp,
10
- mdiAtom,
11
- mdiBee,
12
- mdiBell,
13
- mdiBullhornOutline,
14
- mdiCheck,
15
- mdiCheckCircle,
16
- mdiChevronDown,
17
- mdiChevronLeft,
18
- mdiChevronRight,
19
- mdiChevronUp,
20
- mdiClose,
21
- mdiCloseCircle,
22
- mdiDelete,
23
- mdiDotsHorizontal,
24
- mdiDragVertical,
25
- mdiEarth,
26
- mdiEmail,
27
- mdiEye,
28
- mdiFileEdit,
29
- mdiFlag,
30
- mdiFolder,
31
- mdiFolderGoogleDrive,
32
- mdiFoodApple,
33
- mdiGoogleCirclesExtended,
34
- mdiHeart,
35
- mdiHome,
36
- mdiImageBroken,
37
- mdiInformation,
38
- mdiLink,
39
- mdiMagnifyMinusOutline,
40
- mdiMagnifyPlusOutline,
41
- mdiMenuDown,
42
- mdiMessageTextOutline,
43
- mdiMinus,
44
- mdiOpenInNew,
45
- mdiPauseCircleOutline,
46
- mdiPencil,
47
- mdiPlay,
48
- mdiPlayCircleOutline,
49
- mdiPlus,
50
- mdiRadioboxBlank,
51
- mdiRadioboxMarked,
52
- mdiReply,
53
- mdiSend,
54
- mdiStar,
55
- mdiTextBox,
56
- mdiTextBoxPlus,
57
- mdiTram,
58
- mdiTranslate,
59
- mdiViewList,
60
- } from '@lumx/icons';
61
-
62
- // Small selection of mdi icons to
63
- export const iconArgType = {
64
- control: { type: 'select' },
65
- options: {
66
- undefined,
67
- mdiAbTesting,
68
- mdiAbjadArabic,
69
- mdiAccount,
70
- mdiAccountBox,
71
- mdiAlert,
72
- mdiAlertCircle,
73
- mdiArrowDown,
74
- mdiArrowUp,
75
- mdiAtom,
76
- mdiBee,
77
- mdiBell,
78
- mdiBullhornOutline,
79
- mdiCheck,
80
- mdiCheckCircle,
81
- mdiChevronDown,
82
- mdiChevronLeft,
83
- mdiChevronRight,
84
- mdiChevronUp,
85
- mdiClose,
86
- mdiCloseCircle,
87
- mdiDelete,
88
- mdiDotsHorizontal,
89
- mdiDragVertical,
90
- mdiEarth,
91
- mdiEmail,
92
- mdiEye,
93
- mdiFileEdit,
94
- mdiFlag,
95
- mdiFolder,
96
- mdiFolderGoogleDrive,
97
- mdiFoodApple,
98
- mdiGoogleCirclesExtended,
99
- mdiHeart,
100
- mdiHome,
101
- mdiImageBroken,
102
- mdiInformation,
103
- mdiLink,
104
- mdiMagnifyMinusOutline,
105
- mdiMagnifyPlusOutline,
106
- mdiMenuDown,
107
- mdiMessageTextOutline,
108
- mdiMinus,
109
- mdiOpenInNew,
110
- mdiPauseCircleOutline,
111
- mdiPencil,
112
- mdiPlay,
113
- mdiPlayCircleOutline,
114
- mdiPlus,
115
- mdiRadioboxBlank,
116
- mdiRadioboxMarked,
117
- mdiReply,
118
- mdiSend,
119
- mdiStar,
120
- mdiTextBox,
121
- mdiTextBoxPlus,
122
- mdiTram,
123
- mdiTranslate,
124
- mdiViewList,
125
- },
126
- };
@@ -1,8 +0,0 @@
1
- export const getSelectArgType = <E>(
2
- options: Array<E> | Record<string, E>,
3
- type: 'select' | 'inline-radio' = 'inline-radio',
4
- ) => ({
5
- control: { type },
6
- options: Object.values(options),
7
- mapping: !Array.isArray(options) ? options : undefined,
8
- });
@@ -1 +0,0 @@
1
- export const withUndefined = <E>(options: Array<E> | Record<string, E>) => [undefined, ...Object.values(options)];
@@ -1,19 +0,0 @@
1
- import { buildQueries } from '@testing-library/dom';
2
-
3
- export const queryAllByClassName = (container: HTMLElement, className: string) =>
4
- Array.from(container.getElementsByClassName(className) as HTMLCollectionOf<HTMLElement>);
5
-
6
- export const [queryByClassName, getAllByClassName, getByClassName, findAllByClassName, findByClassName] = buildQueries(
7
- queryAllByClassName,
8
- (_, className) => `Multiple \`.${className}\` found`,
9
- (_, className) => `No \`.${className}\` found`,
10
- );
11
-
12
- export const queryAllByTagName = (container: HTMLElement, tagName: string) =>
13
- Array.from(container.getElementsByTagName(tagName) as HTMLCollectionOf<HTMLElement>);
14
-
15
- export const [queryByTagName, getAllByTagName, getByTagName, findAllByTagName, findByTagName] = buildQueries(
16
- queryAllByTagName,
17
- (_, tagName) => `Multiple \`${tagName}\` found`,
18
- (_, tagName) => `No \`${tagName}\` found`,
19
- );