@nuskin/foundation-ui-components 1.26.0 → 1.26.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/foundation-ui-components",
3
- "version": "1.26.0",
3
+ "version": "1.26.1",
4
4
  "description": "It is a foundation library written in react, that provides common components to all UI pages",
5
5
  "main": "src/common/index.ts",
6
6
  "repository": {
@@ -35,6 +35,7 @@
35
35
  "test": "next build && jest --coverage",
36
36
  "test:pattern": "jest --coverage --testNamePattern accordion/*",
37
37
  "test:watch": "jest --watch",
38
+ "test:update-snapshot": "jest -u",
38
39
  "test:failed": "npx jest --onlyFailures",
39
40
  "test:coverage": "jest --coverage",
40
41
  "types:check": "tsc --pretty --noEmit"
@@ -1,6 +1,7 @@
1
- import React from 'react';
1
+ import { AccordionItem, AccordionVariant, NsCollapse } from '@/common/index';
2
2
  import { render, screen } from '@/test-utils/index';
3
- import { NsCollapse, AccordionVariant, AccordionItem } from '@/common/index';
3
+ import React from 'react';
4
+
4
5
  import { createAccordionItem3_1 } from '../stories/data';
5
6
 
6
7
  describe('NsCollapse', () => {
@@ -53,8 +54,8 @@ describe('NsCollapse', () => {
53
54
  level={0}
54
55
  />
55
56
  );
56
- expect(getByText(content[0].title)).toBeInTheDocument();
57
- expect(getByText(content[1].title)).toBeInTheDocument();
57
+ expect(getByText(content[0].title as string)).toBeInTheDocument();
58
+ expect(getByText(content[1].title as string)).toBeInTheDocument();
58
59
  });
59
60
 
60
61
  it('4. does not render children when isOpen is false', () => {
@@ -1,30 +1,12 @@
1
- import React, {
2
- PropsWithChildren,
3
- useEffect,
4
- useRef,
5
- useState,
6
- } from 'react';
7
-
8
- import {
9
- Autocomplete,
10
- AutocompleteRenderInputParams,
11
- Popper,
12
- } from '@mui/material';
1
+ import { Autocomplete, AutocompleteRenderInputParams } from '@mui/material';
2
+ import React, { PropsWithChildren, useEffect, useRef, useState } from 'react';
13
3
 
14
4
  import { LineLoader } from './helper/LineLoader';
15
5
  import { RecentClearAll } from './helper/RecentClearAll';
16
- import {
17
- renderGroupBy,
18
- renderGroupName,
19
- renderOptionLabel,
20
- } from './helper/renderGroupName';
6
+ import { renderGroupBy, renderGroupName, renderOptionLabel } from './helper/renderGroupName';
21
7
  import { SeeMoreButton } from './helper/SeeMoreButton';
22
- import { StyledPopper, StyledTextField } from './NsAutocomplete.styled';
23
- import {
24
- ComponentBoxProps,
25
- NsAutocompleteProps,
26
- OptionsProps,
27
- } from './types.d';
8
+ import { StyledTextField } from './NsAutocomplete.styled';
9
+ import { ComponentBoxProps, NsAutocompleteProps, OptionsProps } from './types.d';
28
10
 
29
11
  const noop = () => {};
30
12
  const NsAutocomplete = ({
@@ -45,7 +27,7 @@ const NsAutocomplete = ({
45
27
  inputValue,
46
28
  value,
47
29
  isFilterEnabled = true,
48
- fullWidth
30
+ fullWidth,
49
31
  }: PropsWithChildren<NsAutocompleteProps>) => {
50
32
  const [scrollTopPosition, setScrollTopPosition] = useState(0);
51
33
  const listboxRef = useRef<HTMLUListElement | null>(null);
@@ -122,7 +104,7 @@ const NsAutocomplete = ({
122
104
  getOptionLabel={renderOptionLabel}
123
105
  renderOption={renderOption as any}
124
106
  renderInput={renderInput}
125
- PopperComponent={fullWidth ? StyledPopper : Popper}
107
+ // PopperComponent={fullWidth ? StyledPopper : Popper} // TODO:https://code.tls.nuskin.io/ns-am/content-foundation/nuskin-app/-/jobs/1355817
126
108
  ListboxComponent={renderListBoxComponent as any}
127
109
  renderGroup={renderGroupName}
128
110
  onChange={onChange}
@@ -1,6 +1,6 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`<Button /> 1. should match snapshot 1`] = `
3
+ exports[`<Button /> 0. should match snapshot 1`] = `
4
4
  .emotion-0 {
5
5
  display: -webkit-inline-box;
6
6
  display: -webkit-inline-flex;