@ogcio/design-system-react 1.33.0 → 1.34.0
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/accordion/accordion-item.js +1 -1
- package/dist/alert/alert.js +1 -1
- package/dist/alert/variants.js +1 -1
- package/dist/atoms/Button.js +1 -1
- package/dist/atoms/heading/styles.js +1 -1
- package/dist/atoms/storybook/Heading.meta.d.ts +1 -1
- package/dist/atoms/storybook/Heading.meta.js +4 -4
- package/dist/atoms/storybook/Icons.meta.d.ts +1 -1
- package/dist/atoms/storybook/Icons.meta.js +7 -7
- package/dist/atoms/storybook/InsetText.meta.d.ts +1 -1
- package/dist/atoms/storybook/InsetText.meta.js +1 -1
- package/dist/atoms/storybook/Logos.meta.d.ts +1 -1
- package/dist/atoms/storybook/Logos.meta.js +1 -1
- package/dist/autocomplete/autocomplete.js +1 -1
- package/dist/autocomplete/use-autocomplete-controller.js +2 -2
- package/dist/browser-support/browser-support.js +202 -30
- package/dist/chip/chip.js +1 -1
- package/dist/data-table/data-table-footer.js +2 -2
- package/dist/data-table/data-table-header.js +1 -1
- package/dist/data-table/data-table-selected-rows.js +1 -1
- package/dist/data-table/editable-table-cell.js +1 -1
- package/dist/details/details.js +13 -16
- package/dist/drawer/drawer.js +1 -1
- package/dist/error-text/error-text.js +1 -1
- package/dist/header/header-legacy.js +6 -6
- package/dist/header/header-next/header-next.js +3 -3
- package/dist/header/variants.js +1 -1
- package/dist/hint-text/hint-text.js +1 -1
- package/dist/i18n/config.js +2 -2
- package/dist/i18n/utility.js +1 -1
- package/dist/{i18nInstance-AYICsHJu.js → i18nInstance-DiZ0lVPL.js} +2 -2
- package/dist/i18next-zBkzxGW1.js +1388 -0
- package/dist/{index-CB-zPpNk.js → index-C7W4ssMN.js} +1 -1
- package/dist/index-DqBV2TCd.js +23108 -0
- package/dist/index.js +1 -1
- package/dist/label/label.js +1 -1
- package/dist/{lodash-82PmXrjJ.js → lodash-DTZaBYO8.js} +289 -272
- package/dist/modal/modal.content.js +1 -1
- package/dist/pagination/pagination.js +59 -56
- package/dist/progress-stepper/progress-stepper.js +1 -1
- package/dist/select/select-native.js +1 -1
- package/dist/spinner/spinner.js +1 -1
- package/dist/stack/stack.js +2 -2
- package/dist/styles.css +1 -1
- package/dist/table/table.js +1 -1
- package/dist/tabs/variants.js +1 -1
- package/dist/toast/ds-toast.js +1 -1
- package/dist/tooltip/variants.js +1 -1
- package/dist/{useTranslation-DiBQuy8S.js → useTranslation-CRbS3UeG.js} +94 -85
- package/package.json +14 -7
- package/dist/i18next-Bfi2-LyH.js +0 -1370
- package/dist/index-Bh2cTIps.js +0 -33899
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsxs as n, Fragment as y, jsx as a } from "react/jsx-runtime";
|
|
3
3
|
import { c as s } from "../clsx-OuTLNxxd.js";
|
|
4
4
|
import { useState as w, useRef as I } from "react";
|
|
5
|
-
import { c as k } from "../index-
|
|
5
|
+
import { c as k } from "../index-C7W4ssMN.js";
|
|
6
6
|
import { Icon as v } from "../icon/icon.js";
|
|
7
7
|
const $ = ({
|
|
8
8
|
defaultExpanded: d,
|
package/dist/alert/alert.js
CHANGED
package/dist/alert/variants.js
CHANGED
package/dist/atoms/Button.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { w as n, e as t } from "../../index-DqBV2TCd.js";
|
|
2
2
|
import { Size as s } from "../heading/types.js";
|
|
3
3
|
const o = {
|
|
4
4
|
tags: ["autodocs"],
|
|
@@ -55,10 +55,10 @@ const o = {
|
|
|
55
55
|
}, l = {
|
|
56
56
|
play: async ({
|
|
57
57
|
canvasElement: a,
|
|
58
|
-
step:
|
|
58
|
+
step: i
|
|
59
59
|
}) => {
|
|
60
|
-
const e =
|
|
61
|
-
await
|
|
60
|
+
const e = n(a);
|
|
61
|
+
await i("renders h1 to h6 with the correct semantic tags", async () => {
|
|
62
62
|
t(e.getByTestId("heading-1").tagName).toBe("H1"), t(e.getByTestId("heading-2").tagName).toBe("H2"), t(e.getByTestId("heading-3").tagName).toBe("H3"), t(e.getByTestId("heading-4").tagName).toBe("H4"), t(e.getByTestId("heading-5").tagName).toBe("H5"), t(e.getByTestId("heading-6").tagName).toBe("H6");
|
|
63
63
|
});
|
|
64
64
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { w as n, e as i } from "../../index-DqBV2TCd.js";
|
|
2
2
|
import a from "../icons/ArrowLeft.js";
|
|
3
3
|
import s from "../icons/ArrowRight.js";
|
|
4
4
|
import c from "../icons/CheckCircle.js";
|
|
@@ -10,8 +10,8 @@ import d from "../icons/KeyboardArrowDown.js";
|
|
|
10
10
|
import y from "../icons/KeyboardArrowLeft.js";
|
|
11
11
|
import b from "../icons/KeyboardArrowRight.js";
|
|
12
12
|
import g from "../icons/KeyboardArrowUp.js";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
13
|
+
import w from "../icons/LastPage.js";
|
|
14
|
+
import C from "../icons/Visibility.js";
|
|
15
15
|
import h from "../icons/VisibilityOff.js";
|
|
16
16
|
import A from "../icons/Warning.js";
|
|
17
17
|
const u = [{
|
|
@@ -59,11 +59,11 @@ const u = [{
|
|
|
59
59
|
name: "KeyboardArrowUp",
|
|
60
60
|
selector: "keyboard-arrow-up"
|
|
61
61
|
}, {
|
|
62
|
-
Component:
|
|
62
|
+
Component: w,
|
|
63
63
|
name: "LastPage",
|
|
64
64
|
selector: "last-page"
|
|
65
65
|
}, {
|
|
66
|
-
Component:
|
|
66
|
+
Component: C,
|
|
67
67
|
name: "Visibility",
|
|
68
68
|
selector: "visibility"
|
|
69
69
|
}, {
|
|
@@ -108,7 +108,7 @@ const u = [{
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
},
|
|
111
|
+
}, N = {
|
|
112
112
|
args: K.args,
|
|
113
113
|
play: async ({
|
|
114
114
|
canvasElement: e,
|
|
@@ -124,7 +124,7 @@ const u = [{
|
|
|
124
124
|
}
|
|
125
125
|
};
|
|
126
126
|
export {
|
|
127
|
-
|
|
127
|
+
N as Default,
|
|
128
128
|
u as iconList,
|
|
129
129
|
K as iconsMeta
|
|
130
130
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as z, jsx as y } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef as J, useRef as D, useImperativeHandle as Q, useEffect as W, useCallback as P, createElement as Y, Children as Z, isValidElement as ee } from "react";
|
|
4
|
-
import { c as te } from "../index-
|
|
4
|
+
import { c as te } from "../index-C7W4ssMN.js";
|
|
5
5
|
import { cn as oe } from "../cn.js";
|
|
6
6
|
import { useDomId as ne } from "../hooks/use-dom-id.js";
|
|
7
7
|
import { translate as G } from "../i18n/utility.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as F } from "../lodash-
|
|
2
|
-
import { useRef as g, useMemo as G,
|
|
1
|
+
import { l as F } from "../lodash-DTZaBYO8.js";
|
|
2
|
+
import { useRef as g, useMemo as G, useReducer as X, useEffect as A, Children as C, isValidElement as h } from "react";
|
|
3
3
|
import { useScrollHighlightedItem as Y } from "../hooks/use-scroll-highlighted-item.js";
|
|
4
4
|
import { safeCloneElement as j } from "../utils/utilities.js";
|
|
5
5
|
import { AUTOCOMPLETE_ACTIONS as k } from "./types.js";
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as M, jsx as y } from "react/jsx-runtime";
|
|
3
3
|
import { c as F } from "../clsx-OuTLNxxd.js";
|
|
4
|
-
import { useMemo as
|
|
5
|
-
import { Alert as
|
|
6
|
-
import { BROWSER_POLICY as
|
|
4
|
+
import { useMemo as B } from "react";
|
|
5
|
+
import { Alert as S } from "../alert/alert.js";
|
|
6
|
+
import { BROWSER_POLICY as k, DS_HOST as x } from "../constants.js";
|
|
7
7
|
import { Link as A } from "../link/link.js";
|
|
8
|
-
import { u as
|
|
9
|
-
const
|
|
8
|
+
import { u as _ } from "../useTranslation-CRbS3UeG.js";
|
|
9
|
+
const P = {
|
|
10
10
|
AmazonBot: "amazonbot",
|
|
11
11
|
"Amazon Silk": "amazon_silk",
|
|
12
12
|
"Android Browser": "android",
|
|
13
13
|
BaiduSpider: "baiduspider",
|
|
14
14
|
Bada: "bada",
|
|
15
15
|
BingCrawler: "bingcrawler",
|
|
16
|
+
Brave: "brave",
|
|
16
17
|
BlackBerry: "blackberry",
|
|
17
18
|
"ChatGPT-User": "chatgpt_user",
|
|
18
19
|
Chrome: "chrome",
|
|
@@ -20,6 +21,7 @@ const O = {
|
|
|
20
21
|
Chromium: "chromium",
|
|
21
22
|
Diffbot: "diffbot",
|
|
22
23
|
DuckDuckBot: "duckduckbot",
|
|
24
|
+
DuckDuckGo: "duckduckgo",
|
|
23
25
|
Electron: "electron",
|
|
24
26
|
Epiphany: "epiphany",
|
|
25
27
|
FacebookExternalHit: "facebookexternalhit",
|
|
@@ -33,6 +35,7 @@ const O = {
|
|
|
33
35
|
InternetArchiveCrawler: "internetarchivecrawler",
|
|
34
36
|
"K-Meleon": "k_meleon",
|
|
35
37
|
LibreWolf: "librewolf",
|
|
38
|
+
Linespider: "linespider",
|
|
36
39
|
Maxthon: "maxthon",
|
|
37
40
|
"Meta-ExternalAds": "meta_externalads",
|
|
38
41
|
"Meta-ExternalAgent": "meta_externalagent",
|
|
@@ -58,6 +61,7 @@ const O = {
|
|
|
58
61
|
Safari: "safari",
|
|
59
62
|
Sailfish: "sailfish",
|
|
60
63
|
"Samsung Internet for Android": "samsung_internet",
|
|
64
|
+
SlackBot: "slackbot",
|
|
61
65
|
SeaMonkey: "seamonkey",
|
|
62
66
|
Sleipnir: "sleipnir",
|
|
63
67
|
"Sogou Browser": "sogou",
|
|
@@ -79,12 +83,14 @@ const O = {
|
|
|
79
83
|
bada: "Bada",
|
|
80
84
|
bingcrawler: "BingCrawler",
|
|
81
85
|
blackberry: "BlackBerry",
|
|
86
|
+
brave: "Brave",
|
|
82
87
|
chatgpt_user: "ChatGPT-User",
|
|
83
88
|
chrome: "Chrome",
|
|
84
89
|
claudebot: "ClaudeBot",
|
|
85
90
|
chromium: "Chromium",
|
|
86
91
|
diffbot: "Diffbot",
|
|
87
92
|
duckduckbot: "DuckDuckBot",
|
|
93
|
+
duckduckgo: "DuckDuckGo",
|
|
88
94
|
edge: "Microsoft Edge",
|
|
89
95
|
electron: "Electron",
|
|
90
96
|
epiphany: "Epiphany",
|
|
@@ -99,6 +105,7 @@ const O = {
|
|
|
99
105
|
internetarchivecrawler: "InternetArchiveCrawler",
|
|
100
106
|
k_meleon: "K-Meleon",
|
|
101
107
|
librewolf: "LibreWolf",
|
|
108
|
+
linespider: "Linespider",
|
|
102
109
|
maxthon: "Maxthon",
|
|
103
110
|
meta_externalads: "Meta-ExternalAds",
|
|
104
111
|
meta_externalagent: "Meta-ExternalAgent",
|
|
@@ -124,6 +131,7 @@ const O = {
|
|
|
124
131
|
sailfish: "Sailfish",
|
|
125
132
|
samsung_internet: "Samsung Internet for Android",
|
|
126
133
|
seamonkey: "SeaMonkey",
|
|
134
|
+
slackbot: "SlackBot",
|
|
127
135
|
sleipnir: "Sleipnir",
|
|
128
136
|
sogou: "Sogou Browser",
|
|
129
137
|
swing: "Swing",
|
|
@@ -447,7 +455,7 @@ class s {
|
|
|
447
455
|
* @return {string}
|
|
448
456
|
*/
|
|
449
457
|
static getBrowserAlias(e) {
|
|
450
|
-
return
|
|
458
|
+
return P[e];
|
|
451
459
|
}
|
|
452
460
|
/**
|
|
453
461
|
* Get browser name for a short version/alias
|
|
@@ -462,7 +470,7 @@ class s {
|
|
|
462
470
|
return w[e] || "";
|
|
463
471
|
}
|
|
464
472
|
}
|
|
465
|
-
const o = /version\/(\d+(\.?_?\d+)+)/i,
|
|
473
|
+
const o = /version\/(\d+(\.?_?\d+)+)/i, O = [
|
|
466
474
|
/* GPTBot */
|
|
467
475
|
{
|
|
468
476
|
test: [/gptbot/i],
|
|
@@ -603,6 +611,16 @@ const o = /version\/(\d+(\.?_?\d+)+)/i, _ = [
|
|
|
603
611
|
return t && (e.version = t), e;
|
|
604
612
|
}
|
|
605
613
|
},
|
|
614
|
+
/* Linespider */
|
|
615
|
+
{
|
|
616
|
+
test: [/linespider/i],
|
|
617
|
+
describe(r) {
|
|
618
|
+
const e = {
|
|
619
|
+
name: "Linespider"
|
|
620
|
+
}, t = s.getFirstMatch(/(?:linespider)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i, r) || s.getFirstMatch(o, r);
|
|
621
|
+
return t && (e.version = t), e;
|
|
622
|
+
}
|
|
623
|
+
},
|
|
606
624
|
/* AmazonBot */
|
|
607
625
|
{
|
|
608
626
|
test: [/amazonbot/i],
|
|
@@ -662,6 +680,16 @@ const o = /version\/(\d+(\.?_?\d+)+)/i, _ = [
|
|
|
662
680
|
};
|
|
663
681
|
}
|
|
664
682
|
},
|
|
683
|
+
/* SlackBot */
|
|
684
|
+
{
|
|
685
|
+
test: [/slackbot/i, /slack-imgProxy/i],
|
|
686
|
+
describe(r) {
|
|
687
|
+
const e = {
|
|
688
|
+
name: "SlackBot"
|
|
689
|
+
}, t = s.getFirstMatch(/(?:slackbot|slack-imgproxy)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i, r) || s.getFirstMatch(o, r);
|
|
690
|
+
return t && (e.version = t), e;
|
|
691
|
+
}
|
|
692
|
+
},
|
|
665
693
|
/* YahooSlurp */
|
|
666
694
|
{
|
|
667
695
|
test: [/yahoo!?[\s/]*slurp/i],
|
|
@@ -1033,6 +1061,41 @@ const o = /version\/(\d+(\.?_?\d+)+)/i, _ = [
|
|
|
1033
1061
|
return t && (e.version = t), e;
|
|
1034
1062
|
}
|
|
1035
1063
|
},
|
|
1064
|
+
/* DuckDuckGo Browser */
|
|
1065
|
+
{
|
|
1066
|
+
test(r) {
|
|
1067
|
+
return r.hasBrand("DuckDuckGo") ? !0 : r.test(/\sDdg\/[\d.]+$/i);
|
|
1068
|
+
},
|
|
1069
|
+
describe(r, e) {
|
|
1070
|
+
const t = {
|
|
1071
|
+
name: "DuckDuckGo"
|
|
1072
|
+
};
|
|
1073
|
+
if (e) {
|
|
1074
|
+
const a = e.getBrandVersion("DuckDuckGo");
|
|
1075
|
+
if (a)
|
|
1076
|
+
return t.version = a, t;
|
|
1077
|
+
}
|
|
1078
|
+
const i = s.getFirstMatch(/\sDdg\/([\d.]+)$/i, r);
|
|
1079
|
+
return i && (t.version = i), t;
|
|
1080
|
+
}
|
|
1081
|
+
},
|
|
1082
|
+
/* Brave Browser */
|
|
1083
|
+
{
|
|
1084
|
+
test(r) {
|
|
1085
|
+
return r.hasBrand("Brave");
|
|
1086
|
+
},
|
|
1087
|
+
describe(r, e) {
|
|
1088
|
+
const t = {
|
|
1089
|
+
name: "Brave"
|
|
1090
|
+
};
|
|
1091
|
+
if (e) {
|
|
1092
|
+
const i = e.getBrandVersion("Brave");
|
|
1093
|
+
if (i)
|
|
1094
|
+
return t.version = i, t;
|
|
1095
|
+
}
|
|
1096
|
+
return t;
|
|
1097
|
+
}
|
|
1098
|
+
},
|
|
1036
1099
|
{
|
|
1037
1100
|
test: [/chromium/i],
|
|
1038
1101
|
describe(r) {
|
|
@@ -1279,6 +1342,16 @@ const o = /version\/(\d+(\.?_?\d+)+)/i, _ = [
|
|
|
1279
1342
|
};
|
|
1280
1343
|
}
|
|
1281
1344
|
},
|
|
1345
|
+
/* LineSpider */
|
|
1346
|
+
{
|
|
1347
|
+
test: [/linespider/i],
|
|
1348
|
+
describe() {
|
|
1349
|
+
return {
|
|
1350
|
+
type: n.bot,
|
|
1351
|
+
vendor: "Line"
|
|
1352
|
+
};
|
|
1353
|
+
}
|
|
1354
|
+
},
|
|
1282
1355
|
/* AmazonBot */
|
|
1283
1356
|
{
|
|
1284
1357
|
test: [/amazonbot/i],
|
|
@@ -1469,6 +1542,16 @@ const o = /version\/(\d+(\.?_?\d+)+)/i, _ = [
|
|
|
1469
1542
|
};
|
|
1470
1543
|
}
|
|
1471
1544
|
},
|
|
1545
|
+
/* SlackBot */
|
|
1546
|
+
{
|
|
1547
|
+
test: [/slackbot/i, /slack-imgProxy/i],
|
|
1548
|
+
describe() {
|
|
1549
|
+
return {
|
|
1550
|
+
type: n.bot,
|
|
1551
|
+
vendor: "Slack"
|
|
1552
|
+
};
|
|
1553
|
+
}
|
|
1554
|
+
},
|
|
1472
1555
|
/* Yahoo! Slurp */
|
|
1473
1556
|
{
|
|
1474
1557
|
test: [/yahoo/i],
|
|
@@ -1675,6 +1758,24 @@ const o = /version\/(\d+(\.?_?\d+)+)/i, _ = [
|
|
|
1675
1758
|
};
|
|
1676
1759
|
}
|
|
1677
1760
|
},
|
|
1761
|
+
/* Smart TV */
|
|
1762
|
+
{
|
|
1763
|
+
test: [/smart-?tv|smarttv/i],
|
|
1764
|
+
describe() {
|
|
1765
|
+
return {
|
|
1766
|
+
type: n.tv
|
|
1767
|
+
};
|
|
1768
|
+
}
|
|
1769
|
+
},
|
|
1770
|
+
/* NetCast (LG Smart TV) */
|
|
1771
|
+
{
|
|
1772
|
+
test: [/netcast/i],
|
|
1773
|
+
describe() {
|
|
1774
|
+
return {
|
|
1775
|
+
type: n.tv
|
|
1776
|
+
};
|
|
1777
|
+
}
|
|
1778
|
+
},
|
|
1678
1779
|
/* desktop */
|
|
1679
1780
|
{
|
|
1680
1781
|
test(r) {
|
|
@@ -1809,18 +1910,73 @@ class f {
|
|
|
1809
1910
|
* Create instance of Parser
|
|
1810
1911
|
*
|
|
1811
1912
|
* @param {String} UA User-Agent string
|
|
1812
|
-
* @param {Boolean} [
|
|
1813
|
-
*
|
|
1814
|
-
*
|
|
1913
|
+
* @param {Boolean|ClientHints} [skipParsingOrHints=false] Either a boolean to skip parsing,
|
|
1914
|
+
* or a ClientHints object containing User-Agent Client Hints data
|
|
1915
|
+
* @param {ClientHints} [clientHints] User-Agent Client Hints data (navigator.userAgentData)
|
|
1815
1916
|
*
|
|
1816
1917
|
* @throw {Error} in case of empty UA String
|
|
1817
1918
|
*
|
|
1818
1919
|
* @constructor
|
|
1819
1920
|
*/
|
|
1820
|
-
constructor(e, t = !1) {
|
|
1921
|
+
constructor(e, t = !1, i = null) {
|
|
1821
1922
|
if (e == null || e === "")
|
|
1822
1923
|
throw new Error("UserAgent parameter can't be empty");
|
|
1823
|
-
this._ua = e
|
|
1924
|
+
this._ua = e;
|
|
1925
|
+
let a = !1;
|
|
1926
|
+
typeof t == "boolean" ? (a = t, this._hints = i) : t != null && typeof t == "object" ? this._hints = t : this._hints = null, this.parsedResult = {}, a !== !0 && this.parse();
|
|
1927
|
+
}
|
|
1928
|
+
/**
|
|
1929
|
+
* Get Client Hints data
|
|
1930
|
+
* @return {ClientHints|null}
|
|
1931
|
+
*
|
|
1932
|
+
* @public
|
|
1933
|
+
* @example
|
|
1934
|
+
* const parser = Bowser.getParser(UA, clientHints);
|
|
1935
|
+
* const hints = parser.getHints();
|
|
1936
|
+
* console.log(hints.platform); // 'Windows'
|
|
1937
|
+
* console.log(hints.mobile); // false
|
|
1938
|
+
*/
|
|
1939
|
+
getHints() {
|
|
1940
|
+
return this._hints;
|
|
1941
|
+
}
|
|
1942
|
+
/**
|
|
1943
|
+
* Check if a brand exists in Client Hints brands array
|
|
1944
|
+
* @param {string} brandName The brand name to check for
|
|
1945
|
+
* @return {boolean}
|
|
1946
|
+
*
|
|
1947
|
+
* @public
|
|
1948
|
+
* @example
|
|
1949
|
+
* const parser = Bowser.getParser(UA, clientHints);
|
|
1950
|
+
* if (parser.hasBrand('Google Chrome')) {
|
|
1951
|
+
* console.log('Chrome detected!');
|
|
1952
|
+
* }
|
|
1953
|
+
*/
|
|
1954
|
+
hasBrand(e) {
|
|
1955
|
+
if (!this._hints || !Array.isArray(this._hints.brands))
|
|
1956
|
+
return !1;
|
|
1957
|
+
const t = e.toLowerCase();
|
|
1958
|
+
return this._hints.brands.some(
|
|
1959
|
+
(i) => i.brand && i.brand.toLowerCase() === t
|
|
1960
|
+
);
|
|
1961
|
+
}
|
|
1962
|
+
/**
|
|
1963
|
+
* Get brand version from Client Hints
|
|
1964
|
+
* @param {string} brandName The brand name to get version for
|
|
1965
|
+
* @return {string|undefined}
|
|
1966
|
+
*
|
|
1967
|
+
* @public
|
|
1968
|
+
* @example
|
|
1969
|
+
* const parser = Bowser.getParser(UA, clientHints);
|
|
1970
|
+
* const version = parser.getBrandVersion('Google Chrome');
|
|
1971
|
+
* console.log(version); // '131'
|
|
1972
|
+
*/
|
|
1973
|
+
getBrandVersion(e) {
|
|
1974
|
+
if (!this._hints || !Array.isArray(this._hints.brands))
|
|
1975
|
+
return;
|
|
1976
|
+
const t = e.toLowerCase(), i = this._hints.brands.find(
|
|
1977
|
+
(a) => a.brand && a.brand.toLowerCase() === t
|
|
1978
|
+
);
|
|
1979
|
+
return i ? i.version : void 0;
|
|
1824
1980
|
}
|
|
1825
1981
|
/**
|
|
1826
1982
|
* Get UserAgent string of current Parser instance
|
|
@@ -1845,14 +2001,14 @@ class f {
|
|
|
1845
2001
|
*/
|
|
1846
2002
|
parseBrowser() {
|
|
1847
2003
|
this.parsedResult.browser = {};
|
|
1848
|
-
const e = s.find(
|
|
2004
|
+
const e = s.find(O, (t) => {
|
|
1849
2005
|
if (typeof t.test == "function")
|
|
1850
2006
|
return t.test(this);
|
|
1851
2007
|
if (Array.isArray(t.test))
|
|
1852
2008
|
return t.test.some((i) => this.test(i));
|
|
1853
2009
|
throw new Error("Browser's test function is not valid");
|
|
1854
2010
|
});
|
|
1855
|
-
return e && (this.parsedResult.browser = e.describe(this.getUA())), this.parsedResult.browser;
|
|
2011
|
+
return e && (this.parsedResult.browser = e.describe(this.getUA(), this)), this.parsedResult.browser;
|
|
1856
2012
|
}
|
|
1857
2013
|
/**
|
|
1858
2014
|
* Get parsed browser object
|
|
@@ -2116,40 +2272,56 @@ class f {
|
|
|
2116
2272
|
}
|
|
2117
2273
|
/*!
|
|
2118
2274
|
* Bowser - a browser detector
|
|
2119
|
-
* https://github.com/
|
|
2275
|
+
* https://github.com/bowser-js/bowser
|
|
2120
2276
|
* MIT License | (c) Dustin Diaz 2012-2015
|
|
2121
2277
|
* MIT License | (c) Denis Demchenko 2015-2019
|
|
2122
2278
|
*/
|
|
2123
|
-
class
|
|
2279
|
+
class L {
|
|
2124
2280
|
/**
|
|
2125
2281
|
* Creates a {@link Parser} instance
|
|
2126
2282
|
*
|
|
2127
2283
|
* @param {String} UA UserAgent string
|
|
2128
|
-
* @param {Boolean} [
|
|
2129
|
-
*
|
|
2284
|
+
* @param {Boolean|Object} [skipParsingOrHints=false] Either a boolean to skip parsing,
|
|
2285
|
+
* or a ClientHints object (navigator.userAgentData)
|
|
2286
|
+
* @param {Object} [clientHints] User-Agent Client Hints data (navigator.userAgentData)
|
|
2130
2287
|
* @returns {Parser}
|
|
2131
2288
|
* @throws {Error} when UA is not a String
|
|
2132
2289
|
*
|
|
2133
2290
|
* @example
|
|
2134
2291
|
* const parser = Bowser.getParser(window.navigator.userAgent);
|
|
2135
2292
|
* const result = parser.getResult();
|
|
2293
|
+
*
|
|
2294
|
+
* @example
|
|
2295
|
+
* // With User-Agent Client Hints
|
|
2296
|
+
* const parser = Bowser.getParser(
|
|
2297
|
+
* window.navigator.userAgent,
|
|
2298
|
+
* window.navigator.userAgentData
|
|
2299
|
+
* );
|
|
2136
2300
|
*/
|
|
2137
|
-
static getParser(e, t = !1) {
|
|
2301
|
+
static getParser(e, t = !1, i = null) {
|
|
2138
2302
|
if (typeof e != "string")
|
|
2139
2303
|
throw new Error("UserAgent should be a string");
|
|
2140
|
-
return new f(e, t);
|
|
2304
|
+
return new f(e, t, i);
|
|
2141
2305
|
}
|
|
2142
2306
|
/**
|
|
2143
2307
|
* Creates a {@link Parser} instance and runs {@link Parser.getResult} immediately
|
|
2144
2308
|
*
|
|
2145
|
-
* @param UA
|
|
2309
|
+
* @param {String} UA UserAgent string
|
|
2310
|
+
* @param {Object} [clientHints] User-Agent Client Hints data (navigator.userAgentData)
|
|
2146
2311
|
* @return {ParsedResult}
|
|
2147
2312
|
*
|
|
2148
2313
|
* @example
|
|
2149
2314
|
* const result = Bowser.parse(window.navigator.userAgent);
|
|
2315
|
+
*
|
|
2316
|
+
* @example
|
|
2317
|
+
* // With User-Agent Client Hints
|
|
2318
|
+
* const result = Bowser.parse(
|
|
2319
|
+
* window.navigator.userAgent,
|
|
2320
|
+
* window.navigator.userAgentData
|
|
2321
|
+
* );
|
|
2150
2322
|
*/
|
|
2151
|
-
static parse(e) {
|
|
2152
|
-
return new f(e).getResult();
|
|
2323
|
+
static parse(e, t = null) {
|
|
2324
|
+
return new f(e, t).getResult();
|
|
2153
2325
|
}
|
|
2154
2326
|
static get BROWSER_MAP() {
|
|
2155
2327
|
return w;
|
|
@@ -2164,16 +2336,16 @@ class R {
|
|
|
2164
2336
|
return n;
|
|
2165
2337
|
}
|
|
2166
2338
|
}
|
|
2167
|
-
const
|
|
2339
|
+
const I = ({
|
|
2168
2340
|
className: r,
|
|
2169
2341
|
...e
|
|
2170
2342
|
}) => {
|
|
2171
|
-
const { t } =
|
|
2172
|
-
return
|
|
2173
|
-
() =>
|
|
2343
|
+
const { t } = _();
|
|
2344
|
+
return B(
|
|
2345
|
+
() => L.getParser(navigator.userAgent).satisfies(k),
|
|
2174
2346
|
[]
|
|
2175
2347
|
) ? null : /* @__PURE__ */ M(
|
|
2176
|
-
|
|
2348
|
+
S,
|
|
2177
2349
|
{
|
|
2178
2350
|
...e,
|
|
2179
2351
|
variant: "warning",
|
|
@@ -2187,7 +2359,7 @@ const G = ({
|
|
|
2187
2359
|
/* @__PURE__ */ y(
|
|
2188
2360
|
A,
|
|
2189
2361
|
{
|
|
2190
|
-
href: `${
|
|
2362
|
+
href: `${x}/get-started/developers/supported-browsers/`,
|
|
2191
2363
|
target: "_blank",
|
|
2192
2364
|
rel: "noreferrer",
|
|
2193
2365
|
children: t("View supported browsers")
|
|
@@ -2198,5 +2370,5 @@ const G = ({
|
|
|
2198
2370
|
);
|
|
2199
2371
|
};
|
|
2200
2372
|
export {
|
|
2201
|
-
|
|
2373
|
+
I as BrowserSupport
|
|
2202
2374
|
};
|
package/dist/chip/chip.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as a, jsx as o } from "react/jsx-runtime";
|
|
3
3
|
import { useId as l } from "react";
|
|
4
|
-
import { c as p } from "../index-
|
|
4
|
+
import { c as p } from "../index-C7W4ssMN.js";
|
|
5
5
|
import { cn as g } from "../cn.js";
|
|
6
6
|
import { translate as t } from "../i18n/utility.js";
|
|
7
7
|
import { Icon as u } from "../icon/icon.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs as v, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import c from "react";
|
|
3
|
-
import { c as x } from "../index-
|
|
3
|
+
import { c as x } from "../index-C7W4ssMN.js";
|
|
4
4
|
import { cn as i } from "../cn.js";
|
|
5
5
|
const b = ({
|
|
6
6
|
children: e,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as d, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo as A, Children as L, isValidElement as O } from "react";
|
|
3
|
-
import { c as P } from "../index-
|
|
3
|
+
import { c as P } from "../index-C7W4ssMN.js";
|
|
4
4
|
import w from "../atoms/Button.js";
|
|
5
5
|
import { Chip as S } from "../chip/chip.js";
|
|
6
6
|
import { cn as n } from "../cn.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as r, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { c as o } from "../index-
|
|
2
|
+
import { c as o } from "../index-C7W4ssMN.js";
|
|
3
3
|
import { cn as g } from "../cn.js";
|
|
4
4
|
import { translate as m } from "../i18n/utility.js";
|
|
5
5
|
const p = ({ selectedCount: e, actions: s, className: a, ...l }) => /* @__PURE__ */ r("div", { className: g(i.root(), a), ...l, children: [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
-
import { l as O } from "../lodash-
|
|
3
|
+
import { l as O } from "../lodash-DTZaBYO8.js";
|
|
4
4
|
import { useState as g, useMemo as S, useEffect as k } from "react";
|
|
5
5
|
import { InputCheckboxTableCell as V } from "../input-checkbox/input-checkbox.js";
|
|
6
6
|
import { InputTextTableCell as j } from "../input-text/input-text.js";
|