framework7-react
Advanced tools
Comparing version 8.0.0-beta.4 to 8.0.0-beta.5
@@ -10,3 +10,3 @@ | ||
style?: React.CSSProperties; | ||
bold?: boolean; | ||
strong?: boolean; | ||
onClick?: (event?: any) => void; | ||
@@ -13,0 +13,0 @@ ref?: React.MutableRefObject<{el: HTMLElement | null}>; |
@@ -15,3 +15,3 @@ | ||
targetEl ?: string | object; | ||
angle ?: boolean; | ||
arrow ?: boolean; | ||
backdrop ?: boolean; | ||
@@ -18,0 +18,0 @@ backdropEl ?: string | object; |
@@ -22,3 +22,3 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
targetEl, | ||
angle, | ||
arrow, | ||
backdrop, | ||
@@ -81,3 +81,3 @@ backdropEl, | ||
if ('closeOnEscape' in props) popoverParams.closeOnEscape = closeOnEscape; | ||
if ('angle' in props) popoverParams.angle = angle; | ||
if ('arrow' in props) popoverParams.arrow = arrow; | ||
if ('backdrop' in props) popoverParams.backdrop = backdrop; | ||
@@ -122,3 +122,3 @@ if ('backdropEl' in props) popoverParams.backdropEl = backdropEl; | ||
}, extraAttrs), /*#__PURE__*/React.createElement("div", { | ||
className: "popover-angle" | ||
className: "popover-arrow" | ||
}), /*#__PURE__*/React.createElement("div", { | ||
@@ -125,0 +125,0 @@ className: "popover-inner" |
@@ -36,3 +36,3 @@ | ||
removeDiacritics ?: boolean; | ||
hideDividers ?: boolean; | ||
hideGroupTitles ?: boolean; | ||
hideGroups ?: boolean; | ||
@@ -39,0 +39,0 @@ init ?: boolean; |
@@ -43,3 +43,3 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
removeDiacritics = false, | ||
hideDividers = true, | ||
hideGroupTitles = true, | ||
hideGroups = true, | ||
@@ -121,3 +121,3 @@ init = true | ||
removeDiacritics, | ||
hideDividers, | ||
hideGroupTitles, | ||
hideGroups, | ||
@@ -124,0 +124,0 @@ expandable, |
@@ -10,2 +10,3 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
import { useAsyncComponent } from '../shared/use-async-component.js'; | ||
import { TabsSwipeableContext } from '../shared/tabs-swipeable-context.js'; | ||
@@ -25,2 +26,3 @@ | ||
const routerContext = useContext(RouterContext); | ||
const tabsSwipeableContext = useContext(TabsSwipeableContext); | ||
let initialTabContent = null; | ||
@@ -102,10 +104,15 @@ if (!routerData.current && routerContext && routerContext.route && routerContext.route.route && routerContext.route.route.tab && routerContext.route.route.tab.id === id) { | ||
}; | ||
return /*#__PURE__*/React.createElement("div", _extends({ | ||
const Component = tabsSwipeableContext ? 'swiper-slide' : 'div'; | ||
const classAttrs = tabsSwipeableContext ? { | ||
class: classes | ||
} : { | ||
className: classes | ||
}; | ||
return /*#__PURE__*/React.createElement(Component, _extends({ | ||
id: id, | ||
style: style, | ||
className: classes, | ||
ref: elRef | ||
}, extraAttrs), renderChildren()); | ||
}, extraAttrs, classAttrs), renderChildren()); | ||
}); | ||
Tab.displayName = 'f7-tab'; | ||
export default Tab; |
@@ -6,2 +6,3 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
import { colorClasses } from '../shared/mixins.js'; | ||
import { TabsSwipeableContext } from '../shared/tabs-swipeable-context.js'; | ||
@@ -28,9 +29,6 @@ | ||
if (!elRef.current) return; | ||
elRef.current.f7SwiperParams = swiperParams; | ||
Object.assign(elRef.current, swiperParams); | ||
elRef.current.initialize(); | ||
}, []); | ||
const classes = classNames(className, colorClasses(props)); | ||
const wrapClasses = classNames({ | ||
'tabs-animated-wrap': animated, | ||
'tabs-swipeable-wrap': swipeable | ||
}); | ||
const tabsClasses = classNames({ | ||
@@ -40,7 +38,7 @@ tabs: true, | ||
}); | ||
if (animated || swipeable) { | ||
if (animated) { | ||
return /*#__PURE__*/React.createElement("div", _extends({ | ||
id: id, | ||
style: style, | ||
className: classNames(wrapClasses, classes), | ||
className: classNames('tabs-animated-wrap', classes), | ||
ref: elRef | ||
@@ -51,2 +49,13 @@ }, extraAttrs), /*#__PURE__*/React.createElement("div", { | ||
} | ||
if (swipeable) { | ||
return /*#__PURE__*/React.createElement("swiper-container", _extends({ | ||
id: id, | ||
style: style, | ||
class: classNames(tabsClasses, classes), | ||
ref: elRef, | ||
init: swiperParams ? 'false' : 'true' | ||
}, extraAttrs), /*#__PURE__*/React.createElement(TabsSwipeableContext.Provider, { | ||
value: true | ||
}, children)); | ||
} | ||
return /*#__PURE__*/React.createElement("div", _extends({ | ||
@@ -53,0 +62,0 @@ id: id, |
/** | ||
* Framework7 React 8.0.0-beta.4 | ||
* Framework7 React 8.0.0-beta.5 | ||
* Build full featured iOS & Android apps using Framework7 & React | ||
@@ -10,3 +10,3 @@ * https://framework7.io/react/ | ||
* | ||
* Released on: March 14, 2023 | ||
* Released on: March 23, 2023 | ||
*/ | ||
@@ -13,0 +13,0 @@ import Framework7React from './shared/plugin.js'; |
{ | ||
"name": "framework7-react", | ||
"version": "8.0.0-beta.4", | ||
"version": "8.0.0-beta.5", | ||
"description": "Build full featured iOS & Android apps using Framework7 & React", | ||
@@ -50,3 +50,3 @@ "type": "module", | ||
}, | ||
"releaseDate": "March 14, 2023" | ||
"releaseDate": "March 23, 2023" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
401864
205
11787