@frontify/fondue-components 28.0.0 → 29.0.1
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/fondue-components.js +60 -56
- package/dist/fondue-components.js.map +1 -1
- package/dist/fondue-components10.js +1 -1
- package/dist/fondue-components100.js +22 -16
- package/dist/fondue-components100.js.map +1 -1
- package/dist/fondue-components101.js +34 -151
- package/dist/fondue-components101.js.map +1 -1
- package/dist/fondue-components102.js +10 -44
- package/dist/fondue-components102.js.map +1 -1
- package/dist/fondue-components103.js +67 -13
- package/dist/fondue-components103.js.map +1 -1
- package/dist/fondue-components104.js +13 -13
- package/dist/fondue-components105.js +26 -111
- package/dist/fondue-components105.js.map +1 -1
- package/dist/fondue-components106.js +18 -12
- package/dist/fondue-components106.js.map +1 -1
- package/dist/fondue-components107.js +25 -17
- package/dist/fondue-components107.js.map +1 -1
- package/dist/fondue-components108.js +8 -12
- package/dist/fondue-components108.js.map +1 -1
- package/dist/fondue-components109.js +30 -16
- package/dist/fondue-components109.js.map +1 -1
- package/dist/fondue-components11.js +3 -3
- package/dist/fondue-components110.js +7 -6
- package/dist/fondue-components110.js.map +1 -1
- package/dist/fondue-components111.js +16 -11
- package/dist/fondue-components111.js.map +1 -1
- package/dist/fondue-components112.js +125 -69
- package/dist/fondue-components112.js.map +1 -1
- package/dist/fondue-components113.js +11 -15
- package/dist/fondue-components113.js.map +1 -1
- package/dist/fondue-components114.js +36 -7
- package/dist/fondue-components114.js.map +1 -1
- package/dist/fondue-components115.js +14 -89
- package/dist/fondue-components115.js.map +1 -1
- package/dist/fondue-components116.js +14 -80
- package/dist/fondue-components116.js.map +1 -1
- package/dist/fondue-components117.js +109 -29
- package/dist/fondue-components117.js.map +1 -1
- package/dist/fondue-components118.js +12 -28
- package/dist/fondue-components118.js.map +1 -1
- package/dist/fondue-components119.js +20 -0
- package/dist/fondue-components119.js.map +1 -0
- package/dist/fondue-components12.js +3 -3
- package/dist/fondue-components120.js +12 -40
- package/dist/fondue-components120.js.map +1 -1
- package/dist/fondue-components121.js +216 -18
- package/dist/fondue-components121.js.map +1 -1
- package/dist/fondue-components122.js +17 -19
- package/dist/fondue-components122.js.map +1 -1
- package/dist/fondue-components123.js +15 -38
- package/dist/fondue-components123.js.map +1 -1
- package/dist/fondue-components124.js +150 -67
- package/dist/fondue-components124.js.map +1 -1
- package/dist/fondue-components125.js +44 -30
- package/dist/fondue-components125.js.map +1 -1
- package/dist/fondue-components126.js +5 -9
- package/dist/fondue-components126.js.map +1 -1
- package/dist/fondue-components127.js +4 -152
- package/dist/fondue-components127.js.map +1 -1
- package/dist/fondue-components128.js +28 -107
- package/dist/fondue-components128.js.map +1 -1
- package/dist/fondue-components13.js +61 -35
- package/dist/fondue-components13.js.map +1 -1
- package/dist/fondue-components130.js +41 -16
- package/dist/fondue-components130.js.map +1 -1
- package/dist/fondue-components131.js +6 -29
- package/dist/fondue-components131.js.map +1 -1
- package/dist/fondue-components132.js +12 -13
- package/dist/fondue-components132.js.map +1 -1
- package/dist/fondue-components133.js +70 -6
- package/dist/fondue-components133.js.map +1 -1
- package/dist/fondue-components134.js +18 -0
- package/dist/fondue-components134.js.map +1 -0
- package/dist/fondue-components135.js +10 -0
- package/dist/fondue-components135.js.map +1 -0
- package/dist/fondue-components136.js +92 -0
- package/dist/fondue-components136.js.map +1 -0
- package/dist/fondue-components137.js +84 -0
- package/dist/fondue-components137.js.map +1 -0
- package/dist/fondue-components138.js +34 -0
- package/dist/fondue-components138.js.map +1 -0
- package/dist/fondue-components139.js +173 -0
- package/dist/fondue-components139.js.map +1 -0
- package/dist/fondue-components14.js +36 -121
- package/dist/fondue-components14.js.map +1 -1
- package/dist/fondue-components140.js +63 -0
- package/dist/fondue-components140.js.map +1 -0
- package/dist/fondue-components141.js +12 -0
- package/dist/fondue-components141.js.map +1 -0
- package/dist/fondue-components142.js +259 -0
- package/dist/fondue-components142.js.map +1 -0
- package/dist/fondue-components143.js +22 -0
- package/dist/fondue-components143.js.map +1 -0
- package/dist/fondue-components144.js +73 -0
- package/dist/fondue-components144.js.map +1 -0
- package/dist/fondue-components145.js +1355 -0
- package/dist/fondue-components145.js.map +1 -0
- package/dist/fondue-components146.js +944 -0
- package/dist/fondue-components146.js.map +1 -0
- package/dist/fondue-components147.js +201 -0
- package/dist/fondue-components147.js.map +1 -0
- package/dist/fondue-components148.js +24 -0
- package/dist/fondue-components148.js.map +1 -0
- package/dist/fondue-components149.js +43 -0
- package/dist/fondue-components149.js.map +1 -0
- package/dist/fondue-components15.js +121 -36
- package/dist/fondue-components15.js.map +1 -1
- package/dist/fondue-components150.js +71 -0
- package/dist/fondue-components150.js.map +1 -0
- package/dist/fondue-components151.js +34 -0
- package/dist/fondue-components151.js.map +1 -0
- package/dist/fondue-components152.js +12 -0
- package/dist/fondue-components152.js.map +1 -0
- package/dist/fondue-components153.js +156 -0
- package/dist/fondue-components153.js.map +1 -0
- package/dist/fondue-components154.js +111 -0
- package/dist/fondue-components154.js.map +1 -0
- package/dist/{fondue-components129.js → fondue-components155.js} +1 -1
- package/dist/{fondue-components129.js.map → fondue-components155.js.map} +1 -1
- package/dist/fondue-components156.js +19 -0
- package/dist/fondue-components156.js.map +1 -0
- package/dist/fondue-components157.js +32 -0
- package/dist/fondue-components157.js.map +1 -0
- package/dist/fondue-components158.js +16 -0
- package/dist/fondue-components158.js.map +1 -0
- package/dist/fondue-components159.js +10 -0
- package/dist/fondue-components159.js.map +1 -0
- package/dist/fondue-components16.js +30 -39
- package/dist/fondue-components16.js.map +1 -1
- package/dist/fondue-components17.js +44 -41
- package/dist/fondue-components17.js.map +1 -1
- package/dist/fondue-components18.js +42 -57
- package/dist/fondue-components18.js.map +1 -1
- package/dist/fondue-components19.js +55 -41
- package/dist/fondue-components19.js.map +1 -1
- package/dist/fondue-components20.js +39 -16
- package/dist/fondue-components20.js.map +1 -1
- package/dist/fondue-components21.js +17 -43
- package/dist/fondue-components21.js.map +1 -1
- package/dist/fondue-components22.js +42 -69
- package/dist/fondue-components22.js.map +1 -1
- package/dist/fondue-components23.js +69 -17
- package/dist/fondue-components23.js.map +1 -1
- package/dist/fondue-components24.js +71 -74
- package/dist/fondue-components24.js.map +1 -1
- package/dist/fondue-components25.js +18 -36
- package/dist/fondue-components25.js.map +1 -1
- package/dist/fondue-components26.js +72 -50
- package/dist/fondue-components26.js.map +1 -1
- package/dist/fondue-components27.js +36 -23
- package/dist/fondue-components27.js.map +1 -1
- package/dist/fondue-components28.js +50 -50
- package/dist/fondue-components28.js.map +1 -1
- package/dist/fondue-components29.js +23 -100
- package/dist/fondue-components29.js.map +1 -1
- package/dist/fondue-components3.js +1 -1
- package/dist/fondue-components30.js +50 -28
- package/dist/fondue-components30.js.map +1 -1
- package/dist/fondue-components31.js +92 -188
- package/dist/fondue-components31.js.map +1 -1
- package/dist/fondue-components32.js +31 -144
- package/dist/fondue-components32.js.map +1 -1
- package/dist/fondue-components33.js +192 -129
- package/dist/fondue-components33.js.map +1 -1
- package/dist/fondue-components34.js +141 -27
- package/dist/fondue-components34.js.map +1 -1
- package/dist/fondue-components35.js +123 -71
- package/dist/fondue-components35.js.map +1 -1
- package/dist/fondue-components36.js +28 -120
- package/dist/fondue-components36.js.map +1 -1
- package/dist/fondue-components37.js +80 -35
- package/dist/fondue-components37.js.map +1 -1
- package/dist/fondue-components38.js +119 -52
- package/dist/fondue-components38.js.map +1 -1
- package/dist/fondue-components39.js +36 -20
- package/dist/fondue-components39.js.map +1 -1
- package/dist/fondue-components4.js +3 -3
- package/dist/fondue-components40.js +56 -25
- package/dist/fondue-components40.js.map +1 -1
- package/dist/fondue-components41.js +20 -7
- package/dist/fondue-components41.js.map +1 -1
- package/dist/fondue-components42.js +25 -8
- package/dist/fondue-components42.js.map +1 -1
- package/dist/fondue-components43.js +8 -41
- package/dist/fondue-components43.js.map +1 -1
- package/dist/fondue-components44.js +8 -4
- package/dist/fondue-components44.js.map +1 -1
- package/dist/fondue-components45.js +41 -5
- package/dist/fondue-components45.js.map +1 -1
- package/dist/fondue-components46.js +3 -11
- package/dist/fondue-components46.js.map +1 -1
- package/dist/fondue-components47.js +5 -32
- package/dist/fondue-components47.js.map +1 -1
- package/dist/fondue-components48.js +12 -53
- package/dist/fondue-components48.js.map +1 -1
- package/dist/fondue-components49.js +32 -131
- package/dist/fondue-components49.js.map +1 -1
- package/dist/fondue-components5.js +2 -2
- package/dist/fondue-components50.js +53 -20
- package/dist/fondue-components50.js.map +1 -1
- package/dist/fondue-components51.js +131 -53
- package/dist/fondue-components51.js.map +1 -1
- package/dist/fondue-components52.js +20 -7
- package/dist/fondue-components52.js.map +1 -1
- package/dist/fondue-components53.js +53 -13
- package/dist/fondue-components53.js.map +1 -1
- package/dist/fondue-components54.js +7 -16
- package/dist/fondue-components54.js.map +1 -1
- package/dist/fondue-components55.js +13 -5
- package/dist/fondue-components55.js.map +1 -1
- package/dist/fondue-components56.js +17 -18
- package/dist/fondue-components56.js.map +1 -1
- package/dist/fondue-components57.js +4 -18
- package/dist/fondue-components57.js.map +1 -1
- package/dist/fondue-components58.js +18 -44
- package/dist/fondue-components58.js.map +1 -1
- package/dist/fondue-components59.js +18 -24
- package/dist/fondue-components59.js.map +1 -1
- package/dist/fondue-components6.js +1 -1
- package/dist/fondue-components60.js +43 -22
- package/dist/fondue-components60.js.map +1 -1
- package/dist/fondue-components61.js +24 -4
- package/dist/fondue-components61.js.map +1 -1
- package/dist/fondue-components62.js +22 -12
- package/dist/fondue-components62.js.map +1 -1
- package/dist/fondue-components63.js +6 -4
- package/dist/fondue-components63.js.map +1 -1
- package/dist/fondue-components64.js +4 -17
- package/dist/fondue-components64.js.map +1 -1
- package/dist/fondue-components65.js +12 -10
- package/dist/fondue-components65.js.map +1 -1
- package/dist/fondue-components66.js +4 -36
- package/dist/fondue-components66.js.map +1 -1
- package/dist/fondue-components67.js +17 -6
- package/dist/fondue-components67.js.map +1 -1
- package/dist/fondue-components68.js +10 -4
- package/dist/fondue-components68.js.map +1 -1
- package/dist/fondue-components69.js +34 -10
- package/dist/fondue-components69.js.map +1 -1
- package/dist/fondue-components7.js +1 -1
- package/dist/fondue-components70.js +6 -8
- package/dist/fondue-components70.js.map +1 -1
- package/dist/fondue-components71.js +4 -12
- package/dist/fondue-components71.js.map +1 -1
- package/dist/fondue-components72.js +11 -3
- package/dist/fondue-components72.js.map +1 -1
- package/dist/fondue-components73.js +50 -23
- package/dist/fondue-components73.js.map +1 -1
- package/dist/fondue-components74.js +44 -17
- package/dist/fondue-components74.js.map +1 -1
- package/dist/fondue-components75.js +6 -20
- package/dist/fondue-components75.js.map +1 -1
- package/dist/fondue-components76.js +6 -20
- package/dist/fondue-components76.js.map +1 -1
- package/dist/fondue-components77.js +12 -19
- package/dist/fondue-components77.js.map +1 -1
- package/dist/fondue-components78.js +24 -16
- package/dist/fondue-components78.js.map +1 -1
- package/dist/fondue-components79.js +13 -19
- package/dist/fondue-components79.js.map +1 -1
- package/dist/fondue-components8.js +5 -5
- package/dist/fondue-components80.js +5 -8
- package/dist/fondue-components80.js.map +1 -1
- package/dist/fondue-components81.js +12 -10
- package/dist/fondue-components81.js.map +1 -1
- package/dist/fondue-components82.js +47 -10
- package/dist/fondue-components82.js.map +1 -1
- package/dist/fondue-components83.js +20 -4
- package/dist/fondue-components83.js.map +1 -1
- package/dist/fondue-components84.js +628 -12
- package/dist/fondue-components84.js.map +1 -1
- package/dist/fondue-components85.js +8 -22
- package/dist/fondue-components85.js.map +1 -1
- package/dist/fondue-components86.js +13 -34
- package/dist/fondue-components86.js.map +1 -1
- package/dist/fondue-components87.js +4 -10
- package/dist/fondue-components87.js.map +1 -1
- package/dist/fondue-components88.js +23 -66
- package/dist/fondue-components88.js.map +1 -1
- package/dist/fondue-components89.js +14 -12
- package/dist/fondue-components89.js.map +1 -1
- package/dist/fondue-components9.js +5 -5
- package/dist/fondue-components90.js +20 -25
- package/dist/fondue-components90.js.map +1 -1
- package/dist/fondue-components91.js +20 -19
- package/dist/fondue-components91.js.map +1 -1
- package/dist/fondue-components92.js +20 -25
- package/dist/fondue-components92.js.map +1 -1
- package/dist/fondue-components93.js +20 -9
- package/dist/fondue-components93.js.map +1 -1
- package/dist/fondue-components94.js +19 -31
- package/dist/fondue-components94.js.map +1 -1
- package/dist/fondue-components95.js +8 -7
- package/dist/fondue-components95.js.map +1 -1
- package/dist/fondue-components96.js +10 -4
- package/dist/fondue-components96.js.map +1 -1
- package/dist/fondue-components97.js +10 -4
- package/dist/fondue-components97.js.map +1 -1
- package/dist/fondue-components98.js +6 -216
- package/dist/fondue-components98.js.map +1 -1
- package/dist/fondue-components99.js +12 -18
- package/dist/fondue-components99.js.map +1 -1
- package/dist/index.d.ts +102 -4
- package/dist/style.css +1 -1
- package/package.json +6 -4
|
@@ -7,34 +7,36 @@ import { Checkbox as l } from "./fondue-components7.js";
|
|
|
7
7
|
import { ColorPicker as c } from "./fondue-components8.js";
|
|
8
8
|
import { Dialog as g } from "./fondue-components9.js";
|
|
9
9
|
import { Divider as S } from "./fondue-components10.js";
|
|
10
|
-
import { Dropdown as
|
|
11
|
-
import { DatePicker as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
10
|
+
import { Dropdown as L } from "./fondue-components11.js";
|
|
11
|
+
import { DatePicker as B } from "./fondue-components12.js";
|
|
12
|
+
import { EditableText as k } from "./fondue-components13.js";
|
|
13
|
+
import { Flex as D } from "./fondue-components14.js";
|
|
14
|
+
import { Flyout as v } from "./fondue-components15.js";
|
|
15
|
+
import { Grid as w } from "./fondue-components16.js";
|
|
16
|
+
import { Heading as R } from "./fondue-components17.js";
|
|
17
|
+
import { Label as E } from "./fondue-components18.js";
|
|
18
|
+
import { Link as H } from "./fondue-components19.js";
|
|
19
|
+
import { LoadingBar as N } from "./fondue-components20.js";
|
|
20
|
+
import { LoadingCircle as j } from "./fondue-components21.js";
|
|
21
|
+
import { Notice as z } from "./fondue-components22.js";
|
|
22
|
+
import { OrderableList as K } from "./fondue-components23.js";
|
|
23
|
+
import { RadioList as Q } from "./fondue-components24.js";
|
|
24
|
+
import { RouterProvider as V } from "./fondue-components25.js";
|
|
25
|
+
import { ScrollArea as X } from "./fondue-components26.js";
|
|
26
|
+
import { Section as Z } from "./fondue-components27.js";
|
|
27
|
+
import { SegmentedControl as $ } from "./fondue-components28.js";
|
|
28
|
+
import { Select as ro } from "./fondue-components29.js";
|
|
29
|
+
import { Slider as to } from "./fondue-components30.js";
|
|
30
|
+
import { SplitButton as mo } from "./fondue-components31.js";
|
|
31
|
+
import { Switch as fo } from "./fondue-components32.js";
|
|
32
|
+
import { Table as ao } from "./fondue-components33.js";
|
|
33
|
+
import { Tag as no } from "./fondue-components34.js";
|
|
34
|
+
import { Tabs as To } from "./fondue-components35.js";
|
|
35
|
+
import { Text as uo } from "./fondue-components36.js";
|
|
36
|
+
import { TextInput as bo } from "./fondue-components37.js";
|
|
37
|
+
import { Textarea as ho } from "./fondue-components38.js";
|
|
38
|
+
import { ThemeContext as Co, ThemeProvider as ko, useFondueTheme as so } from "./fondue-components39.js";
|
|
39
|
+
import { Tooltip as Po } from "./fondue-components40.js";
|
|
38
40
|
export {
|
|
39
41
|
t as Accordion,
|
|
40
42
|
m as Badge,
|
|
@@ -42,37 +44,39 @@ export {
|
|
|
42
44
|
a as Button,
|
|
43
45
|
l as Checkbox,
|
|
44
46
|
c as ColorPicker,
|
|
45
|
-
|
|
47
|
+
B as DatePicker,
|
|
46
48
|
g as Dialog,
|
|
47
49
|
S as Divider,
|
|
48
|
-
|
|
49
|
-
k as
|
|
50
|
-
|
|
51
|
-
v as
|
|
52
|
-
w as
|
|
53
|
-
R as
|
|
54
|
-
|
|
55
|
-
|
|
50
|
+
L as Dropdown,
|
|
51
|
+
k as EditableText,
|
|
52
|
+
D as Flex,
|
|
53
|
+
v as Flyout,
|
|
54
|
+
w as Grid,
|
|
55
|
+
R as Heading,
|
|
56
|
+
E as Label,
|
|
57
|
+
H as Link,
|
|
58
|
+
N as LoadingBar,
|
|
56
59
|
j as LoadingCircle,
|
|
57
60
|
z as Notice,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
ao as
|
|
69
|
-
|
|
70
|
-
no as
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
ho as
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
61
|
+
K as OrderableList,
|
|
62
|
+
Q as RadioList,
|
|
63
|
+
V as RouterProvider,
|
|
64
|
+
X as ScrollArea,
|
|
65
|
+
Z as Section,
|
|
66
|
+
$ as SegmentedControl,
|
|
67
|
+
ro as Select,
|
|
68
|
+
to as Slider,
|
|
69
|
+
mo as SplitButton,
|
|
70
|
+
fo as Switch,
|
|
71
|
+
ao as Table,
|
|
72
|
+
To as Tabs,
|
|
73
|
+
no as Tag,
|
|
74
|
+
uo as Text,
|
|
75
|
+
bo as TextInput,
|
|
76
|
+
ho as Textarea,
|
|
77
|
+
Co as ThemeContext,
|
|
78
|
+
ko as ThemeProvider,
|
|
79
|
+
Po as Tooltip,
|
|
80
|
+
so as useFondueTheme
|
|
77
81
|
};
|
|
78
82
|
//# sourceMappingURL=fondue-components.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fondue-components.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import * as f from "@radix-ui/react-separator";
|
|
3
3
|
import { forwardRef as p } from "react";
|
|
4
|
-
import c from "./fondue-
|
|
4
|
+
import c from "./fondue-components57.js";
|
|
5
5
|
const u = p(
|
|
6
6
|
({
|
|
7
7
|
"data-test-id": t = "fondue-divider",
|
|
@@ -1,20 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
selectedItemValues: l,
|
|
13
|
-
selectItem: m,
|
|
14
|
-
clear: I
|
|
15
|
-
};
|
|
1
|
+
const t = "_table_1v3sd_4", o = "_headerCell_1v3sd_18", e = "_rowCell_1v3sd_19", _ = "_row_1v3sd_19", s = "_caption_1v3sd_76", n = "_header_1v3sd_18", d = "_cellContent_1v3sd_124", l = "_sortIndicator_1v3sd_152", c = "_body_1v3sd_162", r = "_buttonText_1v3sd_235", a = {
|
|
2
|
+
table: t,
|
|
3
|
+
headerCell: o,
|
|
4
|
+
rowCell: e,
|
|
5
|
+
row: _,
|
|
6
|
+
caption: s,
|
|
7
|
+
header: n,
|
|
8
|
+
cellContent: d,
|
|
9
|
+
sortIndicator: l,
|
|
10
|
+
body: c,
|
|
11
|
+
buttonText: r
|
|
16
12
|
};
|
|
17
13
|
export {
|
|
18
|
-
|
|
14
|
+
c as body,
|
|
15
|
+
r as buttonText,
|
|
16
|
+
s as caption,
|
|
17
|
+
d as cellContent,
|
|
18
|
+
a as default,
|
|
19
|
+
n as header,
|
|
20
|
+
o as headerCell,
|
|
21
|
+
_ as row,
|
|
22
|
+
e as rowCell,
|
|
23
|
+
l as sortIndicator,
|
|
24
|
+
t as table
|
|
19
25
|
};
|
|
20
26
|
//# sourceMappingURL=fondue-components100.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components100.js","sources":[
|
|
1
|
+
{"version":3,"file":"fondue-components100.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -1,154 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
const C = te(null), B = N(
|
|
34
|
-
(e) => {
|
|
35
|
-
C.current = e, typeof a == "function" ? a(e) : a && (a.current = e);
|
|
36
|
-
},
|
|
37
|
-
[a]
|
|
38
|
-
), { inputSlots: H, menuSlots: K, items: w, clearButton: S, getItemByValue: l } = se(M), { onMouseDown: z, onFocus: A, onBlur: q } = ae(), { selectionDescriptionId: D, selectionDescription: m } = ie(
|
|
39
|
-
g,
|
|
40
|
-
o,
|
|
41
|
-
l
|
|
42
|
-
), G = re(o, l), [J, v] = ne(!1), x = N(
|
|
43
|
-
(e) => {
|
|
44
|
-
const t = l(e);
|
|
45
|
-
if (t)
|
|
46
|
-
return !y && (t != null && t.children) ? t.children : t == null ? void 0 : t.label;
|
|
47
|
-
},
|
|
48
|
-
[l, y]
|
|
49
|
-
), { getToggleButtonProps: L, getMenuProps: Q, getItemProps: U, reset: W, isOpen: X, highlightedIndex: Y } = s({
|
|
50
|
-
items: w,
|
|
51
|
-
selectedItem: null,
|
|
52
|
-
toggleButtonId: k,
|
|
53
|
-
labelId: "aria-labelledby" in i ? i["aria-labelledby"] : void 0,
|
|
54
|
-
onIsOpenChange: () => {
|
|
55
|
-
v(!1);
|
|
56
|
-
},
|
|
57
|
-
onHighlightedIndexChange: () => {
|
|
58
|
-
v(!0);
|
|
59
|
-
},
|
|
60
|
-
onSelectedItemChange: ({ selectedItem: e }) => {
|
|
61
|
-
p(e == null ? void 0 : e.value);
|
|
62
|
-
},
|
|
63
|
-
itemToString: (e) => e ? e.label : "",
|
|
64
|
-
...g ? {
|
|
65
|
-
stateReducer: (e, t) => {
|
|
66
|
-
const { changes: h, type: $ } = t;
|
|
67
|
-
switch ($) {
|
|
68
|
-
case s.stateChangeTypes.ToggleButtonKeyDownEnter:
|
|
69
|
-
case s.stateChangeTypes.ToggleButtonKeyDownSpaceButton:
|
|
70
|
-
case s.stateChangeTypes.ItemClick:
|
|
71
|
-
return {
|
|
72
|
-
...h,
|
|
73
|
-
isOpen: !0,
|
|
74
|
-
highlightedIndex: e.highlightedIndex
|
|
75
|
-
};
|
|
76
|
-
case s.stateChangeTypes.ToggleButtonBlur:
|
|
77
|
-
return {
|
|
78
|
-
...h,
|
|
79
|
-
selectedItem: e.selectedItem
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
return h;
|
|
83
|
-
}
|
|
84
|
-
} : {}
|
|
85
|
-
}), T = u === "error", Z = () => {
|
|
86
|
-
P(), W();
|
|
87
|
-
}, _ = oe(
|
|
88
|
-
() => x(o[0]) || c,
|
|
89
|
-
[x, o, c]
|
|
90
|
-
);
|
|
91
|
-
return /* @__PURE__ */ d(I.Root, { open: X, children: [
|
|
92
|
-
/* @__PURE__ */ n(I.Anchor, { asChild: !0, onMouseDown: z, onFocus: A, onBlur: q, children: /* @__PURE__ */ d(
|
|
93
|
-
"div",
|
|
94
|
-
{
|
|
95
|
-
ref: B,
|
|
96
|
-
className: r.root,
|
|
97
|
-
"data-status": T ? "error" : u,
|
|
98
|
-
"data-disabled": f,
|
|
99
|
-
"data-empty": o.length === 0,
|
|
100
|
-
"data-test-id": b,
|
|
101
|
-
...f ? {} : (
|
|
102
|
-
// eslint-disable-next-line react-hooks/refs
|
|
103
|
-
L({
|
|
104
|
-
"aria-label": "aria-label" in i ? i["aria-label"] : void 0,
|
|
105
|
-
"aria-describedby": m ? D : void 0,
|
|
106
|
-
ref: B
|
|
107
|
-
})
|
|
108
|
-
),
|
|
109
|
-
children: [
|
|
110
|
-
m ? /* @__PURE__ */ n("span", { id: D, className: r.srOnly, children: m }) : null,
|
|
111
|
-
g ? /* @__PURE__ */ n("div", { className: r.selectedValue, children: /* @__PURE__ */ n(
|
|
112
|
-
ce,
|
|
113
|
-
{
|
|
114
|
-
items: G,
|
|
115
|
-
placeholder: c,
|
|
116
|
-
onDismiss: (e) => {
|
|
117
|
-
var t;
|
|
118
|
-
p(e), (t = C.current) == null || t.focus();
|
|
119
|
-
},
|
|
120
|
-
selectedCount: o.length
|
|
121
|
-
}
|
|
122
|
-
) }) : /* @__PURE__ */ n("span", { className: r.selectedValue, children: _ }),
|
|
123
|
-
H,
|
|
124
|
-
S ? /* @__PURE__ */ n(le, { onClear: Z, children: S }) : null,
|
|
125
|
-
/* @__PURE__ */ d("div", { className: r.icons, children: [
|
|
126
|
-
/* @__PURE__ */ n(V, { size: 16, className: r.caret }),
|
|
127
|
-
/* @__PURE__ */ n(ge, { status: u, hasError: T, dataTestId: b })
|
|
128
|
-
] })
|
|
129
|
-
]
|
|
130
|
-
}
|
|
131
|
-
) }),
|
|
132
|
-
/* @__PURE__ */ n(
|
|
133
|
-
ue,
|
|
134
|
-
{
|
|
135
|
-
align: R,
|
|
136
|
-
side: j,
|
|
137
|
-
highlightedIndex: Y,
|
|
138
|
-
getMenuProps: Q,
|
|
139
|
-
getItemProps: U,
|
|
140
|
-
selectedItemValues: o,
|
|
141
|
-
hasInteractedSinceOpening: J,
|
|
142
|
-
viewportCollisionPadding: E,
|
|
143
|
-
onEscapeKeyDown: F,
|
|
144
|
-
children: K
|
|
145
|
-
}
|
|
146
|
-
)
|
|
147
|
-
] });
|
|
148
|
-
};
|
|
149
|
-
O.displayName = "Select";
|
|
150
|
-
const Te = ee(O);
|
|
1
|
+
function s(e, n) {
|
|
2
|
+
const r = 'tr[tabindex="0"]', t = e.closest("table");
|
|
3
|
+
if (!t)
|
|
4
|
+
return null;
|
|
5
|
+
const o = Array.from(t.querySelectorAll(r)), l = o.indexOf(e) + (n === "ArrowUp" ? -1 : 1);
|
|
6
|
+
return l >= 0 && l < o.length ? o[l] : null;
|
|
7
|
+
}
|
|
8
|
+
function a(e) {
|
|
9
|
+
const n = e.target, r = n.closest("tr");
|
|
10
|
+
if (!r || n !== r || !["ArrowUp", "ArrowDown"].includes(e.key))
|
|
11
|
+
return;
|
|
12
|
+
const t = s(r, e.key);
|
|
13
|
+
t && (e.preventDefault(), t.focus());
|
|
14
|
+
}
|
|
15
|
+
const u = [HTMLButtonElement, HTMLAnchorElement], i = ["button", "link"];
|
|
16
|
+
function f(e) {
|
|
17
|
+
if (!e)
|
|
18
|
+
return !1;
|
|
19
|
+
const { target: n, currentTarget: r } = e;
|
|
20
|
+
let t = n instanceof Element ? n : null;
|
|
21
|
+
if (!r.contains(t))
|
|
22
|
+
return !0;
|
|
23
|
+
for (; t && !(t instanceof HTMLTableRowElement); ) {
|
|
24
|
+
if (u.some((c) => t instanceof c))
|
|
25
|
+
return !0;
|
|
26
|
+
const o = t.getAttribute("role");
|
|
27
|
+
if (o && i.includes(o))
|
|
28
|
+
return !0;
|
|
29
|
+
t = t.parentElement;
|
|
30
|
+
}
|
|
31
|
+
return !1;
|
|
32
|
+
}
|
|
151
33
|
export {
|
|
152
|
-
|
|
34
|
+
a as handleKeyDown,
|
|
35
|
+
f as shouldIgnoreRowClick
|
|
153
36
|
};
|
|
154
37
|
//# sourceMappingURL=fondue-components101.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components101.js","sources":["../src/components/Select/components/SelectBase.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCaretDown } from '@frontify/fondue-icons';\nimport * as RadixPopover from '@radix-ui/react-popover';\nimport { useSelect } from 'downshift';\nimport { forwardRef, useCallback, useMemo, useRef, useState, type ForwardedRef, type ReactNode } from 'react';\n\nimport { type CommonAriaProps } from '#/helpers/aria';\n\nimport { useBadgeItems } from '../hooks/useBadgeItems';\nimport { useFocusRing } from '../hooks/useFocusRing';\nimport { useSelectData } from '../hooks/useSelectData';\nimport { useSelectionDescription } from '../hooks/useSelectionDescription';\nimport styles from '../styles/select.module.scss';\n\nimport { ClearButton } from './ClearButton';\nimport { CollapsibleBadges } from './CollapsibleBadges';\nimport { SelectMenu, type SelectMenuViewportCollisionPadding } from './SelectMenu';\nimport { StatusIcons } from './StatusIcons';\n\nexport type SelectSharedProps = {\n /**\n * Children of the Select component. This can contain the `Select.Slot` components for the label, decorators, clear action and menu\n */\n children?: ReactNode;\n /**\n * The placeholder in the select component\n */\n placeholder?: string;\n /**\n * Status of the text input\n * @default \"neutral\"\n */\n status?: 'neutral' | 'success' | 'error';\n /**\n * Disables the select component\n */\n disabled?: boolean;\n /**\n * The alignment of the menu\n * @default \"start\"\n */\n alignMenu?: 'start' | 'center' | 'end';\n /**\n * Defines the preferred side of the select. It will not be respected if there are collisions with the viewport\n * @default \"bottom\"\n */\n side?: 'left' | 'right' | 'bottom' | 'top';\n /**\n * The data test id of the select component\n */\n 'data-test-id'?: string;\n /**\n * Id of the select component\n */\n id?: string;\n /**\n * The value of the select is shown as plain text (from the label prop) when set to true\n * Items child components are used if set to false\n * @default true\n */\n showStringValue?: boolean;\n /**\n * Define the minimum distance between the select menu and the viewport edge\n * @default 'compact'\n */\n viewportCollisionPadding?: SelectMenuViewportCollisionPadding;\n /**\n * Event handler called when the escape key is pressed\n */\n onEscapeKeyDown?: (event: KeyboardEvent) => void;\n} & CommonAriaProps;\n\ntype SelectBaseProps = SelectSharedProps & {\n /**\n * The currently selected item values\n */\n selectedItemValues: string[];\n /**\n * Callback fired when an item is selected or deselected\n */\n onItemSelect: (value?: string) => void;\n /**\n * Callback fired when the selection is cleared\n */\n onClear: () => void;\n /**\n * Whether the select allows multiple selections\n */\n multiple: boolean;\n};\n\nconst SelectBaseInput = (\n {\n children,\n selectedItemValues,\n onItemSelect,\n onClear,\n placeholder = '',\n status = 'neutral',\n disabled,\n alignMenu = 'start',\n side = 'bottom',\n id,\n showStringValue = true,\n 'data-test-id': dataTestId = 'fondue-select',\n viewportCollisionPadding = 'compact',\n onEscapeKeyDown,\n multiple,\n ...props\n }: SelectBaseProps,\n forwardedRef: ForwardedRef<HTMLDivElement>,\n): ReactNode => {\n const internalRef = useRef<HTMLDivElement | null>(null);\n const triggerRef = useCallback(\n (node: HTMLDivElement | null): void => {\n internalRef.current = node;\n if (typeof forwardedRef === 'function') {\n forwardedRef(node);\n } else if (forwardedRef) {\n forwardedRef.current = node;\n }\n },\n [forwardedRef],\n );\n const { inputSlots, menuSlots, items, clearButton, getItemByValue } = useSelectData(children);\n const { onMouseDown, onFocus, onBlur } = useFocusRing();\n const { selectionDescriptionId, selectionDescription } = useSelectionDescription(\n multiple,\n selectedItemValues,\n getItemByValue,\n );\n const badgeItems = useBadgeItems(selectedItemValues, getItemByValue);\n\n const [hasInteractedSinceOpening, setHasInteractedSinceOpening] = useState(false);\n\n const getDisplayedValue = useCallback(\n (itemValue?: string): ReactNode => {\n const selectedItem = getItemByValue(itemValue);\n if (selectedItem) {\n return !showStringValue && selectedItem?.children ? selectedItem.children : selectedItem?.label;\n }\n return undefined;\n },\n [getItemByValue, showStringValue],\n );\n\n const { getToggleButtonProps, getMenuProps, getItemProps, reset, isOpen, highlightedIndex } = useSelect<{\n value: string;\n label: string;\n children?: ReactNode;\n }>({\n items,\n selectedItem: null,\n toggleButtonId: id,\n labelId: 'aria-labelledby' in props ? props['aria-labelledby'] : undefined,\n onIsOpenChange: () => {\n setHasInteractedSinceOpening(false);\n },\n onHighlightedIndexChange: () => {\n setHasInteractedSinceOpening(true);\n },\n onSelectedItemChange: ({ selectedItem }) => {\n onItemSelect(selectedItem?.value);\n },\n itemToString: (item) => (item ? item.label : ''),\n ...(multiple\n ? {\n stateReducer: (state, actionAndChanges) => {\n const { changes, type } = actionAndChanges;\n switch (type) {\n case useSelect.stateChangeTypes.ToggleButtonKeyDownEnter:\n case useSelect.stateChangeTypes.ToggleButtonKeyDownSpaceButton:\n case useSelect.stateChangeTypes.ItemClick:\n return {\n ...changes,\n isOpen: true,\n highlightedIndex: state.highlightedIndex,\n };\n case useSelect.stateChangeTypes.ToggleButtonBlur:\n return {\n ...changes,\n selectedItem: state.selectedItem,\n };\n }\n return changes;\n },\n }\n : {}),\n });\n\n const hasError = status === 'error';\n\n const handleClear = (): void => {\n onClear();\n reset();\n };\n\n const singleSelectValue = useMemo(\n (): ReactNode => getDisplayedValue(selectedItemValues[0]) || placeholder,\n [getDisplayedValue, selectedItemValues, placeholder],\n );\n\n return (\n <RadixPopover.Root open={isOpen}>\n <RadixPopover.Anchor asChild onMouseDown={onMouseDown} onFocus={onFocus} onBlur={onBlur}>\n <div\n ref={triggerRef}\n className={styles.root}\n data-status={hasError ? 'error' : status}\n data-disabled={disabled}\n data-empty={selectedItemValues.length === 0}\n data-test-id={dataTestId}\n {...(disabled\n ? {}\n : // eslint-disable-next-line react-hooks/refs\n getToggleButtonProps({\n 'aria-label': 'aria-label' in props ? props['aria-label'] : undefined,\n 'aria-describedby': selectionDescription ? selectionDescriptionId : undefined,\n ref: triggerRef,\n }))}\n >\n {selectionDescription ? (\n <span id={selectionDescriptionId} className={styles.srOnly}>\n {selectionDescription}\n </span>\n ) : null}\n {multiple ? (\n <div className={styles.selectedValue}>\n <CollapsibleBadges\n items={badgeItems}\n placeholder={placeholder}\n onDismiss={(value) => {\n onItemSelect(value);\n internalRef.current?.focus();\n }}\n selectedCount={selectedItemValues.length}\n />\n </div>\n ) : (\n <span className={styles.selectedValue}>{singleSelectValue}</span>\n )}\n {inputSlots}\n {clearButton ? <ClearButton onClear={handleClear}>{clearButton}</ClearButton> : null}\n <div className={styles.icons}>\n <IconCaretDown size={16} className={styles.caret} />\n <StatusIcons status={status} hasError={hasError} dataTestId={dataTestId} />\n </div>\n </div>\n </RadixPopover.Anchor>\n\n <SelectMenu\n align={alignMenu}\n side={side}\n highlightedIndex={highlightedIndex}\n getMenuProps={getMenuProps}\n getItemProps={getItemProps}\n selectedItemValues={selectedItemValues}\n hasInteractedSinceOpening={hasInteractedSinceOpening}\n viewportCollisionPadding={viewportCollisionPadding}\n onEscapeKeyDown={onEscapeKeyDown}\n >\n {menuSlots}\n </SelectMenu>\n </RadixPopover.Root>\n );\n};\nSelectBaseInput.displayName = 'Select';\n\nexport const SelectBase = forwardRef<HTMLDivElement, SelectBaseProps>(SelectBaseInput);\n"],"names":["SelectBaseInput","children","selectedItemValues","onItemSelect","onClear","placeholder","status","disabled","alignMenu","side","id","showStringValue","dataTestId","viewportCollisionPadding","onEscapeKeyDown","multiple","props","forwardedRef","internalRef","useRef","triggerRef","useCallback","node","inputSlots","menuSlots","items","clearButton","getItemByValue","useSelectData","onMouseDown","onFocus","onBlur","useFocusRing","selectionDescriptionId","selectionDescription","useSelectionDescription","badgeItems","useBadgeItems","hasInteractedSinceOpening","setHasInteractedSinceOpening","useState","getDisplayedValue","itemValue","selectedItem","getToggleButtonProps","getMenuProps","getItemProps","reset","isOpen","highlightedIndex","useSelect","item","state","actionAndChanges","changes","type","hasError","handleClear","singleSelectValue","useMemo","jsxs","RadixPopover","jsx","styles","CollapsibleBadges","value","_a","ClearButton","IconCaretDown","StatusIcons","SelectMenu","SelectBase","forwardRef"],"mappings":";;;;;;;;;;;;;;AA4FA,MAAMA,IAAkB,CACpB;AAAA,EACI,UAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,SAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,QAAAC,IAAS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,IAAA,GAER;AAAA,IAEA,gBAAAkD;AAAA,MAACQ;AAAA,MAAA;AAAA,QACG,OAAO9D;AAAA,QACP,MAAAC;AAAA,QACA,kBAAAwC;AAAA,QACA,cAAAJ;AAAA,QACA,cAAAC;AAAA,QACA,oBAAA5C;AAAA,QACA,2BAAAoC;AAAA,QACA,0BAAAzB;AAAA,QACA,iBAAAC;AAAA,QAEC,UAAAU;AAAA,MAAA;AAAA,IAAA;AAAA,EACL,GACJ;AAER;AACAxB,EAAgB,cAAc;AAEvB,MAAMuE,KAAaC,GAA4CxE,CAAe;"}
|
|
1
|
+
{"version":3,"file":"fondue-components101.js","sources":["../src/components/Table/utils.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type KeyboardEvent, type MouseEvent } from 'react';\n\nfunction getAdjacentRow(currentRow: HTMLElement, key: 'ArrowUp' | 'ArrowDown'): HTMLElement | null {\n const selector = 'tr[tabindex=\"0\"]';\n const table = currentRow.closest('table');\n if (!table) {\n return null;\n }\n\n const rows = Array.from(table.querySelectorAll(selector));\n const currentIndex = rows.indexOf(currentRow);\n const nextIndex = currentIndex + (key === 'ArrowUp' ? -1 : 1);\n\n return nextIndex >= 0 && nextIndex < rows.length ? (rows[nextIndex] as HTMLElement) : null;\n}\n\nexport function handleKeyDown(event: KeyboardEvent<HTMLTableElement>) {\n const target = event.target as HTMLElement;\n const currentRow = target.closest('tr');\n\n if (!currentRow || target !== currentRow || !['ArrowUp', 'ArrowDown'].includes(event.key)) {\n return;\n }\n\n const nextRow = getAdjacentRow(currentRow, event.key as 'ArrowUp' | 'ArrowDown');\n if (nextRow) {\n event.preventDefault();\n nextRow.focus();\n }\n}\n\nconst INTERACTIVE_ELEMENTS_LIST = [HTMLButtonElement, HTMLAnchorElement];\nconst INTERACTIVE_ROLES_LIST = ['button', 'link'];\n\nexport function shouldIgnoreRowClick(event?: MouseEvent): boolean {\n if (!event) {\n return false;\n }\n\n const { target, currentTarget } = event;\n\n let element = target instanceof Element ? target : null;\n\n if (!currentTarget.contains(element)) {\n return true;\n }\n\n while (element && !(element instanceof HTMLTableRowElement)) {\n if (INTERACTIVE_ELEMENTS_LIST.some((interactiveElement) => element instanceof interactiveElement)) {\n return true;\n }\n\n const role = element.getAttribute('role');\n if (role && INTERACTIVE_ROLES_LIST.includes(role)) {\n return true;\n }\n\n element = element.parentElement;\n }\n\n return false;\n}\n"],"names":["getAdjacentRow","currentRow","key","selector","table","rows","nextIndex","handleKeyDown","event","target","nextRow","INTERACTIVE_ELEMENTS_LIST","INTERACTIVE_ROLES_LIST","shouldIgnoreRowClick","currentTarget","element","interactiveElement","role"],"mappings":"AAIA,SAASA,EAAeC,GAAyBC,GAAkD;AAC/F,QAAMC,IAAW,oBACXC,IAAQH,EAAW,QAAQ,OAAO;AACxC,MAAI,CAACG;AACD,WAAO;AAGX,QAAMC,IAAO,MAAM,KAAKD,EAAM,iBAAiBD,CAAQ,CAAC,GAElDG,IADeD,EAAK,QAAQJ,CAAU,KACVC,MAAQ,YAAY,KAAK;AAE3D,SAAOI,KAAa,KAAKA,IAAYD,EAAK,SAAUA,EAAKC,CAAS,IAAoB;AAC1F;AAEO,SAASC,EAAcC,GAAwC;AAClE,QAAMC,IAASD,EAAM,QACfP,IAAaQ,EAAO,QAAQ,IAAI;AAEtC,MAAI,CAACR,KAAcQ,MAAWR,KAAc,CAAC,CAAC,WAAW,WAAW,EAAE,SAASO,EAAM,GAAG;AACpF;AAGJ,QAAME,IAAUV,EAAeC,GAAYO,EAAM,GAA8B;AAC/E,EAAIE,MACAF,EAAM,eAAA,GACNE,EAAQ,MAAA;AAEhB;AAEA,MAAMC,IAA4B,CAAC,mBAAmB,iBAAiB,GACjEC,IAAyB,CAAC,UAAU,MAAM;AAEzC,SAASC,EAAqBL,GAA6B;AAC9D,MAAI,CAACA;AACD,WAAO;AAGX,QAAM,EAAE,QAAAC,GAAQ,eAAAK,EAAA,IAAkBN;AAElC,MAAIO,IAAUN,aAAkB,UAAUA,IAAS;AAEnD,MAAI,CAACK,EAAc,SAASC,CAAO;AAC/B,WAAO;AAGX,SAAOA,KAAW,EAAEA,aAAmB,wBAAsB;AACzD,QAAIJ,EAA0B,KAAK,CAACK,MAAuBD,aAAmBC,CAAkB;AAC5F,aAAO;AAGX,UAAMC,IAAOF,EAAQ,aAAa,MAAM;AACxC,QAAIE,KAAQL,EAAuB,SAASK,CAAI;AAC5C,aAAO;AAGX,IAAAF,IAAUA,EAAQ;AAAA,EACtB;AAEA,SAAO;AACX;"}
|
|
@@ -1,48 +1,14 @@
|
|
|
1
|
-
const
|
|
2
|
-
root:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
clear: t,
|
|
7
|
-
clearIcon: n,
|
|
8
|
-
icons: u,
|
|
9
|
-
caret: i,
|
|
10
|
-
iconSuccess: r,
|
|
11
|
-
iconError: s,
|
|
12
|
-
menu: a,
|
|
13
|
-
portal: l,
|
|
14
|
-
item: p,
|
|
15
|
-
checkmarkIcon: g,
|
|
16
|
-
itemValue: m,
|
|
17
|
-
group: d,
|
|
18
|
-
groupHeading: I,
|
|
19
|
-
badgesContainer: b,
|
|
20
|
-
badgeWrapper: k,
|
|
21
|
-
srOnly: S,
|
|
22
|
-
multiSelectInput: V
|
|
1
|
+
const n = "_root_bn9za_3", t = "_mainContent_bn9za_15", o = "_actionButton_bn9za_28", a = "_secondaryContent_bn9za_123", e = {
|
|
2
|
+
root: n,
|
|
3
|
+
mainContent: t,
|
|
4
|
+
actionButton: o,
|
|
5
|
+
secondaryContent: a
|
|
23
6
|
};
|
|
24
7
|
export {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
n as clearIcon,
|
|
31
|
-
y as default,
|
|
32
|
-
d as group,
|
|
33
|
-
I as groupHeading,
|
|
34
|
-
s as iconError,
|
|
35
|
-
r as iconSuccess,
|
|
36
|
-
u as icons,
|
|
37
|
-
_ as input,
|
|
38
|
-
p as item,
|
|
39
|
-
m as itemValue,
|
|
40
|
-
a as menu,
|
|
41
|
-
V as multiSelectInput,
|
|
42
|
-
l as portal,
|
|
43
|
-
c as root,
|
|
44
|
-
e as selectedValue,
|
|
45
|
-
o as slot,
|
|
46
|
-
S as srOnly
|
|
8
|
+
o as actionButton,
|
|
9
|
+
e as default,
|
|
10
|
+
t as mainContent,
|
|
11
|
+
n as root,
|
|
12
|
+
a as secondaryContent
|
|
47
13
|
};
|
|
48
14
|
//# sourceMappingURL=fondue-components102.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components102.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fondue-components102.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -1,17 +1,71 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const t =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
if (!(t != null && t.from) || !(t != null && t.to))
|
|
1
|
+
import { useRef as W, useState as p, useEffect as w, useLayoutEffect as I } from "react";
|
|
2
|
+
const T = (e, s) => e.filter((f) => {
|
|
3
|
+
var c;
|
|
4
|
+
const t = (c = f.ref) == null ? void 0 : c.current;
|
|
5
|
+
return t ? t.offsetLeft + t.offsetWidth > (s == null ? void 0 : s.scrollLeft) + s.offsetWidth || t.offsetLeft - s.scrollLeft < 0 : !1;
|
|
6
|
+
}), a = (e, s) => {
|
|
7
|
+
const f = s.current, t = e == null ? void 0 : e.querySelector('[data-state="active"]');
|
|
8
|
+
if (!e || !(t instanceof HTMLButtonElement) || !(f instanceof HTMLSpanElement))
|
|
10
9
|
return;
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
const u = getComputedStyle(e).direction === "rtl", r = (e == null ? void 0 : e.scrollLeft) > (t == null ? void 0 : t.offsetLeft), l = (t == null ? void 0 : t.offsetLeft) + (t == null ? void 0 : t.offsetWidth) > (e == null ? void 0 : e.offsetWidth), o = (n) => u ? e.offsetWidth - n - t.offsetWidth : n;
|
|
11
|
+
if (r) {
|
|
12
|
+
if (e.offsetWidth > t.offsetWidth + t.offsetLeft)
|
|
13
|
+
f.style.insetInlineStart = `${o(t.offsetLeft)}px`;
|
|
14
|
+
else {
|
|
15
|
+
const i = e.offsetWidth - t.offsetWidth;
|
|
16
|
+
f.style.insetInlineStart = `${o(i)}px`;
|
|
17
|
+
}
|
|
18
|
+
f.style.width = `${t == null ? void 0 : t.offsetWidth}px`;
|
|
19
|
+
} else if (l) {
|
|
20
|
+
const n = e.clientWidth - t.offsetWidth;
|
|
21
|
+
f.style.insetInlineStart = `${o(n)}px`, f.style.width = `${t.offsetWidth}px`;
|
|
22
|
+
} else
|
|
23
|
+
f.style.insetInlineStart = `${o(t.offsetLeft)}px`, f.style.width = `${t.offsetWidth}px`;
|
|
24
|
+
}, b = ({
|
|
25
|
+
activeTab: e
|
|
26
|
+
}) => {
|
|
27
|
+
const s = W(null), f = W(null), [t, c] = p([]), [u, r] = p([]);
|
|
28
|
+
return w(() => {
|
|
29
|
+
const o = s.current, n = o == null ? void 0 : o.querySelector('[data-state="active"]');
|
|
30
|
+
n instanceof HTMLButtonElement && o instanceof HTMLDivElement && (a(o, f), n.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "end" }));
|
|
31
|
+
}, [e, f]), I(() => {
|
|
32
|
+
var i;
|
|
33
|
+
const o = s.current, n = o == null ? void 0 : o.querySelector('[data-state="active"]');
|
|
34
|
+
if (o instanceof HTMLDivElement && n instanceof HTMLButtonElement) {
|
|
35
|
+
a(o, f);
|
|
36
|
+
const d = new MutationObserver(() => {
|
|
37
|
+
n.scrollIntoView({ behavior: "instant", block: "nearest", inline: "end" }), a(o, f);
|
|
38
|
+
});
|
|
39
|
+
o.parentNode && d.observe(o.parentNode, { childList: !0 });
|
|
40
|
+
const h = new IntersectionObserver(
|
|
41
|
+
() => {
|
|
42
|
+
r(T(t, o)), a(o, f);
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
root: o,
|
|
46
|
+
threshold: 1
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
for (const v of t)
|
|
50
|
+
(i = v.ref) != null && i.current && h.observe(v.ref.current);
|
|
51
|
+
return () => {
|
|
52
|
+
h.disconnect(), d.disconnect();
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
}, [t, s, f]), {
|
|
56
|
+
triggerListRef: s,
|
|
57
|
+
activeIndicatorRef: f,
|
|
58
|
+
triggersOutOfView: u,
|
|
59
|
+
triggers: t,
|
|
60
|
+
addTrigger: (o) => {
|
|
61
|
+
o.previousElement || c((n) => [...n, o]), c((n) => {
|
|
62
|
+
const i = n.findIndex((d) => d.element === o.previousElement);
|
|
63
|
+
return n[i] = o, [...n];
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
};
|
|
14
68
|
export {
|
|
15
|
-
|
|
69
|
+
b as useTabTriggers
|
|
16
70
|
};
|
|
17
71
|
//# sourceMappingURL=fondue-components103.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components103.js","sources":["../src/components/DatePicker/helpers/dateDisplayFormatter.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { format } from 'date-fns';\n\nimport { type DatePickerDate, type DatePickerDateRange } from '../types';\n\nimport { transformDateRangeToPickerDateRange, transformDatePickerDateToDate } from './dateTransformer';\n\nconst isDateRange = (selected?: DatePickerDateRange | DatePickerDate): selected is DatePickerDateRange => {\n return Boolean(selected && 'from' in selected && 'to' in selected);\n};\n\nconst getSingleDateDisplayString = (selected?: DatePickerDate): string | undefined => {\n const singleDate = transformDatePickerDateToDate(selected);\n if (!singleDate) {\n return undefined;\n }\n return format(singleDate, 'MMMM d, yyyy');\n};\n\nconst getDateRangeDisplayString = (selected?: DatePickerDateRange): string | undefined => {\n const dateRange = transformDateRangeToPickerDateRange(selected);\n if (!dateRange?.from || !dateRange?.to) {\n return undefined;\n }\n\n const isSameYear = dateRange.from.getFullYear() === dateRange.to.getFullYear();\n\n const isSameMonth = isSameYear && dateRange.from.getMonth() === dateRange.to.getMonth();\n\n if (isSameMonth) {\n return `${format(dateRange.from, 'MMM d')}\\u2013${format(dateRange.to, 'd, yyyy')}`;\n }\n\n if (isSameYear) {\n return `${format(dateRange.from, 'MMM d')}\\u2013${format(dateRange.to, 'MMM d, yyyy')}`;\n }\n\n return `${format(dateRange.from, 'MMM d, yyyy')}\\u2013${format(dateRange.to, 'MMM d, yyyy')}`;\n};\n\nexport const getDateDisplayString = (selected?: DatePickerDateRange | DatePickerDate): string | undefined => {\n if (isDateRange(selected)) {\n return getDateRangeDisplayString(selected);\n }\n return getSingleDateDisplayString(selected);\n};\n"],"names":["isDateRange","selected","getSingleDateDisplayString","singleDate","transformDatePickerDateToDate","format","getDateRangeDisplayString","dateRange","transformDateRangeToPickerDateRange","isSameYear","getDateDisplayString"],"mappings":";;AAQA,MAAMA,IAAc,CAACC,MACV,GAAQA,KAAY,UAAUA,KAAY,QAAQA,IAGvDC,IAA6B,CAACD,MAAkD;AAClF,QAAME,IAAaC,EAA8BH,CAAQ;AACzD,MAAKE;AAGL,WAAOE,EAAOF,GAAY,cAAc;AAC5C,GAEMG,IAA4B,CAACL,MAAuD;AACtF,QAAMM,IAAYC,EAAoCP,CAAQ;AAC9D,MAAI,EAACM,KAAA,QAAAA,EAAW,SAAQ,EAACA,KAAA,QAAAA,EAAW;AAChC;AAGJ,QAAME,IAAaF,EAAU,KAAK,kBAAkBA,EAAU,GAAG,YAAA;AAIjE,SAFoBE,KAAcF,EAAU,KAAK,eAAeA,EAAU,GAAG,SAAA,IAGlE,GAAGF,EAAOE,EAAU,MAAM,OAAO,CAAC,IAASF,EAAOE,EAAU,IAAI,SAAS,CAAC,KAGjFE,IACO,GAAGJ,EAAOE,EAAU,MAAM,OAAO,CAAC,IAASF,EAAOE,EAAU,IAAI,aAAa,CAAC,KAGlF,GAAGF,EAAOE,EAAU,MAAM,aAAa,CAAC,IAASF,EAAOE,EAAU,IAAI,aAAa,CAAC;AAC/F,GAEaG,IAAuB,CAACT,MAC7BD,EAAYC,CAAQ,IACbK,EAA0BL,CAAQ,IAEtCC,EAA2BD,CAAQ;"}
|
|
1
|
+
{"version":3,"file":"fondue-components103.js","sources":["../src/components/Tabs/hooks/useTabTriggers.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type RefObject, useEffect, useLayoutEffect, useRef, useState } from 'react';\n\nimport { type TabTrigger } from '../types';\n\nconst getOverflowingTriggers = (triggers: TabTrigger[], triggerListElement: HTMLDivElement) => {\n return triggers.filter((trigger) => {\n const triggerElement = trigger.ref?.current;\n if (!triggerElement) {\n return false;\n }\n return (\n triggerElement.offsetLeft + triggerElement.offsetWidth >\n triggerListElement?.scrollLeft + triggerListElement.offsetWidth ||\n triggerElement.offsetLeft - triggerListElement.scrollLeft < 0\n );\n });\n};\n\nconst moveActiveIndicator = (triggerListElement: HTMLDivElement, activeIndicatorRef: RefObject<HTMLSpanElement>) => {\n const activeIndicatorElement = activeIndicatorRef.current;\n const activeTriggerElement = triggerListElement?.querySelector('[data-state=\"active\"]');\n\n if (\n !triggerListElement ||\n !(activeTriggerElement instanceof HTMLButtonElement) ||\n !(activeIndicatorElement instanceof HTMLSpanElement)\n ) {\n return;\n }\n\n // Get the computed direction to handle RTL correctly\n const direction = getComputedStyle(triggerListElement).direction;\n const isRTL = direction === 'rtl';\n\n const isOverflowingLeft = triggerListElement?.scrollLeft > activeTriggerElement?.offsetLeft;\n const isOverflowingRight =\n activeTriggerElement?.offsetLeft + activeTriggerElement?.offsetWidth > triggerListElement?.offsetWidth;\n\n // Helper function to calculate position based on direction\n const getInlineStartPosition = (position: number) => {\n if (isRTL) {\n // In RTL, insetInlineStart maps to 'right', so we need to calculate from the right edge\n return triggerListElement.offsetWidth - position - activeTriggerElement.offsetWidth;\n }\n return position;\n };\n\n if (isOverflowingLeft) {\n const willFitAllItemsToTheLeft =\n triggerListElement.offsetWidth > activeTriggerElement.offsetWidth + activeTriggerElement.offsetLeft;\n if (willFitAllItemsToTheLeft) {\n activeIndicatorElement.style.insetInlineStart = `${getInlineStartPosition(activeTriggerElement.offsetLeft)}px`;\n } else {\n const position = triggerListElement.offsetWidth - activeTriggerElement.offsetWidth;\n activeIndicatorElement.style.insetInlineStart = `${getInlineStartPosition(position)}px`;\n }\n activeIndicatorElement.style.width = `${activeTriggerElement?.offsetWidth}px`;\n } else if (isOverflowingRight) {\n const position = triggerListElement.clientWidth - activeTriggerElement.offsetWidth;\n activeIndicatorElement.style.insetInlineStart = `${getInlineStartPosition(position)}px`;\n activeIndicatorElement.style.width = `${activeTriggerElement.offsetWidth}px`;\n } else {\n activeIndicatorElement.style.insetInlineStart = `${getInlineStartPosition(activeTriggerElement.offsetLeft)}px`;\n activeIndicatorElement.style.width = `${activeTriggerElement.offsetWidth}px`;\n }\n};\n\nexport const useTabTriggers = ({\n activeTab,\n}: {\n activeTab?: string;\n}): {\n triggerListRef: RefObject<HTMLDivElement>;\n activeIndicatorRef: RefObject<HTMLSpanElement>;\n triggers: TabTrigger[];\n triggersOutOfView: TabTrigger[];\n addTrigger: (trigger: TabTrigger) => void;\n} => {\n const triggerListRef = useRef<HTMLDivElement | null>(null);\n const activeIndicatorRef = useRef<HTMLSpanElement | null>(null);\n const [triggers, setTriggers] = useState<TabTrigger[]>([]);\n const [triggersOutOfView, setTriggersOutOfView] = useState<TabTrigger[]>([]);\n\n // move the active indicator and scroll to the correct position when the tab changes\n useEffect(() => {\n const triggerListElement = triggerListRef.current;\n const activeTriggerElement = triggerListElement?.querySelector('[data-state=\"active\"]');\n\n if (activeTriggerElement instanceof HTMLButtonElement && triggerListElement instanceof HTMLDivElement) {\n moveActiveIndicator(triggerListElement, activeIndicatorRef);\n activeTriggerElement.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'end' });\n }\n }, [activeTab, activeIndicatorRef]);\n\n useLayoutEffect(() => {\n const triggerListElement = triggerListRef.current;\n const activeTriggerElement = triggerListElement?.querySelector('[data-state=\"active\"]');\n\n if (triggerListElement instanceof HTMLDivElement && activeTriggerElement instanceof HTMLButtonElement) {\n // move the active indicator to the initial active tab\n moveActiveIndicator(triggerListElement, activeIndicatorRef);\n\n // observe addition of the dropdown trigger which reduces the available width\n const mutationObserver = new MutationObserver(() => {\n activeTriggerElement.scrollIntoView({ behavior: 'instant', block: 'nearest', inline: 'end' });\n moveActiveIndicator(triggerListElement, activeIndicatorRef);\n });\n if (triggerListElement.parentNode) {\n mutationObserver.observe(triggerListElement.parentNode, { childList: true });\n }\n\n // calculate the overflowing elements when item starts overflowing the parent\n const intersectionObserver = new IntersectionObserver(\n () => {\n setTriggersOutOfView(getOverflowingTriggers(triggers, triggerListElement));\n moveActiveIndicator(triggerListElement, activeIndicatorRef);\n },\n {\n root: triggerListElement,\n threshold: 1,\n },\n );\n for (const trigger of triggers) {\n if (trigger.ref?.current) {\n intersectionObserver.observe(trigger.ref.current);\n }\n }\n\n return () => {\n intersectionObserver.disconnect();\n mutationObserver.disconnect();\n };\n }\n }, [triggers, triggerListRef, activeIndicatorRef]);\n\n const addTrigger = (trigger: TabTrigger) => {\n if (!trigger.previousElement) {\n setTriggers((prev) => [...prev, trigger]);\n }\n\n setTriggers((prev) => {\n const index = prev.findIndex((element) => element.element === trigger.previousElement);\n prev[index] = trigger;\n return [...prev];\n });\n };\n\n return {\n triggerListRef,\n activeIndicatorRef,\n triggersOutOfView,\n triggers,\n addTrigger,\n };\n};\n"],"names":["getOverflowingTriggers","triggers","triggerListElement","trigger","triggerElement","_a","moveActiveIndicator","activeIndicatorRef","activeIndicatorElement","activeTriggerElement","isRTL","isOverflowingLeft","isOverflowingRight","getInlineStartPosition","position","useTabTriggers","activeTab","triggerListRef","useRef","setTriggers","useState","triggersOutOfView","setTriggersOutOfView","useEffect","useLayoutEffect","mutationObserver","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