@trafilea/afrodita-components 5.0.0-beta.13 → 5.0.0-beta.16

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.d.ts CHANGED
@@ -522,6 +522,7 @@ interface BaseButtonProps {
522
522
  onClick: () => void;
523
523
  className?: string;
524
524
  inline?: boolean;
525
+ uppercase?: boolean;
525
526
  testId?: string;
526
527
  }
527
528
 
@@ -532,8 +533,9 @@ interface TextButtonProps$1 extends BaseProps {
532
533
  TrailingIcon?: IconType;
533
534
  iconColor?: string;
534
535
  size?: ComponentSize;
536
+ uppercase?: boolean;
535
537
  }
536
- declare const TextButton: ({ text, LeadingIcon, TrailingIcon, iconColor, disabled, type, size, onClick, }: TextButtonProps$1) => _emotion_react_jsx_runtime.JSX.Element;
538
+ declare const TextButton: ({ text, LeadingIcon, TrailingIcon, iconColor, disabled, type, size, uppercase, onClick, }: TextButtonProps$1) => _emotion_react_jsx_runtime.JSX.Element;
537
539
 
538
540
  interface DiscountTagProps {
539
541
  discount: number;
@@ -3558,14 +3558,14 @@ function jsxs(type, props, key) {
3558
3558
  }
3559
3559
 
3560
3560
  var BaseButton = function (_a) {
3561
- var children = _a.children, renderLeading = _a.renderLeading, renderTrailing = _a.renderTrailing, disabled = _a.disabled, _b = _a.type, type = _b === void 0 ? 'button' : _b, onClick = _a.onClick, className = _a.className, inline = _a.inline, _c = _a.testId, testId = _c === void 0 ? 'base-button' : _c;
3561
+ var children = _a.children, renderLeading = _a.renderLeading, renderTrailing = _a.renderTrailing, disabled = _a.disabled, _b = _a.type, type = _b === void 0 ? 'button' : _b, onClick = _a.onClick, className = _a.className, inline = _a.inline, _c = _a.uppercase, uppercase = _c === void 0 ? true : _c, _d = _a.testId, testId = _d === void 0 ? 'base-button' : _d;
3562
3562
  return (jsxs("button", __assign$1({ onClick: onClick, disabled: disabled, className: className, type: type, "data-testid": testId, css: {
3563
3563
  display: inline ? 'inline-flex' : 'flex',
3564
3564
  justifyContent: 'center',
3565
3565
  alignItems: 'center',
3566
3566
  padding: '0.75rem 2rem',
3567
3567
  textDecoration: 'none',
3568
- textTransform: 'uppercase',
3568
+ textTransform: uppercase ? 'uppercase' : 'unset',
3569
3569
  boxSizing: 'border-box',
3570
3570
  cursor: 'pointer',
3571
3571
  } }, { children: [renderLeading, children, renderTrailing] }), void 0));
@@ -4246,10 +4246,10 @@ var getIconFill = function (theme, disabled, iconColor) {
4246
4246
  return theme.colors.shades['550'].color;
4247
4247
  };
4248
4248
  var TextButton = function (_a) {
4249
- var text = _a.text, LeadingIcon = _a.LeadingIcon, TrailingIcon = _a.TrailingIcon, iconColor = _a.iconColor, disabled = _a.disabled, type = _a.type, _b = _a.size, size = _b === void 0 ? ComponentSize.Medium : _b, onClick = _a.onClick;
4249
+ var text = _a.text, LeadingIcon = _a.LeadingIcon, TrailingIcon = _a.TrailingIcon, iconColor = _a.iconColor, disabled = _a.disabled, type = _a.type, _b = _a.size, size = _b === void 0 ? ComponentSize.Medium : _b, _c = _a.uppercase, uppercase = _c === void 0 ? true : _c, onClick = _a.onClick;
4250
4250
  var theme = useTheme();
4251
4251
  var iconFill = getIconFill(theme, disabled, iconColor);
4252
- return (jsx(BaseButton, __assign$1({ renderLeading: withContainer(iconFill, true, LeadingIcon), renderTrailing: withContainer(iconFill, false, TrailingIcon), disabled: disabled, type: type, onClick: onClick, css: textButtonStyles$1(theme, size) }, { children: text }), void 0));
4252
+ return (jsx(BaseButton, __assign$1({ renderLeading: withContainer(iconFill, true, LeadingIcon), renderTrailing: withContainer(iconFill, false, TrailingIcon), disabled: disabled, type: type, onClick: onClick, css: textButtonStyles$1(theme, size), uppercase: uppercase }, { children: text }), void 0));
4253
4253
  };
4254
4254
  var templateObject_1$12;
4255
4255
 
@@ -4258,7 +4258,7 @@ var P$3 = newStyled.p(templateObject_2$G || (templateObject_2$G = __makeTemplate
4258
4258
  var PercentageSpan = newStyled.span(templateObject_3$r || (templateObject_3$r = __makeTemplateObject(["\n font-weight: 700;\n text-decoration-line: underline;\n cursor: pointer;\n"], ["\n font-weight: 700;\n text-decoration-line: underline;\n cursor: pointer;\n"])));
4259
4259
  var SizeFitGuide = function (_a) {
4260
4260
  var title = _a.title, fitPercentage = _a.fitPercentage, onClick = _a.onClick, onClickFitPercentage = _a.onClickFitPercentage;
4261
- return (jsxs$1(Container$F, { children: [jsx$1(TextButton, { LeadingIcon: Icon.PDP.Rule, size: ComponentSize.Small, text: title, onClick: onClick }, void 0), !!fitPercentage && (jsxs$1(P$3, { children: ["Fit As Expected:", ' ', jsxs$1(PercentageSpan, __assign$1({ onClick: onClickFitPercentage, role: "button" }, { children: [fitPercentage, "%"] }), void 0)] }, void 0))] }, void 0));
4261
+ return (jsxs$1(Container$F, { children: [jsx$1(TextButton, { LeadingIcon: Icon.PDP.Rule, size: ComponentSize.Small, text: title, onClick: onClick, uppercase: false }, void 0), !!fitPercentage && (jsxs$1(P$3, { children: ["Fit As Expected:", ' ', jsxs$1(PercentageSpan, __assign$1({ onClick: onClickFitPercentage, role: "button" }, { children: [fitPercentage, "%"] }), void 0)] }, void 0))] }, void 0));
4262
4262
  };
4263
4263
  var templateObject_1$11, templateObject_2$G, templateObject_3$r;
4264
4264
 
@@ -11098,8 +11098,8 @@ var visibleStyle = function (_a) {
11098
11098
  return opened
11099
11099
  ? css(templateObject_1$9 || (templateObject_1$9 = __makeTemplateObject(["\n opacity: 1;\n pointer-events: all;\n transform: translate(-50%, -50%);\n "], ["\n opacity: 1;\n pointer-events: all;\n transform: translate(-50%, -50%);\n "]))) : css(templateObject_2$5 || (templateObject_2$5 = __makeTemplateObject(["\n opacity: 0;\n pointer-events: none;\n transform: translate(-50%, -40%);\n "], ["\n opacity: 0;\n pointer-events: none;\n transform: translate(-50%, -40%);\n "])));
11100
11100
  };
11101
- var Container$4 = newStyled.div(templateObject_3$5 || (templateObject_3$5 = __makeTemplateObject(["\n border: 1px solid var(--colors-pallete-primary-color);\n border-radius: ", ";\n padding: 20px;\n position: fixed;\n left: 50%;\n top: 50%;\n z-index: var(--zIndex-modal);\n background-color: var(--colors-background-color);\n transition: transform 0.3s, opacity 0.3s;\n max-width: ", ";\n max-height: ", ";\n width: ", ";\n height: ", ";\n ", "\n ", "\n\n ", ";\n"], ["\n border: 1px solid var(--colors-pallete-primary-color);\n border-radius: ", ";\n padding: 20px;\n position: fixed;\n left: 50%;\n top: 50%;\n z-index: var(--zIndex-modal);\n background-color: var(--colors-background-color);\n transition: transform 0.3s, opacity 0.3s;\n max-width: ", ";\n max-height: ", ";\n width: ", ";\n height: ", ";\n ", "\n ", "\n\n ", ";\n"])), function (props) { return "".concat(props.maxFullScreen ? '0' : 'var(--radius-regular)'); }, function (props) { return "".concat(props.maxFullScreen ? '100vw' : '90vw'); }, function (props) { return "".concat(props.maxFullScreen ? '100vh' : '90vh'); }, function (props) { return "".concat(props.maxFullScreen ? '100vw' : 'fit-content'); }, function (props) { return "".concat(props.maxFullScreen ? '100vh' : 'inherit'); }, function (props) { return "".concat(props.maxFullScreen ? 'overflow-y: auto;' : ''); }, mediaQueries({
11102
- minWidth: ['50%', 'var(--component-modal-minWidth)'],
11101
+ var Container$4 = newStyled.div(templateObject_3$5 || (templateObject_3$5 = __makeTemplateObject(["\n border: 1px solid var(--colors-pallete-primary-color);\n border-radius: ", ";\n padding: 20px;\n position: fixed;\n left: 50%;\n top: 50%;\n z-index: var(--zIndex-modal);\n background-color: var(--colors-background-color);\n transition: transform 0.3s, opacity 0.3s;\n overflow-y: auto;\n max-width: ", ";\n max-height: ", ";\n width: ", ";\n height: ", ";\n ", "\n\n ", ";\n"], ["\n border: 1px solid var(--colors-pallete-primary-color);\n border-radius: ", ";\n padding: 20px;\n position: fixed;\n left: 50%;\n top: 50%;\n z-index: var(--zIndex-modal);\n background-color: var(--colors-background-color);\n transition: transform 0.3s, opacity 0.3s;\n overflow-y: auto;\n max-width: ", ";\n max-height: ", ";\n width: ", ";\n height: ", ";\n ", "\n\n ", ";\n"])), function (props) { return "".concat(props.maxFullScreen ? '0' : 'var(--radius-regular)'); }, function (props) { return "".concat(props.maxFullScreen ? '100vw' : '90vw'); }, function (props) { return "".concat(props.maxFullScreen ? '100vh' : '90vh'); }, function (props) { return "".concat(props.maxFullScreen ? '100vw' : 'auto'); }, function (props) { return "".concat(props.maxFullScreen ? '100vh' : 'inherit'); }, mediaQueries({
11102
+ minWidth: ['90%', 'var(--component-modal-minWidth)'],
11103
11103
  }), visibleStyle);
11104
11104
  var Overlay = newStyled.div(templateObject_4$4 || (templateObject_4$4 = __makeTemplateObject(["\n position: fixed;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.75);\n z-index: var(--zIndex-overlay);\n transition: transform 0.3s, opacity 0.3s;\n\n ", "\n\n transform: none;\n"], ["\n position: fixed;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.75);\n z-index: var(--zIndex-overlay);\n transition: transform 0.3s, opacity 0.3s;\n\n ", "\n\n transform: none;\n"])), visibleStyle);
11105
11105
  var Modal = function (_a) {
package/build/index.js CHANGED
@@ -3584,14 +3584,14 @@ function jsxs(type, props, key) {
3584
3584
  }
3585
3585
 
3586
3586
  var BaseButton = function (_a) {
3587
- var children = _a.children, renderLeading = _a.renderLeading, renderTrailing = _a.renderTrailing, disabled = _a.disabled, _b = _a.type, type = _b === void 0 ? 'button' : _b, onClick = _a.onClick, className = _a.className, inline = _a.inline, _c = _a.testId, testId = _c === void 0 ? 'base-button' : _c;
3587
+ var children = _a.children, renderLeading = _a.renderLeading, renderTrailing = _a.renderTrailing, disabled = _a.disabled, _b = _a.type, type = _b === void 0 ? 'button' : _b, onClick = _a.onClick, className = _a.className, inline = _a.inline, _c = _a.uppercase, uppercase = _c === void 0 ? true : _c, _d = _a.testId, testId = _d === void 0 ? 'base-button' : _d;
3588
3588
  return (jsxs("button", __assign$1({ onClick: onClick, disabled: disabled, className: className, type: type, "data-testid": testId, css: {
3589
3589
  display: inline ? 'inline-flex' : 'flex',
3590
3590
  justifyContent: 'center',
3591
3591
  alignItems: 'center',
3592
3592
  padding: '0.75rem 2rem',
3593
3593
  textDecoration: 'none',
3594
- textTransform: 'uppercase',
3594
+ textTransform: uppercase ? 'uppercase' : 'unset',
3595
3595
  boxSizing: 'border-box',
3596
3596
  cursor: 'pointer',
3597
3597
  } }, { children: [renderLeading, children, renderTrailing] }), void 0));
@@ -4272,10 +4272,10 @@ var getIconFill = function (theme, disabled, iconColor) {
4272
4272
  return theme.colors.shades['550'].color;
4273
4273
  };
4274
4274
  var TextButton = function (_a) {
4275
- var text = _a.text, LeadingIcon = _a.LeadingIcon, TrailingIcon = _a.TrailingIcon, iconColor = _a.iconColor, disabled = _a.disabled, type = _a.type, _b = _a.size, size = _b === void 0 ? exports.ComponentSize.Medium : _b, onClick = _a.onClick;
4275
+ var text = _a.text, LeadingIcon = _a.LeadingIcon, TrailingIcon = _a.TrailingIcon, iconColor = _a.iconColor, disabled = _a.disabled, type = _a.type, _b = _a.size, size = _b === void 0 ? exports.ComponentSize.Medium : _b, _c = _a.uppercase, uppercase = _c === void 0 ? true : _c, onClick = _a.onClick;
4276
4276
  var theme = useTheme();
4277
4277
  var iconFill = getIconFill(theme, disabled, iconColor);
4278
- return (jsx(BaseButton, __assign$1({ renderLeading: withContainer(iconFill, true, LeadingIcon), renderTrailing: withContainer(iconFill, false, TrailingIcon), disabled: disabled, type: type, onClick: onClick, css: textButtonStyles$1(theme, size) }, { children: text }), void 0));
4278
+ return (jsx(BaseButton, __assign$1({ renderLeading: withContainer(iconFill, true, LeadingIcon), renderTrailing: withContainer(iconFill, false, TrailingIcon), disabled: disabled, type: type, onClick: onClick, css: textButtonStyles$1(theme, size), uppercase: uppercase }, { children: text }), void 0));
4279
4279
  };
4280
4280
  var templateObject_1$12;
4281
4281
 
@@ -4284,7 +4284,7 @@ var P$3 = newStyled.p(templateObject_2$G || (templateObject_2$G = __makeTemplate
4284
4284
  var PercentageSpan = newStyled.span(templateObject_3$r || (templateObject_3$r = __makeTemplateObject(["\n font-weight: 700;\n text-decoration-line: underline;\n cursor: pointer;\n"], ["\n font-weight: 700;\n text-decoration-line: underline;\n cursor: pointer;\n"])));
4285
4285
  var SizeFitGuide = function (_a) {
4286
4286
  var title = _a.title, fitPercentage = _a.fitPercentage, onClick = _a.onClick, onClickFitPercentage = _a.onClickFitPercentage;
4287
- return (jsxRuntime.jsxs(Container$F, { children: [jsxRuntime.jsx(TextButton, { LeadingIcon: Icon.PDP.Rule, size: exports.ComponentSize.Small, text: title, onClick: onClick }, void 0), !!fitPercentage && (jsxRuntime.jsxs(P$3, { children: ["Fit As Expected:", ' ', jsxRuntime.jsxs(PercentageSpan, __assign$1({ onClick: onClickFitPercentage, role: "button" }, { children: [fitPercentage, "%"] }), void 0)] }, void 0))] }, void 0));
4287
+ return (jsxRuntime.jsxs(Container$F, { children: [jsxRuntime.jsx(TextButton, { LeadingIcon: Icon.PDP.Rule, size: exports.ComponentSize.Small, text: title, onClick: onClick, uppercase: false }, void 0), !!fitPercentage && (jsxRuntime.jsxs(P$3, { children: ["Fit As Expected:", ' ', jsxRuntime.jsxs(PercentageSpan, __assign$1({ onClick: onClickFitPercentage, role: "button" }, { children: [fitPercentage, "%"] }), void 0)] }, void 0))] }, void 0));
4288
4288
  };
4289
4289
  var templateObject_1$11, templateObject_2$G, templateObject_3$r;
4290
4290
 
@@ -11124,8 +11124,8 @@ var visibleStyle = function (_a) {
11124
11124
  return opened
11125
11125
  ? css(templateObject_1$9 || (templateObject_1$9 = __makeTemplateObject(["\n opacity: 1;\n pointer-events: all;\n transform: translate(-50%, -50%);\n "], ["\n opacity: 1;\n pointer-events: all;\n transform: translate(-50%, -50%);\n "]))) : css(templateObject_2$5 || (templateObject_2$5 = __makeTemplateObject(["\n opacity: 0;\n pointer-events: none;\n transform: translate(-50%, -40%);\n "], ["\n opacity: 0;\n pointer-events: none;\n transform: translate(-50%, -40%);\n "])));
11126
11126
  };
11127
- var Container$4 = newStyled.div(templateObject_3$5 || (templateObject_3$5 = __makeTemplateObject(["\n border: 1px solid var(--colors-pallete-primary-color);\n border-radius: ", ";\n padding: 20px;\n position: fixed;\n left: 50%;\n top: 50%;\n z-index: var(--zIndex-modal);\n background-color: var(--colors-background-color);\n transition: transform 0.3s, opacity 0.3s;\n max-width: ", ";\n max-height: ", ";\n width: ", ";\n height: ", ";\n ", "\n ", "\n\n ", ";\n"], ["\n border: 1px solid var(--colors-pallete-primary-color);\n border-radius: ", ";\n padding: 20px;\n position: fixed;\n left: 50%;\n top: 50%;\n z-index: var(--zIndex-modal);\n background-color: var(--colors-background-color);\n transition: transform 0.3s, opacity 0.3s;\n max-width: ", ";\n max-height: ", ";\n width: ", ";\n height: ", ";\n ", "\n ", "\n\n ", ";\n"])), function (props) { return "".concat(props.maxFullScreen ? '0' : 'var(--radius-regular)'); }, function (props) { return "".concat(props.maxFullScreen ? '100vw' : '90vw'); }, function (props) { return "".concat(props.maxFullScreen ? '100vh' : '90vh'); }, function (props) { return "".concat(props.maxFullScreen ? '100vw' : 'fit-content'); }, function (props) { return "".concat(props.maxFullScreen ? '100vh' : 'inherit'); }, function (props) { return "".concat(props.maxFullScreen ? 'overflow-y: auto;' : ''); }, mediaQueries({
11128
- minWidth: ['50%', 'var(--component-modal-minWidth)'],
11127
+ var Container$4 = newStyled.div(templateObject_3$5 || (templateObject_3$5 = __makeTemplateObject(["\n border: 1px solid var(--colors-pallete-primary-color);\n border-radius: ", ";\n padding: 20px;\n position: fixed;\n left: 50%;\n top: 50%;\n z-index: var(--zIndex-modal);\n background-color: var(--colors-background-color);\n transition: transform 0.3s, opacity 0.3s;\n overflow-y: auto;\n max-width: ", ";\n max-height: ", ";\n width: ", ";\n height: ", ";\n ", "\n\n ", ";\n"], ["\n border: 1px solid var(--colors-pallete-primary-color);\n border-radius: ", ";\n padding: 20px;\n position: fixed;\n left: 50%;\n top: 50%;\n z-index: var(--zIndex-modal);\n background-color: var(--colors-background-color);\n transition: transform 0.3s, opacity 0.3s;\n overflow-y: auto;\n max-width: ", ";\n max-height: ", ";\n width: ", ";\n height: ", ";\n ", "\n\n ", ";\n"])), function (props) { return "".concat(props.maxFullScreen ? '0' : 'var(--radius-regular)'); }, function (props) { return "".concat(props.maxFullScreen ? '100vw' : '90vw'); }, function (props) { return "".concat(props.maxFullScreen ? '100vh' : '90vh'); }, function (props) { return "".concat(props.maxFullScreen ? '100vw' : 'auto'); }, function (props) { return "".concat(props.maxFullScreen ? '100vh' : 'inherit'); }, mediaQueries({
11128
+ minWidth: ['90%', 'var(--component-modal-minWidth)'],
11129
11129
  }), visibleStyle);
11130
11130
  var Overlay = newStyled.div(templateObject_4$4 || (templateObject_4$4 = __makeTemplateObject(["\n position: fixed;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.75);\n z-index: var(--zIndex-overlay);\n transition: transform 0.3s, opacity 0.3s;\n\n ", "\n\n transform: none;\n"], ["\n position: fixed;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.75);\n z-index: var(--zIndex-overlay);\n transition: transform 0.3s, opacity 0.3s;\n\n ", "\n\n transform: none;\n"])), visibleStyle);
11131
11131
  var Modal = function (_a) {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Trafilea's Design System",
4
4
  "author": "Trafilea",
5
5
  "repository": "https://github.com/trafilea/afrodita-components",
6
- "version": "5.0.0-beta.13",
6
+ "version": "5.0.0-beta.16",
7
7
  "private": false,
8
8
  "main": "build/index.js",
9
9
  "style": "build/index.css",