@tedi-design-system/react 19.1.0-rc.13 → 19.1.0-rc.14
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/bundle-stats.html +1 -1
- package/external/hoist-non-react-statics/external/react-is/cjs/react-is.development.cjs.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/cjs/react-is.development.es.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/cjs/react-is.production.min.cjs.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/cjs/react-is.production.min.es.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/index.cjs.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/index.es.js +1 -1
- package/external/prop-types/external/react-is/cjs/react-is.development.cjs.js +1 -1
- package/external/prop-types/external/react-is/cjs/react-is.development.es.js +1 -1
- package/external/prop-types/external/react-is/cjs/react-is.production.min.cjs.js +1 -1
- package/external/prop-types/external/react-is/cjs/react-is.production.min.es.js +1 -1
- package/external/prop-types/external/react-is/index.cjs.js +1 -1
- package/external/prop-types/external/react-is/index.es.js +1 -1
- package/package.json +1 -1
- package/src/tedi/components/navigation/tabs/tabs-helpers.cjs.js +1 -1
- package/src/tedi/components/navigation/tabs/tabs-helpers.d.ts +5 -0
- package/src/tedi/components/navigation/tabs/tabs-helpers.es.js +7 -4
- package/src/tedi/components/navigation/tabs/tabs-trigger/tabs-trigger.cjs.js +1 -1
- package/src/tedi/components/navigation/tabs/tabs-trigger/tabs-trigger.es.js +17 -17
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../../../_virtual/react-is.development.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../../../_virtual/react-is.development.cjs2.js");/** @license React v16.13.1
|
|
2
2
|
* react-is.development.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
package/external/hoist-non-react-statics/external/react-is/cjs/react-is.production.min.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../../../_virtual/react-is.production.min.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../../../_virtual/react-is.production.min.cjs2.js");/** @license React v16.13.1
|
|
2
2
|
* react-is.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../../_virtual/index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../../_virtual/index.cjs4.js"),r=require("./cjs/react-is.production.min.cjs.js"),o=require("./cjs/react-is.development.cjs.js");process.env.NODE_ENV==="production"?e.__module.exports=r.__require():e.__module.exports=o.__require();var t=e.__module.exports;exports.reactIsExports=t;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __module as r } from "../../../../_virtual/index.
|
|
1
|
+
import { __module as r } from "../../../../_virtual/index.es4.js";
|
|
2
2
|
import { __require as e } from "./cjs/react-is.production.min.es.js";
|
|
3
3
|
import { __require as o } from "./cjs/react-is.development.es.js";
|
|
4
4
|
process.env.NODE_ENV === "production" ? r.exports = e() : r.exports = o();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../../../_virtual/react-is.development.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../../../_virtual/react-is.development.cjs.js");/** @license React v16.13.1
|
|
2
2
|
* react-is.development.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../../../_virtual/react-is.production.min.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../../../_virtual/react-is.production.min.cjs.js");/** @license React v16.13.1
|
|
2
2
|
* react-is.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../../_virtual/index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../../_virtual/index.cjs3.js"),t=require("./cjs/react-is.production.min.cjs.js"),o=require("./cjs/react-is.development.cjs.js");var r;function u(){return r||(r=1,process.env.NODE_ENV==="production"?e.__module.exports=t.__require():e.__module.exports=o.__require()),e.__module.exports}exports.__require=u;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __module as e } from "../../../../_virtual/index.
|
|
1
|
+
import { __module as e } from "../../../../_virtual/index.es3.js";
|
|
2
2
|
import { __require as o } from "./cjs/react-is.production.min.es.js";
|
|
3
3
|
import { __require as t } from "./cjs/react-is.development.es.js";
|
|
4
4
|
var r;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tedi-design-system/react",
|
|
3
|
-
"version": "19.1.0-rc.
|
|
3
|
+
"version": "19.1.0-rc.14",
|
|
4
4
|
"description": "TEDI Design System React component library — accessible, reusable UI components. Docs & live examples: https://storybook.tedi.ee/react/rc/",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=e=>{if(e.key!=="ArrowLeft"&&e.key!=="ArrowRight"&&e.key!=="Home"&&e.key!=="End")return null;const l=e.currentTarget.closest('[role="tablist"]');if(!l)return null;const t=Array.from(l.querySelectorAll('[role="tab"]:not([disabled])')).filter(a=>getComputedStyle(a).display!=="none"),n=t.indexOf(e.currentTarget);if(t.length===0||n===-1)return null;let r=-1;switch(e.key){case"ArrowLeft":r=n===0?t.length-1:n-1;break;case"ArrowRight":r=n===t.length-1?0:n+1;break;case"Home":r=0;break;case"End":r=t.length-1;break}return r!==-1?(e.preventDefault(),t[r].focus(),t[r]
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=e=>{e.scrollIntoView({block:"nearest",inline:"nearest"})},s=e=>{if(e.key!=="ArrowLeft"&&e.key!=="ArrowRight"&&e.key!=="Home"&&e.key!=="End")return null;const l=e.currentTarget.closest('[role="tablist"]');if(!l)return null;const t=Array.from(l.querySelectorAll('[role="tab"]:not([disabled])')).filter(a=>getComputedStyle(a).display!=="none"),n=t.indexOf(e.currentTarget);if(t.length===0||n===-1)return null;let r=-1;switch(e.key){case"ArrowLeft":r=n===0?t.length-1:n-1;break;case"ArrowRight":r=n===t.length-1?0:n+1;break;case"Home":r=0;break;case"End":r=t.length-1;break}return r!==-1?(e.preventDefault(),t[r].focus(),o(t[r]),t[r]):null};exports.navigateTablist=s;exports.scrollTabIntoView=o;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scrolls a tab fully into view inside a horizontally scrollable tablist.
|
|
3
|
+
* A no-op when the tab is already fully visible.
|
|
4
|
+
*/
|
|
5
|
+
export declare const scrollTabIntoView: (tab: HTMLElement) => void;
|
|
1
6
|
/**
|
|
2
7
|
* Navigates to a sibling tab in the tablist using ArrowLeft/ArrowRight/Home/End keys.
|
|
3
8
|
* Returns the target tab element if navigation occurred, or null otherwise.
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a = (e) => {
|
|
2
|
+
e.scrollIntoView({ block: "nearest", inline: "nearest" });
|
|
3
|
+
}, s = (e) => {
|
|
2
4
|
if (e.key !== "ArrowLeft" && e.key !== "ArrowRight" && e.key !== "Home" && e.key !== "End")
|
|
3
5
|
return null;
|
|
4
6
|
const l = e.currentTarget.closest('[role="tablist"]');
|
|
5
7
|
if (!l) return null;
|
|
6
8
|
const t = Array.from(l.querySelectorAll('[role="tab"]:not([disabled])')).filter(
|
|
7
|
-
(
|
|
9
|
+
(o) => getComputedStyle(o).display !== "none"
|
|
8
10
|
), n = t.indexOf(e.currentTarget);
|
|
9
11
|
if (t.length === 0 || n === -1) return null;
|
|
10
12
|
let r = -1;
|
|
@@ -22,8 +24,9 @@ const o = (e) => {
|
|
|
22
24
|
r = t.length - 1;
|
|
23
25
|
break;
|
|
24
26
|
}
|
|
25
|
-
return r !== -1 ? (e.preventDefault(), t[r].focus(), t[r]
|
|
27
|
+
return r !== -1 ? (e.preventDefault(), t[r].focus(), a(t[r]), t[r]) : null;
|
|
26
28
|
};
|
|
27
29
|
export {
|
|
28
|
-
|
|
30
|
+
s as navigateTablist,
|
|
31
|
+
a as scrollTabIntoView
|
|
29
32
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),x=require("../../../../../../external/classnames/index.cjs.js"),_=require("../../../base/icon/icon.cjs.js"),a=require("../tabs.module.scss.cjs.js"),q=require("../tabs-context.cjs.js"),l=require("../tabs-helpers.cjs.js"),d=b=>{const{id:e,children:u,icon:n,disabled:t=!1,className:g}=b,{currentTab:T,setCurrentTab:i}=q.useTabsContext(),r=T===e,f=s=>{t||(i(e),l.scrollTabIntoView(s.currentTarget))},m=s=>{const o=l.navigateTablist(s);o&&i(o.id)};return c.jsxs("button",{"data-name":"tabs-trigger",id:e,role:"tab",type:"button","aria-selected":r,"aria-controls":`${e}-panel`,tabIndex:r?0:-1,disabled:t,className:x.default(a.default["tedi-tabs__trigger"],{[a.default["tedi-tabs__trigger--selected"]]:r},{[a.default["tedi-tabs__trigger--disabled"]]:t},g),onClick:f,onKeyDown:m,children:[n&&c.jsx(_.Icon,{name:n,size:18,color:"inherit"}),u]})};d.displayName="TabsTrigger";exports.TabsTrigger=d;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsxs as p, jsx as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as p, jsx as T } from "react/jsx-runtime";
|
|
2
|
+
import f from "../../../../../../external/classnames/index.es.js";
|
|
3
3
|
import { Icon as u } from "../../../base/icon/icon.es.js";
|
|
4
4
|
import s from "../tabs.module.scss.es.js";
|
|
5
5
|
import { useTabsContext as _ } from "../tabs-context.es.js";
|
|
6
|
-
import { navigateTablist as h } from "../tabs-helpers.es.js";
|
|
7
|
-
const
|
|
8
|
-
const { id: e, children:
|
|
9
|
-
t ||
|
|
10
|
-
},
|
|
11
|
-
const
|
|
12
|
-
|
|
6
|
+
import { navigateTablist as h, scrollTabIntoView as x } from "../tabs-helpers.es.js";
|
|
7
|
+
const y = (c) => {
|
|
8
|
+
const { id: e, children: l, icon: i, disabled: t = !1, className: d } = c, { currentTab: m, setCurrentTab: o } = _(), r = m === e, b = (a) => {
|
|
9
|
+
t || (o(e), x(a.currentTarget));
|
|
10
|
+
}, g = (a) => {
|
|
11
|
+
const n = h(a);
|
|
12
|
+
n && o(n.id);
|
|
13
13
|
};
|
|
14
14
|
return /* @__PURE__ */ p(
|
|
15
15
|
"button",
|
|
@@ -22,22 +22,22 @@ const x = (n) => {
|
|
|
22
22
|
"aria-controls": `${e}-panel`,
|
|
23
23
|
tabIndex: r ? 0 : -1,
|
|
24
24
|
disabled: t,
|
|
25
|
-
className:
|
|
25
|
+
className: f(
|
|
26
26
|
s["tedi-tabs__trigger"],
|
|
27
27
|
{ [s["tedi-tabs__trigger--selected"]]: r },
|
|
28
28
|
{ [s["tedi-tabs__trigger--disabled"]]: t },
|
|
29
|
-
|
|
29
|
+
d
|
|
30
30
|
),
|
|
31
|
-
onClick:
|
|
32
|
-
onKeyDown:
|
|
31
|
+
onClick: b,
|
|
32
|
+
onKeyDown: g,
|
|
33
33
|
children: [
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
i && /* @__PURE__ */ T(u, { name: i, size: 18, color: "inherit" }),
|
|
35
|
+
l
|
|
36
36
|
]
|
|
37
37
|
}
|
|
38
38
|
);
|
|
39
39
|
};
|
|
40
|
-
|
|
40
|
+
y.displayName = "TabsTrigger";
|
|
41
41
|
export {
|
|
42
|
-
|
|
42
|
+
y as TabsTrigger
|
|
43
43
|
};
|