pds-dev-kit-web-test 2.5.5 → 2.5.7
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.
| 
         @@ -194,7 +194,9 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) { 
     | 
|
| 
       194 
194 
     | 
    
         
             
                        });
         
     | 
| 
       195 
195 
     | 
    
         
             
                };
         
     | 
| 
       196 
196 
     | 
    
         
             
                var padding = (0, parseSectionPadding_1.default)(CB_LAYOUT_PROP_PADDING, device);
         
     | 
| 
       197 
     | 
    
         
            -
                var sectionRow = CB_PLACEMENT_PROP_SECTION 
     | 
| 
      
 197 
     | 
    
         
            +
                var sectionRow = CB_PLACEMENT_PROP_SECTION[device === 'DESKTOP'
         
     | 
| 
      
 198 
     | 
    
         
            +
                    ? 'CB_PLACEMENT_PROP_SECTION_SPEC_ROWS'
         
     | 
| 
      
 199 
     | 
    
         
            +
                    : 'CB_PLACEMENT_PROP_SECTION_SPEC_ROWS:MOBILE'];
         
     | 
| 
       198 
200 
     | 
    
         
             
                var rowHeight = (function () {
         
     | 
| 
       199 
201 
     | 
    
         
             
                    if (!size.width) {
         
     | 
| 
       200 
202 
     | 
    
         
             
                        return 50;
         
     | 
| 
         @@ -217,16 +219,15 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) { 
     | 
|
| 
       217 
219 
     | 
    
         
             
                            return size.width * 0.0421;
         
     | 
| 
       218 
220 
     | 
    
         
             
                        }
         
     | 
| 
       219 
221 
     | 
    
         
             
                        if (size.width < 327) {
         
     | 
| 
       220 
     | 
    
         
            -
                            return Math.min(size.width 
     | 
| 
      
 222 
     | 
    
         
            +
                            return Math.min(getDefensiveFontSize(device, size.width), 14);
         
     | 
| 
       221 
223 
     | 
    
         
             
                        }
         
     | 
| 
       222 
224 
     | 
    
         
             
                        return 16;
         
     | 
| 
       223 
225 
     | 
    
         
             
                    }
         
     | 
| 
       224 
     | 
    
         
            -
                    var cellWidth = size.width / DESKTOP_GRID_COLS;
         
     | 
| 
       225 
226 
     | 
    
         
             
                    if (responsiveFontMode) {
         
     | 
| 
       226 
227 
     | 
    
         
             
                        return size.width * 0.0133;
         
     | 
| 
       227 
228 
     | 
    
         
             
                    }
         
     | 
| 
       228 
229 
     | 
    
         
             
                    if (size.width < 1200) {
         
     | 
| 
       229 
     | 
    
         
            -
                        return Math.min(size.width 
     | 
| 
      
 230 
     | 
    
         
            +
                        return Math.min(getDefensiveFontSize(device, size.width), 14);
         
     | 
| 
       230 
231 
     | 
    
         
             
                    }
         
     | 
| 
       231 
232 
     | 
    
         
             
                    return 16;
         
     | 
| 
       232 
233 
     | 
    
         
             
                })();
         
     | 
| 
         @@ -236,7 +237,7 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) { 
     | 
|
| 
       236 
237 
     | 
    
         
             
                                    paddingBottom: padding.bottom,
         
     | 
| 
       237 
238 
     | 
    
         
             
                                    paddingRight: padding.right,
         
     | 
| 
       238 
239 
     | 
    
         
             
                                    paddingLeft: padding.left
         
     | 
| 
       239 
     | 
    
         
            -
                                } }, { children: (0, jsx_runtime_1.jsx)(GridContainer, __assign({ ref: containerRef, cols: isMobile ? 8 : 24, rowHeight: rowHeight, sectionRow: sectionRow, style: {
         
     | 
| 
      
 240 
     | 
    
         
            +
                                } }, { children: (0, jsx_runtime_1.jsx)(GridContainer, __assign({ ref: containerRef, cols: isMobile ? 8 : 24, rowHeight: rowHeight, sectionRow: sectionRow !== null && sectionRow !== void 0 ? sectionRow : 0, style: {
         
     | 
| 
       240 
241 
     | 
    
         
             
                                        width: customSectionStyles.width,
         
     | 
| 
       241 
242 
     | 
    
         
             
                                        maxWidth: customSectionStyles.maxWidth,
         
     | 
| 
       242 
243 
     | 
    
         
             
                                        minWidth: isMobile ? GLE_MIN_WIDTH_MOBILE_PX : GLE_MIN_WIDTH_DESKTOP_PX,
         
     | 
| 
         @@ -246,4 +247,10 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) { 
     | 
|
| 
       246 
247 
     | 
    
         
             
            var GridContainer = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n  display: grid; /* Space between grid items */\n  gap: 10px;\n  grid-template-columns: repeat(", ", 1fr);\n  grid-template-rows: repeat(\n    ", ",\n    minmax(", ", auto)\n  );\n  padding: 0 10px;\n\n  * {\n    box-sizing: border-box;\n  }\n"], ["\n  display: grid; /* Space between grid items */\n  gap: 10px;\n  grid-template-columns: repeat(", ", 1fr);\n  grid-template-rows: repeat(\n    ", ",\n    minmax(", ", auto)\n  );\n  padding: 0 10px;\n\n  * {\n    box-sizing: border-box;\n  }\n"])), function (props) { return props.cols; }, function (props) { return props.sectionRow; }, function (props) { return "".concat(props.rowHeight, "px"); });
         
     | 
| 
       247 
248 
     | 
    
         
             
            var S_SectionWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n  position: relative;\n"], ["\n  position: relative;\n"])));
         
     | 
| 
       248 
249 
     | 
    
         
             
            exports.default = react_1.default.memo(CustomSection);
         
     | 
| 
      
 250 
     | 
    
         
            +
            function getDefensiveFontSize(device, width) {
         
     | 
| 
      
 251 
     | 
    
         
            +
                if (device === 'MOBILE') {
         
     | 
| 
      
 252 
     | 
    
         
            +
                    return width * (0.0000868 * width + 0.0202);
         
     | 
| 
      
 253 
     | 
    
         
            +
                }
         
     | 
| 
      
 254 
     | 
    
         
            +
                return width * (0.0000246 * width - 0.01618);
         
     | 
| 
      
 255 
     | 
    
         
            +
            }
         
     | 
| 
       249 
256 
     | 
    
         
             
            var templateObject_1, templateObject_2;
         
     |