@lunit/oui 2.2.19 → 2.2.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.
@@ -141,7 +141,7 @@ declare const baseButtonStyle: (theme: Theme, focusOutline: boolean | undefined)
141
141
  flexShrink?: import("csstype").Property.FlexShrink | undefined;
142
142
  flexWrap?: import("csstype").Property.FlexWrap | undefined;
143
143
  float?: import("csstype").Property.Float | undefined;
144
- fontFamily?: import("csstype").Property.FontFamily | undefined;
144
+ fontFamily: import("csstype").Property.FontFamily | undefined;
145
145
  fontFeatureSettings?: import("csstype").Property.FontFeatureSettings | undefined;
146
146
  fontKerning?: import("csstype").Property.FontKerning | undefined;
147
147
  fontLanguageOverride?: import("csstype").Property.FontLanguageOverride | undefined;
@@ -12,6 +12,7 @@ const baseButtonStyle = (theme, focusOutline) => {
12
12
  width: 'max-content',
13
13
  height: '36px',
14
14
  padding: '8px 12px',
15
+ fontFamily: typography.fontFamily,
15
16
  ...typography.body4,
16
17
  backgroundColor: mainColor,
17
18
  color: theme.palette.neutralGrey[97],
@@ -143,7 +143,7 @@ declare const containedPrimaryStyle: (theme: Theme, focusOutline: boolean | unde
143
143
  flexShrink?: import("csstype").Property.FlexShrink | undefined;
144
144
  flexWrap?: import("csstype").Property.FlexWrap | undefined;
145
145
  float?: import("csstype").Property.Float | undefined;
146
- fontFamily?: import("csstype").Property.FontFamily | undefined;
146
+ fontFamily: import("csstype").Property.FontFamily | undefined;
147
147
  fontFeatureSettings?: import("csstype").Property.FontFeatureSettings | undefined;
148
148
  fontKerning?: import("csstype").Property.FontKerning | undefined;
149
149
  fontLanguageOverride?: import("csstype").Property.FontLanguageOverride | undefined;
@@ -142,7 +142,7 @@ declare const ghostPrimaryStyle: (theme: Theme, focusOutline: boolean | undefine
142
142
  flexShrink?: import("csstype").Property.FlexShrink | undefined;
143
143
  flexWrap?: import("csstype").Property.FlexWrap | undefined;
144
144
  float?: import("csstype").Property.Float | undefined;
145
- fontFamily?: import("csstype").Property.FontFamily | undefined;
145
+ fontFamily: import("csstype").Property.FontFamily | undefined;
146
146
  fontFeatureSettings?: import("csstype").Property.FontFeatureSettings | undefined;
147
147
  fontKerning?: import("csstype").Property.FontKerning | undefined;
148
148
  fontLanguageOverride?: import("csstype").Property.FontLanguageOverride | undefined;
@@ -144,7 +144,7 @@ declare const outlinedPrimaryStyle: (theme: Theme, focusOutline: boolean | undef
144
144
  flexShrink?: import("csstype").Property.FlexShrink | undefined;
145
145
  flexWrap?: import("csstype").Property.FlexWrap | undefined;
146
146
  float?: import("csstype").Property.Float | undefined;
147
- fontFamily?: import("csstype").Property.FontFamily | undefined;
147
+ fontFamily: import("csstype").Property.FontFamily | undefined;
148
148
  fontFeatureSettings?: import("csstype").Property.FontFeatureSettings | undefined;
149
149
  fontKerning?: import("csstype").Property.FontKerning | undefined;
150
150
  fontLanguageOverride?: import("csstype").Property.FontLanguageOverride | undefined;
@@ -9,6 +9,7 @@ import { FreeText } from '../FreeText';
9
9
  import { Statistic } from '../Statistic';
10
10
  import { Tooltip } from '../../components';
11
11
  import { Information } from '../../icons';
12
+ import theme from '../../theme';
12
13
  const ToggleControl = ({ componentType = 'toggle', title, size = 'medium', symbol, tooltip = [], content = [], color, isParent = false, disabled = false, bar, checked, isDimmed = false, onChange, }) => {
13
14
  if (!componentType)
14
15
  throw new Error("The 'componentType' prop is required.");
@@ -19,6 +20,6 @@ const ToggleControl = ({ componentType = 'toggle', title, size = 'medium', symbo
19
20
  return (_jsxs(ToggleControlOuter, { "data-toggle-name": `toggle-control-${title?.replace(/\s/g, '-')}`, hasBar: !!bar || !!content.length, style: { marginBottom: isParent ? '4px' : '0' }, children: [_jsxs(ToggleControlContainer, { className: "toggle-inner-container", size: size, children: [_jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: '6px' }, className: "toggle-label", children: [!!tooltip.length && (_jsx(Tooltip, { arrow: true, size: "large", title: _jsx(Box, { sx: { display: 'flex', flexDirection: 'column', gap: '8px' }, children: tooltip.map((item) => (_jsxs(Box, { children: [item.componentType === 'freeText' && (_jsx(FreeText, { componentType: item.componentType, size: item.size, content: item.content })), item.componentType === 'statistic' && (_jsx(Statistic, { componentType: item.componentType, title: item.title, size: item.size, layout: item.layout, symbol: item.symbol, color: item.color }))] }, uuidV4()))) }), children: _jsx(Box, { sx: {
20
21
  display: 'flex',
21
22
  alignItems: 'center',
22
- }, children: _jsx(Information, {}) }) })), symbol && (_jsx(PresentationSymbolIcon, { symbol: symbol, color: color, isDimmed: isDimmed || !checked })), _jsx(PresentationTypography, { size: size, isDimmed: isDimmed || !checked, children: title })] }), _jsx(StyledToggle, { disabled: disabled || isDimmed, checked: checked, onChange: onChange })] }), content.length > 0 && (_jsx(Box, { sx: { display: 'flex', flexDirection: 'column', gap: '8px' }, children: content.map((item) => (_jsx(Statistic, { ...item, isDimmed: isDimmed || !checked }, uuidV4()))) }, uuidV4())), bar && (_jsx(Box, { sx: { padding: '0 8px', fontSize: '14px', lineHeight: '8px' }, children: _jsx(AnalysisBar, { isDimmed: isDimmed || !checked, componentType: bar.componentType, expressionValue: bar.expressionValue, expressionLevels: bar.expressionLevels, caption: bar.caption, segments: bar.segments }) }))] }));
23
+ }, children: _jsx(Information, {}) }) })), symbol && (_jsx(PresentationSymbolIcon, { symbol: symbol, color: color, isDimmed: isDimmed || !checked })), _jsx(PresentationTypography, { size: size, isDimmed: isDimmed || !checked, children: title })] }), _jsx(StyledToggle, { disabled: disabled || isDimmed, checked: checked, toggleColor: theme.palette.lunitTeal[70], onChange: onChange })] }), content.length > 0 && (_jsx(Box, { sx: { display: 'flex', flexDirection: 'column', gap: '8px' }, children: content.map((item) => (_jsx(Statistic, { ...item, isDimmed: isDimmed || !checked }, uuidV4()))) }, uuidV4())), bar && (_jsx(Box, { sx: { padding: '0 8px', fontSize: '14px', lineHeight: '8px' }, children: _jsx(AnalysisBar, { isDimmed: isDimmed || !checked, componentType: bar.componentType, expressionValue: bar.expressionValue, expressionLevels: bar.expressionLevels, caption: bar.caption, segments: bar.segments }) }))] }));
23
24
  };
24
25
  export default ToggleControl;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lunit/oui",
3
- "version": "2.2.19",
3
+ "version": "2.2.21",
4
4
  "validate-branch-name": {
5
5
  "pattern": "^(main|develop)|(feature|fix|release|hotfix|qe)/.+$",
6
6
  "errorMsg": "The branch name is not correct. Please check the pattern. (ex. feature/add-something)"