@rpg-engine/long-bow 0.6.61 → 0.6.63

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,16 @@
1
+ import React from 'react';
2
+ interface TabItem {
3
+ id: string;
4
+ title: string;
5
+ content: React.ReactNode;
6
+ }
7
+ export interface TableTabProps {
8
+ tabs: TabItem[];
9
+ activeColor?: string;
10
+ activeTextColor: string;
11
+ inactiveColor?: string;
12
+ borderColor?: string;
13
+ hoverColor?: string;
14
+ }
15
+ export declare const TableTab: React.FC<TableTabProps>;
16
+ export {};
package/dist/index.d.ts CHANGED
@@ -45,6 +45,7 @@ export * from './components/SkillProgressBar';
45
45
  export * from './components/SkillsContainer';
46
46
  export * from './components/Spellbook/Spellbook';
47
47
  export * from './components/Stepper';
48
+ export * from './components/TableTab/TableTab';
48
49
  export * from './components/TextArea';
49
50
  export * from './components/TimeWidget/TimeWidget';
50
51
  export * from './components/TradingMenu/TradingMenu';
@@ -26985,7 +26985,7 @@ var DraggableContainer = function DraggableContainer(_ref) {
26985
26985
  };
26986
26986
  }, []);
26987
26987
  return React__default.createElement(Draggable, {
26988
- cancel: ".container-close," + cancelDrag,
26988
+ cancel: ".container-close,input,button," + cancelDrag,
26989
26989
  disabled: dragDisabled,
26990
26990
  onDrag: function onDrag(_e, data) {
26991
26991
  if (onPositionChange) {
@@ -32883,6 +32883,68 @@ var ProgressIndicator = /*#__PURE__*/styled__default.div.withConfig({
32883
32883
  return isActive ? '0 0 0 1px black, 1px 1px 0 1px black, 2px 2px 0 1px black, -1px -1px 0 1px black' : '0 0 0 1px black, 1px 1px 0 1px gray, 2px 2px 0 1px gray, -1px -1px 0 1px gray';
32884
32884
  });
32885
32885
 
32886
+ var TableTab = function TableTab(_ref) {
32887
+ var _tabs$find;
32888
+ var tabs = _ref.tabs,
32889
+ _ref$activeColor = _ref.activeColor,
32890
+ activeColor = _ref$activeColor === void 0 ? '#fef08a' : _ref$activeColor,
32891
+ _ref$activeTextColor = _ref.activeTextColor,
32892
+ activeTextColor = _ref$activeTextColor === void 0 ? '#000000' : _ref$activeTextColor,
32893
+ _ref$inactiveColor = _ref.inactiveColor,
32894
+ inactiveColor = _ref$inactiveColor === void 0 ? '#6b7280' : _ref$inactiveColor,
32895
+ _ref$borderColor = _ref.borderColor,
32896
+ borderColor = _ref$borderColor === void 0 ? '#f59e0b' : _ref$borderColor,
32897
+ _ref$hoverColor = _ref.hoverColor,
32898
+ hoverColor = _ref$hoverColor === void 0 ? '#fef3c7' : _ref$hoverColor;
32899
+ var _useState = React.useState(tabs[0].id),
32900
+ activeTab = _useState[0],
32901
+ setActiveTab = _useState[1];
32902
+ return React__default.createElement(TableWrapper$1, null, React__default.createElement(TabHeader, {
32903
+ borderColor: borderColor
32904
+ }, tabs.map(function (tab) {
32905
+ return React__default.createElement(TabButton, {
32906
+ key: tab.id,
32907
+ active: activeTab === tab.id,
32908
+ activeColor: activeColor,
32909
+ activeTextColor: activeTextColor,
32910
+ inactiveColor: inactiveColor,
32911
+ borderColor: borderColor,
32912
+ hoverColor: hoverColor,
32913
+ onClick: function onClick() {
32914
+ return setActiveTab(tab.id);
32915
+ }
32916
+ }, tab.title);
32917
+ })), React__default.createElement(ContentWrapper, null, (_tabs$find = tabs.find(function (tab) {
32918
+ return tab.id === activeTab;
32919
+ })) == null ? void 0 : _tabs$find.content));
32920
+ };
32921
+ var TableWrapper$1 = /*#__PURE__*/styled__default.div.withConfig({
32922
+ displayName: "TableTab__TableWrapper",
32923
+ componentId: "sc-m1diiu-0"
32924
+ })(["width:100%;"]);
32925
+ var TabHeader = /*#__PURE__*/styled__default.div.withConfig({
32926
+ displayName: "TableTab__TabHeader",
32927
+ componentId: "sc-m1diiu-1"
32928
+ })(["display:flex;border-bottom:1px solid ", ";"], function (props) {
32929
+ return props.borderColor;
32930
+ });
32931
+ var TabButton = /*#__PURE__*/styled__default.button.withConfig({
32932
+ displayName: "TableTab__TabButton",
32933
+ componentId: "sc-m1diiu-2"
32934
+ })(["flex:1;padding:0.5rem 1rem;font-size:0.875rem;font-weight:500;border-right:1px solid ", ";background-color:", ";color:", ";&:last-child{border-right:none;}&:hover{background-color:", ";}"], function (props) {
32935
+ return props.borderColor;
32936
+ }, function (props) {
32937
+ return props.active ? props.activeColor : 'transparent';
32938
+ }, function (props) {
32939
+ return props.active ? props.activeTextColor : props.inactiveColor;
32940
+ }, function (props) {
32941
+ return props.active ? props.activeColor : props.hoverColor;
32942
+ });
32943
+ var ContentWrapper = /*#__PURE__*/styled__default.div.withConfig({
32944
+ displayName: "TableTab__ContentWrapper",
32945
+ componentId: "sc-m1diiu-3"
32946
+ })(["padding:1rem;"]);
32947
+
32886
32948
  var TextArea = function TextArea(_ref) {
32887
32949
  var props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
32888
32950
  return React__default.createElement("textarea", Object.assign({}, props));
@@ -33424,6 +33486,7 @@ exports.Spellbook = Spellbook;
33424
33486
  exports.SpriteFromAtlas = SpriteFromAtlas;
33425
33487
  exports.Stepper = Stepper;
33426
33488
  exports.TabBody = TabBody;
33489
+ exports.TableTab = TableTab;
33427
33490
  exports.TabsContainer = TabsContainer;
33428
33491
  exports.TextArea = TextArea;
33429
33492
  exports.TimeWidget = TimeWidget;