@nuskin/foundation-ui-components 1.0.0-cft-35.10 → 1.0.0-cft-35.12

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/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ # [1.0.0-cft-35.12](https://code.tls.nuskin.io/ns-am/content-foundation/foundation-ui-components/compare/v1.0.0-cft-35.11...v1.0.0-cft-35.12) (2023-04-25)
2
+
3
+
4
+ ### Fix
5
+
6
+ * removing utils folder ([e4de0f0](https://code.tls.nuskin.io/ns-am/content-foundation/foundation-ui-components/commit/e4de0f0000622258f05479f3b5e601498b0008ed))
7
+
8
+ # [1.0.0-cft-35.11](https://code.tls.nuskin.io/ns-am/content-foundation/foundation-ui-components/compare/v1.0.0-cft-35.10...v1.0.0-cft-35.11) (2023-04-25)
9
+
10
+
11
+ ### fix
12
+
13
+ * to trigger a release v10 ([4382a19](https://code.tls.nuskin.io/ns-am/content-foundation/foundation-ui-components/commit/4382a197a15e6c3704d9a7896414b881172eacd1))
14
+
15
+ ### Fix
16
+
17
+ * retrigger a build ([ef6bf9e](https://code.tls.nuskin.io/ns-am/content-foundation/foundation-ui-components/commit/ef6bf9ed20556c5cbdf2f87dccc34ff85e544c9b))
18
+
1
19
  # [1.0.0-cft-35.10](https://code.tls.nuskin.io/ns-am/content-foundation/foundation-ui-components/compare/v1.0.0-cft-35.9...v1.0.0-cft-35.10) (2023-04-25)
2
20
 
3
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/foundation-ui-components",
3
- "version": "1.0.0-cft-35.10",
3
+ "version": "1.0.0-cft-35.12",
4
4
  "description": "It is a foundation library written in react, that provides commom components to all UI pages",
5
5
  "private": false,
6
6
  "main": "src/common/index.ts",
@@ -20,7 +20,7 @@ const NsBrandComponent = (props: PropsWithChildren<NsBrandComponentProps>) => {
20
20
  const renderBrand = useCallback(() => {
21
21
  const BrandComponent = VariantMap[variant || 'stacked'];
22
22
  return <BrandComponent color={color as any} />;
23
- }, [variant]);
23
+ }, [color, variant]);
24
24
  return <LogoContainer size={size}>{renderBrand()}</LogoContainer>;
25
25
  };
26
26
 
@@ -1,4 +1,3 @@
1
- import { getIsLight } from '../../utils/utils';
2
1
  import { styled, ColorUtils, FoundationTheme } from '@nuskin/foundation-theme';
3
2
  const { getPaletteColor, getAppColor } = ColorUtils;
4
3
 
@@ -33,6 +32,11 @@ export const DropdownList = styled.div<{ borderColor: FoundationTheme.PaletteCol
33
32
  color: ${({ theme }) => getPaletteColor(theme, 'primary', 'main')};
34
33
  background-color: ${({ theme }) => getPaletteColor(theme, 'primary', 'contrastText')};
35
34
  `;
35
+ const getIsLight = (theme: FoundationTheme.Theme) => {
36
+ const { palette = { primary: { main: '', contrastText: '' } } } = theme;
37
+ return palette.primary.main === getAppColor(theme, 'primary', 'black');
38
+ };
39
+
36
40
  const getDividerColor = (theme: FoundationTheme.Theme) => {
37
41
  const isLight = getIsLight(theme);
38
42
  const dividerColor = isLight ? getAppColor(theme, 'neutral', '30') : getAppColor(theme, 'neutral', '20');
@@ -15,6 +15,7 @@ export * from './icon';
15
15
  export * from './input';
16
16
  export * from './image';
17
17
  export * from './label';
18
- export * from './dropdown';
19
18
 
19
+ /* Dropdown Components */
20
+ export * from './dropdown';
20
21
  export * from './auth-dropdown';
@@ -1,7 +1,6 @@
1
- import { getSuccessColor } from '../../utils/utils';
2
1
  import { Stack } from '@mui/material';
3
2
  import { styled, ColorUtils } from '@nuskin/foundation-theme';
4
- const { getPaletteColor } = ColorUtils;
3
+ const { getPaletteColor, getAppColor } = ColorUtils;
5
4
 
6
5
  const InputFieldWrapper = styled(Stack)(({ theme }: any) => {
7
6
  return {
@@ -13,7 +12,7 @@ const InputFieldWrapper = styled(Stack)(({ theme }: any) => {
13
12
  marginTop: 0,
14
13
  color: getPaletteColor(theme, 'primary', 'main'),
15
14
  '&.success': {
16
- color: getSuccessColor(theme),
15
+ color: getAppColor(theme, 'success', '40') as string,
17
16
  },
18
17
  '&.error': {
19
18
  color: getPaletteColor(theme, 'error', 'main'),