@trafilea/afrodita-components 5.0.0-beta.102 → 5.0.0-beta.104

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/build/index.js CHANGED
@@ -4042,7 +4042,7 @@ exports.InputValidationType = void 0;
4042
4042
  InputValidationType[InputValidationType["Empty"] = 2] = "Empty";
4043
4043
  })(exports.InputValidationType || (exports.InputValidationType = {}));
4044
4044
 
4045
- var Section = newStyled.div(templateObject_1$1i || (templateObject_1$1i = __makeTemplateObject(["\n font-weight: 600;\n display: flex;\n flex-direction: row;\n align-items: center;\n align-text: left;\n width: 100%;\n box-sizing: border-box;\n align-self: flex-start;\n padding: ", ";\n"], ["\n font-weight: 600;\n display: flex;\n flex-direction: row;\n align-items: center;\n align-text: left;\n width: 100%;\n box-sizing: border-box;\n align-self: flex-start;\n padding: ", ";\n"])), function (props) {
4045
+ var Section = newStyled.div(templateObject_1$1j || (templateObject_1$1j = __makeTemplateObject(["\n font-weight: 600;\n display: flex;\n flex-direction: row;\n align-items: center;\n align-text: left;\n width: 100%;\n box-sizing: border-box;\n align-self: flex-start;\n padding: ", ";\n"], ["\n font-weight: 600;\n display: flex;\n flex-direction: row;\n align-items: center;\n align-text: left;\n width: 100%;\n box-sizing: border-box;\n align-self: flex-start;\n padding: ", ";\n"])), function (props) {
4046
4046
  return props.type === exports.CardSectionType.Header ? '1.5rem 1.5rem 0' : '0 1.5rem 1.5rem';
4047
4047
  });
4048
4048
  var CardHeader = function (_a) {
@@ -4053,14 +4053,14 @@ var CardFooter = function (_a) {
4053
4053
  var children = _a.children;
4054
4054
  return (jsxRuntime.jsx(Section, __assign$1({ type: exports.CardSectionType.Footer }, { children: children }), void 0));
4055
4055
  };
4056
- var templateObject_1$1i;
4056
+ var templateObject_1$1j;
4057
4057
 
4058
- var Body = newStyled.div(templateObject_1$1h || (templateObject_1$1h = __makeTemplateObject(["\n display: flex;\n align-items: center;\n padding: 0.5rem 1.5rem;\n align-self: flex-start;\n"], ["\n display: flex;\n align-items: center;\n padding: 0.5rem 1.5rem;\n align-self: flex-start;\n"])));
4058
+ var Body = newStyled.div(templateObject_1$1i || (templateObject_1$1i = __makeTemplateObject(["\n display: flex;\n align-items: center;\n padding: 0.5rem 1.5rem;\n align-self: flex-start;\n"], ["\n display: flex;\n align-items: center;\n padding: 0.5rem 1.5rem;\n align-self: flex-start;\n"])));
4059
4059
  var CardBody = function (_a) {
4060
4060
  var children = _a.children;
4061
4061
  return jsxRuntime.jsx(Body, { children: children }, void 0);
4062
4062
  };
4063
- var templateObject_1$1h;
4063
+ var templateObject_1$1i;
4064
4064
 
4065
4065
  var IGNORED_KEYS = ['typography', 'fonts'];
4066
4066
  var applyVariablesIntoTheme = function (theme) {
@@ -4205,7 +4205,7 @@ var AssetsProvider = function (_a) {
4205
4205
  };
4206
4206
  var useThemeAssets = function () { return React$2.useContext(AssetsContext); };
4207
4207
 
4208
- var Container$O = newStyled.div(templateObject_1$1g || (templateObject_1$1g = __makeTemplateObject(["\n ", "\n width: ", ";\n background: ", ";\n border-radius: ", ";\n border: ", ";\n"], ["\n ", "\n width: ", ";\n background: ", ";\n border-radius: ", ";\n border: ", ";\n"])), function (_a) {
4208
+ var Container$O = newStyled.div(templateObject_1$1h || (templateObject_1$1h = __makeTemplateObject(["\n ", "\n width: ", ";\n background: ", ";\n border-radius: ", ";\n border: ", ";\n"], ["\n ", "\n width: ", ";\n background: ", ";\n border-radius: ", ";\n border: ", ";\n"])), function (_a) {
4209
4209
  var flex = _a.flex;
4210
4210
  return flex &&
4211
4211
  "display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;";
@@ -4225,7 +4225,7 @@ var Card$2 = Object.assign(Card$1, {
4225
4225
  Footer: CardFooter,
4226
4226
  Body: CardBody,
4227
4227
  });
4228
- var templateObject_1$1g;
4228
+ var templateObject_1$1h;
4229
4229
 
4230
4230
  var Fragment = jsxRuntime.Fragment;
4231
4231
  function jsx(type, props, key) {
@@ -4367,7 +4367,7 @@ function BaseSelectOption(_a) {
4367
4367
  return (jsxRuntime.jsx(Ee.Option, __assign$1({ className: className, as: as, value: value, disabled: disabled }, { children: children }), void 0));
4368
4368
  }
4369
4369
 
4370
- var CustomListBox = newStyled(Ee)(templateObject_1$1f || (templateObject_1$1f = __makeTemplateObject(["\n position: relative;\n"], ["\n position: relative;\n"])));
4370
+ var CustomListBox = newStyled(Ee)(templateObject_1$1g || (templateObject_1$1g = __makeTemplateObject(["\n position: relative;\n"], ["\n position: relative;\n"])));
4371
4371
  function BaseSelect(_a) {
4372
4372
  var value = _a.value, onChange = _a.onChange, disabled = _a.disabled, children = _a.children, className = _a.className;
4373
4373
  return (jsxRuntime.jsx(CustomListBox, __assign$1({ disabled: disabled, as: "div", value: value, onChange: onChange, className: className }, { children: children }), void 0));
@@ -4377,7 +4377,7 @@ var BaseSelect$1 = Object.assign(BaseSelect, {
4377
4377
  Options: BaseSelectOptions,
4378
4378
  Option: BaseSelectOption,
4379
4379
  });
4380
- var templateObject_1$1f;
4380
+ var templateObject_1$1g;
4381
4381
 
4382
4382
  var CustomButton = newStyled.button(function (_a) {
4383
4383
  var theme = _a.theme, wide = _a.wide, isSortOrFilter = _a.isSortOrFilter;
@@ -4590,12 +4590,12 @@ var CustomCheckboxStyles = {
4590
4590
  },
4591
4591
  };
4592
4592
 
4593
- var Container$N = newStyled.div(templateObject_1$1e || (templateObject_1$1e = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n user-select: none;\n position: relative;\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n user-select: none;\n position: relative;\n"])));
4593
+ var Container$N = newStyled.div(templateObject_1$1f || (templateObject_1$1f = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n user-select: none;\n position: relative;\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n user-select: none;\n position: relative;\n"])));
4594
4594
  var CustomCheckbox = newStyled.div(CustomCheckboxStyles.baseStyles, function (props) { return [
4595
4595
  CustomCheckboxStyles[props.size](props.theme),
4596
4596
  CustomCheckboxStyles[props.variant](props.theme, props.isChecked, props.disabled),
4597
4597
  ]; });
4598
- var Input$3 = newStyled.input(templateObject_2$O || (templateObject_2$O = __makeTemplateObject(["\n position: absolute;\n height: 100%;\n width: 100%;\n margin: 0;\n opacity: 0;\n cursor: ", ";\n"], ["\n position: absolute;\n height: 100%;\n width: 100%;\n margin: 0;\n opacity: 0;\n cursor: ", ";\n"])), function (_a) {
4598
+ var Input$3 = newStyled.input(templateObject_2$P || (templateObject_2$P = __makeTemplateObject(["\n position: absolute;\n height: 100%;\n width: 100%;\n margin: 0;\n opacity: 0;\n cursor: ", ";\n"], ["\n position: absolute;\n height: 100%;\n width: 100%;\n margin: 0;\n opacity: 0;\n cursor: ", ";\n"])), function (_a) {
4599
4599
  var disabled = _a.disabled;
4600
4600
  return (disabled ? 'not-allowed' : 'pointer');
4601
4601
  });
@@ -4626,7 +4626,7 @@ var Checkbox = function (_a) {
4626
4626
  }, []);
4627
4627
  return (jsxRuntime.jsxs(Container$N, { children: [jsxRuntime.jsx(Input$3, { type: "checkbox", checked: isChecked, disabled: disabled, onChange: handleChange, id: id }, void 0), jsxRuntime.jsx(CustomCheckbox, __assign$1({ theme: theme, size: size, disabled: disabled, isChecked: isChecked, "data-testid": "checkbox", variant: variant }, { children: isChecked && jsxRuntime.jsx(Icon.Actions.Check, { fill: "#fff" }, void 0) }), void 0), jsxRuntime.jsx(Label$3, __assign$1({ "data-testid": "checkbox-text", size: size, variant: isChecked ? 'demi' : 'regular', htmlFor: id, disabled: disabled }, { children: text }), void 0)] }, void 0));
4628
4628
  };
4629
- var templateObject_1$1e, templateObject_2$O;
4629
+ var templateObject_1$1f, templateObject_2$P;
4630
4630
 
4631
4631
  var CustomOption = newStyled.li(function (_a) {
4632
4632
  var theme = _a.theme, selected = _a.selected, active = _a.active;
@@ -4705,6 +4705,19 @@ function SimpleDropdown(_a) {
4705
4705
  return (jsxRuntime.jsxs(BaseDropdown$1, __assign$1({ value: selectedValue, onChange: onChangeHandler, disabled: disabled, wide: wide }, { children: [jsxRuntime.jsx(Button, __assign$1({ OpenIcon: Icon.Arrows.ChevronDown, CloseIcon: Icon.Arrows.ChevronUp, wide: wide, isSortOrFilter: sort, "data-testid": testId }, { children: selectedOptionLabel }), void 0), jsxRuntime.jsx(BaseDropdown$1.Options, { children: options.map(function (item) { return (jsxRuntime.jsx(BaseDropdown$1.Option, __assign$1({ value: item, disabled: false }, { children: item.label }), item.key)); }) }, void 0)] }), void 0));
4706
4706
  }
4707
4707
 
4708
+ var DialogDropdownWrapper = newStyled.div(templateObject_1$1e || (templateObject_1$1e = __makeTemplateObject(["\n position: relative;\n display: none;\n ::before,\n ::after {\n content: '';\n position: absolute;\n border: 11px solid transparent;\n margin-left: -10px;\n border-bottom-color: #e9e9e9;\n top: calc(", " - 5px);\n right: calc(", " + 21px);\n z-index: 50 !important;\n }\n ::after {\n border-bottom-color: #fff;\n top: calc(", " - 4px);\n right: calc(", " + 21px);\n z-index: 50 !important;\n }\n"], ["\n position: relative;\n display: none;\n ::before,\n ::after {\n content: '';\n position: absolute;\n border: 11px solid transparent;\n margin-left: -10px;\n border-bottom-color: #e9e9e9;\n top: calc(", " - 5px);\n right: calc(", " + 21px);\n z-index: 50 !important;\n }\n ::after {\n border-bottom-color: #fff;\n top: calc(", " - 4px);\n right: calc(", " + 21px);\n z-index: 50 !important;\n }\n"])), function (props) { return props.top; }, function (props) { return props.right; }, function (props) { return props.top; }, function (props) { return props.right; });
4709
+ var DialogDropdownListContainer = newStyled.ul(templateObject_2$O || (templateObject_2$O = __makeTemplateObject(["\n position: absolute;\n list-style: none;\n width: max-content;\n min-width: 100px;\n background: #fff;\n border: 1px solid #e9e9e9;\n top: calc(", " + 15px);\n right: calc(", " - 23px);\n z-index: 50 !important;\n margin-bottom: 1rem;\n\n font-family: inherit;\n font-size: 100%;\n font-style: inherit;\n font-variant: inherit;\n font-weight: inherit;\n line-height: inherit;\n margin: 0;\n padding: 0;\n vertical-align: inherit;\n"], ["\n position: absolute;\n list-style: none;\n width: max-content;\n min-width: 100px;\n background: #fff;\n border: 1px solid #e9e9e9;\n top: calc(", " + 15px);\n right: calc(", " - 23px);\n z-index: 50 !important;\n margin-bottom: 1rem;\n\n font-family: inherit;\n font-size: 100%;\n font-style: inherit;\n font-variant: inherit;\n font-weight: inherit;\n line-height: inherit;\n margin: 0;\n padding: 0;\n vertical-align: inherit;\n"])), function (props) { return props.top; }, function (props) { return props.right; });
4710
+ var DialogDropdownListItem = newStyled.li(templateObject_3$B || (templateObject_3$B = __makeTemplateObject(["\n border-bottom: 1px solid #e9e9e9;\n margin: 0;\n padding: 0;\n font-style: normal;\n font-weight: 400;\n font-size: 14px;\n line-height: 17px;\n color: var(--colors-shades-550-color);\n vertical-align: inherit;\n"], ["\n border-bottom: 1px solid #e9e9e9;\n margin: 0;\n padding: 0;\n font-style: normal;\n font-weight: 400;\n font-size: 14px;\n line-height: 17px;\n color: var(--colors-shades-550-color);\n vertical-align: inherit;\n"])));
4711
+ var DialogDropdownLink = newStyled.a(templateObject_4$o || (templateObject_4$o = __makeTemplateObject(["\n display: inline-block;\n text-decoration: none;\n width: 100%;\n background-color: transparent;\n border: 0;\n margin: 0;\n padding: 12px;\n cursor: pointer;\n transition: all 0.2s;\n color: var(--colors-shades-700-color);\n font-size: 1.125rem;\n font-style: inherit;\n font-variant: inherit;\n font-weight: inherit;\n line-height: inherit;\n vertical-align: inherit;\n"], ["\n display: inline-block;\n text-decoration: none;\n width: 100%;\n background-color: transparent;\n border: 0;\n margin: 0;\n padding: 12px;\n cursor: pointer;\n transition: all 0.2s;\n color: var(--colors-shades-700-color);\n font-size: 1.125rem;\n font-style: inherit;\n font-variant: inherit;\n font-weight: inherit;\n line-height: inherit;\n vertical-align: inherit;\n"])));
4712
+ var DropdownDialog = function (_a) {
4713
+ var options = _a.options, _b = _a.position, top = _b.top, right = _b.right, style = _a.style, className = _a.className;
4714
+ return (jsxRuntime.jsx(DialogDropdownWrapper, __assign$1({ top: top, right: right, style: style, className: className }, { children: jsxRuntime.jsx(DialogDropdownListContainer, __assign$1({ "data-testid": "dialog-dropdown-list", top: top, right: right }, { children: options.map(function (_a, idx) {
4715
+ var label = _a.label, value = _a.value;
4716
+ return (jsxRuntime.jsx(DialogDropdownListItem, { children: jsxRuntime.jsx(DialogDropdownLink, __assign$1({ href: value }, { children: label }), void 0) }, idx));
4717
+ }) }), void 0) }), void 0));
4718
+ };
4719
+ var templateObject_1$1e, templateObject_2$O, templateObject_3$B, templateObject_4$o;
4720
+
4708
4721
  var getStylesBySize$8 = function (size, theme) {
4709
4722
  switch (size) {
4710
4723
  case exports.ComponentSize.Medium:
@@ -4805,7 +4818,7 @@ var Text$6 = function (_a) {
4805
4818
  var variantName = [variant, size].filter(Boolean).join('-');
4806
4819
  // These are styles specific to `variation-size`.
4807
4820
  var variantSizeStyle = (_b = theme.typography.variants[variantName]) !== null && _b !== void 0 ? _b : {};
4808
- var style = __assign$1(__assign$1({ margin: 0, color: theme.colors.text.color }, variantstyle), variantSizeStyle);
4821
+ var style = __assign$1(__assign$1(__assign$1({ margin: 0, color: theme.colors.text.color }, variantstyle), variantSizeStyle), { fontFamily: theme.fonts.config[0].family });
4809
4822
  if (weight) {
4810
4823
  style.fontWeight = theme.typography.config.weight[weight];
4811
4824
  }
@@ -11680,12 +11693,12 @@ var AccordionSummaryStyles = {
11680
11693
  simple: function (theme, disabled) {
11681
11694
  return css(__assign$1(__assign$1({}, theme.component.accordion.variant.simple.summary), { color: disabled
11682
11695
  ? theme.colors.text.disabled
11683
- : theme.component.accordion.variant.simple.summary.color }));
11696
+ : theme.component.accordion.variant.simple.summary.color, fontFamily: theme.fonts.config[0].family }));
11684
11697
  },
11685
11698
  box: function (theme, disabled) {
11686
11699
  return css(__assign$1(__assign$1({}, theme.component.accordion.variant.box.summary), { color: disabled
11687
11700
  ? theme.colors.text.disabled
11688
- : theme.component.accordion.variant.box.summary.color }));
11701
+ : theme.component.accordion.variant.box.summary.color, fontFamily: theme.fonts.config[0].family }));
11689
11702
  },
11690
11703
  title: function (titleColor) {
11691
11704
  return css({
@@ -17839,6 +17852,7 @@ exports.CrossSell = index;
17839
17852
  exports.DeliveryDetails = DeliveryDetails;
17840
17853
  exports.DiscountTag = DiscountTag;
17841
17854
  exports.Drawer = Drawer;
17855
+ exports.DropdownDialog = DropdownDialog;
17842
17856
  exports.DropdownListIcons = DropdownListIcons;
17843
17857
  exports.FilteringDropdown = FilteringDropdown;
17844
17858
  exports.FilteringTags = Tags;