odaptos_design_system 1.4.17 → 1.4.19
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/dist/odaptos_design_system.cjs.development.js +50 -38
- package/dist/odaptos_design_system.cjs.development.js.map +1 -1
- package/dist/odaptos_design_system.cjs.production.min.js +1 -1
- package/dist/odaptos_design_system.cjs.production.min.js.map +1 -1
- package/dist/odaptos_design_system.esm.js +50 -38
- package/dist/odaptos_design_system.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/Modal/Modal.modules.scss +8 -2
- package/src/SingleSelect/SingleSelect.tsx +15 -3
|
@@ -4099,10 +4099,36 @@ const Accordion = ({
|
|
|
4099
4099
|
})), isAccordionOpen && /*#__PURE__*/React__default.createElement("div", null, children));
|
|
4100
4100
|
};
|
|
4101
4101
|
|
|
4102
|
-
var css_248z$3 = ".
|
|
4103
|
-
var styles$3 = {"
|
|
4102
|
+
var css_248z$3 = "@import \"../../styles/index.css\";.TextForButton-modules_button_text__ti6YE{font-family:var(--sdFontFamilyPoppins);font-weight:var(--sdFontWeightMedium);letter-spacing:var(--sdLetterSpacingButtons);margin:unset;padding:.125rem 0;text-align:left}.TextForButton-modules_button_text_bold__L1fLC{font-weight:var(--sdFontWeightSemibold)}.TextForButton-modules_button_text_sm__NXijI{font-size:var(--sdFontSizeSm);line-height:var(--sdLineHeight140)}.TextForButton-modules_button_text_base__5ToZ9{font-size:var(--sdFontSizeBase);line-height:var(--sdLineHeight150)}.TextForButton-modules_button_text_lg__s-LLo{font-size:var(--sdFontSizeLg);line-height:var(--sdLineHeight150)}";
|
|
4103
|
+
var styles$3 = {"button_text":"TextForButton-modules_button_text__ti6YE","button_text_bold":"TextForButton-modules_button_text_bold__L1fLC","button_text_sm":"TextForButton-modules_button_text_sm__NXijI","button_text_base":"TextForButton-modules_button_text_base__5ToZ9","button_text_lg":"TextForButton-modules_button_text_lg__s-LLo"};
|
|
4104
4104
|
styleInject(css_248z$3);
|
|
4105
4105
|
|
|
4106
|
+
/** This button should only be used in the Button component
|
|
4107
|
+
* Figma link : https://www.figma.com/file/fjnhhbL12HvKccPmJchVnr/Atomic-Library?type=design&node-id=52-787&mode=dev
|
|
4108
|
+
*/
|
|
4109
|
+
const TextForButton = ({
|
|
4110
|
+
text,
|
|
4111
|
+
color = '#00040A',
|
|
4112
|
+
bold = false,
|
|
4113
|
+
className,
|
|
4114
|
+
size = 'base',
|
|
4115
|
+
...props
|
|
4116
|
+
}) => {
|
|
4117
|
+
const getTextSize = () => {
|
|
4118
|
+
if (size === 'sm') return styles$3.button_text_sm;else if (size === 'base') return styles$3.button_text_base;else if (size === 'lg') return styles$3.button_text_lg;else return styles$3.button_text_base;
|
|
4119
|
+
};
|
|
4120
|
+
return /*#__PURE__*/React__default.createElement("p", Object.assign({}, props, {
|
|
4121
|
+
style: {
|
|
4122
|
+
color: color
|
|
4123
|
+
},
|
|
4124
|
+
className: `${styles$3.button_text} ${bold ? styles$3.button_text_bold : ''} ${className ?? ''} ${getTextSize()}`
|
|
4125
|
+
}), text);
|
|
4126
|
+
};
|
|
4127
|
+
|
|
4128
|
+
var css_248z$4 = ".SingleSelect-modules_newAutocomplete__AgBoW{min-width:16rem;width:100%}.SingleSelect-modules_newAutocomplete__AgBoW label,.SingleSelect-modules_newAutocomplete__AgBoW span{font-family:Open Sans;font-size:1rem;font-style:normal;font-weight:400;letter-spacing:.03em;line-height:1.3;margin:unset;text-align:left}.SingleSelect-modules_newAutocomplete__AgBoW .SingleSelect-modules_MuiAutocomplete-endAdornment__3kdFk{display:flex;gap:.5rem;margin-top:-.35rem!important}.SingleSelect-modules_newAutocomplete__AgBoW .SingleSelect-modules_tags-container__bWCQt{display:flex;flex-wrap:nowrap;gap:.5rem;max-width:90%;overflow:scroll;padding:0 .5rem}.SingleSelect-modules_newAutocomplete__AgBoW .SingleSelect-modules_tags-container__bWCQt p{text-overflow:ellipsis;white-space:nowrap}.SingleSelect-modules_input_top_label__a6UdT{margin-bottom:.625rem}.SingleSelect-modules_MuiOutlinedInput-root__RuMrq.SingleSelect-modules_MuiInputBase-root__ByCLC.SingleSelect-modules_MuiInputBase-formControl__5hTna{align-items:center;display:flex;flex-direction:row}.SingleSelect-modules_text_below__9S4k5{margin:.25rem .5rem .25rem .75rem}.SingleSelect-modules_icon__2WnMK{height:1rem!important;margin-left:.25rem;width:1rem!important}";
|
|
4129
|
+
var styles$4 = {"newAutocomplete":"SingleSelect-modules_newAutocomplete__AgBoW","MuiAutocomplete-endAdornment":"SingleSelect-modules_MuiAutocomplete-endAdornment__3kdFk","tags-container":"SingleSelect-modules_tags-container__bWCQt","input_top_label":"SingleSelect-modules_input_top_label__a6UdT","MuiOutlinedInput-root":"SingleSelect-modules_MuiOutlinedInput-root__RuMrq","MuiInputBase-root":"SingleSelect-modules_MuiInputBase-root__ByCLC","MuiInputBase-formControl":"SingleSelect-modules_MuiInputBase-formControl__5hTna","text_below":"SingleSelect-modules_text_below__9S4k5","icon":"SingleSelect-modules_icon__2WnMK"};
|
|
4130
|
+
styleInject(css_248z$4);
|
|
4131
|
+
|
|
4106
4132
|
const CssTextField = /*#__PURE__*/styles$F.styled(material.TextField)({
|
|
4107
4133
|
'& .MuiInputBase-input': {
|
|
4108
4134
|
color: '#26292E',
|
|
@@ -4222,7 +4248,7 @@ const SingleSelect = ({
|
|
|
4222
4248
|
text: `${topLabel ? topLabel : ''}`,
|
|
4223
4249
|
weight: "bold",
|
|
4224
4250
|
size: "base",
|
|
4225
|
-
className: styles$
|
|
4251
|
+
className: styles$4.input_top_label,
|
|
4226
4252
|
required: required
|
|
4227
4253
|
}), /*#__PURE__*/React__default.createElement(Autocomplete, Object.assign({
|
|
4228
4254
|
id: "tags-standard",
|
|
@@ -4232,8 +4258,14 @@ const SingleSelect = ({
|
|
|
4232
4258
|
setInputValue(newInputValue);
|
|
4233
4259
|
},
|
|
4234
4260
|
onChange: (_event, newValue) => {
|
|
4261
|
+
const e = {
|
|
4262
|
+
target: {
|
|
4263
|
+
name: name,
|
|
4264
|
+
value: newValue
|
|
4265
|
+
}
|
|
4266
|
+
};
|
|
4235
4267
|
setValue(newValue);
|
|
4236
|
-
onChange(
|
|
4268
|
+
onChange(e);
|
|
4237
4269
|
},
|
|
4238
4270
|
options: options,
|
|
4239
4271
|
placeholder: label,
|
|
@@ -4247,7 +4279,7 @@ const SingleSelect = ({
|
|
|
4247
4279
|
return option.label;
|
|
4248
4280
|
},
|
|
4249
4281
|
isOptionEqualToValue: (option, value) => {
|
|
4250
|
-
return option.value === value.value;
|
|
4282
|
+
if (value._id && option._id) return option._id === value._id;else if (value && value !== '') return option.value === value.value;else return false;
|
|
4251
4283
|
},
|
|
4252
4284
|
renderInput: params => /*#__PURE__*/React__default.createElement(CssTextField, Object.assign({}, params, {
|
|
4253
4285
|
variant: "outlined",
|
|
@@ -4255,58 +4287,38 @@ const SingleSelect = ({
|
|
|
4255
4287
|
placeholder: placeholder,
|
|
4256
4288
|
size: "small",
|
|
4257
4289
|
required: required,
|
|
4258
|
-
name: name,
|
|
4259
4290
|
error: error
|
|
4260
4291
|
})),
|
|
4261
4292
|
clearIcon: /*#__PURE__*/React__default.createElement(RemoveCircledIcon, {
|
|
4262
4293
|
fill: "black",
|
|
4263
|
-
className: `${styles$
|
|
4294
|
+
className: `${styles$4.icon}`
|
|
4264
4295
|
}),
|
|
4265
4296
|
popupIcon: /*#__PURE__*/React__default.createElement(ArrowLineDowIcon, {
|
|
4266
4297
|
fill: "black",
|
|
4267
|
-
className: `${styles$
|
|
4298
|
+
className: `${styles$4.icon}`
|
|
4268
4299
|
}),
|
|
4269
|
-
className: `${styles$
|
|
4300
|
+
className: `${styles$4.newAutocomplete}`,
|
|
4301
|
+
renderOption: (props, option) => {
|
|
4302
|
+
return /*#__PURE__*/React__default.createElement("li", Object.assign({}, props, {
|
|
4303
|
+
key: option.value
|
|
4304
|
+
}), /*#__PURE__*/React__default.createElement(TextForButton, {
|
|
4305
|
+
text: option.label
|
|
4306
|
+
}));
|
|
4307
|
+
}
|
|
4270
4308
|
}, props)), errorText && /*#__PURE__*/React__default.createElement(Text, {
|
|
4271
4309
|
size: "xs",
|
|
4272
4310
|
color: "#F54C4C",
|
|
4273
4311
|
italic: true,
|
|
4274
4312
|
text: errorText,
|
|
4275
|
-
className: styles$
|
|
4313
|
+
className: styles$4.text_below
|
|
4276
4314
|
}), helperText && /*#__PURE__*/React__default.createElement(Text, {
|
|
4277
4315
|
size: "xs",
|
|
4278
4316
|
italic: true,
|
|
4279
4317
|
text: helperText,
|
|
4280
|
-
className: styles$
|
|
4318
|
+
className: styles$4.text_below
|
|
4281
4319
|
}));
|
|
4282
4320
|
};
|
|
4283
4321
|
|
|
4284
|
-
var css_248z$4 = "@import \"../../styles/index.css\";.TextForButton-modules_button_text__ti6YE{font-family:var(--sdFontFamilyPoppins);font-weight:var(--sdFontWeightMedium);letter-spacing:var(--sdLetterSpacingButtons);margin:unset;padding:.125rem 0;text-align:left}.TextForButton-modules_button_text_bold__L1fLC{font-weight:var(--sdFontWeightSemibold)}.TextForButton-modules_button_text_sm__NXijI{font-size:var(--sdFontSizeSm);line-height:var(--sdLineHeight140)}.TextForButton-modules_button_text_base__5ToZ9{font-size:var(--sdFontSizeBase);line-height:var(--sdLineHeight150)}.TextForButton-modules_button_text_lg__s-LLo{font-size:var(--sdFontSizeLg);line-height:var(--sdLineHeight150)}";
|
|
4285
|
-
var styles$4 = {"button_text":"TextForButton-modules_button_text__ti6YE","button_text_bold":"TextForButton-modules_button_text_bold__L1fLC","button_text_sm":"TextForButton-modules_button_text_sm__NXijI","button_text_base":"TextForButton-modules_button_text_base__5ToZ9","button_text_lg":"TextForButton-modules_button_text_lg__s-LLo"};
|
|
4286
|
-
styleInject(css_248z$4);
|
|
4287
|
-
|
|
4288
|
-
/** This button should only be used in the Button component
|
|
4289
|
-
* Figma link : https://www.figma.com/file/fjnhhbL12HvKccPmJchVnr/Atomic-Library?type=design&node-id=52-787&mode=dev
|
|
4290
|
-
*/
|
|
4291
|
-
const TextForButton = ({
|
|
4292
|
-
text,
|
|
4293
|
-
color = '#00040A',
|
|
4294
|
-
bold = false,
|
|
4295
|
-
className,
|
|
4296
|
-
size = 'base',
|
|
4297
|
-
...props
|
|
4298
|
-
}) => {
|
|
4299
|
-
const getTextSize = () => {
|
|
4300
|
-
if (size === 'sm') return styles$4.button_text_sm;else if (size === 'base') return styles$4.button_text_base;else if (size === 'lg') return styles$4.button_text_lg;else return styles$4.button_text_base;
|
|
4301
|
-
};
|
|
4302
|
-
return /*#__PURE__*/React__default.createElement("p", Object.assign({}, props, {
|
|
4303
|
-
style: {
|
|
4304
|
-
color: color
|
|
4305
|
-
},
|
|
4306
|
-
className: `${styles$4.button_text} ${bold ? styles$4.button_text_bold : ''} ${className ?? ''} ${getTextSize()}`
|
|
4307
|
-
}), text);
|
|
4308
|
-
};
|
|
4309
|
-
|
|
4310
4322
|
var css_248z$5 = ".Checkbox-module_checkboxContainer__1EvhC{align-items:center;display:flex}";
|
|
4311
4323
|
var styles$5 = {"checkboxContainer":"Checkbox-module_checkboxContainer__1EvhC"};
|
|
4312
4324
|
styleInject(css_248z$5);
|
|
@@ -4829,7 +4841,7 @@ const Title = ({
|
|
|
4829
4841
|
}
|
|
4830
4842
|
};
|
|
4831
4843
|
|
|
4832
|
-
var css_248z$c = ".Modal-modules_modal__M6coU
|
|
4844
|
+
var css_248z$c = ".Modal-modules_modal__M6coU .Modal-modules_modal_content__kI5NN{align-items:space-between;background:#fff;border:none;display:flex;flex-direction:column;gap:1rem;height:50rem;left:50%;padding:1rem;position:absolute;top:50%;transform:translate(-50%,-50%);width:65rem;z-index:1301}.Modal-modules_modal__M6coU .Modal-modules_modal_content__kI5NN .Modal-modules_modal_header__bLwe9{align-items:center;display:flex;gap:.5rem;justify-content:space-between;width:100%}.Modal-modules_modal__M6coU .Modal-modules_modal_content__kI5NN .Modal-modules_modal_buttons_container__VIykY{display:flex;gap:.5rem;justify-content:flex-end;width:100%}.Modal-modules_modal_overlay__sU-UF .Modal-modules_modal_content__kI5NN{align-items:space-between;background:#fff;border:none;display:flex;flex-direction:column;gap:.5rem;height:auto;left:50%;padding:1rem;position:absolute;top:50%;transform:translate(-50%,-50%);width:21rem;z-index:1301}.Modal-modules_modal_overlay__sU-UF .Modal-modules_modal_content__kI5NN .Modal-modules_modal_header__bLwe9{align-items:center;display:flex;gap:.5rem;justify-content:space-between;width:100%}.Modal-modules_modal_overlay__sU-UF .Modal-modules_modal_content__kI5NN .Modal-modules_modal_buttons_container__VIykY{display:flex;gap:.5rem;justify-content:flex-end;margin-top:.5rem;width:100%}";
|
|
4833
4845
|
var styles$c = {"modal":"Modal-modules_modal__M6coU","modal_content":"Modal-modules_modal_content__kI5NN","modal_header":"Modal-modules_modal_header__bLwe9","modal_buttons_container":"Modal-modules_modal_buttons_container__VIykY","modal_overlay":"Modal-modules_modal_overlay__sU-UF"};
|
|
4834
4846
|
styleInject(css_248z$c);
|
|
4835
4847
|
|