@seeqdev/qomponents 0.0.46 → 0.0.47
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/dist/FontCustom.woff +0 -0
- package/dist/FontCustom.woff2 +0 -0
- package/dist/Tabs/Tabs.types.d.ts +5 -3
- package/dist/index.esm.js +4 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +4 -5
- package/dist/index.js.map +1 -1
- package/dist/styles.css +224 -178
- package/package.json +1 -1
package/dist/FontCustom.woff
CHANGED
|
Binary file
|
package/dist/FontCustom.woff2
CHANGED
|
Binary file
|
|
@@ -3,6 +3,10 @@ export interface TabsProps {
|
|
|
3
3
|
defaultActiveTab?: string;
|
|
4
4
|
activeTab?: string;
|
|
5
5
|
transition?: boolean;
|
|
6
|
+
onTabSelect?: (tabId: string) => void;
|
|
7
|
+
id?: string;
|
|
8
|
+
testId?: string;
|
|
9
|
+
stretchTabs?: boolean;
|
|
6
10
|
tabs: {
|
|
7
11
|
label: string;
|
|
8
12
|
id: string;
|
|
@@ -11,8 +15,6 @@ export interface TabsProps {
|
|
|
11
15
|
testId?: string;
|
|
12
16
|
tabExtraClassNames?: string;
|
|
13
17
|
disabled?: boolean;
|
|
18
|
+
tabContentExtraClassNames?: string;
|
|
14
19
|
}[];
|
|
15
|
-
onTabSelect?: (tabId: string) => void;
|
|
16
|
-
id?: string;
|
|
17
|
-
testId?: string;
|
|
18
20
|
}
|
package/dist/index.esm.js
CHANGED
|
@@ -14539,14 +14539,14 @@ const $69cb30bb0017df05$export$54c2e3dc7acea9f5 = $69cb30bb0017df05$export$9712d
|
|
|
14539
14539
|
const $69cb30bb0017df05$export$41fb9f06171c75f4 = $69cb30bb0017df05$export$8114b9fdfdf9f3ba;
|
|
14540
14540
|
const $69cb30bb0017df05$export$7c6e2c02157bb7d2 = $69cb30bb0017df05$export$bd905d70e8fd2ebb;
|
|
14541
14541
|
|
|
14542
|
-
const Tabs = ({ tabs, defaultActiveTab, activeTab, onTabSelect, extraClassNames, testId, id, }) => {
|
|
14542
|
+
const Tabs = ({ tabs, defaultActiveTab, activeTab, onTabSelect, extraClassNames, testId, id, stretchTabs = false, }) => {
|
|
14543
14543
|
const handleTabSelect = (tabId) => {
|
|
14544
14544
|
if (activeTab === tabId)
|
|
14545
14545
|
return;
|
|
14546
14546
|
onTabSelect && onTabSelect(tabId);
|
|
14547
14547
|
};
|
|
14548
|
-
return (React__default.createElement($69cb30bb0017df05$export$be92b6f5f03c0fe9, { className: `tw-flex tw-flex-col tw-min-w-[300px] ${extraClassNames || ''}`, defaultValue: defaultActiveTab, "data-testid": testId, id: id, value: activeTab, onValueChange: handleTabSelect },
|
|
14549
|
-
React__default.createElement($69cb30bb0017df05$export$54c2e3dc7acea9f5, { className: `tw-
|
|
14548
|
+
return (React__default.createElement($69cb30bb0017df05$export$be92b6f5f03c0fe9, { className: `tw-flex tw-flex-col tw-min-w-[300px] tw-max-w-full h-full ${extraClassNames || ''}`, defaultValue: defaultActiveTab, "data-testid": testId, id: id, value: activeTab, onValueChange: handleTabSelect },
|
|
14549
|
+
React__default.createElement($69cb30bb0017df05$export$54c2e3dc7acea9f5, { className: `tw-flex tw-flex-row tw-flex-wrap tw-z-[1001]` }, tabs.map(({ id, icon, label, tabExtraClassNames, testId: tabsTestId, disabled }, index) => (React__default.createElement($69cb30bb0017df05$export$41fb9f06171c75f4, { className: `tw-bg-sq-white dark:tw-bg-sq-dark-background tw-h-[45px] tw-min-w-[100px] tw-px-4 tw-border-solid dark:tw-border-gray-700 tw-flex tw-flex-1 tw-justify-center tw-items-center tw-border-r-[2px] last:tw-border-r-0 ${stretchTabs ? '' : 'tw-max-w-max tw-min-w-fit'} ${tabExtraClassNames || ''} ${activeTab === id
|
|
14550
14550
|
? 'tw-border-b-sq-color-dark dark:tw-border-b-sq-color-dark tw-border-b-[3px]'
|
|
14551
14551
|
: 'hover:tw-bg-sq-light-gray tw-border-b-[1px] hover:dark:tw-bg-gray-700'}`, "data-testid": tabsTestId, disabled: disabled, key: `${label}-${id}-${index}`, value: id },
|
|
14552
14552
|
React__default.createElement("span", null,
|
|
@@ -14554,8 +14554,7 @@ const Tabs = ({ tabs, defaultActiveTab, activeTab, onTabSelect, extraClassNames,
|
|
|
14554
14554
|
React__default.createElement("span", { className: `tw-text-[14px] tw-font-medium ${activeTab === id
|
|
14555
14555
|
? 'dark:tw-text-sq-dark-text tw-text-gray-500'
|
|
14556
14556
|
: 'dark:tw-text-sq-color-dark-dark tw-text-sq-color-dark'}` }, label)))))),
|
|
14557
|
-
tabs.map((tab, index) => (React__default.createElement($69cb30bb0017df05$export$7c6e2c02157bb7d2, { key: `${tab.label}_${index}_content`, value: tab.id },
|
|
14558
|
-
React__default.createElement("div", { className: "tw-bg-sq-white dark:tw-bg-sq-dark-background tw-p-4" }, tab.content))))));
|
|
14557
|
+
tabs.map((tab, index) => (React__default.createElement($69cb30bb0017df05$export$7c6e2c02157bb7d2, { className: `tw-bg-sq-white dark:tw-bg-sq-dark-background tw-h-full tw-overflow-y-auto -tw-mt-[1px] tw-border-t-[1px] tw-z-[500] ${tab.tabContentExtraClassNames || ''}`, key: `${tab.label}_${index}_content`, value: tab.id }, tab.content)))));
|
|
14559
14558
|
};
|
|
14560
14559
|
|
|
14561
14560
|
export { Button, Checkbox, Icon, Modal, QTip, Select, Tabs, TextArea, TextField, ToolbarButton, Tooltip };
|