@semcore/tab-line 17.2.0 → 17.2.1-prerelease.2
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/TabLine.js +12 -12
- package/lib/cjs/TabLine.type.js.map +1 -1
- package/lib/es6/TabLine.js +12 -12
- package/lib/es6/TabLine.type.js.map +1 -1
- package/lib/esm/TabLine.mjs +13 -13
- package/lib/types/TabLine.d.ts +1 -0
- package/lib/types/TabLine.d.ts.map +1 -0
- package/lib/types/TabLine.type.d.ts +5 -4
- package/lib/types/TabLine.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 +5 -5
- package/vitest.config.mts +17 -0
package/CHANGELOG.md
CHANGED
package/lib/cjs/TabLine.js
CHANGED
|
@@ -13,20 +13,20 @@ 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-line.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__*/".___STabLine_1n7v4_gg_{position:relative;display:flex;width:100%;max-width:100%}.___STabLine_1n7v4_gg_.__underlined_1n7v4_gg_{border-bottom:1px solid var(--intergalactic-border-primary,#000c0829)}@media (color-gamut:p3){.___STabLine_1n7v4_gg_.__underlined_1n7v4_gg_{border-bottom:1px solid var(--intergalactic-border-primary,oklch(.137 .026 175.7/.161))}}.___STabLineItem_1n7v4_gg_{display:inline-flex;align-items:center;justify-content:center;position:relative;touch-action:manipulation;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none;box-sizing:border-box;padding:0;margin:0;box-shadow:none;-webkit-text-decoration:none;text-decoration:none;-webkit-tap-highlight-color:transparent;overflow:visible;text-align:center;vertical-align:middle;font-family:inherit;cursor:pointer;border:none;background:#0000;color:var(--intergalactic-text-primary,oklch(.1 .03 137/.899));margin-right:var(--intergalactic-spacing-4x,16px);font-weight:var(--intergalactic-medium,500)}.___STabLineItem_1n7v4_gg_::-moz-focus-inner{border:none;padding:0}.___STabLineItem_1n7v4_gg_:active{-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.___STabLineItem_1n7v4_gg_:hover{-webkit-text-decoration:none;text-decoration:none}}.___STabLineItem_1n7v4_gg_:after,.___STabLineItem_1n7v4_gg_:before{content:\"\";position:absolute;left:0;bottom:-1px;height:3px;width:100%;background-color:initial}.___STabLineItem_1n7v4_gg_:before{transition:background-color calc(var(--intergalactic-duration-control, 200)*1ms) ease-in-out}@media (hover:hover){.___STabLineItem_1n7v4_gg_:hover:before{background-color:var(--intergalactic-border-primary,#000c0829)}@media (color-gamut:p3){.___STabLineItem_1n7v4_gg_:hover:before{background-color:var(--intergalactic-border-primary,oklch(.137 .026 175.7/.161))}}}.___STabLineItem_1n7v4_gg_.__selected_1n7v4_gg_:after{transition-delay:calc(var(--intergalactic-duration-control, 200)*1ms);background-color:var(--intergalactic-border-info-active,oklch(.7 .131 275.2))}.___STabLineItem_1n7v4_gg_ .___SAddon_1n7v4_gg_:not(:last-child),.___STabLineItem_1n7v4_gg_ .___SText_1n7v4_gg_:not(:last-child){margin-right:var(--intergalactic-spacing-2x,8px)}.___SCaret_1n7v4_gg_{position:absolute;bottom:-1px;height:3px;background:var(--intergalactic-border-info-active,oklch(.7 .131 275.2));transition:calc(var(--intergalactic-duration-control, 200)*1ms) all ease-in-out}.___STabLineItem_1n7v4_gg_.__selected_1n7v4_gg_{flex-shrink:0}.___STabLineItem_1n7v4_gg_.__disabled_1n7v4_gg_{opacity:var(--intergalactic-disabled-opacity,.4);cursor:default;pointer-events:none}.___SAddon_1n7v4_gg_{display:inline-flex;align-items:center;justify-content:center}.___STabLineItem_1n7v4_gg_._size_m_1n7v4_gg_{height:28px;min-width:18px}.___STabLineItem_1n7v4_gg_._size_l_1n7v4_gg_{height:40px;min-width:26px}.___STabLineItem_1n7v4_gg_._neighborLocation_left_1n7v4_gg_{margin-right:0}@media (prefers-reduced-motion){.___STabLineItem_1n7v4_gg_.__selected_1n7v4_gg_:after,.___STabLineItem_1n7v4_gg_:after,.___STabLineItem_1n7v4_gg_:before{transition:none}.___SCaret_1n7v4_gg_{display:none}}", /*__inner_css_end__*/"1n7v4_gg_"),
|
|
17
17
|
/*__reshadow_css_end__*/
|
|
18
18
|
{
|
|
19
|
-
"__STabLine": "
|
|
20
|
-
"_underlined": "
|
|
21
|
-
"__SCaret": "
|
|
22
|
-
"__STabLineItem": "
|
|
23
|
-
"_selected": "
|
|
24
|
-
"_disabled": "
|
|
25
|
-
"__SAddon": "
|
|
26
|
-
"_size_m": "
|
|
27
|
-
"_size_l": "
|
|
28
|
-
"_neighborLocation_left": "
|
|
29
|
-
"__SText": "
|
|
19
|
+
"__STabLine": "___STabLine_1n7v4_gg_",
|
|
20
|
+
"_underlined": "__underlined_1n7v4_gg_",
|
|
21
|
+
"__SCaret": "___SCaret_1n7v4_gg_",
|
|
22
|
+
"__STabLineItem": "___STabLineItem_1n7v4_gg_",
|
|
23
|
+
"_selected": "__selected_1n7v4_gg_",
|
|
24
|
+
"_disabled": "__disabled_1n7v4_gg_",
|
|
25
|
+
"__SAddon": "___SAddon_1n7v4_gg_",
|
|
26
|
+
"_size_m": "_size_m_1n7v4_gg_",
|
|
27
|
+
"_size_l": "_size_l_1n7v4_gg_",
|
|
28
|
+
"_neighborLocation_left": "_neighborLocation_left_1n7v4_gg_",
|
|
29
|
+
"__SText": "___SText_1n7v4_gg_"
|
|
30
30
|
});
|
|
31
31
|
class TabLineRoot extends _core.Component {
|
|
32
32
|
constructor(...args) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabLine.type.js","names":[],"sources":["../../src/TabLine.type.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"TabLine.type.js","names":[],"sources":["../../src/TabLine.type.ts"],"sourcesContent":["import type { NSBox, NSNeighborLocation } from '@semcore/base-components';\nimport type { PropGetterFn, Intergalactic } from '@semcore/core';\nimport type { NSText } from '@semcore/typography';\nimport type React from 'react';\n\ndeclare namespace NSTabLine {\n type Value = string | number | boolean;\n type Props<T extends NSTabLine.Value = NSTabLine.Value> = NSBox.Props &\n NSNeighborLocation.Props & {\n /** TabLine size\n * @default m\n * */\n size?: 'm' | 'l' | false;\n /** Adds a bottom border for the entire component\n * @default true\n * */\n underlined?: boolean;\n /** Is invoked when changing the selection */\n onChange?:\n | ((value: T, e?: React.SyntheticEvent<HTMLButtonElement>) => void)\n | React.Dispatch<React.SetStateAction<T>>;\n /** Value of the selected tab */\n value?: T;\n /** Default value of the selected tab\n * @default null\n * */\n defaultValue?: T;\n\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\n type DefaultProps = {\n defaultValue: 0;\n size: 'm';\n underlined: true;\n behavior: 'auto';\n };\n\n namespace Item {\n type Props = NSBox.Props &\n NSNeighborLocation.Detect.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?: NSTabLine.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: NSTabLine.Handlers]> & {\n Text: Text.Component;\n Addon: Addon.Component;\n };\n }\n\n type WrapperComponent<PropsExtending = {}> = (<\n V extends 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) &\n 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 v18. */\nexport type TabLineValue = NSTabLine.Value;\n/** @deprecated It will be removed in v18. */\nexport type TabLineProps<T extends TabLineValue = TabLineValue> = NSTabLine.Props<T>;\n/** @deprecated It will be removed in v18. */\nexport type TabLineItemProps = NSTabLine.Item.Props;\n/** @deprecated It will be removed in v18. */\nexport type TabLineContext = NSTabLine.Ctx;\n/** @deprecated It will be removed in v18. */\nexport type TabLineHandlers = NSTabLine.Handlers;\n\nexport type { NSTabLine };\n"],"mappings":"","ignoreList":[]}
|
package/lib/es6/TabLine.js
CHANGED
|
@@ -11,20 +11,20 @@ import a11yEnhance from '@semcore/core/lib/utils/enhances/a11yEnhance';
|
|
|
11
11
|
import { Text as SemcoreText } from '@semcore/typography';
|
|
12
12
|
import React from 'react';
|
|
13
13
|
/*!__reshadow-styles__:"./style/tab-line.shadow.css"*/
|
|
14
|
-
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".
|
|
14
|
+
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___STabLine_1n7v4_gg_{position:relative;display:flex;width:100%;max-width:100%}.___STabLine_1n7v4_gg_.__underlined_1n7v4_gg_{border-bottom:1px solid var(--intergalactic-border-primary,#000c0829)}@media (color-gamut:p3){.___STabLine_1n7v4_gg_.__underlined_1n7v4_gg_{border-bottom:1px solid var(--intergalactic-border-primary,oklch(.137 .026 175.7/.161))}}.___STabLineItem_1n7v4_gg_{display:inline-flex;align-items:center;justify-content:center;position:relative;touch-action:manipulation;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none;box-sizing:border-box;padding:0;margin:0;box-shadow:none;-webkit-text-decoration:none;text-decoration:none;-webkit-tap-highlight-color:transparent;overflow:visible;text-align:center;vertical-align:middle;font-family:inherit;cursor:pointer;border:none;background:#0000;color:var(--intergalactic-text-primary,oklch(.1 .03 137/.899));margin-right:var(--intergalactic-spacing-4x,16px);font-weight:var(--intergalactic-medium,500)}.___STabLineItem_1n7v4_gg_::-moz-focus-inner{border:none;padding:0}.___STabLineItem_1n7v4_gg_:active{-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.___STabLineItem_1n7v4_gg_:hover{-webkit-text-decoration:none;text-decoration:none}}.___STabLineItem_1n7v4_gg_:after,.___STabLineItem_1n7v4_gg_:before{content:\"\";position:absolute;left:0;bottom:-1px;height:3px;width:100%;background-color:initial}.___STabLineItem_1n7v4_gg_:before{transition:background-color calc(var(--intergalactic-duration-control, 200)*1ms) ease-in-out}@media (hover:hover){.___STabLineItem_1n7v4_gg_:hover:before{background-color:var(--intergalactic-border-primary,#000c0829)}@media (color-gamut:p3){.___STabLineItem_1n7v4_gg_:hover:before{background-color:var(--intergalactic-border-primary,oklch(.137 .026 175.7/.161))}}}.___STabLineItem_1n7v4_gg_.__selected_1n7v4_gg_:after{transition-delay:calc(var(--intergalactic-duration-control, 200)*1ms);background-color:var(--intergalactic-border-info-active,oklch(.7 .131 275.2))}.___STabLineItem_1n7v4_gg_ .___SAddon_1n7v4_gg_:not(:last-child),.___STabLineItem_1n7v4_gg_ .___SText_1n7v4_gg_:not(:last-child){margin-right:var(--intergalactic-spacing-2x,8px)}.___SCaret_1n7v4_gg_{position:absolute;bottom:-1px;height:3px;background:var(--intergalactic-border-info-active,oklch(.7 .131 275.2));transition:calc(var(--intergalactic-duration-control, 200)*1ms) all ease-in-out}.___STabLineItem_1n7v4_gg_.__selected_1n7v4_gg_{flex-shrink:0}.___STabLineItem_1n7v4_gg_.__disabled_1n7v4_gg_{opacity:var(--intergalactic-disabled-opacity,.4);cursor:default;pointer-events:none}.___SAddon_1n7v4_gg_{display:inline-flex;align-items:center;justify-content:center}.___STabLineItem_1n7v4_gg_._size_m_1n7v4_gg_{height:28px;min-width:18px}.___STabLineItem_1n7v4_gg_._size_l_1n7v4_gg_{height:40px;min-width:26px}.___STabLineItem_1n7v4_gg_._neighborLocation_left_1n7v4_gg_{margin-right:0}@media (prefers-reduced-motion){.___STabLineItem_1n7v4_gg_.__selected_1n7v4_gg_:after,.___STabLineItem_1n7v4_gg_:after,.___STabLineItem_1n7v4_gg_:before{transition:none}.___SCaret_1n7v4_gg_{display:none}}", /*__inner_css_end__*/"1n7v4_gg_"),
|
|
15
15
|
/*__reshadow_css_end__*/
|
|
16
16
|
{
|
|
17
|
-
"__STabLine": "
|
|
18
|
-
"_underlined": "
|
|
19
|
-
"__SCaret": "
|
|
20
|
-
"__STabLineItem": "
|
|
21
|
-
"_selected": "
|
|
22
|
-
"_disabled": "
|
|
23
|
-
"__SAddon": "
|
|
24
|
-
"_size_m": "
|
|
25
|
-
"_size_l": "
|
|
26
|
-
"_neighborLocation_left": "
|
|
27
|
-
"__SText": "
|
|
17
|
+
"__STabLine": "___STabLine_1n7v4_gg_",
|
|
18
|
+
"_underlined": "__underlined_1n7v4_gg_",
|
|
19
|
+
"__SCaret": "___SCaret_1n7v4_gg_",
|
|
20
|
+
"__STabLineItem": "___STabLineItem_1n7v4_gg_",
|
|
21
|
+
"_selected": "__selected_1n7v4_gg_",
|
|
22
|
+
"_disabled": "__disabled_1n7v4_gg_",
|
|
23
|
+
"__SAddon": "___SAddon_1n7v4_gg_",
|
|
24
|
+
"_size_m": "_size_m_1n7v4_gg_",
|
|
25
|
+
"_size_l": "_size_l_1n7v4_gg_",
|
|
26
|
+
"_neighborLocation_left": "_neighborLocation_left_1n7v4_gg_",
|
|
27
|
+
"__SText": "___SText_1n7v4_gg_"
|
|
28
28
|
});
|
|
29
29
|
class TabLineRoot extends Component {
|
|
30
30
|
constructor(...args) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabLine.type.js","names":[],"sources":["../../src/TabLine.type.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"TabLine.type.js","names":[],"sources":["../../src/TabLine.type.ts"],"sourcesContent":["import type { NSBox, NSNeighborLocation } from '@semcore/base-components';\nimport type { PropGetterFn, Intergalactic } from '@semcore/core';\nimport type { NSText } from '@semcore/typography';\nimport type React from 'react';\n\ndeclare namespace NSTabLine {\n type Value = string | number | boolean;\n type Props<T extends NSTabLine.Value = NSTabLine.Value> = NSBox.Props &\n NSNeighborLocation.Props & {\n /** TabLine size\n * @default m\n * */\n size?: 'm' | 'l' | false;\n /** Adds a bottom border for the entire component\n * @default true\n * */\n underlined?: boolean;\n /** Is invoked when changing the selection */\n onChange?:\n | ((value: T, e?: React.SyntheticEvent<HTMLButtonElement>) => void)\n | React.Dispatch<React.SetStateAction<T>>;\n /** Value of the selected tab */\n value?: T;\n /** Default value of the selected tab\n * @default null\n * */\n defaultValue?: T;\n\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\n type DefaultProps = {\n defaultValue: 0;\n size: 'm';\n underlined: true;\n behavior: 'auto';\n };\n\n namespace Item {\n type Props = NSBox.Props &\n NSNeighborLocation.Detect.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?: NSTabLine.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: NSTabLine.Handlers]> & {\n Text: Text.Component;\n Addon: Addon.Component;\n };\n }\n\n type WrapperComponent<PropsExtending = {}> = (<\n V extends 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) &\n 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 v18. */\nexport type TabLineValue = NSTabLine.Value;\n/** @deprecated It will be removed in v18. */\nexport type TabLineProps<T extends TabLineValue = TabLineValue> = NSTabLine.Props<T>;\n/** @deprecated It will be removed in v18. */\nexport type TabLineItemProps = NSTabLine.Item.Props;\n/** @deprecated It will be removed in v18. */\nexport type TabLineContext = NSTabLine.Ctx;\n/** @deprecated It will be removed in v18. */\nexport type TabLineHandlers = NSTabLine.Handlers;\n\nexport type { NSTabLine };\n"],"mappings":"","ignoreList":[]}
|
package/lib/esm/TabLine.mjs
CHANGED
|
@@ -10,22 +10,22 @@ const style = (
|
|
|
10
10
|
/*__reshadow_css_start__*/
|
|
11
11
|
(sstyled.insert(
|
|
12
12
|
/*__inner_css_start__*/
|
|
13
|
-
'.
|
|
13
|
+
'.___STabLine_1n7v4_gg_{position:relative;display:flex;width:100%;max-width:100%}.___STabLine_1n7v4_gg_.__underlined_1n7v4_gg_{border-bottom:1px solid var(--intergalactic-border-primary,#000c0829)}@media (color-gamut:p3){.___STabLine_1n7v4_gg_.__underlined_1n7v4_gg_{border-bottom:1px solid var(--intergalactic-border-primary,oklch(.137 .026 175.7/.161))}}.___STabLineItem_1n7v4_gg_{display:inline-flex;align-items:center;justify-content:center;position:relative;touch-action:manipulation;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none;box-sizing:border-box;padding:0;margin:0;box-shadow:none;-webkit-text-decoration:none;text-decoration:none;-webkit-tap-highlight-color:transparent;overflow:visible;text-align:center;vertical-align:middle;font-family:inherit;cursor:pointer;border:none;background:#0000;color:var(--intergalactic-text-primary,oklch(.1 .03 137/.899));margin-right:var(--intergalactic-spacing-4x,16px);font-weight:var(--intergalactic-medium,500)}.___STabLineItem_1n7v4_gg_::-moz-focus-inner{border:none;padding:0}.___STabLineItem_1n7v4_gg_:active{-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.___STabLineItem_1n7v4_gg_:hover{-webkit-text-decoration:none;text-decoration:none}}.___STabLineItem_1n7v4_gg_:after,.___STabLineItem_1n7v4_gg_:before{content:"";position:absolute;left:0;bottom:-1px;height:3px;width:100%;background-color:initial}.___STabLineItem_1n7v4_gg_:before{transition:background-color calc(var(--intergalactic-duration-control, 200)*1ms) ease-in-out}@media (hover:hover){.___STabLineItem_1n7v4_gg_:hover:before{background-color:var(--intergalactic-border-primary,#000c0829)}@media (color-gamut:p3){.___STabLineItem_1n7v4_gg_:hover:before{background-color:var(--intergalactic-border-primary,oklch(.137 .026 175.7/.161))}}}.___STabLineItem_1n7v4_gg_.__selected_1n7v4_gg_:after{transition-delay:calc(var(--intergalactic-duration-control, 200)*1ms);background-color:var(--intergalactic-border-info-active,oklch(.7 .131 275.2))}.___STabLineItem_1n7v4_gg_ .___SAddon_1n7v4_gg_:not(:last-child),.___STabLineItem_1n7v4_gg_ .___SText_1n7v4_gg_:not(:last-child){margin-right:var(--intergalactic-spacing-2x,8px)}.___SCaret_1n7v4_gg_{position:absolute;bottom:-1px;height:3px;background:var(--intergalactic-border-info-active,oklch(.7 .131 275.2));transition:calc(var(--intergalactic-duration-control, 200)*1ms) all ease-in-out}.___STabLineItem_1n7v4_gg_.__selected_1n7v4_gg_{flex-shrink:0}.___STabLineItem_1n7v4_gg_.__disabled_1n7v4_gg_{opacity:var(--intergalactic-disabled-opacity,.4);cursor:default;pointer-events:none}.___SAddon_1n7v4_gg_{display:inline-flex;align-items:center;justify-content:center}.___STabLineItem_1n7v4_gg_._size_m_1n7v4_gg_{height:28px;min-width:18px}.___STabLineItem_1n7v4_gg_._size_l_1n7v4_gg_{height:40px;min-width:26px}.___STabLineItem_1n7v4_gg_._neighborLocation_left_1n7v4_gg_{margin-right:0}@media (prefers-reduced-motion){.___STabLineItem_1n7v4_gg_.__selected_1n7v4_gg_:after,.___STabLineItem_1n7v4_gg_:after,.___STabLineItem_1n7v4_gg_:before{transition:none}.___SCaret_1n7v4_gg_{display:none}}',
|
|
14
14
|
/*__inner_css_end__*/
|
|
15
|
-
"
|
|
15
|
+
"1n7v4_gg_"
|
|
16
16
|
), /*__reshadow_css_end__*/
|
|
17
17
|
{
|
|
18
|
-
"__STabLine": "
|
|
19
|
-
"_underlined": "
|
|
20
|
-
"__SCaret": "
|
|
21
|
-
"__STabLineItem": "
|
|
22
|
-
"_selected": "
|
|
23
|
-
"_disabled": "
|
|
24
|
-
"__SAddon": "
|
|
25
|
-
"_size_m": "
|
|
26
|
-
"_size_l": "
|
|
27
|
-
"_neighborLocation_left": "
|
|
28
|
-
"__SText": "
|
|
18
|
+
"__STabLine": "___STabLine_1n7v4_gg_",
|
|
19
|
+
"_underlined": "__underlined_1n7v4_gg_",
|
|
20
|
+
"__SCaret": "___SCaret_1n7v4_gg_",
|
|
21
|
+
"__STabLineItem": "___STabLineItem_1n7v4_gg_",
|
|
22
|
+
"_selected": "__selected_1n7v4_gg_",
|
|
23
|
+
"_disabled": "__disabled_1n7v4_gg_",
|
|
24
|
+
"__SAddon": "___SAddon_1n7v4_gg_",
|
|
25
|
+
"_size_m": "_size_m_1n7v4_gg_",
|
|
26
|
+
"_size_l": "_size_l_1n7v4_gg_",
|
|
27
|
+
"_neighborLocation_left": "_neighborLocation_left_1n7v4_gg_",
|
|
28
|
+
"__SText": "___SText_1n7v4_gg_"
|
|
29
29
|
})
|
|
30
30
|
);
|
|
31
31
|
class TabLineRoot extends Component {
|
package/lib/types/TabLine.d.ts
CHANGED
|
@@ -9,3 +9,4 @@ import type { NSTabLine } from './TabLine.type';
|
|
|
9
9
|
declare const TabLine: NSTabLine.Component;
|
|
10
10
|
export declare const wrapTabLine: <PropsExtending extends {}>(wrapper: (props: Intergalactic.InternalTypings.UntypeRefAndTag<Intergalactic.InternalTypings.ComponentPropsNesting<NSTabLine.WrapperComponent>> & PropsExtending) => React.ReactNode) => NSTabLine.WrapperComponent<PropsExtending>;
|
|
11
11
|
export default TabLine;
|
|
12
|
+
//# sourceMappingURL=TabLine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TabLine.d.ts","sourceRoot":"","sources":["../../src/TabLine.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAKnD,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAkPhD;;;;GAIG;AACH,QAAA,MAAM,OAAO,qBAKX,CAAC;AAEH,eAAO,MAAM,WAAW,GAAI,cAAc,SAAS,EAAE,EAAE,SAAS,CAC9D,KAAK,EAAE,aAAa,CAAC,eAAe,CAAC,eAAe,CAClD,aAAa,CAAC,eAAe,CAAC,qBAAqB,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAChF,GACD,cAAc,KACX,KAAK,CAAC,SAAS,KAAgB,SAAS,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;AAE/E,eAAe,OAAO,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { NSBox, NSNeighborLocation } from '@semcore/base-components';
|
|
2
2
|
import type { PropGetterFn, Intergalactic } from '@semcore/core';
|
|
3
3
|
import type { NSText } from '@semcore/typography';
|
|
4
4
|
import type React from 'react';
|
|
5
5
|
declare namespace NSTabLine {
|
|
6
6
|
type Value = string | number | boolean;
|
|
7
|
-
type Props<T extends NSTabLine.Value = NSTabLine.Value> =
|
|
7
|
+
type Props<T extends NSTabLine.Value = NSTabLine.Value> = NSBox.Props & NSNeighborLocation.Props & {
|
|
8
8
|
/** TabLine size
|
|
9
9
|
* @default m
|
|
10
10
|
* */
|
|
@@ -42,7 +42,7 @@ declare namespace NSTabLine {
|
|
|
42
42
|
behavior: 'auto';
|
|
43
43
|
};
|
|
44
44
|
namespace Item {
|
|
45
|
-
type Props =
|
|
45
|
+
type Props = NSBox.Props & NSNeighborLocation.Detect.Props & {
|
|
46
46
|
/** Makes a tab selected. This property is determined automatically depending on the value. */
|
|
47
47
|
selected?: boolean;
|
|
48
48
|
/** Disabled state */
|
|
@@ -59,7 +59,7 @@ declare namespace NSTabLine {
|
|
|
59
59
|
type Component = NSText.Component;
|
|
60
60
|
}
|
|
61
61
|
namespace Addon {
|
|
62
|
-
type Component =
|
|
62
|
+
type Component = NSBox.Component;
|
|
63
63
|
}
|
|
64
64
|
type Component = Intergalactic.Component<'div', Props, {}, [handlers: NSTabLine.Handlers]> & {
|
|
65
65
|
Text: Text.Component;
|
|
@@ -84,3 +84,4 @@ export type TabLineContext = NSTabLine.Ctx;
|
|
|
84
84
|
/** @deprecated It will be removed in v18. */
|
|
85
85
|
export type TabLineHandlers = NSTabLine.Handlers;
|
|
86
86
|
export type { NSTabLine };
|
|
87
|
+
//# sourceMappingURL=TabLine.type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TabLine.type.d.ts","sourceRoot":"","sources":["../../src/TabLine.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,WAAW,SAAS,CAAC;IAC1B,KAAK,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IACvC,K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,YAAY,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACrF,6CAA6C;AAC7C,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC;AACpD,6CAA6C;AAC7C,MAAM,MAAM,cAAc,GAAG,SAAS,CAAC,GAAG,CAAC;AAC3C,6CAA6C;AAC7C,MAAM,MAAM,eAAe,GAAG,SAAS,CAAC,QAAQ,CAAC;AAEjD,YAAY,EAAE,SAAS,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,WAAW,EAAE,MAAM,WAAW,CAAC;AACjD,cAAc,gBAAgB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/tab-line",
|
|
3
3
|
"description": "Semrush TabLine Component",
|
|
4
|
-
"version": "17.2.
|
|
4
|
+
"version": "17.2.1-prerelease.2",
|
|
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.2"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@semcore/base-components": "^17.2.
|
|
20
|
+
"@semcore/base-components": "^17.2.2"
|
|
21
21
|
},
|
|
22
22
|
"repository": {
|
|
23
23
|
"type": "git",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"directory": "semcore/tab-line"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@semcore/core": "17.2
|
|
29
|
-
"@semcore/base-components": "17.2.
|
|
28
|
+
"@semcore/core": "17.3.1-prerelease.2",
|
|
29
|
+
"@semcore/base-components": "17.2.2-prerelease.2",
|
|
30
30
|
"@semcore/testing-utils": "1.0.0"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
@@ -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
|
+
});
|