@frontify/fondue-components 29.0.1 → 29.2.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/fondue-components.js +72 -70
- package/dist/fondue-components.js.map +1 -1
- package/dist/fondue-components10.js +176 -33
- package/dist/fondue-components10.js.map +1 -1
- package/dist/fondue-components100.js +8 -23
- package/dist/fondue-components100.js.map +1 -1
- package/dist/fondue-components101.js +11 -34
- package/dist/fondue-components101.js.map +1 -1
- package/dist/fondue-components102.js +10 -10
- package/dist/fondue-components103.js +6 -67
- package/dist/fondue-components103.js.map +1 -1
- package/dist/fondue-components104.js +12 -14
- package/dist/fondue-components104.js.map +1 -1
- package/dist/fondue-components105.js +22 -25
- package/dist/fondue-components105.js.map +1 -1
- package/dist/fondue-components106.js +34 -19
- package/dist/fondue-components106.js.map +1 -1
- package/dist/fondue-components107.js +10 -24
- package/dist/fondue-components107.js.map +1 -1
- package/dist/fondue-components108.js +67 -8
- package/dist/fondue-components108.js.map +1 -1
- package/dist/fondue-components109.js +14 -30
- package/dist/fondue-components109.js.map +1 -1
- package/dist/fondue-components11.js +35 -185
- package/dist/fondue-components11.js.map +1 -1
- package/dist/fondue-components110.js +23 -4
- package/dist/fondue-components110.js.map +1 -1
- package/dist/fondue-components111.js +17 -15
- package/dist/fondue-components111.js.map +1 -1
- package/dist/fondue-components112.js +25 -127
- package/dist/fondue-components112.js.map +1 -1
- package/dist/fondue-components113.js +9 -11
- package/dist/fondue-components113.js.map +1 -1
- package/dist/fondue-components114.js +33 -36
- package/dist/fondue-components114.js.map +1 -1
- package/dist/fondue-components115.js +7 -14
- package/dist/fondue-components115.js.map +1 -1
- package/dist/fondue-components116.js +4 -14
- package/dist/fondue-components116.js.map +1 -1
- package/dist/fondue-components117.js +5 -111
- package/dist/fondue-components117.js.map +1 -1
- package/dist/fondue-components118.js +16 -12
- package/dist/fondue-components118.js.map +1 -1
- package/dist/fondue-components119.js +14 -17
- package/dist/fondue-components119.js.map +1 -1
- package/dist/fondue-components12.js +185 -7
- package/dist/fondue-components12.js.map +1 -1
- package/dist/fondue-components120.js +16 -12
- package/dist/fondue-components120.js.map +1 -1
- package/dist/fondue-components121.js +107 -213
- package/dist/fondue-components121.js.map +1 -1
- package/dist/fondue-components122.js +10 -16
- package/dist/fondue-components122.js.map +1 -1
- package/dist/fondue-components123.js +16 -16
- package/dist/fondue-components123.js.map +1 -1
- package/dist/fondue-components124.js +12 -150
- package/dist/fondue-components124.js.map +1 -1
- package/dist/fondue-components125.js +32 -44
- package/dist/fondue-components125.js.map +1 -1
- package/dist/fondue-components126.js +6 -5
- package/dist/fondue-components126.js.map +1 -1
- package/dist/fondue-components127.js +127 -5
- package/dist/fondue-components127.js.map +1 -1
- package/dist/fondue-components128.js +11 -29
- package/dist/fondue-components128.js.map +1 -1
- package/dist/fondue-components129.js +39 -0
- package/dist/fondue-components129.js.map +1 -0
- package/dist/fondue-components13.js +8 -63
- package/dist/fondue-components13.js.map +1 -1
- package/dist/fondue-components130.js +216 -40
- package/dist/fondue-components130.js.map +1 -1
- package/dist/fondue-components131.js +19 -6
- package/dist/fondue-components131.js.map +1 -1
- package/dist/fondue-components132.js +16 -11
- package/dist/fondue-components132.js.map +1 -1
- package/dist/fondue-components133.js +150 -70
- package/dist/fondue-components133.js.map +1 -1
- package/dist/fondue-components134.js +44 -14
- package/dist/fondue-components134.js.map +1 -1
- package/dist/fondue-components135.js +170 -7
- package/dist/fondue-components135.js.map +1 -1
- package/dist/fondue-components136.js +57 -86
- package/dist/fondue-components136.js.map +1 -1
- package/dist/fondue-components137.js +9 -81
- package/dist/fondue-components137.js.map +1 -1
- package/dist/fondue-components138.js +254 -29
- package/dist/fondue-components138.js.map +1 -1
- package/dist/fondue-components14.js +61 -35
- package/dist/fondue-components14.js.map +1 -1
- package/dist/fondue-components140.js +40 -58
- package/dist/fondue-components140.js.map +1 -1
- package/dist/fondue-components141.js +41 -9
- package/dist/fondue-components141.js.map +1 -1
- package/dist/fondue-components142.js +6 -256
- package/dist/fondue-components142.js.map +1 -1
- package/dist/fondue-components143.js +11 -18
- package/dist/fondue-components143.js.map +1 -1
- package/dist/fondue-components144.js +68 -67
- package/dist/fondue-components144.js.map +1 -1
- package/dist/fondue-components145.js +14 -1351
- package/dist/fondue-components145.js.map +1 -1
- package/dist/fondue-components146.js +7 -941
- package/dist/fondue-components146.js.map +1 -1
- package/dist/fondue-components147.js +87 -196
- package/dist/fondue-components147.js.map +1 -1
- package/dist/fondue-components148.js +78 -18
- package/dist/fondue-components148.js.map +1 -1
- package/dist/fondue-components149.js +30 -39
- package/dist/fondue-components149.js.map +1 -1
- package/dist/fondue-components15.js +36 -121
- package/dist/fondue-components15.js.map +1 -1
- package/dist/fondue-components150.js +17 -66
- package/dist/fondue-components150.js.map +1 -1
- package/dist/fondue-components151.js +69 -30
- package/dist/fondue-components151.js.map +1 -1
- package/dist/fondue-components152.js +1352 -9
- package/dist/fondue-components152.js.map +1 -1
- package/dist/fondue-components153.js +939 -151
- package/dist/fondue-components153.js.map +1 -1
- package/dist/fondue-components154.js +197 -107
- package/dist/fondue-components154.js.map +1 -1
- package/dist/fondue-components155.js +22 -17
- package/dist/fondue-components155.js.map +1 -1
- package/dist/fondue-components156.js +39 -15
- package/dist/fondue-components156.js.map +1 -1
- package/dist/fondue-components157.js +68 -29
- package/dist/fondue-components157.js.map +1 -1
- package/dist/fondue-components158.js +31 -13
- package/dist/fondue-components158.js.map +1 -1
- package/dist/fondue-components159.js +9 -7
- package/dist/fondue-components159.js.map +1 -1
- package/dist/fondue-components16.js +121 -36
- package/dist/fondue-components16.js.map +1 -1
- package/dist/fondue-components160.js +156 -0
- package/dist/fondue-components160.js.map +1 -0
- package/dist/fondue-components161.js +111 -0
- package/dist/fondue-components161.js.map +1 -0
- package/dist/fondue-components162.js +19 -0
- package/dist/fondue-components162.js.map +1 -0
- package/dist/fondue-components163.js +32 -0
- package/dist/fondue-components163.js.map +1 -0
- package/dist/fondue-components164.js +16 -0
- package/dist/fondue-components164.js.map +1 -0
- package/dist/fondue-components165.js +10 -0
- package/dist/fondue-components165.js.map +1 -0
- package/dist/fondue-components166.js +19 -0
- package/dist/fondue-components166.js.map +1 -0
- package/dist/fondue-components17.js +30 -39
- package/dist/fondue-components17.js.map +1 -1
- package/dist/fondue-components18.js +44 -41
- package/dist/fondue-components18.js.map +1 -1
- package/dist/fondue-components19.js +42 -57
- package/dist/fondue-components19.js.map +1 -1
- package/dist/fondue-components20.js +55 -41
- package/dist/fondue-components20.js.map +1 -1
- package/dist/fondue-components21.js +39 -16
- package/dist/fondue-components21.js.map +1 -1
- package/dist/fondue-components22.js +17 -43
- package/dist/fondue-components22.js.map +1 -1
- package/dist/fondue-components23.js +46 -68
- package/dist/fondue-components23.js.map +1 -1
- package/dist/fondue-components24.js +67 -71
- package/dist/fondue-components24.js.map +1 -1
- package/dist/fondue-components25.js +72 -16
- package/dist/fondue-components25.js.map +1 -1
- package/dist/fondue-components26.js +18 -77
- package/dist/fondue-components26.js.map +1 -1
- package/dist/fondue-components27.js +75 -34
- package/dist/fondue-components27.js.map +1 -1
- package/dist/fondue-components28.js +34 -53
- package/dist/fondue-components28.js.map +1 -1
- package/dist/fondue-components29.js +55 -23
- package/dist/fondue-components29.js.map +1 -1
- package/dist/fondue-components3.js +1 -1
- package/dist/fondue-components30.js +23 -55
- package/dist/fondue-components30.js.map +1 -1
- package/dist/fondue-components31.js +52 -97
- package/dist/fondue-components31.js.map +1 -1
- package/dist/fondue-components32.js +98 -31
- package/dist/fondue-components32.js.map +1 -1
- package/dist/fondue-components33.js +31 -194
- package/dist/fondue-components33.js.map +1 -1
- package/dist/fondue-components34.js +184 -134
- package/dist/fondue-components34.js.map +1 -1
- package/dist/fondue-components35.js +143 -130
- package/dist/fondue-components35.js.map +1 -1
- package/dist/fondue-components36.js +131 -30
- package/dist/fondue-components36.js.map +1 -1
- package/dist/fondue-components37.js +29 -79
- package/dist/fondue-components37.js.map +1 -1
- package/dist/fondue-components38.js +68 -110
- package/dist/fondue-components38.js.map +1 -1
- package/dist/fondue-components39.js +121 -34
- package/dist/fondue-components39.js.map +1 -1
- package/dist/fondue-components4.js +21 -19
- package/dist/fondue-components4.js.map +1 -1
- package/dist/fondue-components40.js +36 -56
- package/dist/fondue-components40.js.map +1 -1
- package/dist/fondue-components41.js +56 -20
- package/dist/fondue-components41.js.map +1 -1
- package/dist/fondue-components42.js +20 -25
- package/dist/fondue-components42.js.map +1 -1
- package/dist/fondue-components43.js +25 -7
- package/dist/fondue-components43.js.map +1 -1
- package/dist/fondue-components44.js +7 -8
- package/dist/fondue-components44.js.map +1 -1
- package/dist/fondue-components45.js +9 -41
- package/dist/fondue-components45.js.map +1 -1
- package/dist/fondue-components46.js +41 -5
- package/dist/fondue-components46.js.map +1 -1
- package/dist/fondue-components47.js +1 -1
- package/dist/fondue-components48.js +3 -11
- package/dist/fondue-components48.js.map +1 -1
- package/dist/fondue-components49.js +25 -29
- package/dist/fondue-components49.js.map +1 -1
- package/dist/fondue-components5.js +2 -2
- package/dist/fondue-components50.js +33 -54
- package/dist/fondue-components50.js.map +1 -1
- package/dist/fondue-components51.js +20 -130
- package/dist/fondue-components51.js.map +1 -1
- package/dist/fondue-components52.js +85 -20
- package/dist/fondue-components52.js.map +1 -1
- package/dist/fondue-components53.js +13 -53
- package/dist/fondue-components53.js.map +1 -1
- package/dist/fondue-components54.js +32 -8
- package/dist/fondue-components54.js.map +1 -1
- package/dist/fondue-components55.js +54 -13
- package/dist/fondue-components55.js.map +1 -1
- package/dist/fondue-components56.js +130 -16
- package/dist/fondue-components56.js.map +1 -1
- package/dist/fondue-components57.js +20 -4
- package/dist/fondue-components57.js.map +1 -1
- package/dist/fondue-components58.js +52 -17
- package/dist/fondue-components58.js.map +1 -1
- package/dist/fondue-components59.js +7 -18
- package/dist/fondue-components59.js.map +1 -1
- package/dist/fondue-components6.js +1 -1
- package/dist/fondue-components60.js +13 -44
- package/dist/fondue-components60.js.map +1 -1
- package/dist/fondue-components61.js +16 -24
- package/dist/fondue-components61.js.map +1 -1
- package/dist/fondue-components62.js +4 -22
- package/dist/fondue-components62.js.map +1 -1
- package/dist/fondue-components63.js +18 -7
- package/dist/fondue-components63.js.map +1 -1
- package/dist/fondue-components64.js +18 -4
- package/dist/fondue-components64.js.map +1 -1
- package/dist/fondue-components65.js +43 -12
- package/dist/fondue-components65.js.map +1 -1
- package/dist/fondue-components66.js +24 -4
- package/dist/fondue-components66.js.map +1 -1
- package/dist/fondue-components67.js +22 -17
- package/dist/fondue-components67.js.map +1 -1
- package/dist/fondue-components68.js +4 -8
- package/dist/fondue-components68.js.map +1 -1
- package/dist/fondue-components69.js +4 -36
- package/dist/fondue-components69.js.map +1 -1
- package/dist/fondue-components7.js +32 -65
- package/dist/fondue-components7.js.map +1 -1
- package/dist/fondue-components70.js +12 -6
- package/dist/fondue-components70.js.map +1 -1
- package/dist/fondue-components71.js +1 -1
- package/dist/fondue-components72.js +17 -12
- package/dist/fondue-components72.js.map +1 -1
- package/dist/fondue-components73.js +10 -51
- package/dist/fondue-components73.js.map +1 -1
- package/dist/fondue-components74.js +37 -44
- package/dist/fondue-components74.js.map +1 -1
- package/dist/fondue-components75.js +7 -6
- package/dist/fondue-components75.js.map +1 -1
- package/dist/fondue-components76.js +5 -6
- package/dist/fondue-components76.js.map +1 -1
- package/dist/fondue-components77.js +13 -13
- package/dist/fondue-components77.js.map +1 -1
- package/dist/fondue-components78.js +51 -27
- package/dist/fondue-components78.js.map +1 -1
- package/dist/fondue-components79.js +42 -11
- package/dist/fondue-components79.js.map +1 -1
- package/dist/fondue-components8.js +65 -51
- package/dist/fondue-components8.js.map +1 -1
- package/dist/fondue-components80.js +6 -5
- package/dist/fondue-components80.js.map +1 -1
- package/dist/fondue-components81.js +6 -13
- package/dist/fondue-components81.js.map +1 -1
- package/dist/fondue-components82.js +13 -48
- package/dist/fondue-components82.js.map +1 -1
- package/dist/fondue-components83.js +27 -22
- package/dist/fondue-components83.js.map +1 -1
- package/dist/fondue-components84.js +13 -629
- package/dist/fondue-components84.js.map +1 -1
- package/dist/fondue-components85.js +4 -8
- package/dist/fondue-components85.js.map +1 -1
- package/dist/fondue-components86.js +12 -12
- package/dist/fondue-components86.js.map +1 -1
- package/dist/fondue-components87.js +47 -4
- package/dist/fondue-components87.js.map +1 -1
- package/dist/fondue-components88.js +22 -24
- package/dist/fondue-components88.js.map +1 -1
- package/dist/fondue-components89.js +628 -16
- package/dist/fondue-components89.js.map +1 -1
- package/dist/fondue-components9.js +46 -173
- package/dist/fondue-components9.js.map +1 -1
- package/dist/fondue-components90.js +9 -20
- package/dist/fondue-components90.js.map +1 -1
- package/dist/fondue-components91.js +13 -20
- package/dist/fondue-components91.js.map +1 -1
- package/dist/fondue-components92.js +5 -20
- package/dist/fondue-components92.js.map +1 -1
- package/dist/fondue-components93.js +24 -19
- package/dist/fondue-components93.js.map +1 -1
- package/dist/fondue-components94.js +17 -19
- package/dist/fondue-components94.js.map +1 -1
- package/dist/fondue-components95.js +20 -8
- package/dist/fondue-components95.js.map +1 -1
- package/dist/fondue-components96.js +20 -11
- package/dist/fondue-components96.js.map +1 -1
- package/dist/fondue-components97.js +20 -11
- package/dist/fondue-components97.js.map +1 -1
- package/dist/fondue-components98.js +20 -7
- package/dist/fondue-components98.js.map +1 -1
- package/dist/fondue-components99.js +19 -13
- package/dist/fondue-components99.js.map +1 -1
- package/dist/index.d.ts +184 -18
- package/dist/style.css +1 -1
- package/package.json +6 -2
- package/dist/fondue-components139.js +0 -173
- package/dist/fondue-components139.js.map +0 -1
|
@@ -3,80 +3,82 @@ import { Accordion as t } from "./fondue-components3.js";
|
|
|
3
3
|
import { Badge as m } from "./fondue-components4.js";
|
|
4
4
|
import { Box as f } from "./fondue-components5.js";
|
|
5
5
|
import { Button as a } from "./fondue-components6.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
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 {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
6
|
+
import { Card as l } from "./fondue-components7.js";
|
|
7
|
+
import { Checkbox as c } from "./fondue-components8.js";
|
|
8
|
+
import { ColorPicker as g } from "./fondue-components9.js";
|
|
9
|
+
import { Dialog as S } from "./fondue-components10.js";
|
|
10
|
+
import { Divider as C } from "./fondue-components11.js";
|
|
11
|
+
import { Dropdown as h } from "./fondue-components12.js";
|
|
12
|
+
import { DatePicker as k } from "./fondue-components13.js";
|
|
13
|
+
import { EditableText as D } from "./fondue-components14.js";
|
|
14
|
+
import { Flex as v } from "./fondue-components15.js";
|
|
15
|
+
import { Flyout as w } from "./fondue-components16.js";
|
|
16
|
+
import { Grid as R } from "./fondue-components17.js";
|
|
17
|
+
import { Heading as E } from "./fondue-components18.js";
|
|
18
|
+
import { Label as H } from "./fondue-components19.js";
|
|
19
|
+
import { Link as N } from "./fondue-components20.js";
|
|
20
|
+
import { LoadingBar as j } from "./fondue-components21.js";
|
|
21
|
+
import { LoadingCircle as z } from "./fondue-components22.js";
|
|
22
|
+
import { Notice as K } from "./fondue-components23.js";
|
|
23
|
+
import { OrderableList as Q } from "./fondue-components24.js";
|
|
24
|
+
import { RadioList as V } from "./fondue-components25.js";
|
|
25
|
+
import { RouterProvider as X } from "./fondue-components26.js";
|
|
26
|
+
import { ScrollArea as Z } from "./fondue-components27.js";
|
|
27
|
+
import { Section as $ } from "./fondue-components28.js";
|
|
28
|
+
import { SegmentedControl as ro } from "./fondue-components29.js";
|
|
29
|
+
import { Select as to } from "./fondue-components30.js";
|
|
30
|
+
import { Slider as mo } from "./fondue-components31.js";
|
|
31
|
+
import { SplitButton as fo } from "./fondue-components32.js";
|
|
32
|
+
import { Switch as ao } from "./fondue-components33.js";
|
|
33
|
+
import { Table as no } from "./fondue-components34.js";
|
|
34
|
+
import { Tag as To } from "./fondue-components35.js";
|
|
35
|
+
import { Tabs as uo } from "./fondue-components36.js";
|
|
36
|
+
import { Text as bo } from "./fondue-components37.js";
|
|
37
|
+
import { TextInput as Lo } from "./fondue-components38.js";
|
|
38
|
+
import { Textarea as Bo } from "./fondue-components39.js";
|
|
39
|
+
import { ThemeContext as so, ThemeProvider as Do, useFondueTheme as Po } from "./fondue-components40.js";
|
|
40
|
+
import { Tooltip as Fo } from "./fondue-components41.js";
|
|
40
41
|
export {
|
|
41
42
|
t as Accordion,
|
|
42
43
|
m as Badge,
|
|
43
44
|
f as Box,
|
|
44
45
|
a as Button,
|
|
45
|
-
l as
|
|
46
|
-
c as
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
S as
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
D as
|
|
53
|
-
v as
|
|
54
|
-
w as
|
|
55
|
-
R as
|
|
56
|
-
E as
|
|
57
|
-
H as
|
|
58
|
-
N as
|
|
59
|
-
j as
|
|
60
|
-
z as
|
|
61
|
-
K as
|
|
62
|
-
Q as
|
|
63
|
-
V as
|
|
64
|
-
X as
|
|
65
|
-
Z as
|
|
66
|
-
$ as
|
|
67
|
-
ro as
|
|
68
|
-
to as
|
|
69
|
-
mo as
|
|
70
|
-
fo as
|
|
71
|
-
ao as
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
bo as
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
46
|
+
l as Card,
|
|
47
|
+
c as Checkbox,
|
|
48
|
+
g as ColorPicker,
|
|
49
|
+
k as DatePicker,
|
|
50
|
+
S as Dialog,
|
|
51
|
+
C as Divider,
|
|
52
|
+
h as Dropdown,
|
|
53
|
+
D as EditableText,
|
|
54
|
+
v as Flex,
|
|
55
|
+
w as Flyout,
|
|
56
|
+
R as Grid,
|
|
57
|
+
E as Heading,
|
|
58
|
+
H as Label,
|
|
59
|
+
N as Link,
|
|
60
|
+
j as LoadingBar,
|
|
61
|
+
z as LoadingCircle,
|
|
62
|
+
K as Notice,
|
|
63
|
+
Q as OrderableList,
|
|
64
|
+
V as RadioList,
|
|
65
|
+
X as RouterProvider,
|
|
66
|
+
Z as ScrollArea,
|
|
67
|
+
$ as Section,
|
|
68
|
+
ro as SegmentedControl,
|
|
69
|
+
to as Select,
|
|
70
|
+
mo as Slider,
|
|
71
|
+
fo as SplitButton,
|
|
72
|
+
ao as Switch,
|
|
73
|
+
no as Table,
|
|
74
|
+
uo as Tabs,
|
|
75
|
+
To as Tag,
|
|
76
|
+
bo as Text,
|
|
77
|
+
Lo as TextInput,
|
|
78
|
+
Bo as Textarea,
|
|
79
|
+
so as ThemeContext,
|
|
80
|
+
Do as ThemeProvider,
|
|
81
|
+
Fo as Tooltip,
|
|
82
|
+
Po as useFondueTheme
|
|
81
83
|
};
|
|
82
84
|
//# 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,38 +1,181 @@
|
|
|
1
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
1
|
+
import { jsx as o, jsxs as E } from "react/jsx-runtime";
|
|
2
|
+
import { IconCross as L } from "@frontify/fondue-icons";
|
|
3
|
+
import * as r from "@radix-ui/react-dialog";
|
|
4
|
+
import { createContext as _, forwardRef as d, useRef as k, useContext as G, useMemo as I } from "react";
|
|
5
|
+
import { useSyncRefs as J } from "./fondue-components59.js";
|
|
6
|
+
import { useTranslation as K } from "./fondue-components43.js";
|
|
7
|
+
import { addShowFocusRing as Q, addAutoFocusAttribute as U } from "./fondue-components60.js";
|
|
8
|
+
import { useFondueTheme as V, ThemeProvider as W } from "./fondue-components40.js";
|
|
9
|
+
import s from "./fondue-components61.js";
|
|
10
|
+
const D = _({ isModal: !1 });
|
|
11
|
+
D.displayName = "DialogContext";
|
|
12
|
+
const T = ({ children: t, modal: e, onOpenChange: a, open: i }) => {
|
|
13
|
+
const n = I(() => ({ isModal: e ?? !1 }), [e]);
|
|
14
|
+
return /* @__PURE__ */ o(D.Provider, { value: n, children: /* @__PURE__ */ o(r.Root, { open: i, onOpenChange: a, modal: e, children: t }) });
|
|
15
|
+
};
|
|
16
|
+
T.displayName = "Dialog.Root";
|
|
17
|
+
const R = ({ asChild: t = !0, children: e, "data-test-id": a = "fondue-dialog-trigger" }, i) => /* @__PURE__ */ o(
|
|
18
|
+
r.Trigger,
|
|
19
|
+
{
|
|
20
|
+
onMouseDown: U,
|
|
21
|
+
"data-auto-focus-visible": "true",
|
|
22
|
+
"data-auto-focus-trigger": !0,
|
|
23
|
+
"data-test-id": a,
|
|
24
|
+
asChild: t,
|
|
25
|
+
ref: i,
|
|
26
|
+
children: e
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
R.displayName = "Dialog.Trigger";
|
|
30
|
+
const X = ({ children: t, showUnderlay: e }) => {
|
|
31
|
+
const { isModal: a } = G(D);
|
|
32
|
+
return a ? /* @__PURE__ */ o(r.Overlay, { "data-visible": e, className: s.underlay, children: t }) : /* @__PURE__ */ o("div", { className: s.underlay, "data-visible": e, children: t });
|
|
33
|
+
}, S = ({
|
|
34
|
+
maxWidth: t = "800px",
|
|
35
|
+
minWidth: e = "400px",
|
|
36
|
+
minHeight: a = "200px",
|
|
37
|
+
padding: i = "compact",
|
|
38
|
+
verticalAlign: n = "center",
|
|
39
|
+
"data-test-id": u = "fondue-dialog-content",
|
|
40
|
+
showUnderlay: c = !1,
|
|
41
|
+
rounded: p = !0,
|
|
42
|
+
onEscapeKeyDown: j,
|
|
43
|
+
children: A
|
|
44
|
+
}, H) => {
|
|
45
|
+
const { theme: P, dir: N } = V(), l = k(null);
|
|
46
|
+
J(l, H);
|
|
47
|
+
const B = (z) => {
|
|
48
|
+
var C, v, x;
|
|
49
|
+
z.preventDefault();
|
|
50
|
+
const g = 'button:not([data-tooltip-trigger="true"]), [href], input, select, textarea, [tabindex]:not([tabindex="-1"])', m = (C = l.current) == null ? void 0 : C.querySelector('[data-dialog-layout-component="body"]'), f = (v = l.current) == null ? void 0 : v.querySelector('[data-dialog-layout-component="footer"]'), y = (x = l.current) == null ? void 0 : x.querySelector('[data-dialog-layout-component="header"]'), b = (m == null ? void 0 : m.querySelector(g)) || (f == null ? void 0 : f.querySelector(g)) || (y == null ? void 0 : y.querySelector(g));
|
|
51
|
+
b instanceof HTMLElement && b.focus();
|
|
52
|
+
};
|
|
53
|
+
return /* @__PURE__ */ o(r.Portal, { children: /* @__PURE__ */ o(W, { theme: P, dir: N, children: /* @__PURE__ */ o(X, { showUnderlay: c, children: /* @__PURE__ */ o(
|
|
54
|
+
r.Content,
|
|
55
|
+
{
|
|
56
|
+
style: {
|
|
57
|
+
"--dialog-max-width": t,
|
|
58
|
+
"--dialog-min-width": e,
|
|
59
|
+
"--dialog-min-height": a
|
|
60
|
+
},
|
|
61
|
+
ref: l,
|
|
62
|
+
className: s.content,
|
|
63
|
+
onFocus: Q,
|
|
64
|
+
onOpenAutoFocus: B,
|
|
65
|
+
onEscapeKeyDown: j,
|
|
66
|
+
"data-dialog-padding": i,
|
|
67
|
+
"data-dialog-rounded": p,
|
|
68
|
+
"data-test-id": u,
|
|
69
|
+
"data-dialog-vertical-align": n,
|
|
70
|
+
dir: N,
|
|
71
|
+
children: A
|
|
72
|
+
}
|
|
73
|
+
) }) }) });
|
|
74
|
+
};
|
|
75
|
+
S.displayName = "Dialog.Content";
|
|
76
|
+
const h = ({
|
|
77
|
+
padding: t,
|
|
78
|
+
showBorder: e = !0,
|
|
79
|
+
showCloseButton: a = !0,
|
|
80
|
+
closeProps: i,
|
|
81
|
+
children: n,
|
|
82
|
+
"data-test-id": u = "fondue-dialog-header"
|
|
83
|
+
}, c) => {
|
|
84
|
+
const { t: p } = K();
|
|
85
|
+
return /* @__PURE__ */ E(
|
|
86
|
+
"div",
|
|
87
|
+
{
|
|
88
|
+
"data-test-id": u,
|
|
89
|
+
ref: c,
|
|
90
|
+
className: s.header,
|
|
91
|
+
"data-dialog-header-padding": t,
|
|
92
|
+
"data-show-border": e,
|
|
93
|
+
"data-dialog-layout-component": "header",
|
|
94
|
+
children: [
|
|
95
|
+
/* @__PURE__ */ o("div", { children: n }),
|
|
96
|
+
a && /* @__PURE__ */ o(
|
|
97
|
+
r.Close,
|
|
98
|
+
{
|
|
99
|
+
role: "button",
|
|
100
|
+
"data-test-id": `${u}-close`,
|
|
101
|
+
"aria-label": p("Dialog_close"),
|
|
102
|
+
...i,
|
|
103
|
+
children: /* @__PURE__ */ o(L, { size: 20 })
|
|
104
|
+
}
|
|
105
|
+
)
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
);
|
|
109
|
+
};
|
|
110
|
+
h.displayName = "Dialog.Header";
|
|
111
|
+
const F = ({ padding: t, showBorder: e = !0, children: a, "data-test-id": i = "fondue-dialog-footer" }, n) => /* @__PURE__ */ o(
|
|
112
|
+
"div",
|
|
113
|
+
{
|
|
114
|
+
"data-test-id": i,
|
|
115
|
+
ref: n,
|
|
116
|
+
className: s.footer,
|
|
117
|
+
"data-dialog-footer-padding": t,
|
|
118
|
+
"data-show-border": e,
|
|
119
|
+
"data-dialog-layout-component": "footer",
|
|
120
|
+
children: a
|
|
32
121
|
}
|
|
33
122
|
);
|
|
34
|
-
|
|
123
|
+
F.displayName = "Dialog.Footer";
|
|
124
|
+
const q = ({ padding: t, children: e, "data-test-id": a = "fondue-dialog-body" }, i) => /* @__PURE__ */ o(
|
|
125
|
+
"div",
|
|
126
|
+
{
|
|
127
|
+
"data-test-id": a,
|
|
128
|
+
ref: i,
|
|
129
|
+
className: s.body,
|
|
130
|
+
"data-dialog-body-padding": t,
|
|
131
|
+
"data-dialog-layout-component": "body",
|
|
132
|
+
children: e
|
|
133
|
+
}
|
|
134
|
+
);
|
|
135
|
+
q.displayName = "Dialog.Body";
|
|
136
|
+
const w = ({ children: t, "data-test-id": e = "fondue-dialog-side-content" }, a) => /* @__PURE__ */ o("div", { "data-test-id": e, ref: a, className: s.sideContent, "data-dialog-layout-component": !0, children: t });
|
|
137
|
+
w.displayName = "Dialog.SideContent";
|
|
138
|
+
const M = ({ children: t }) => /* @__PURE__ */ o(r.Close, { asChild: !0, children: t });
|
|
139
|
+
M.displayName = "Dialog.Close";
|
|
140
|
+
const O = ({ children: t, asChild: e, screenReaderOnly: a = !1 }) => a && !e ? /* @__PURE__ */ o(r.Title, { asChild: !0, children: /* @__PURE__ */ o("span", { className: s.screenReaderOnly, children: t }) }) : a && e ? /* @__PURE__ */ o(r.Title, { asChild: !0, children: typeof t == "object" && t && "props" in t ? {
|
|
141
|
+
...t,
|
|
142
|
+
props: {
|
|
143
|
+
...t.props,
|
|
144
|
+
className: `${t.props.className || ""} ${s.screenReaderOnly}`.trim()
|
|
145
|
+
}
|
|
146
|
+
} : t }) : /* @__PURE__ */ o(r.Title, { asChild: e, children: t });
|
|
147
|
+
O.displayName = "Dialog.Title";
|
|
148
|
+
const $ = ({ children: t, asChild: e, screenReaderOnly: a = !1 }) => a && !e ? /* @__PURE__ */ o(r.Description, { asChild: !0, children: /* @__PURE__ */ o("span", { className: s.screenReaderOnly, children: t }) }) : a && e ? /* @__PURE__ */ o(r.Description, { asChild: !0, children: typeof t == "object" && t && "props" in t ? {
|
|
149
|
+
...t,
|
|
150
|
+
props: {
|
|
151
|
+
...t.props,
|
|
152
|
+
className: `${t.props.className || ""} ${s.screenReaderOnly}`.trim()
|
|
153
|
+
}
|
|
154
|
+
} : t }) : /* @__PURE__ */ o(r.Description, { asChild: e, children: t });
|
|
155
|
+
$.displayName = "Dialog.Description";
|
|
156
|
+
const st = {
|
|
157
|
+
Root: T,
|
|
158
|
+
Title: O,
|
|
159
|
+
Description: $,
|
|
160
|
+
Close: M,
|
|
161
|
+
Trigger: d(R),
|
|
162
|
+
Content: d(S),
|
|
163
|
+
Header: d(h),
|
|
164
|
+
Footer: d(F),
|
|
165
|
+
Body: d(q),
|
|
166
|
+
SideContent: d(w)
|
|
167
|
+
};
|
|
35
168
|
export {
|
|
36
|
-
|
|
169
|
+
st as Dialog,
|
|
170
|
+
q as DialogBody,
|
|
171
|
+
M as DialogClose,
|
|
172
|
+
S as DialogContent,
|
|
173
|
+
$ as DialogDescription,
|
|
174
|
+
F as DialogFooter,
|
|
175
|
+
h as DialogHeader,
|
|
176
|
+
T as DialogRoot,
|
|
177
|
+
w as DialogSideContent,
|
|
178
|
+
O as DialogTitle,
|
|
179
|
+
R as DialogTrigger
|
|
37
180
|
};
|
|
38
181
|
//# sourceMappingURL=fondue-components10.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components10.js","sources":["../src/components/Divider/Divider.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport * as Separator from '@radix-ui/react-separator';\nimport { forwardRef, type ForwardedRef, type ReactElement } from 'react';\n\nimport styles from './styles/divider.module.scss';\n\ntype DividerStyle = 'noline' | 'dashed' | 'solid';\ntype DividerPadding = 'none' | 'small' | 'medium' | 'large';\ntype DividerDirection = 'horizontal' | 'vertical';\ntype DividerColor = 'weak' | 'default' | 'strong';\n\nexport type DividerProps = {\n /**\n * The style of the divider\n * @default \"solid\"\n */\n variant?: DividerStyle;\n /**\n * The padding of the divider\n * @default \"medium\"\n */\n padding?: DividerPadding;\n /**\n * The color of the divider\n * @default \"default\"\n */\n color?: DividerColor;\n /**\n * The direction of the divider\n * @default \"horizontal\"\n */\n direction?: DividerDirection;\n /**\n * The html element to be used\n * @default \"div\"\n */\n as?: 'div' | 'li';\n /**\n * When `true`, signifies that it is purely visual, carries no semantic\n * meaning, and ensures it is not present in the accessibility tree.\n * @default false\n */\n decorative?: boolean;\n 'data-test-id'?: string;\n className?: string;\n};\n\nexport const Divider = forwardRef<HTMLDivElement, DividerProps>(\n (\n {\n 'data-test-id': dataTestId = 'fondue-divider',\n direction = 'horizontal',\n padding = 'medium',\n className = '',\n variant = 'solid',\n color = 'default',\n as = 'div',\n decorative,\n }: DividerProps,\n ref: ForwardedRef<HTMLDivElement | null>,\n ): ReactElement => {\n const Component = as;\n\n return (\n <Separator.Root\n ref={ref}\n className={[styles.root, className].filter(Boolean).join(' ')}\n data-variant={variant}\n data-color={color}\n data-padding={padding}\n data-test-id={dataTestId}\n decorative={decorative}\n data-orientation={direction}\n asChild\n >\n <Component />\n </Separator.Root>\n );\n },\n);\n\nDivider.displayName = 'Divider';\n"],"names":["Divider","forwardRef","dataTestId","direction","padding","className","variant","color","as","decorative","ref","Component","jsx","Separator","styles"],"mappings":";;;;AAgDO,MAAMA,IAAUC;AAAA,EACnB,CACI;AAAA,IACI,gBAAgBC,IAAa;AAAA,IAC7B,WAAAC,IAAY;AAAA,IACZ,SAAAC,IAAU;AAAA,IACV,WAAAC,IAAY;AAAA,IACZ,SAAAC,IAAU;AAAA,IACV,OAAAC,IAAQ;AAAA,IACR,IAAAC,IAAK;AAAA,IACL,YAAAC;AAAA,EAAA,GAEJC,MACe;AACf,UAAMC,IAAYH;AAElB,WACI,gBAAAI;AAAA,MAACC,EAAU;AAAA,MAAV;AAAA,QACG,KAAAH;AAAA,QACA,WAAW,CAACI,EAAO,MAAMT,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,QAC5D,gBAAcC;AAAA,QACd,cAAYC;AAAA,QACZ,gBAAcH;AAAA,QACd,gBAAcF;AAAA,QACd,YAAAO;AAAA,QACA,oBAAkBN;AAAA,QAClB,SAAO;AAAA,QAEP,4BAACQ,GAAA,CAAA,CAAU;AAAA,MAAA;AAAA,IAAA;AAAA,EAGvB;AACJ;AAEAX,EAAQ,cAAc;"}
|
|
1
|
+
{"version":3,"file":"fondue-components10.js","sources":["../src/components/Dialog/Dialog.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCross } from '@frontify/fondue-icons';\nimport * as RadixDialog from '@radix-ui/react-dialog';\nimport {\n createContext,\n forwardRef,\n useContext,\n useMemo,\n useRef,\n type CSSProperties,\n type ForwardedRef,\n type ReactNode,\n} from 'react';\n\nimport { type CommonAriaProps } from '#/helpers/aria';\nimport { useSyncRefs } from '#/hooks/useSyncRefs';\nimport { useTranslation } from '#/hooks/useTranslation';\nimport { addAutoFocusAttribute, addShowFocusRing } from '#/utilities/domUtilities';\n\nimport { ThemeProvider, useFondueTheme } from '../ThemeProvider/ThemeProvider';\n\nimport styles from './styles/dialog.module.scss';\n\nexport type DialogRootProps = {\n /**\n * Disable interaction with the rest of the page\n * @default false\n */\n modal?: boolean;\n /**\n * The controlled `open` state of the dialog\n * @default false\n */\n open?: boolean;\n /**\n * Event handler called when the `open` state changes\n */\n onOpenChange?: (open: boolean) => void;\n children?: ReactNode;\n};\n\nexport type DialogContentProps = {\n /**\n * Add rounded corners to the dialog\n * @default true\n */\n rounded?: boolean;\n /**\n * Define the padding of the dialog\n * @default \"compact\"\n */\n padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n /**\n * The vertical alignment of the divider\n * @default \"center\"\n */\n verticalAlign?: 'top' | 'center';\n\n /**\n * Define a maximum width for the dialog\n * @default \"800px\"\n */\n maxWidth?: string;\n /**\n * Define a minimum width for the dialog\n * @default \"400px\"\n */\n minWidth?: string;\n /**\n * Define a minimum height for the dialog\n * @default \"200px\"\n */\n minHeight?: string;\n /**\n * Show a dark underlay behind the dialog\n * @default false\n */\n showUnderlay?: boolean;\n /**\n * Event handler called when the escape key is pressed.\n */\n onEscapeKeyDown?: (event: KeyboardEvent) => void;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type DialogTriggerProps = {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default true\n */\n asChild?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type DialogHeaderProps = {\n /**\n * Define the padding for the dialog header\n */\n padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n /**\n * Show a border at the bottom of the header\n * @default true\n */\n showBorder?: boolean;\n /**\n * Show a close button in the header\n * @default true\n */\n showCloseButton?: boolean;\n closeProps?: CommonAriaProps;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type DialogFooterProps = {\n /**\n * Define the padding for the dialog footer\n */\n padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n /**\n * Show a border at the top of the footer\n * @default true\n */\n showBorder?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type DialogBodyProps = {\n /**\n * Define the padding for the dialog body\n */\n padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type DialogSideContentProps = { children?: ReactNode; 'data-test-id'?: string };\n\nexport type DialogCloseProps = { children?: ReactNode };\n\nexport type DialogAnnouncementProps = {\n children?: ReactNode;\n asChild?: boolean;\n /**\n * Visually hide the element while keeping it accessible to screen readers\n * @default false\n */\n screenReaderOnly?: boolean;\n};\n\ntype DialogContextType = {\n isModal: boolean;\n};\n\nconst DialogContext = createContext<DialogContextType>({ isModal: false });\nDialogContext.displayName = 'DialogContext';\n\nexport const DialogRoot = ({ children, modal, onOpenChange, open }: DialogRootProps) => {\n const value = useMemo(() => ({ isModal: modal ?? false }), [modal]);\n\n return (\n <DialogContext.Provider value={value}>\n <RadixDialog.Root open={open} onOpenChange={onOpenChange} modal={modal}>\n {children}\n </RadixDialog.Root>\n </DialogContext.Provider>\n );\n};\nDialogRoot.displayName = 'Dialog.Root';\n\nexport const DialogTrigger = (\n { asChild = true, children, 'data-test-id': dataTestId = 'fondue-dialog-trigger' }: DialogTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixDialog.Trigger\n onMouseDown={addAutoFocusAttribute}\n data-auto-focus-visible=\"true\"\n data-auto-focus-trigger\n data-test-id={dataTestId}\n asChild={asChild}\n ref={ref}\n >\n {children}\n </RadixDialog.Trigger>\n );\n};\nDialogTrigger.displayName = 'Dialog.Trigger';\n\nconst DialogUnderlay = ({ children, showUnderlay }: { children: ReactNode; showUnderlay: boolean }) => {\n const { isModal } = useContext(DialogContext);\n if (isModal) {\n return (\n <RadixDialog.Overlay data-visible={showUnderlay} className={styles.underlay}>\n {children}\n </RadixDialog.Overlay>\n );\n }\n return (\n <div className={styles.underlay} data-visible={showUnderlay}>\n {children}\n </div>\n );\n};\n\nexport const DialogContent = (\n {\n maxWidth = '800px',\n minWidth = '400px',\n minHeight = '200px',\n padding = 'compact',\n verticalAlign = 'center',\n 'data-test-id': dataTestId = 'fondue-dialog-content',\n showUnderlay = false,\n rounded = true,\n onEscapeKeyDown,\n children,\n }: DialogContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const { theme, dir } = useFondueTheme();\n const contentRef = useRef<HTMLDivElement>(null);\n\n useSyncRefs<HTMLDivElement>(contentRef, ref);\n\n const handleOpenAutoFocus = (event: Event) => {\n event.preventDefault();\n\n const focusableSelector =\n 'button:not([data-tooltip-trigger=\"true\"]), [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])';\n\n // Try to find focusable element in order: body -> footer -> header\n const dialogBody = contentRef.current?.querySelector('[data-dialog-layout-component=\"body\"]');\n const dialogFooter = contentRef.current?.querySelector('[data-dialog-layout-component=\"footer\"]');\n const dialogHeader = contentRef.current?.querySelector('[data-dialog-layout-component=\"header\"]');\n\n const firstFocusable =\n dialogBody?.querySelector(focusableSelector) ||\n dialogFooter?.querySelector(focusableSelector) ||\n dialogHeader?.querySelector(focusableSelector);\n\n if (firstFocusable instanceof HTMLElement) {\n firstFocusable.focus();\n }\n };\n\n return (\n <RadixDialog.Portal>\n <ThemeProvider theme={theme} dir={dir}>\n <DialogUnderlay showUnderlay={showUnderlay}>\n <RadixDialog.Content\n style={\n {\n '--dialog-max-width': maxWidth,\n '--dialog-min-width': minWidth,\n '--dialog-min-height': minHeight,\n } as CSSProperties\n }\n ref={contentRef}\n className={styles.content}\n onFocus={addShowFocusRing}\n onOpenAutoFocus={handleOpenAutoFocus}\n onEscapeKeyDown={onEscapeKeyDown}\n data-dialog-padding={padding}\n data-dialog-rounded={rounded}\n data-test-id={dataTestId}\n data-dialog-vertical-align={verticalAlign}\n dir={dir}\n >\n {children}\n </RadixDialog.Content>\n </DialogUnderlay>\n </ThemeProvider>\n </RadixDialog.Portal>\n );\n};\nDialogContent.displayName = 'Dialog.Content';\n\nexport const DialogHeader = (\n {\n padding,\n showBorder = true,\n showCloseButton = true,\n closeProps,\n children,\n 'data-test-id': dataTestId = 'fondue-dialog-header',\n }: DialogHeaderProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const { t } = useTranslation();\n\n return (\n <div\n data-test-id={dataTestId}\n ref={ref}\n className={styles.header}\n data-dialog-header-padding={padding}\n data-show-border={showBorder}\n data-dialog-layout-component=\"header\"\n >\n <div>{children}</div>\n {showCloseButton && (\n <RadixDialog.Close\n role=\"button\"\n data-test-id={`${dataTestId}-close`}\n aria-label={t('Dialog_close')}\n {...closeProps}\n >\n <IconCross size={20} />\n </RadixDialog.Close>\n )}\n </div>\n );\n};\nDialogHeader.displayName = 'Dialog.Header';\n\nexport const DialogFooter = (\n { padding, showBorder = true, children, 'data-test-id': dataTestId = 'fondue-dialog-footer' }: DialogFooterProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div\n data-test-id={dataTestId}\n ref={ref}\n className={styles.footer}\n data-dialog-footer-padding={padding}\n data-show-border={showBorder}\n data-dialog-layout-component=\"footer\"\n >\n {children}\n </div>\n );\n};\nDialogFooter.displayName = 'Dialog.Footer';\n\nexport const DialogBody = (\n { padding, children, 'data-test-id': dataTestId = 'fondue-dialog-body' }: DialogBodyProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div\n data-test-id={dataTestId}\n ref={ref}\n className={styles.body}\n data-dialog-body-padding={padding}\n data-dialog-layout-component=\"body\"\n >\n {children}\n </div>\n );\n};\nDialogBody.displayName = 'Dialog.Body';\n\nexport const DialogSideContent = (\n { children, 'data-test-id': dataTestId = 'fondue-dialog-side-content' }: DialogSideContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} className={styles.sideContent} data-dialog-layout-component>\n {children}\n </div>\n );\n};\nDialogSideContent.displayName = 'Dialog.SideContent';\n\nexport const DialogClose = ({ children }: DialogCloseProps) => {\n return <RadixDialog.Close asChild>{children}</RadixDialog.Close>;\n};\nDialogClose.displayName = 'Dialog.Close';\n\nexport const DialogTitle = ({ children, asChild, screenReaderOnly = false }: DialogAnnouncementProps) => {\n if (screenReaderOnly && !asChild) {\n return (\n <RadixDialog.Title asChild>\n <span className={styles.screenReaderOnly}>{children}</span>\n </RadixDialog.Title>\n );\n }\n\n if (screenReaderOnly && asChild) {\n // When using asChild with screenReaderOnly, apply className to the child\n return (\n <RadixDialog.Title asChild>\n {typeof children === 'object' && children && 'props' in children\n ? {\n ...children,\n props: {\n ...children.props,\n className: `${children.props.className || ''} ${styles.screenReaderOnly}`.trim(),\n },\n }\n : children}\n </RadixDialog.Title>\n );\n }\n\n return <RadixDialog.Title asChild={asChild}>{children}</RadixDialog.Title>;\n};\nDialogTitle.displayName = 'Dialog.Title';\n\nexport const DialogDescription = ({ children, asChild, screenReaderOnly = false }: DialogAnnouncementProps) => {\n if (screenReaderOnly && !asChild) {\n return (\n <RadixDialog.Description asChild>\n <span className={styles.screenReaderOnly}>{children}</span>\n </RadixDialog.Description>\n );\n }\n\n if (screenReaderOnly && asChild) {\n // When using asChild with screenReaderOnly, apply className to the child\n return (\n <RadixDialog.Description asChild>\n {typeof children === 'object' && children && 'props' in children\n ? {\n ...children,\n props: {\n ...children.props,\n className: `${children.props.className || ''} ${styles.screenReaderOnly}`.trim(),\n },\n }\n : children}\n </RadixDialog.Description>\n );\n }\n\n return <RadixDialog.Description asChild={asChild}>{children}</RadixDialog.Description>;\n};\nDialogDescription.displayName = 'Dialog.Description';\n\nexport const Dialog = {\n Root: DialogRoot,\n Title: DialogTitle,\n Description: DialogDescription,\n Close: DialogClose,\n Trigger: forwardRef<HTMLButtonElement, DialogTriggerProps>(DialogTrigger),\n Content: forwardRef<HTMLDivElement, DialogContentProps>(DialogContent),\n Header: forwardRef<HTMLDivElement, DialogHeaderProps>(DialogHeader),\n Footer: forwardRef<HTMLDivElement, DialogFooterProps>(DialogFooter),\n Body: forwardRef<HTMLDivElement, DialogBodyProps>(DialogBody),\n SideContent: forwardRef<HTMLDivElement, DialogSideContentProps>(DialogSideContent),\n};\n"],"names":["DialogContext","createContext","DialogRoot","children","modal","onOpenChange","open","value","useMemo","jsx","RadixDialog","DialogTrigger","asChild","dataTestId","ref","addAutoFocusAttribute","DialogUnderlay","showUnderlay","isModal","useContext","styles","DialogContent","maxWidth","minWidth","minHeight","padding","verticalAlign","rounded","onEscapeKeyDown","theme","dir","useFondueTheme","contentRef","useRef","useSyncRefs","handleOpenAutoFocus","event","focusableSelector","dialogBody","_a","dialogFooter","_b","dialogHeader","_c","firstFocusable","ThemeProvider","addShowFocusRing","DialogHeader","showBorder","showCloseButton","closeProps","t","useTranslation","jsxs","IconCross","DialogFooter","DialogBody","DialogSideContent","DialogClose","DialogTitle","screenReaderOnly","DialogDescription","Dialog","forwardRef"],"mappings":";;;;;;;;;AA8JA,MAAMA,IAAgBC,EAAiC,EAAE,SAAS,IAAO;AACzED,EAAc,cAAc;AAErB,MAAME,IAAa,CAAC,EAAE,UAAAC,GAAU,OAAAC,GAAO,cAAAC,GAAc,MAAAC,QAA4B;AACpF,QAAMC,IAAQC,EAAQ,OAAO,EAAE,SAASJ,KAAS,GAAA,IAAU,CAACA,CAAK,CAAC;AAElE,SACI,gBAAAK,EAACT,EAAc,UAAd,EAAuB,OAAAO,GACpB,UAAA,gBAAAE,EAACC,EAAY,MAAZ,EAAiB,MAAAJ,GAAY,cAAAD,GAA4B,OAAAD,GACrD,UAAAD,GACL,GACJ;AAER;AACAD,EAAW,cAAc;AAElB,MAAMS,IAAgB,CACzB,EAAE,SAAAC,IAAU,IAAM,UAAAT,GAAU,gBAAgBU,IAAa,wBAAA,GACzDC,MAGI,gBAAAL;AAAA,EAACC,EAAY;AAAA,EAAZ;AAAA,IACG,aAAaK;AAAA,IACb,2BAAwB;AAAA,IACxB,2BAAuB;AAAA,IACvB,gBAAcF;AAAA,IACd,SAAAD;AAAA,IACA,KAAAE;AAAA,IAEC,UAAAX;AAAA,EAAA;AAAA;AAIbQ,EAAc,cAAc;AAE5B,MAAMK,IAAiB,CAAC,EAAE,UAAAb,GAAU,cAAAc,QAAmE;AACnG,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAWnB,CAAa;AAC5C,SAAIkB,IAEI,gBAAAT,EAACC,EAAY,SAAZ,EAAoB,gBAAcO,GAAc,WAAWG,EAAO,UAC9D,UAAAjB,GACL,sBAIH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|
|
9
|
-
sortIndicator: l,
|
|
10
|
-
body: c,
|
|
11
|
-
buttonText: r
|
|
12
|
-
};
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as d } from "react";
|
|
3
|
+
import m from "./fondue-components134.js";
|
|
4
|
+
const t = ({ children: e, name: o, "data-test-id": r = "fondue-select-slot", ...a }, s) => /* @__PURE__ */ l("div", { "data-test-id": r, ref: s, className: m.slot, "data-name": o, ...a, children: e });
|
|
5
|
+
t.displayName = "Select.Slot";
|
|
6
|
+
const S = d(t);
|
|
13
7
|
export {
|
|
14
|
-
|
|
15
|
-
|
|
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
|
|
8
|
+
S as ForwardedRefSelectSlot,
|
|
9
|
+
t as SelectSlot
|
|
25
10
|
};
|
|
26
11
|
//# sourceMappingURL=fondue-components100.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components100.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fondue-components100.js","sources":["../src/components/Select/components/SelectSlot.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { forwardRef, type ForwardedRef, type ReactNode } from 'react';\n\nimport styles from '../styles/select.module.scss';\n\nexport type SelectSlotProps = {\n /**\n * The children of the select slot. This can be a custom component.\n */\n children?: ReactNode;\n /**\n * The slot name that is used to determine the placement.\n */\n name: 'menu' | 'left' | 'right' | 'clear';\n /**\n * The data test id of the select slot.\n */\n 'data-test-id'?: string;\n};\n\nexport const SelectSlot = (\n { children, name, 'data-test-id': dataTestId = 'fondue-select-slot', ...props }: SelectSlotProps,\n forwardedRef: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={forwardedRef} className={styles.slot} data-name={name} {...props}>\n {children}\n </div>\n );\n};\nSelectSlot.displayName = 'Select.Slot';\n\nexport const ForwardedRefSelectSlot = forwardRef<HTMLDivElement, SelectSlotProps>(SelectSlot);\n"],"names":["SelectSlot","children","name","dataTestId","props","forwardedRef","jsx","styles","ForwardedRefSelectSlot","forwardRef"],"mappings":";;;AAqBO,MAAMA,IAAa,CACtB,EAAE,UAAAC,GAAU,MAAAC,GAAM,gBAAgBC,IAAa,sBAAsB,GAAGC,EAAA,GACxEC,MAGI,gBAAAC,EAAC,OAAA,EAAI,gBAAcH,GAAY,KAAKE,GAAc,WAAWE,EAAO,MAAM,aAAWL,GAAO,GAAGE,GAC1F,UAAAH,GACL;AAGRD,EAAW,cAAc;AAElB,MAAMQ,IAAyBC,EAA4CT,CAAU;"}
|
|
@@ -1,37 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
}
|
|
1
|
+
const t = "_root_1x5sc_5", c = "_thumb_1x5sc_17", o = "_track_1x5sc_21", s = "_range_1x5sc_28", _ = {
|
|
2
|
+
root: t,
|
|
3
|
+
thumb: c,
|
|
4
|
+
track: o,
|
|
5
|
+
range: s
|
|
6
|
+
};
|
|
33
7
|
export {
|
|
34
|
-
|
|
35
|
-
|
|
8
|
+
_ as default,
|
|
9
|
+
s as range,
|
|
10
|
+
t as root,
|
|
11
|
+
c as thumb,
|
|
12
|
+
o as track
|
|
36
13
|
};
|
|
37
14
|
//# sourceMappingURL=fondue-components101.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components101.js","sources":[
|
|
1
|
+
{"version":3,"file":"fondue-components101.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
const
|
|
2
|
-
root:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
const t = "_root_gywoe_3", o = "_content_gywoe_18", n = "_action_gywoe_22", c = "_actionButton_gywoe_200", _ = {
|
|
2
|
+
root: t,
|
|
3
|
+
content: o,
|
|
4
|
+
action: n,
|
|
5
|
+
actionButton: c
|
|
6
6
|
};
|
|
7
7
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
n as action,
|
|
9
|
+
c as actionButton,
|
|
10
|
+
o as content,
|
|
11
|
+
_ as default,
|
|
12
|
+
t as root
|
|
13
13
|
};
|
|
14
14
|
//# sourceMappingURL=fondue-components102.js.map
|
|
@@ -1,71 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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))
|
|
9
|
-
return;
|
|
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
|
-
};
|
|
1
|
+
const t = "_root_2ej9d_5", o = "_thumb_2ej9d_62", s = {
|
|
2
|
+
root: t,
|
|
3
|
+
thumb: o
|
|
67
4
|
};
|
|
68
5
|
export {
|
|
69
|
-
|
|
6
|
+
s as default,
|
|
7
|
+
t as root,
|
|
8
|
+
o as thumb
|
|
70
9
|
};
|
|
71
10
|
//# sourceMappingURL=fondue-components103.js.map
|