wargerm 0.4.37 → 0.5.0

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.
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const _default: () => JSX.Element;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const _default: () => JSX.Element;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const _default: () => JSX.Element;
3
+ export default _default;
@@ -1,13 +1,14 @@
1
1
  import React from 'react';
2
2
  import { ReactNode } from 'react';
3
3
  interface IsliderTabs {
4
- tabs: Array<string>;
4
+ tabs?: Array<any>;
5
+ renderTab?: ReactNode | string;
5
6
  direction: 'left' | 'right';
6
7
  defaultValue?: number;
7
8
  className?: string;
8
9
  tabClassName?: string;
9
10
  activeTabClassName?: string;
10
- components: Array<ReactNode>;
11
+ components?: Array<ReactNode>;
11
12
  onChange?: (event: any) => void;
12
13
  }
13
14
  declare type Props = {
package/dist/index.css CHANGED
@@ -14619,6 +14619,45 @@ button[data-prefers-color='light'] .swiper-pagination-bullet {
14619
14619
  transform: translate(-124px, -63px);
14620
14620
  padding: 12px 6px;
14621
14621
  }
14622
+ [data-prefers-color='light'] .card-container .container-in .sliderTabs {
14623
+ position: absolute;
14624
+ }
14625
+ [data-prefers-color='light'] .card-container .container-in .sliderTabs.left {
14626
+ right: -22px;
14627
+ top: 80px;
14628
+ }
14629
+ [data-prefers-color='light'] .card-container .container-in .sliderTabs.right {
14630
+ left: -22px;
14631
+ top: 80px;
14632
+ }
14633
+ [data-prefers-color='light'] .card-container .container-in .sliderTabs.right .tab::before {
14634
+ transform: skewy(-45deg);
14635
+ }
14636
+ [data-prefers-color='light'] .card-container .container-in .sliderTabs .tab {
14637
+ -ms-writing-mode: tb-lr;
14638
+ writing-mode: vertical-lr;
14639
+ position: relative;
14640
+ margin-bottom: 2px;
14641
+ cursor: pointer;
14642
+ padding: 10px 2px;
14643
+ }
14644
+ [data-prefers-color='light'] .card-container .container-in .sliderTabs .tab::before {
14645
+ content: '';
14646
+ position: absolute;
14647
+ width: 100%;
14648
+ height: 100%;
14649
+ transform: skewy(45deg);
14650
+ left: 0;
14651
+ top: 0;
14652
+ background: rgba(81, 190, 246, 0.28);
14653
+ border: 2px solid #51bef6;
14654
+ transition: background 0.3s ease;
14655
+ z-index: -1;
14656
+ }
14657
+ [data-prefers-color='light'] .card-container .container-in .sliderTabs .tab.active::before {
14658
+ background: #51bef6;
14659
+ border: none;
14660
+ }
14622
14661
  [data-prefers-color='light'] .card-container .container-in::before {
14623
14662
  content: '';
14624
14663
  position: absolute;
@@ -14619,6 +14619,45 @@ button[data-prefers-color='light'] .swiper-pagination-bullet {
14619
14619
  transform: translate(-124px, -63px);
14620
14620
  padding: 12px 6px;
14621
14621
  }
14622
+ [data-prefers-color='light'] .card-container .container-in .sliderTabs {
14623
+ position: absolute;
14624
+ }
14625
+ [data-prefers-color='light'] .card-container .container-in .sliderTabs.left {
14626
+ right: -22px;
14627
+ top: 80px;
14628
+ }
14629
+ [data-prefers-color='light'] .card-container .container-in .sliderTabs.right {
14630
+ left: -22px;
14631
+ top: 80px;
14632
+ }
14633
+ [data-prefers-color='light'] .card-container .container-in .sliderTabs.right .tab::before {
14634
+ transform: skewy(-45deg);
14635
+ }
14636
+ [data-prefers-color='light'] .card-container .container-in .sliderTabs .tab {
14637
+ -ms-writing-mode: tb-lr;
14638
+ writing-mode: vertical-lr;
14639
+ position: relative;
14640
+ margin-bottom: 2px;
14641
+ cursor: pointer;
14642
+ padding: 10px 2px;
14643
+ }
14644
+ [data-prefers-color='light'] .card-container .container-in .sliderTabs .tab::before {
14645
+ content: '';
14646
+ position: absolute;
14647
+ width: 100%;
14648
+ height: 100%;
14649
+ transform: skewy(45deg);
14650
+ left: 0;
14651
+ top: 0;
14652
+ background: rgba(81, 190, 246, 0.28);
14653
+ border: 2px solid #51bef6;
14654
+ transition: background 0.3s ease;
14655
+ z-index: -1;
14656
+ }
14657
+ [data-prefers-color='light'] .card-container .container-in .sliderTabs .tab.active::before {
14658
+ background: #51bef6;
14659
+ border: none;
14660
+ }
14622
14661
  [data-prefers-color='light'] .card-container .container-in::before {
14623
14662
  content: '';
14624
14663
  position: absolute;
package/dist/index.esm.js CHANGED
@@ -9518,7 +9518,7 @@ var Index$b = function Index(_ref) {
9518
9518
  var _excluded$d = ["title", "className", "headerTail", "headerCenter", "sliderTabs"];
9519
9519
 
9520
9520
  var Index$c = function Index(_ref, ref) {
9521
- var _classNames, _sliderTabs$component;
9521
+ var _classNames, _sliderTabs$component, _sliderTabs$tabs;
9522
9522
 
9523
9523
  var title = _ref.title,
9524
9524
  _ref$className = _ref.className,
@@ -9555,9 +9555,9 @@ var Index$c = function Index(_ref, ref) {
9555
9555
  className: "body"
9556
9556
  }, (sliderTabs === null || sliderTabs === void 0 ? void 0 : (_sliderTabs$component = sliderTabs.components) === null || _sliderTabs$component === void 0 ? void 0 : _sliderTabs$component[activeTab]) || props.children)), sliderTabs && /*#__PURE__*/React.createElement("div", {
9557
9557
  className: "sliderTabs ".concat(sliderTabs.direction == 'left' ? "left ".concat(sliderTabs.className || '') : "right ".concat(sliderTabs.className || ''))
9558
- }, sliderTabs.tabs.map(function (item, index) {
9558
+ }, (sliderTabs === null || sliderTabs === void 0 ? void 0 : sliderTabs.renderTab) ? sliderTabs === null || sliderTabs === void 0 ? void 0 : sliderTabs.renderTab : sliderTabs === null || sliderTabs === void 0 ? void 0 : (_sliderTabs$tabs = sliderTabs.tabs) === null || _sliderTabs$tabs === void 0 ? void 0 : _sliderTabs$tabs.map(function (item, index) {
9559
9559
  return /*#__PURE__*/React.createElement("div", {
9560
- className: "tab ".concat(index == activeTab ? 'active' : '', " ").concat(sliderTabs.tabClassName || '', " ").concat(sliderTabs.activeTabClassName || '')
9560
+ className: "tab ".concat(index == activeTab ? "active ".concat(sliderTabs.activeTabClassName || '') : '', " ").concat(sliderTabs.tabClassName || '')
9561
9561
  }, /*#__PURE__*/React.createElement("span", {
9562
9562
  onClick: function onClick() {
9563
9563
  setActiveTab(index);
package/dist/index.js CHANGED
@@ -9577,7 +9577,7 @@ var Index$b = function Index(_ref) {
9577
9577
  var _excluded$d = ["title", "className", "headerTail", "headerCenter", "sliderTabs"];
9578
9578
 
9579
9579
  var Index$c = function Index(_ref, ref) {
9580
- var _classNames, _sliderTabs$component;
9580
+ var _classNames, _sliderTabs$component, _sliderTabs$tabs;
9581
9581
 
9582
9582
  var title = _ref.title,
9583
9583
  _ref$className = _ref.className,
@@ -9614,9 +9614,9 @@ var Index$c = function Index(_ref, ref) {
9614
9614
  className: "body"
9615
9615
  }, (sliderTabs === null || sliderTabs === void 0 ? void 0 : (_sliderTabs$component = sliderTabs.components) === null || _sliderTabs$component === void 0 ? void 0 : _sliderTabs$component[activeTab]) || props.children)), sliderTabs && /*#__PURE__*/React__default['default'].createElement("div", {
9616
9616
  className: "sliderTabs ".concat(sliderTabs.direction == 'left' ? "left ".concat(sliderTabs.className || '') : "right ".concat(sliderTabs.className || ''))
9617
- }, sliderTabs.tabs.map(function (item, index) {
9617
+ }, (sliderTabs === null || sliderTabs === void 0 ? void 0 : sliderTabs.renderTab) ? sliderTabs === null || sliderTabs === void 0 ? void 0 : sliderTabs.renderTab : sliderTabs === null || sliderTabs === void 0 ? void 0 : (_sliderTabs$tabs = sliderTabs.tabs) === null || _sliderTabs$tabs === void 0 ? void 0 : _sliderTabs$tabs.map(function (item, index) {
9618
9618
  return /*#__PURE__*/React__default['default'].createElement("div", {
9619
- className: "tab ".concat(index == activeTab ? 'active' : '', " ").concat(sliderTabs.tabClassName || '', " ").concat(sliderTabs.activeTabClassName || '')
9619
+ className: "tab ".concat(index == activeTab ? "active ".concat(sliderTabs.activeTabClassName || '') : '', " ").concat(sliderTabs.tabClassName || '')
9620
9620
  }, /*#__PURE__*/React__default['default'].createElement("span", {
9621
9621
  onClick: function onClick() {
9622
9622
  setActiveTab(index);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "wargerm",
4
- "version": "0.4.37",
4
+ "version": "0.5.0",
5
5
  "scripts": {
6
6
  "dev": "dumi dev",
7
7
  "docs:build": "dumi build",