@semcore/tab-panel 17.2.0 → 17.2.1-prerelease.11
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/CHANGELOG.md +6 -0
- package/lib/cjs/TabPanel.js +7 -7
- package/lib/cjs/TabPanel.type.js.map +1 -1
- package/lib/es6/TabPanel.js +7 -7
- package/lib/es6/TabPanel.type.js.map +1 -1
- package/lib/esm/TabPanel.mjs +8 -8
- package/lib/types/TabPanel.d.ts +1 -0
- package/lib/types/TabPanel.d.ts.map +1 -0
- package/lib/types/TabPanel.type.d.ts +10 -9
- package/lib/types/TabPanel.type.d.ts.map +1 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.d.ts.map +1 -0
- package/package.json +7 -7
- package/vitest.config.mts +17 -0
package/CHANGELOG.md
CHANGED
package/lib/cjs/TabPanel.js
CHANGED
|
@@ -13,15 +13,15 @@ var _a11yEnhance = _interopRequireDefault(require("@semcore/core/lib/utils/enhan
|
|
|
13
13
|
var _typography = require("@semcore/typography");
|
|
14
14
|
var _react = _interopRequireDefault(require("react"));
|
|
15
15
|
/*!__reshadow-styles__:"./style/tab-panel.shadow.css"*/
|
|
16
|
-
const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".
|
|
16
|
+
const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___STabPanel_mrlnc_gg_{display:flex;width:100%;max-width:100%}.___STabPanel_mrlnc_gg_:after{content:\"\";position:relative;bottom:-1px;flex:1;border-top:1px solid #0000;border-bottom:1px solid var(--intergalactic-border-primary,#000c0829)}@media (color-gamut:p3){.___STabPanel_mrlnc_gg_:after{border-bottom:1px solid var(--intergalactic-border-primary,oklch(.137 .026 175.7/.161))}}.___STabPanelItem_mrlnc_gg_{position:relative;bottom:-1px;display:inline-flex;min-width:0;height:32px;color:var(--intergalactic-text-secondary,#00030095);border:1px solid #0000;border-bottom:none;border-radius:var(--intergalactic-control-rounded,6px) var(--intergalactic-control-rounded,6px) 0 0;background:#0000;align-items:center;justify-content:center;touch-action:manipulation;-webkit-user-select:none;-moz-user-select:none;user-select:none;box-sizing:border-box;padding:0 0 1px;margin:0;box-shadow:none;-webkit-text-decoration:none;text-decoration:none;-webkit-tap-highlight-color:transparent;text-align:center;vertical-align:middle;font-family:inherit;cursor:pointer}@media (color-gamut:p3){.___STabPanelItem_mrlnc_gg_{color:var(--intergalactic-text-secondary,oklch(.088 .026 147.7/.583))}}.___STabPanelItem_mrlnc_gg_::-moz-focus-inner{border:none;padding:0}.___STabPanelItem_mrlnc_gg_:active{-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.___STabPanelItem_mrlnc_gg_:hover{-webkit-text-decoration:none;text-decoration:none;color:var(--intergalactic-text-primary,oklch(.1 .03 137/.899))}}.___STabPanelItem_mrlnc_gg_:after{content:\"\";position:absolute;left:-1px;bottom:0;width:calc(100% + 2px);border-bottom:1px solid var(--intergalactic-border-primary,#000c0829)}@media (color-gamut:p3){.___STabPanelItem_mrlnc_gg_:after{border-bottom:1px solid var(--intergalactic-border-primary,oklch(.137 .026 175.7/.161))}}.___STabPanelItem_mrlnc_gg_.__disabled_mrlnc_gg_{cursor:default;pointer-events:none}.___STabPanelItem_mrlnc_gg_.__disabled_mrlnc_gg_ :is(.___SAddon_mrlnc_gg_,.___SText_mrlnc_gg_){opacity:var(--intergalactic-disabled-opacity,.4)}.___STabPanelItem_mrlnc_gg_.__selected_mrlnc_gg_{color:var(--intergalactic-text-link,oklch(.53 .21 263));border-color:var(--intergalactic-border-primary,#000c0829);flex-shrink:0}@media (color-gamut:p3){.___STabPanelItem_mrlnc_gg_.__selected_mrlnc_gg_{border-color:var(--intergalactic-border-primary,oklch(.137 .026 175.7/.161))}}@media (hover:hover){.___STabPanelItem_mrlnc_gg_.__selected_mrlnc_gg_:hover{color:var(--intergalactic-text-link-hover-active,oklch(.51 .202 263))}}.___STabPanelItem_mrlnc_gg_.__selected_mrlnc_gg_:after{border-bottom:none}.___SText_mrlnc_gg_{margin:auto var(--intergalactic-spacing-2x,8px)}.___SAddon_mrlnc_gg_{display:inline-flex;align-items:center;justify-content:center}.___SAddon_mrlnc_gg_:not(:only-child):first-child{margin-left:var(--intergalactic-spacing-2x,8px)}.___SAddon_mrlnc_gg_:not(:only-child):last-child,.___SAddon_mrlnc_gg_:only-child{margin-right:var(--intergalactic-spacing-2x,8px)}.___SAddon_mrlnc_gg_:only-child{margin-left:var(--intergalactic-spacing-2x,8px)}", /*__inner_css_end__*/"mrlnc_gg_"),
|
|
17
17
|
/*__reshadow_css_end__*/
|
|
18
18
|
{
|
|
19
|
-
"__SText": "
|
|
20
|
-
"__SAddon": "
|
|
21
|
-
"__STabPanel": "
|
|
22
|
-
"__STabPanelItem": "
|
|
23
|
-
"_disabled": "
|
|
24
|
-
"_selected": "
|
|
19
|
+
"__SText": "___SText_mrlnc_gg_",
|
|
20
|
+
"__SAddon": "___SAddon_mrlnc_gg_",
|
|
21
|
+
"__STabPanel": "___STabPanel_mrlnc_gg_",
|
|
22
|
+
"__STabPanelItem": "___STabPanelItem_mrlnc_gg_",
|
|
23
|
+
"_disabled": "__disabled_mrlnc_gg_",
|
|
24
|
+
"_selected": "__selected_mrlnc_gg_"
|
|
25
25
|
});
|
|
26
26
|
class TabPanelRoot extends _core.Component {
|
|
27
27
|
constructor(...args) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabPanel.type.js","names":[],"sources":["../../src/TabPanel.type.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"TabPanel.type.js","names":[],"sources":["../../src/TabPanel.type.ts"],"sourcesContent":["import type { NSBox } from '@semcore/base-components';\nimport type { Intergalactic, PropGetterFn } from '@semcore/core';\nimport type { NSText } from '@semcore/typography';\n\ndeclare namespace NSTabPanel {\n type Value = string | number | boolean;\n type Props<V extends NSTabPanel.Value = NSTabPanel.Value> = NSBox.Props & {\n /** Is invoked when changing the selection */\n onChange?:\n | ((value: V, e?: React.SyntheticEvent<HTMLButtonElement>) => void)\n | React.Dispatch<React.SetStateAction<V>>;\n /** Value of the selected tab */\n value?: V;\n /** Default value of the selected tab\n * @default null\n * */\n defaultValue?: V;\n /**\n * Behavior of tabs.\n * In `auto`, changes the tab immediately when press arrow.\n * In `manual`, needs to press `space` or `enter` for select a choice.\n * @default 'auto'\n */\n behavior?: 'auto' | 'manual';\n };\n type Ctx = {\n getItemProps: PropGetterFn;\n };\n type Handlers = {\n value: null;\n };\n type DefaultProps = {\n defaultValue: 0;\n behavior: 'manual';\n };\n\n namespace Item {\n type Props = NSBox.Props & {\n /** Makes a tab selected. This property is determined automatically depending on the value. */\n selected?: boolean;\n /** Disabled state */\n disabled?: boolean;\n /** Tab value */\n value?: NSTabPanel.Value;\n /** Left addon tag */\n addonLeft?: React.ElementType;\n /** Right addon tag */\n addonRight?: React.ElementType;\n };\n\n namespace Text {\n type Props = NSText.Props;\n type Component = NSText.Component;\n }\n\n namespace Addon {\n type Component = NSBox.Component;\n }\n\n type Component = Intergalactic.Component<'div', Props, {}, [handlers: NSTabPanel.Handlers]> & {\n Text: Text.Component;\n Addon: Addon.Component;\n };\n }\n\n type WrapperComponent<PropsExtending = {}> = (<\n V extends NSTabPanel.Value,\n Tag extends Intergalactic.Tag = 'div',\n >(\n props: Intergalactic.InternalTypings.ComponentProps<\n Tag,\n 'div',\n Props<V>,\n Ctx,\n [handlers: Handlers]\n > &\n PropsExtending,\n ) => Intergalactic.InternalTypings.ComponentRenderingResults) & Intergalactic.InternalTypings.ComponentAdditive<'div', 'div', Props>;\n\n type Component = WrapperComponent & {\n Item: Item.Component;\n };\n}\n\n/** @deprecated It will be removed in v19. */\nexport type TabPanelValue = NSTabPanel.Value;\n/** @deprecated It will be removed in v19. */\nexport type TabPanelProps<T extends NSTabPanel.Value = NSTabPanel.Value> = NSTabPanel.Props<T>;\n/** @deprecated It will be removed in v19. */\nexport type TabPanelItemProps = NSTabPanel.Item.Props;\n/** @deprecated It will be removed in v19. */\nexport type TabPanelContext = NSTabPanel.Ctx;\n/** @deprecated It will be removed in v19. */\nexport type TabPanelHandlers = NSTabPanel.Handlers;\n\nexport type { NSTabPanel };\n"],"mappings":"","ignoreList":[]}
|
package/lib/es6/TabPanel.js
CHANGED
|
@@ -11,15 +11,15 @@ import a11yEnhance from '@semcore/core/lib/utils/enhances/a11yEnhance';
|
|
|
11
11
|
import { Text as UikitText } from '@semcore/typography';
|
|
12
12
|
import React from 'react';
|
|
13
13
|
/*!__reshadow-styles__:"./style/tab-panel.shadow.css"*/
|
|
14
|
-
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".
|
|
14
|
+
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___STabPanel_mrlnc_gg_{display:flex;width:100%;max-width:100%}.___STabPanel_mrlnc_gg_:after{content:\"\";position:relative;bottom:-1px;flex:1;border-top:1px solid #0000;border-bottom:1px solid var(--intergalactic-border-primary,#000c0829)}@media (color-gamut:p3){.___STabPanel_mrlnc_gg_:after{border-bottom:1px solid var(--intergalactic-border-primary,oklch(.137 .026 175.7/.161))}}.___STabPanelItem_mrlnc_gg_{position:relative;bottom:-1px;display:inline-flex;min-width:0;height:32px;color:var(--intergalactic-text-secondary,#00030095);border:1px solid #0000;border-bottom:none;border-radius:var(--intergalactic-control-rounded,6px) var(--intergalactic-control-rounded,6px) 0 0;background:#0000;align-items:center;justify-content:center;touch-action:manipulation;-webkit-user-select:none;-moz-user-select:none;user-select:none;box-sizing:border-box;padding:0 0 1px;margin:0;box-shadow:none;-webkit-text-decoration:none;text-decoration:none;-webkit-tap-highlight-color:transparent;text-align:center;vertical-align:middle;font-family:inherit;cursor:pointer}@media (color-gamut:p3){.___STabPanelItem_mrlnc_gg_{color:var(--intergalactic-text-secondary,oklch(.088 .026 147.7/.583))}}.___STabPanelItem_mrlnc_gg_::-moz-focus-inner{border:none;padding:0}.___STabPanelItem_mrlnc_gg_:active{-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.___STabPanelItem_mrlnc_gg_:hover{-webkit-text-decoration:none;text-decoration:none;color:var(--intergalactic-text-primary,oklch(.1 .03 137/.899))}}.___STabPanelItem_mrlnc_gg_:after{content:\"\";position:absolute;left:-1px;bottom:0;width:calc(100% + 2px);border-bottom:1px solid var(--intergalactic-border-primary,#000c0829)}@media (color-gamut:p3){.___STabPanelItem_mrlnc_gg_:after{border-bottom:1px solid var(--intergalactic-border-primary,oklch(.137 .026 175.7/.161))}}.___STabPanelItem_mrlnc_gg_.__disabled_mrlnc_gg_{cursor:default;pointer-events:none}.___STabPanelItem_mrlnc_gg_.__disabled_mrlnc_gg_ :is(.___SAddon_mrlnc_gg_,.___SText_mrlnc_gg_){opacity:var(--intergalactic-disabled-opacity,.4)}.___STabPanelItem_mrlnc_gg_.__selected_mrlnc_gg_{color:var(--intergalactic-text-link,oklch(.53 .21 263));border-color:var(--intergalactic-border-primary,#000c0829);flex-shrink:0}@media (color-gamut:p3){.___STabPanelItem_mrlnc_gg_.__selected_mrlnc_gg_{border-color:var(--intergalactic-border-primary,oklch(.137 .026 175.7/.161))}}@media (hover:hover){.___STabPanelItem_mrlnc_gg_.__selected_mrlnc_gg_:hover{color:var(--intergalactic-text-link-hover-active,oklch(.51 .202 263))}}.___STabPanelItem_mrlnc_gg_.__selected_mrlnc_gg_:after{border-bottom:none}.___SText_mrlnc_gg_{margin:auto var(--intergalactic-spacing-2x,8px)}.___SAddon_mrlnc_gg_{display:inline-flex;align-items:center;justify-content:center}.___SAddon_mrlnc_gg_:not(:only-child):first-child{margin-left:var(--intergalactic-spacing-2x,8px)}.___SAddon_mrlnc_gg_:not(:only-child):last-child,.___SAddon_mrlnc_gg_:only-child{margin-right:var(--intergalactic-spacing-2x,8px)}.___SAddon_mrlnc_gg_:only-child{margin-left:var(--intergalactic-spacing-2x,8px)}", /*__inner_css_end__*/"mrlnc_gg_"),
|
|
15
15
|
/*__reshadow_css_end__*/
|
|
16
16
|
{
|
|
17
|
-
"__SText": "
|
|
18
|
-
"__SAddon": "
|
|
19
|
-
"__STabPanel": "
|
|
20
|
-
"__STabPanelItem": "
|
|
21
|
-
"_disabled": "
|
|
22
|
-
"_selected": "
|
|
17
|
+
"__SText": "___SText_mrlnc_gg_",
|
|
18
|
+
"__SAddon": "___SAddon_mrlnc_gg_",
|
|
19
|
+
"__STabPanel": "___STabPanel_mrlnc_gg_",
|
|
20
|
+
"__STabPanelItem": "___STabPanelItem_mrlnc_gg_",
|
|
21
|
+
"_disabled": "__disabled_mrlnc_gg_",
|
|
22
|
+
"_selected": "__selected_mrlnc_gg_"
|
|
23
23
|
});
|
|
24
24
|
class TabPanelRoot extends Component {
|
|
25
25
|
constructor(...args) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabPanel.type.js","names":[],"sources":["../../src/TabPanel.type.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"TabPanel.type.js","names":[],"sources":["../../src/TabPanel.type.ts"],"sourcesContent":["import type { NSBox } from '@semcore/base-components';\nimport type { Intergalactic, PropGetterFn } from '@semcore/core';\nimport type { NSText } from '@semcore/typography';\n\ndeclare namespace NSTabPanel {\n type Value = string | number | boolean;\n type Props<V extends NSTabPanel.Value = NSTabPanel.Value> = NSBox.Props & {\n /** Is invoked when changing the selection */\n onChange?:\n | ((value: V, e?: React.SyntheticEvent<HTMLButtonElement>) => void)\n | React.Dispatch<React.SetStateAction<V>>;\n /** Value of the selected tab */\n value?: V;\n /** Default value of the selected tab\n * @default null\n * */\n defaultValue?: V;\n /**\n * Behavior of tabs.\n * In `auto`, changes the tab immediately when press arrow.\n * In `manual`, needs to press `space` or `enter` for select a choice.\n * @default 'auto'\n */\n behavior?: 'auto' | 'manual';\n };\n type Ctx = {\n getItemProps: PropGetterFn;\n };\n type Handlers = {\n value: null;\n };\n type DefaultProps = {\n defaultValue: 0;\n behavior: 'manual';\n };\n\n namespace Item {\n type Props = NSBox.Props & {\n /** Makes a tab selected. This property is determined automatically depending on the value. */\n selected?: boolean;\n /** Disabled state */\n disabled?: boolean;\n /** Tab value */\n value?: NSTabPanel.Value;\n /** Left addon tag */\n addonLeft?: React.ElementType;\n /** Right addon tag */\n addonRight?: React.ElementType;\n };\n\n namespace Text {\n type Props = NSText.Props;\n type Component = NSText.Component;\n }\n\n namespace Addon {\n type Component = NSBox.Component;\n }\n\n type Component = Intergalactic.Component<'div', Props, {}, [handlers: NSTabPanel.Handlers]> & {\n Text: Text.Component;\n Addon: Addon.Component;\n };\n }\n\n type WrapperComponent<PropsExtending = {}> = (<\n V extends NSTabPanel.Value,\n Tag extends Intergalactic.Tag = 'div',\n >(\n props: Intergalactic.InternalTypings.ComponentProps<\n Tag,\n 'div',\n Props<V>,\n Ctx,\n [handlers: Handlers]\n > &\n PropsExtending,\n ) => Intergalactic.InternalTypings.ComponentRenderingResults) & Intergalactic.InternalTypings.ComponentAdditive<'div', 'div', Props>;\n\n type Component = WrapperComponent & {\n Item: Item.Component;\n };\n}\n\n/** @deprecated It will be removed in v19. */\nexport type TabPanelValue = NSTabPanel.Value;\n/** @deprecated It will be removed in v19. */\nexport type TabPanelProps<T extends NSTabPanel.Value = NSTabPanel.Value> = NSTabPanel.Props<T>;\n/** @deprecated It will be removed in v19. */\nexport type TabPanelItemProps = NSTabPanel.Item.Props;\n/** @deprecated It will be removed in v19. */\nexport type TabPanelContext = NSTabPanel.Ctx;\n/** @deprecated It will be removed in v19. */\nexport type TabPanelHandlers = NSTabPanel.Handlers;\n\nexport type { NSTabPanel };\n"],"mappings":"","ignoreList":[]}
|
package/lib/esm/TabPanel.mjs
CHANGED
|
@@ -10,17 +10,17 @@ const style = (
|
|
|
10
10
|
/*__reshadow_css_start__*/
|
|
11
11
|
(sstyled.insert(
|
|
12
12
|
/*__inner_css_start__*/
|
|
13
|
-
'.
|
|
13
|
+
'.___STabPanel_mrlnc_gg_{display:flex;width:100%;max-width:100%}.___STabPanel_mrlnc_gg_:after{content:"";position:relative;bottom:-1px;flex:1;border-top:1px solid #0000;border-bottom:1px solid var(--intergalactic-border-primary,#000c0829)}@media (color-gamut:p3){.___STabPanel_mrlnc_gg_:after{border-bottom:1px solid var(--intergalactic-border-primary,oklch(.137 .026 175.7/.161))}}.___STabPanelItem_mrlnc_gg_{position:relative;bottom:-1px;display:inline-flex;min-width:0;height:32px;color:var(--intergalactic-text-secondary,#00030095);border:1px solid #0000;border-bottom:none;border-radius:var(--intergalactic-control-rounded,6px) var(--intergalactic-control-rounded,6px) 0 0;background:#0000;align-items:center;justify-content:center;touch-action:manipulation;-webkit-user-select:none;-moz-user-select:none;user-select:none;box-sizing:border-box;padding:0 0 1px;margin:0;box-shadow:none;-webkit-text-decoration:none;text-decoration:none;-webkit-tap-highlight-color:transparent;text-align:center;vertical-align:middle;font-family:inherit;cursor:pointer}@media (color-gamut:p3){.___STabPanelItem_mrlnc_gg_{color:var(--intergalactic-text-secondary,oklch(.088 .026 147.7/.583))}}.___STabPanelItem_mrlnc_gg_::-moz-focus-inner{border:none;padding:0}.___STabPanelItem_mrlnc_gg_:active{-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.___STabPanelItem_mrlnc_gg_:hover{-webkit-text-decoration:none;text-decoration:none;color:var(--intergalactic-text-primary,oklch(.1 .03 137/.899))}}.___STabPanelItem_mrlnc_gg_:after{content:"";position:absolute;left:-1px;bottom:0;width:calc(100% + 2px);border-bottom:1px solid var(--intergalactic-border-primary,#000c0829)}@media (color-gamut:p3){.___STabPanelItem_mrlnc_gg_:after{border-bottom:1px solid var(--intergalactic-border-primary,oklch(.137 .026 175.7/.161))}}.___STabPanelItem_mrlnc_gg_.__disabled_mrlnc_gg_{cursor:default;pointer-events:none}.___STabPanelItem_mrlnc_gg_.__disabled_mrlnc_gg_ :is(.___SAddon_mrlnc_gg_,.___SText_mrlnc_gg_){opacity:var(--intergalactic-disabled-opacity,.4)}.___STabPanelItem_mrlnc_gg_.__selected_mrlnc_gg_{color:var(--intergalactic-text-link,oklch(.53 .21 263));border-color:var(--intergalactic-border-primary,#000c0829);flex-shrink:0}@media (color-gamut:p3){.___STabPanelItem_mrlnc_gg_.__selected_mrlnc_gg_{border-color:var(--intergalactic-border-primary,oklch(.137 .026 175.7/.161))}}@media (hover:hover){.___STabPanelItem_mrlnc_gg_.__selected_mrlnc_gg_:hover{color:var(--intergalactic-text-link-hover-active,oklch(.51 .202 263))}}.___STabPanelItem_mrlnc_gg_.__selected_mrlnc_gg_:after{border-bottom:none}.___SText_mrlnc_gg_{margin:auto var(--intergalactic-spacing-2x,8px)}.___SAddon_mrlnc_gg_{display:inline-flex;align-items:center;justify-content:center}.___SAddon_mrlnc_gg_:not(:only-child):first-child{margin-left:var(--intergalactic-spacing-2x,8px)}.___SAddon_mrlnc_gg_:not(:only-child):last-child,.___SAddon_mrlnc_gg_:only-child{margin-right:var(--intergalactic-spacing-2x,8px)}.___SAddon_mrlnc_gg_:only-child{margin-left:var(--intergalactic-spacing-2x,8px)}',
|
|
14
14
|
/*__inner_css_end__*/
|
|
15
|
-
"
|
|
15
|
+
"mrlnc_gg_"
|
|
16
16
|
), /*__reshadow_css_end__*/
|
|
17
17
|
{
|
|
18
|
-
"__SText": "
|
|
19
|
-
"__SAddon": "
|
|
20
|
-
"__STabPanel": "
|
|
21
|
-
"__STabPanelItem": "
|
|
22
|
-
"_disabled": "
|
|
23
|
-
"_selected": "
|
|
18
|
+
"__SText": "___SText_mrlnc_gg_",
|
|
19
|
+
"__SAddon": "___SAddon_mrlnc_gg_",
|
|
20
|
+
"__STabPanel": "___STabPanel_mrlnc_gg_",
|
|
21
|
+
"__STabPanelItem": "___STabPanelItem_mrlnc_gg_",
|
|
22
|
+
"_disabled": "__disabled_mrlnc_gg_",
|
|
23
|
+
"_selected": "__selected_mrlnc_gg_"
|
|
24
24
|
})
|
|
25
25
|
);
|
|
26
26
|
class TabPanelRoot extends Component {
|
package/lib/types/TabPanel.d.ts
CHANGED
|
@@ -9,3 +9,4 @@ import type { NSTabPanel } from './TabPanel.type';
|
|
|
9
9
|
declare const TabPanel: NSTabPanel.Component;
|
|
10
10
|
export declare const wrapTabPanel: <PropsExtending extends {}>(wrapper: (props: Intergalactic.InternalTypings.UntypeRefAndTag<Intergalactic.InternalTypings.ComponentPropsNesting<NSTabPanel.WrapperComponent>> & PropsExtending) => React.ReactNode) => NSTabPanel.WrapperComponent<PropsExtending>;
|
|
11
11
|
export default TabPanel;
|
|
12
|
+
//# sourceMappingURL=TabPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TabPanel.d.ts","sourceRoot":"","sources":["../../src/TabPanel.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAKnD,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAyHlD;;;;GAIG;AACH,QAAA,MAAM,QAAQ,sBAKZ,CAAC;AAEH,eAAO,MAAM,YAAY,GAAI,cAAc,SAAS,EAAE,EAAE,SAAS,CAC/D,KAAK,EAAE,aAAa,CAAC,eAAe,CAAC,eAAe,CAClD,aAAa,CAAC,eAAe,CAAC,qBAAqB,CAAC,UAAU,CAAC,gBAAgB,CAAC,CACjF,GACD,cAAc,KACX,KAAK,CAAC,SAAS,KAAgB,UAAU,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;AAEhF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { NSBox } from '@semcore/base-components';
|
|
2
2
|
import type { Intergalactic, PropGetterFn } from '@semcore/core';
|
|
3
3
|
import type { NSText } from '@semcore/typography';
|
|
4
4
|
declare namespace NSTabPanel {
|
|
5
5
|
type Value = string | number | boolean;
|
|
6
|
-
type Props<V extends NSTabPanel.Value = NSTabPanel.Value> =
|
|
6
|
+
type Props<V extends NSTabPanel.Value = NSTabPanel.Value> = NSBox.Props & {
|
|
7
7
|
/** Is invoked when changing the selection */
|
|
8
8
|
onChange?: ((value: V, e?: React.SyntheticEvent<HTMLButtonElement>) => void) | React.Dispatch<React.SetStateAction<V>>;
|
|
9
9
|
/** Value of the selected tab */
|
|
@@ -31,7 +31,7 @@ declare namespace NSTabPanel {
|
|
|
31
31
|
behavior: 'manual';
|
|
32
32
|
};
|
|
33
33
|
namespace Item {
|
|
34
|
-
type Props =
|
|
34
|
+
type Props = NSBox.Props & {
|
|
35
35
|
/** Makes a tab selected. This property is determined automatically depending on the value. */
|
|
36
36
|
selected?: boolean;
|
|
37
37
|
/** Disabled state */
|
|
@@ -48,7 +48,7 @@ declare namespace NSTabPanel {
|
|
|
48
48
|
type Component = NSText.Component;
|
|
49
49
|
}
|
|
50
50
|
namespace Addon {
|
|
51
|
-
type Component =
|
|
51
|
+
type Component = NSBox.Component;
|
|
52
52
|
}
|
|
53
53
|
type Component = Intergalactic.Component<'div', Props, {}, [handlers: NSTabPanel.Handlers]> & {
|
|
54
54
|
Text: Text.Component;
|
|
@@ -62,14 +62,15 @@ declare namespace NSTabPanel {
|
|
|
62
62
|
Item: Item.Component;
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
/** @deprecated It will be removed in
|
|
65
|
+
/** @deprecated It will be removed in v19. */
|
|
66
66
|
export type TabPanelValue = NSTabPanel.Value;
|
|
67
|
-
/** @deprecated It will be removed in
|
|
67
|
+
/** @deprecated It will be removed in v19. */
|
|
68
68
|
export type TabPanelProps<T extends NSTabPanel.Value = NSTabPanel.Value> = NSTabPanel.Props<T>;
|
|
69
|
-
/** @deprecated It will be removed in
|
|
69
|
+
/** @deprecated It will be removed in v19. */
|
|
70
70
|
export type TabPanelItemProps = NSTabPanel.Item.Props;
|
|
71
|
-
/** @deprecated It will be removed in
|
|
71
|
+
/** @deprecated It will be removed in v19. */
|
|
72
72
|
export type TabPanelContext = NSTabPanel.Ctx;
|
|
73
|
-
/** @deprecated It will be removed in
|
|
73
|
+
/** @deprecated It will be removed in v19. */
|
|
74
74
|
export type TabPanelHandlers = NSTabPanel.Handlers;
|
|
75
75
|
export type { NSTabPanel };
|
|
76
|
+
//# sourceMappingURL=TabPanel.type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TabPanel.type.d.ts","sourceRoot":"","sources":["../../src/TabPanel.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,WAAW,UAAU,CAAC;IAC3B,KAAK,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IACvC,KAAK,KAAK,CAAC,CAAC,SAAS,UAAU,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,GAAG;QACxE,6CAA6C;QAC7C,QAAQ,CAAC,EACL,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC,GACjE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5C,gCAAgC;QAChC,KAAK,CAAC,EAAE,CAAC,CAAC;QACV;;aAEK;QACL,YAAY,CAAC,EAAE,CAAC,CAAC;QACjB;;;;;WAKG;QACH,QAAQ,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;KAC9B,CAAC;IACF,KAAK,GAAG,GAAG;QACT,YAAY,EAAE,YAAY,CAAC;KAC5B,CAAC;IACF,KAAK,QAAQ,GAAG;QACd,KAAK,EAAE,IAAI,CAAC;KACb,CAAC;IACF,KAAK,YAAY,GAAG;QAClB,YAAY,EAAE,CAAC,CAAC;QAChB,QAAQ,EAAE,QAAQ,CAAC;KACpB,CAAC;IAEF,UAAU,IAAI,CAAC;QACb,KAAK,KAAK,GAAG,KAAK,CAAC,KAAK,GAAG;YACzB,8FAA8F;YAC9F,QAAQ,CAAC,EAAE,OAAO,CAAC;YACnB,qBAAqB;YACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;YACnB,gBAAgB;YAChB,KAAK,CAAC,EAAE,UAAU,CAAC,KAAK,CAAC;YACzB,sBAAsB;YACtB,SAAS,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;YAC9B,uBAAuB;YACvB,UAAU,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;SAChC,CAAC;QAEF,UAAU,IAAI,CAAC;YACX,KAAK,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;YAC1B,KAAK,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;SACrC;QAED,UAAU,KAAK,CAAC;YACZ,KAAK,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;SACpC;QAED,KAAK,SAAS,GAAG,aAAa,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC,GAAG;YAC5F,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;YACrB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;SACxB,CAAC;KACH;IAED,KAAK,gBAAgB,CAAC,cAAc,GAAG,EAAE,IAAI,CAAC,CAC5C,CAAC,SAAS,UAAU,CAAC,KAAK,EAC1B,GAAG,SAAS,aAAa,CAAC,GAAG,GAAG,KAAK,EAErC,KAAK,EAAE,aAAa,CAAC,eAAe,CAAC,cAAc,CACjD,GAAG,EACH,KAAK,EACL,KAAK,CAAC,CAAC,CAAC,EACR,GAAG,EACH;QAAC,QAAQ,EAAE,QAAQ;KAAC,CACrB,GACD,cAAc,KACX,aAAa,CAAC,eAAe,CAAC,yBAAyB,CAAC,GAAG,aAAa,CAAC,eAAe,CAAC,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IAErI,KAAK,SAAS,GAAG,gBAAgB,GAAG;QAClC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;KACtB,CAAC;CACH;AAED,6CAA6C;AAC7C,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,KAAK,CAAC;AAC7C,6CAA6C;AAC7C,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,UAAU,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAC/F,6CAA6C;AAC7C,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC;AACtD,6CAA6C;AAC7C,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,GAAG,CAAC;AAC7C,6CAA6C;AAC7C,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,QAAQ,CAAC;AAEnD,YAAY,EAAE,UAAU,EAAE,CAAC"}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACnD,cAAc,iBAAiB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/tab-panel",
|
|
3
3
|
"description": "Semrush TabPanel Component",
|
|
4
|
-
"version": "17.2.
|
|
4
|
+
"version": "17.2.1-prerelease.11",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"require": "./lib/cjs/index.js"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@semcore/typography": "^17.2.
|
|
17
|
+
"@semcore/typography": "^17.2.1-prerelease.11"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@semcore/base-components": "^17.2.
|
|
20
|
+
"@semcore/base-components": "^17.2.2-prerelease.11"
|
|
21
21
|
},
|
|
22
22
|
"repository": {
|
|
23
23
|
"type": "git",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"directory": "semcore/tab-panel"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@semcore/core": "17.
|
|
29
|
-
"@semcore/base-components": "17.2.
|
|
30
|
-
"@semcore/
|
|
31
|
-
"@semcore/
|
|
28
|
+
"@semcore/core": "17.3.1-prerelease.11",
|
|
29
|
+
"@semcore/base-components": "17.2.2-prerelease.11",
|
|
30
|
+
"@semcore/icon": "17.3.0-prerelease.11",
|
|
31
|
+
"@semcore/testing-utils": "1.0.0"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
34
34
|
"build": "pnpm semcore-builder && pnpm vite build"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { resolve as resolvePath } from 'node:path';
|
|
2
|
+
|
|
3
|
+
import { defineConfig } from 'vitest/config';
|
|
4
|
+
|
|
5
|
+
import { vitestPlugins, vitestResolve } from '../../vitest.config.mts';
|
|
6
|
+
|
|
7
|
+
export default defineConfig({
|
|
8
|
+
plugins: vitestPlugins,
|
|
9
|
+
resolve: vitestResolve,
|
|
10
|
+
test: {
|
|
11
|
+
include: [
|
|
12
|
+
'__tests__/**/*.test.tsx',
|
|
13
|
+
],
|
|
14
|
+
environment: 'jsdom',
|
|
15
|
+
setupFiles: [resolvePath(__dirname, '../../tools/testing-utils/setupTests')],
|
|
16
|
+
},
|
|
17
|
+
});
|