jynko-kit 0.0.0-stage → 1.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/README.md +110 -2
- package/dist/components/atoms/AAvatar/AAvatar.d.ts +12 -0
- package/dist/components/atoms/AAvatar/AAvatar.d.ts.map +1 -0
- package/dist/components/atoms/AAvatar/AAvatar.styles.d.ts +7 -0
- package/dist/components/atoms/AAvatar/AAvatar.styles.d.ts.map +1 -0
- package/dist/components/atoms/AAvatar/index.d.ts +3 -0
- package/dist/components/atoms/AAvatar/index.d.ts.map +1 -0
- package/dist/components/atoms/AAvatar/types.d.ts +2 -0
- package/dist/components/atoms/AAvatar/types.d.ts.map +1 -0
- package/dist/components/atoms/ABadge/ABadge.d.ts +10 -0
- package/dist/components/atoms/ABadge/ABadge.d.ts.map +1 -0
- package/dist/components/atoms/ABadge/ABadge.styles.d.ts +8 -0
- package/dist/components/atoms/ABadge/ABadge.styles.d.ts.map +1 -0
- package/dist/components/atoms/ABadge/index.d.ts +3 -0
- package/dist/components/atoms/ABadge/index.d.ts.map +1 -0
- package/dist/components/atoms/ABadge/types.d.ts +3 -0
- package/dist/components/atoms/ABadge/types.d.ts.map +1 -0
- package/dist/components/atoms/AButton/AButton.d.ts +10 -0
- package/dist/components/atoms/AButton/AButton.d.ts.map +1 -0
- package/dist/components/atoms/AButton/AButton.styles.d.ts +15 -0
- package/dist/components/atoms/AButton/AButton.styles.d.ts.map +1 -0
- package/dist/components/atoms/AButton/index.d.ts +3 -0
- package/dist/components/atoms/AButton/index.d.ts.map +1 -0
- package/dist/components/atoms/AButton/types.d.ts +2 -0
- package/dist/components/atoms/AButton/types.d.ts.map +1 -0
- package/dist/components/atoms/AIcon/AIcon.d.ts +12 -0
- package/dist/components/atoms/AIcon/AIcon.d.ts.map +1 -0
- package/dist/components/atoms/AIcon/AIcon.styles.d.ts +8 -0
- package/dist/components/atoms/AIcon/AIcon.styles.d.ts.map +1 -0
- package/dist/components/atoms/AIcon/index.d.ts +3 -0
- package/dist/components/atoms/AIcon/index.d.ts.map +1 -0
- package/dist/components/atoms/AIconButton/AIconButton.d.ts +17 -0
- package/dist/components/atoms/AIconButton/AIconButton.d.ts.map +1 -0
- package/dist/components/atoms/AIconButton/AIconButton.styles.d.ts +11 -0
- package/dist/components/atoms/AIconButton/AIconButton.styles.d.ts.map +1 -0
- package/dist/components/atoms/AIconButton/index.d.ts +3 -0
- package/dist/components/atoms/AIconButton/index.d.ts.map +1 -0
- package/dist/components/atoms/AIconLink/AIconLink.d.ts +17 -0
- package/dist/components/atoms/AIconLink/AIconLink.d.ts.map +1 -0
- package/dist/components/atoms/AIconLink/AIconLink.styles.d.ts +11 -0
- package/dist/components/atoms/AIconLink/AIconLink.styles.d.ts.map +1 -0
- package/dist/components/atoms/AIconLink/index.d.ts +3 -0
- package/dist/components/atoms/AIconLink/index.d.ts.map +1 -0
- package/dist/components/atoms/AInput/AInput.d.ts +11 -0
- package/dist/components/atoms/AInput/AInput.d.ts.map +1 -0
- package/dist/components/atoms/AInput/AInput.styles.d.ts +26 -0
- package/dist/components/atoms/AInput/AInput.styles.d.ts.map +1 -0
- package/dist/components/atoms/AInput/index.d.ts +3 -0
- package/dist/components/atoms/AInput/index.d.ts.map +1 -0
- package/dist/components/atoms/ALink/ALink.d.ts +11 -0
- package/dist/components/atoms/ALink/ALink.d.ts.map +1 -0
- package/dist/components/atoms/ALink/ALink.styles.d.ts +8 -0
- package/dist/components/atoms/ALink/ALink.styles.d.ts.map +1 -0
- package/dist/components/atoms/ALink/index.d.ts +3 -0
- package/dist/components/atoms/ALink/index.d.ts.map +1 -0
- package/dist/components/atoms/ALogo/ALogo.d.ts +4 -0
- package/dist/components/atoms/ALogo/ALogo.d.ts.map +1 -0
- package/dist/components/atoms/ALogo/ALogo.styles.d.ts +9 -0
- package/dist/components/atoms/ALogo/ALogo.styles.d.ts.map +1 -0
- package/dist/components/atoms/ALogo/index.d.ts +3 -0
- package/dist/components/atoms/ALogo/index.d.ts.map +1 -0
- package/dist/components/atoms/ALogo/types.d.ts +8 -0
- package/dist/components/atoms/ALogo/types.d.ts.map +1 -0
- package/dist/components/atoms/ASearchInput/ASearchInput.d.ts +16 -0
- package/dist/components/atoms/ASearchInput/ASearchInput.d.ts.map +1 -0
- package/dist/components/atoms/ASearchInput/ASearchInput.styles.d.ts +22 -0
- package/dist/components/atoms/ASearchInput/ASearchInput.styles.d.ts.map +1 -0
- package/dist/components/atoms/ASearchInput/index.d.ts +3 -0
- package/dist/components/atoms/ASearchInput/index.d.ts.map +1 -0
- package/dist/components/atoms/ASection/ASection.d.ts +6 -0
- package/dist/components/atoms/ASection/ASection.d.ts.map +1 -0
- package/dist/components/atoms/ASection/ASection.styles.d.ts +6 -0
- package/dist/components/atoms/ASection/ASection.styles.d.ts.map +1 -0
- package/dist/components/atoms/ASection/index.d.ts +3 -0
- package/dist/components/atoms/ASection/index.d.ts.map +1 -0
- package/dist/components/atoms/ASelect/ASelect.d.ts +19 -0
- package/dist/components/atoms/ASelect/ASelect.d.ts.map +1 -0
- package/dist/components/atoms/ASelect/ASelect.styles.d.ts +38 -0
- package/dist/components/atoms/ASelect/ASelect.styles.d.ts.map +1 -0
- package/dist/components/atoms/ASelect/index.d.ts +3 -0
- package/dist/components/atoms/ASelect/index.d.ts.map +1 -0
- package/dist/components/atoms/ATextarea/ATextarea.d.ts +11 -0
- package/dist/components/atoms/ATextarea/ATextarea.d.ts.map +1 -0
- package/dist/components/atoms/ATextarea/ATextarea.styles.d.ts +20 -0
- package/dist/components/atoms/ATextarea/ATextarea.styles.d.ts.map +1 -0
- package/dist/components/atoms/ATextarea/index.d.ts +3 -0
- package/dist/components/atoms/ATextarea/index.d.ts.map +1 -0
- package/dist/components/atoms/ATypography/ATypography.d.ts +8 -0
- package/dist/components/atoms/ATypography/ATypography.d.ts.map +1 -0
- package/dist/components/atoms/ATypography/ATypography.styles.d.ts +8 -0
- package/dist/components/atoms/ATypography/ATypography.styles.d.ts.map +1 -0
- package/dist/components/atoms/ATypography/index.d.ts +3 -0
- package/dist/components/atoms/ATypography/index.d.ts.map +1 -0
- package/dist/components/atoms/index.d.ts +29 -0
- package/dist/components/atoms/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +7 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/molecules/MModal/MModal.d.ts +4 -0
- package/dist/components/molecules/MModal/MModal.d.ts.map +1 -0
- package/dist/components/molecules/MModal/MModal.styles.d.ts +19 -0
- package/dist/components/molecules/MModal/MModal.styles.d.ts.map +1 -0
- package/dist/components/molecules/MModal/index.d.ts +3 -0
- package/dist/components/molecules/MModal/index.d.ts.map +1 -0
- package/dist/components/molecules/MModal/types.d.ts +10 -0
- package/dist/components/molecules/MModal/types.d.ts.map +1 -0
- package/dist/components/molecules/MNavLinks/MNavLinks.d.ts +8 -0
- package/dist/components/molecules/MNavLinks/MNavLinks.d.ts.map +1 -0
- package/dist/components/molecules/MNavLinks/MNavLinks.styles.d.ts +7 -0
- package/dist/components/molecules/MNavLinks/MNavLinks.styles.d.ts.map +1 -0
- package/dist/components/molecules/MNavLinks/index.d.ts +3 -0
- package/dist/components/molecules/MNavLinks/index.d.ts.map +1 -0
- package/dist/components/molecules/MNavLinks/types.d.ts +22 -0
- package/dist/components/molecules/MNavLinks/types.d.ts.map +1 -0
- package/dist/components/molecules/MUserBadge/MUserBadge.d.ts +4 -0
- package/dist/components/molecules/MUserBadge/MUserBadge.d.ts.map +1 -0
- package/dist/components/molecules/MUserBadge/MUserBadge.styles.d.ts +4 -0
- package/dist/components/molecules/MUserBadge/MUserBadge.styles.d.ts.map +1 -0
- package/dist/components/molecules/MUserBadge/index.d.ts +3 -0
- package/dist/components/molecules/MUserBadge/index.d.ts.map +1 -0
- package/dist/components/molecules/MUserBadge/types.d.ts +11 -0
- package/dist/components/molecules/MUserBadge/types.d.ts.map +1 -0
- package/dist/components/molecules/index.d.ts +7 -0
- package/dist/components/molecules/index.d.ts.map +1 -0
- package/dist/components/organisms/OSidebar/OSidebar.d.ts +13 -0
- package/dist/components/organisms/OSidebar/OSidebar.d.ts.map +1 -0
- package/dist/components/organisms/OSidebar/OSidebar.styles.d.ts +22 -0
- package/dist/components/organisms/OSidebar/OSidebar.styles.d.ts.map +1 -0
- package/dist/components/organisms/OSidebar/index.d.ts +3 -0
- package/dist/components/organisms/OSidebar/index.d.ts.map +1 -0
- package/dist/components/organisms/OSidebar/types.d.ts +9 -0
- package/dist/components/organisms/OSidebar/types.d.ts.map +1 -0
- package/dist/components/organisms/OUserCamera/OUserCamera.d.ts +4 -0
- package/dist/components/organisms/OUserCamera/OUserCamera.d.ts.map +1 -0
- package/dist/components/organisms/OUserCamera/OUserCamera.styles.d.ts +20 -0
- package/dist/components/organisms/OUserCamera/OUserCamera.styles.d.ts.map +1 -0
- package/dist/components/organisms/OUserCamera/index.d.ts +3 -0
- package/dist/components/organisms/OUserCamera/index.d.ts.map +1 -0
- package/dist/components/organisms/OUserCamera/types.d.ts +12 -0
- package/dist/components/organisms/OUserCamera/types.d.ts.map +1 -0
- package/dist/components/organisms/index.d.ts +5 -0
- package/dist/components/organisms/index.d.ts.map +1 -0
- package/dist/index.cjs +930 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2081 -0
- package/dist/index.js.map +1 -0
- package/dist/providers/JynkoProvider/JynkoProvider.d.ts +8 -0
- package/dist/providers/JynkoProvider/JynkoProvider.d.ts.map +1 -0
- package/dist/providers/JynkoProvider/index.d.ts +3 -0
- package/dist/providers/JynkoProvider/index.d.ts.map +1 -0
- package/dist/providers/index.d.ts +3 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/shared/hooks/index.d.ts +2 -0
- package/dist/shared/hooks/index.d.ts.map +1 -0
- package/dist/shared/hooks/usePressState.d.ts +19 -0
- package/dist/shared/hooks/usePressState.d.ts.map +1 -0
- package/dist/shared/index.d.ts +6 -0
- package/dist/shared/index.d.ts.map +1 -0
- package/dist/shared/styles/GlobalStyles.d.ts +2 -0
- package/dist/shared/styles/GlobalStyles.d.ts.map +1 -0
- package/dist/shared/styles/componentMetrics.d.ts +11 -0
- package/dist/shared/styles/componentMetrics.d.ts.map +1 -0
- package/dist/shared/styles/index.d.ts +4 -0
- package/dist/shared/styles/index.d.ts.map +1 -0
- package/dist/shared/styles/theme.d.ts +254 -0
- package/dist/shared/styles/theme.d.ts.map +1 -0
- package/dist/shared/types/button.d.ts +3 -0
- package/dist/shared/types/button.d.ts.map +1 -0
- package/dist/shared/types/index.d.ts +2 -0
- package/dist/shared/types/index.d.ts.map +1 -0
- package/dist/shared/types/link.d.ts +3 -0
- package/dist/shared/types/link.d.ts.map +1 -0
- package/dist/shared/utils/color.d.ts +2 -0
- package/dist/shared/utils/color.d.ts.map +1 -0
- package/dist/shared/utils/index.d.ts +3 -0
- package/dist/shared/utils/index.d.ts.map +1 -0
- package/dist/shared/utils/tokens.d.ts +3 -0
- package/dist/shared/utils/tokens.d.ts.map +1 -0
- package/package.json +116 -4
package/dist/index.js
ADDED
|
@@ -0,0 +1,2081 @@
|
|
|
1
|
+
import { useEffect as e, useId as t, useRef as n, useState as r } from "react";
|
|
2
|
+
import { ThemeProvider as i, createGlobalStyle as a, css as o, styled as s } from "styled-components";
|
|
3
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
4
|
+
import { createPortal as u } from "react-dom";
|
|
5
|
+
import { Link as d, NavLink as f } from "react-router-dom";
|
|
6
|
+
// src/shared/utils/color.ts
|
|
7
|
+
function p(e, t) {
|
|
8
|
+
return `color-mix(in srgb, ${e} 88%, ${t})`;
|
|
9
|
+
}
|
|
10
|
+
// src/shared/styles/theme.ts
|
|
11
|
+
var m = {
|
|
12
|
+
bg: "#0f172a",
|
|
13
|
+
surface: "#1e293b",
|
|
14
|
+
background: "#edf7f6",
|
|
15
|
+
text: "#0f172a",
|
|
16
|
+
muted: "#94a3b8",
|
|
17
|
+
primary: "#38bdf8",
|
|
18
|
+
primaryHover: "#7dd3fc",
|
|
19
|
+
primaryText: "#0f172a",
|
|
20
|
+
secondary: "#334155",
|
|
21
|
+
secondaryHover: "#475569",
|
|
22
|
+
ink: "#000000",
|
|
23
|
+
error: "#dc2626",
|
|
24
|
+
success: "#16a34a",
|
|
25
|
+
warning: "#d97706"
|
|
26
|
+
}, h = "30px", g = {
|
|
27
|
+
width: "3px",
|
|
28
|
+
offset: "2px",
|
|
29
|
+
colorMix: "45%"
|
|
30
|
+
}, _ = {
|
|
31
|
+
regular: 400,
|
|
32
|
+
semibold: 600,
|
|
33
|
+
bold: 700
|
|
34
|
+
}, v = {
|
|
35
|
+
colors: m,
|
|
36
|
+
opacity: {
|
|
37
|
+
disabled: .6,
|
|
38
|
+
disabledButton: .55
|
|
39
|
+
},
|
|
40
|
+
radius: {
|
|
41
|
+
sm: "6px",
|
|
42
|
+
md: "10px",
|
|
43
|
+
lg: "16px",
|
|
44
|
+
full: "9999px"
|
|
45
|
+
},
|
|
46
|
+
space: {
|
|
47
|
+
xs: "0.25rem",
|
|
48
|
+
sm: "0.5rem",
|
|
49
|
+
md: "0.75rem",
|
|
50
|
+
lg: "1rem",
|
|
51
|
+
inset: "10px",
|
|
52
|
+
components: {
|
|
53
|
+
button: {
|
|
54
|
+
sm: "0.25rem",
|
|
55
|
+
md: "0.5rem",
|
|
56
|
+
lg: "0.75rem"
|
|
57
|
+
},
|
|
58
|
+
badge: {
|
|
59
|
+
sm: "0.25rem",
|
|
60
|
+
md: "0.5rem",
|
|
61
|
+
lg: "0.75rem"
|
|
62
|
+
},
|
|
63
|
+
link: {
|
|
64
|
+
sm: "0.25rem",
|
|
65
|
+
md: "0.5rem",
|
|
66
|
+
lg: "0.75rem"
|
|
67
|
+
},
|
|
68
|
+
iconButton: {
|
|
69
|
+
sm: "0.25rem",
|
|
70
|
+
md: "0.5rem",
|
|
71
|
+
lg: "0.75rem"
|
|
72
|
+
},
|
|
73
|
+
iconLink: {
|
|
74
|
+
sm: "0.25rem",
|
|
75
|
+
md: "0.5rem",
|
|
76
|
+
lg: "0.75rem"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
font: {
|
|
81
|
+
sans: "'Segoe UI', system-ui, -apple-system, sans-serif",
|
|
82
|
+
weight: _
|
|
83
|
+
},
|
|
84
|
+
typography: {
|
|
85
|
+
fallback: "1rem",
|
|
86
|
+
h1: "2.5rem",
|
|
87
|
+
h2: "2rem",
|
|
88
|
+
h3: "1.75rem",
|
|
89
|
+
h4: "1.5rem",
|
|
90
|
+
h5: "1.25rem",
|
|
91
|
+
h6: "1.125rem",
|
|
92
|
+
small: "0.875rem",
|
|
93
|
+
sub: "0.75rem",
|
|
94
|
+
sup: "0.75rem"
|
|
95
|
+
},
|
|
96
|
+
avatar: {
|
|
97
|
+
border: `2px solid ${m.ink}`,
|
|
98
|
+
borderRadius: "50%",
|
|
99
|
+
fontWeight: _.semibold,
|
|
100
|
+
sizes: {
|
|
101
|
+
sm: {
|
|
102
|
+
diameter: "32px",
|
|
103
|
+
fontSize: "12px"
|
|
104
|
+
},
|
|
105
|
+
md: {
|
|
106
|
+
diameter: "40px",
|
|
107
|
+
fontSize: "14px"
|
|
108
|
+
},
|
|
109
|
+
lg: {
|
|
110
|
+
diameter: "48px",
|
|
111
|
+
fontSize: "16px"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
icon: { sizes: {
|
|
116
|
+
sm: "1rem",
|
|
117
|
+
md: "1.25rem",
|
|
118
|
+
lg: "1.5rem"
|
|
119
|
+
} },
|
|
120
|
+
logo: {
|
|
121
|
+
size: "36px",
|
|
122
|
+
fontSize: "1rem",
|
|
123
|
+
fontWeight: _.bold,
|
|
124
|
+
whiteSpace: "nowrap"
|
|
125
|
+
},
|
|
126
|
+
sidebar: {
|
|
127
|
+
width: {
|
|
128
|
+
compact: "64px",
|
|
129
|
+
extended: "240px"
|
|
130
|
+
},
|
|
131
|
+
height: {
|
|
132
|
+
fallback: "100vh",
|
|
133
|
+
dynamic: "100dvh"
|
|
134
|
+
},
|
|
135
|
+
border: `2px solid ${m.ink}`,
|
|
136
|
+
borderRadius: "16px"
|
|
137
|
+
},
|
|
138
|
+
camera: {
|
|
139
|
+
border: `2px solid ${m.ink}`,
|
|
140
|
+
borderRadius: "12px",
|
|
141
|
+
nameBorderRadius: "4px",
|
|
142
|
+
nameMaxWidthOffset: "64px",
|
|
143
|
+
fallbackFontSize: "clamp(2rem, 8vw, 5rem)",
|
|
144
|
+
fallbackFontWeight: _.bold
|
|
145
|
+
},
|
|
146
|
+
shadow: {
|
|
147
|
+
offsetX: "2px",
|
|
148
|
+
offsetY: "3px",
|
|
149
|
+
button: `2px 3px 0 0 ${m.ink}`,
|
|
150
|
+
link: `2px 3px 0 0 ${m.ink}`,
|
|
151
|
+
navLinks: `2px 3px 0 0 ${m.ink}`,
|
|
152
|
+
section: `3px 5px 0 0 ${m.ink}`,
|
|
153
|
+
modal: `3px 5px 0 0 ${m.ink}`,
|
|
154
|
+
sidebar: `3px 5px 0 0 ${m.ink}`
|
|
155
|
+
},
|
|
156
|
+
button: {
|
|
157
|
+
border: `2px solid ${m.ink}`,
|
|
158
|
+
borderRadius: "8px",
|
|
159
|
+
focus: g,
|
|
160
|
+
padding: "16px",
|
|
161
|
+
fontSize: "14px",
|
|
162
|
+
textDecoration: "none",
|
|
163
|
+
textTransform: "uppercase"
|
|
164
|
+
},
|
|
165
|
+
iconButton: {
|
|
166
|
+
border: `2px solid ${m.ink}`,
|
|
167
|
+
borderRadius: "8px",
|
|
168
|
+
focus: g
|
|
169
|
+
},
|
|
170
|
+
iconLink: {
|
|
171
|
+
border: `2px solid ${m.ink}`,
|
|
172
|
+
borderRadius: "8px",
|
|
173
|
+
focus: g
|
|
174
|
+
},
|
|
175
|
+
badge: {
|
|
176
|
+
border: `2px solid ${m.ink}`,
|
|
177
|
+
borderRadius: "8px",
|
|
178
|
+
fontSize: "14px",
|
|
179
|
+
textTransform: "uppercase"
|
|
180
|
+
},
|
|
181
|
+
link: {
|
|
182
|
+
border: `2px solid ${m.ink}`,
|
|
183
|
+
borderRadius: "8px",
|
|
184
|
+
focus: g,
|
|
185
|
+
padding: "16px",
|
|
186
|
+
fontSize: "14px",
|
|
187
|
+
textDecoration: "none",
|
|
188
|
+
textTransform: "uppercase"
|
|
189
|
+
},
|
|
190
|
+
navLinks: {
|
|
191
|
+
border: `2px solid ${m.ink}`,
|
|
192
|
+
borderRadius: "8px",
|
|
193
|
+
focus: g,
|
|
194
|
+
padding: "0",
|
|
195
|
+
fontSize: "14px",
|
|
196
|
+
textDecoration: "none",
|
|
197
|
+
textTransform: "uppercase",
|
|
198
|
+
itemPadding: "16px"
|
|
199
|
+
},
|
|
200
|
+
formControl: {
|
|
201
|
+
border: `2px solid ${m.ink}`,
|
|
202
|
+
borderRadius: "8px",
|
|
203
|
+
padding: "16px",
|
|
204
|
+
height: "3.5rem",
|
|
205
|
+
textareaHeight: "3rem",
|
|
206
|
+
dropdownBorder: `2px solid ${m.ink}`,
|
|
207
|
+
optionListMaxHeight: "16rem",
|
|
208
|
+
focus: g,
|
|
209
|
+
trailingActionPadding: "3.25rem",
|
|
210
|
+
fontSize: "14px",
|
|
211
|
+
optionTextTransform: "none"
|
|
212
|
+
},
|
|
213
|
+
userBadge: {
|
|
214
|
+
focus: g,
|
|
215
|
+
textDecoration: "none"
|
|
216
|
+
},
|
|
217
|
+
section: {
|
|
218
|
+
border: `2px solid ${m.ink}`,
|
|
219
|
+
borderRadius: "16px",
|
|
220
|
+
padding: h
|
|
221
|
+
},
|
|
222
|
+
modal: {
|
|
223
|
+
padding: h,
|
|
224
|
+
maxWidth: "720px",
|
|
225
|
+
maxHeight: "80vh",
|
|
226
|
+
border: `2px solid ${m.ink}`,
|
|
227
|
+
borderRadius: "16px",
|
|
228
|
+
title: {
|
|
229
|
+
fontSize: "1.25rem",
|
|
230
|
+
fontWeight: _.semibold
|
|
231
|
+
},
|
|
232
|
+
body: { fontSize: "1rem" }
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
// src/shared/utils/tokens.ts
|
|
236
|
+
function y(e) {
|
|
237
|
+
return e?.colors ? e : v;
|
|
238
|
+
}
|
|
239
|
+
// src/components/atoms/AAvatar/AAvatar.styles.ts
|
|
240
|
+
var b = s.span`
|
|
241
|
+
display: inline-flex;
|
|
242
|
+
flex: 0 0 auto;
|
|
243
|
+
align-items: center;
|
|
244
|
+
justify-content: center;
|
|
245
|
+
overflow: hidden;
|
|
246
|
+
border: ${({ theme: e }) => y(e).avatar.border};
|
|
247
|
+
border-radius: ${({ theme: e }) => y(e).avatar.borderRadius};
|
|
248
|
+
background: ${({ theme: e }) => y(e).colors.secondary};
|
|
249
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
250
|
+
font-family: ${({ theme: e }) => y(e).font.sans};
|
|
251
|
+
font-weight: ${({ theme: e }) => y(e).avatar.fontWeight};
|
|
252
|
+
width: ${({ $size: e, theme: t }) => y(t).avatar.sizes[e].diameter};
|
|
253
|
+
height: ${({ $size: e, theme: t }) => y(t).avatar.sizes[e].diameter};
|
|
254
|
+
font-size: ${({ $size: e, theme: t }) => y(t).avatar.sizes[e].fontSize};
|
|
255
|
+
|
|
256
|
+
& > img {
|
|
257
|
+
width: 100%;
|
|
258
|
+
height: 100%;
|
|
259
|
+
object-fit: cover;
|
|
260
|
+
}
|
|
261
|
+
`;
|
|
262
|
+
// src/components/atoms/AAvatar/AAvatar.tsx
|
|
263
|
+
function x({ firstName: e, lastName: t, src: n, alt: i, size: a = "md", ...o }) {
|
|
264
|
+
let [s, l] = r(), u = `${e} ${t}`.trim(), d = i ?? u, f = `${e.charAt(0)}${t.charAt(0)}`.toUpperCase(), p = !!(n && s !== n);
|
|
265
|
+
return /* @__PURE__ */ c(b, {
|
|
266
|
+
$size: a,
|
|
267
|
+
role: p ? void 0 : "img",
|
|
268
|
+
"aria-label": p ? void 0 : d,
|
|
269
|
+
...o,
|
|
270
|
+
children: p ? /* @__PURE__ */ c("img", {
|
|
271
|
+
src: n,
|
|
272
|
+
alt: d,
|
|
273
|
+
onError: () => {
|
|
274
|
+
l(n);
|
|
275
|
+
}
|
|
276
|
+
}) : f
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
// src/shared/styles/componentMetrics.ts
|
|
280
|
+
var S = o`
|
|
281
|
+
display: grid;
|
|
282
|
+
gap: ${({ theme: e }) => y(e).space.sm};
|
|
283
|
+
width: 100%;
|
|
284
|
+
`, C = (e) => ({
|
|
285
|
+
sm: o`
|
|
286
|
+
padding: ${({ theme: t }) => y(t).space.components[e].sm};
|
|
287
|
+
`,
|
|
288
|
+
md: o`
|
|
289
|
+
padding: ${({ theme: t }) => y(t).space.components[e].md};
|
|
290
|
+
`,
|
|
291
|
+
lg: o`
|
|
292
|
+
padding: ${({ theme: t }) => y(t).space.components[e].lg};
|
|
293
|
+
`
|
|
294
|
+
}), w = o`
|
|
295
|
+
padding: ${({ theme: e }) => `${y(e).space.md} ${y(e).space.lg}`};
|
|
296
|
+
`, T = (e) => o`
|
|
297
|
+
&:focus-visible {
|
|
298
|
+
outline: ${({ theme: t }) => `${y(t)[e].focus.width} solid color-mix(in srgb, ${y(t).colors.primary} ${y(t)[e].focus.colorMix}, transparent)`};
|
|
299
|
+
outline-offset: ${({ theme: t }) => y(t)[e].focus.offset};
|
|
300
|
+
}
|
|
301
|
+
`, E = C("badge"), D = {
|
|
302
|
+
default: o`
|
|
303
|
+
background: ${({ theme: e }) => y(e).colors.secondary};
|
|
304
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
305
|
+
`,
|
|
306
|
+
info: o`
|
|
307
|
+
background: ${({ theme: e }) => y(e).colors.primary};
|
|
308
|
+
color: ${({ theme: e }) => y(e).colors.primaryText};
|
|
309
|
+
`,
|
|
310
|
+
success: o`
|
|
311
|
+
background: ${({ theme: e }) => y(e).colors.success};
|
|
312
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
313
|
+
`,
|
|
314
|
+
warning: o`
|
|
315
|
+
background: ${({ theme: e }) => y(e).colors.warning};
|
|
316
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
317
|
+
`,
|
|
318
|
+
error: o`
|
|
319
|
+
background: ${({ theme: e }) => y(e).colors.error};
|
|
320
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
321
|
+
`
|
|
322
|
+
}, O = s.span`
|
|
323
|
+
display: inline-flex;
|
|
324
|
+
align-items: center;
|
|
325
|
+
justify-content: center;
|
|
326
|
+
gap: ${({ theme: e }) => y(e).space.sm};
|
|
327
|
+
border: ${({ theme: e }) => y(e).badge.border};
|
|
328
|
+
border-radius: ${({ theme: e }) => y(e).badge.borderRadius};
|
|
329
|
+
font-family: ${({ theme: e }) => y(e).font.sans};
|
|
330
|
+
font-size: ${({ theme: e }) => y(e).badge.fontSize};
|
|
331
|
+
font-weight: ${({ theme: e }) => y(e).font.weight.semibold};
|
|
332
|
+
text-transform: ${({ theme: e }) => y(e).badge.textTransform};
|
|
333
|
+
|
|
334
|
+
${({ $size: e }) => E[e]}
|
|
335
|
+
${({ $variant: e }) => D[e]}
|
|
336
|
+
`;
|
|
337
|
+
// src/components/atoms/ABadge/ABadge.tsx
|
|
338
|
+
function k({ children: e, size: t = "md", variant: n = "default", ...r }) {
|
|
339
|
+
return /* @__PURE__ */ c(O, {
|
|
340
|
+
$size: t,
|
|
341
|
+
$variant: n,
|
|
342
|
+
...r,
|
|
343
|
+
children: e
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
// src/shared/hooks/usePressState.ts
|
|
347
|
+
var A = 150;
|
|
348
|
+
function j({ disabled: t, onPointerDown: i, onPointerUp: a, onPointerCancel: o, onLostPointerCapture: s }) {
|
|
349
|
+
let [c, l] = r(!1), u = n(0), d = n(null);
|
|
350
|
+
e(() => () => {
|
|
351
|
+
d.current && clearTimeout(d.current);
|
|
352
|
+
}, []);
|
|
353
|
+
let f = () => {
|
|
354
|
+
d.current && clearTimeout(d.current);
|
|
355
|
+
}, p = () => {
|
|
356
|
+
if (!u.current) return;
|
|
357
|
+
let e = performance.now() - u.current, t = Math.max(0, A - e);
|
|
358
|
+
f(), d.current = setTimeout(() => {
|
|
359
|
+
l(!1), u.current = 0, d.current = null;
|
|
360
|
+
}, t);
|
|
361
|
+
};
|
|
362
|
+
return {
|
|
363
|
+
pressed: c,
|
|
364
|
+
pressHandlers: {
|
|
365
|
+
onPointerDown: (e) => {
|
|
366
|
+
i?.(e), e.defaultPrevented || t || e.button !== 0 || (e.currentTarget.setPointerCapture(e.pointerId), f(), u.current = performance.now(), l(!0));
|
|
367
|
+
},
|
|
368
|
+
onPointerUp: (e) => {
|
|
369
|
+
a?.(e), p();
|
|
370
|
+
},
|
|
371
|
+
onPointerCancel: (e) => {
|
|
372
|
+
o?.(e), p();
|
|
373
|
+
},
|
|
374
|
+
onLostPointerCapture: (e) => {
|
|
375
|
+
s?.(e), p();
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
};
|
|
379
|
+
}
|
|
380
|
+
// src/components/atoms/AButton/AButton.styles.ts
|
|
381
|
+
var M = C("button"), N = {
|
|
382
|
+
primary: o`
|
|
383
|
+
background: ${({ theme: e }) => y(e).colors.primary};
|
|
384
|
+
color: ${({ theme: e }) => y(e).colors.primaryText};
|
|
385
|
+
|
|
386
|
+
&:hover:not(:disabled) {
|
|
387
|
+
background: ${({ theme: e }) => p(y(e).colors.primary, y(e).colors.ink)};
|
|
388
|
+
}
|
|
389
|
+
`,
|
|
390
|
+
secondary: o`
|
|
391
|
+
background: ${({ theme: e }) => y(e).colors.secondary};
|
|
392
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
393
|
+
|
|
394
|
+
&:hover:not(:disabled) {
|
|
395
|
+
background: ${({ theme: e }) => p(y(e).colors.secondary, y(e).colors.ink)};
|
|
396
|
+
}
|
|
397
|
+
`
|
|
398
|
+
}, P = o`
|
|
399
|
+
display: inline-flex;
|
|
400
|
+
align-items: center;
|
|
401
|
+
justify-content: center;
|
|
402
|
+
gap: ${({ theme: e }) => y(e).space.sm};
|
|
403
|
+
font-family: ${({ theme: e }) => y(e).font.sans};
|
|
404
|
+
font-size: ${({ theme: e }) => y(e).button.fontSize};
|
|
405
|
+
font-weight: ${({ theme: e }) => y(e).font.weight.semibold};
|
|
406
|
+
text-transform: ${({ theme: e }) => y(e).button.textTransform};
|
|
407
|
+
cursor: pointer;
|
|
408
|
+
transition:
|
|
409
|
+
background-color 0.15s ease,
|
|
410
|
+
transform 0.15s ease,
|
|
411
|
+
box-shadow 0.15s ease;
|
|
412
|
+
white-space: nowrap;
|
|
413
|
+
|
|
414
|
+
${T("button")}
|
|
415
|
+
|
|
416
|
+
&:disabled {
|
|
417
|
+
opacity: ${({ theme: e }) => y(e).opacity.disabledButton};
|
|
418
|
+
cursor: not-allowed;
|
|
419
|
+
}
|
|
420
|
+
`, F = o`
|
|
421
|
+
border: ${({ theme: e }) => y(e).button.border};
|
|
422
|
+
box-shadow: ${({ theme: e }) => y(e).shadow.button};
|
|
423
|
+
|
|
424
|
+
&:active:not(:disabled),
|
|
425
|
+
&[data-pressed='true']:not(:disabled),
|
|
426
|
+
&:disabled {
|
|
427
|
+
transform: ${({ theme: e }) => `translate(${y(e).shadow.offsetX}, ${y(e).shadow.offsetY})`};
|
|
428
|
+
box-shadow: none;
|
|
429
|
+
}
|
|
430
|
+
`, I = o`
|
|
431
|
+
border-radius: ${({ theme: e }) => y(e).button.borderRadius};
|
|
432
|
+
`, L = o`
|
|
433
|
+
padding: ${({ theme: e }) => y(e).button.padding};
|
|
434
|
+
`, R = s.button`
|
|
435
|
+
${P}
|
|
436
|
+
${F}
|
|
437
|
+
${I}
|
|
438
|
+
${L}
|
|
439
|
+
${({ $variant: e }) => N[e]}
|
|
440
|
+
${({ $size: e }) => M[e]}
|
|
441
|
+
`;
|
|
442
|
+
// src/components/atoms/AButton/AButton.tsx
|
|
443
|
+
function z({ children: e, variant: t = "primary", size: n = "md", type: r = "button", disabled: i, onPointerDown: a, onPointerUp: o, onPointerCancel: s, onLostPointerCapture: l, ...u }) {
|
|
444
|
+
let { pressed: d, pressHandlers: f } = j({
|
|
445
|
+
disabled: i,
|
|
446
|
+
onPointerDown: a,
|
|
447
|
+
onPointerUp: o,
|
|
448
|
+
onPointerCancel: s,
|
|
449
|
+
onLostPointerCapture: l
|
|
450
|
+
});
|
|
451
|
+
return /* @__PURE__ */ c(R, {
|
|
452
|
+
$size: n,
|
|
453
|
+
$variant: t,
|
|
454
|
+
type: r,
|
|
455
|
+
disabled: i,
|
|
456
|
+
"data-pressed": d ? "true" : void 0,
|
|
457
|
+
...u,
|
|
458
|
+
...f,
|
|
459
|
+
children: e
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
// src/components/atoms/AIcon/AIcon.styles.ts
|
|
463
|
+
var B = {
|
|
464
|
+
default: (e) => y(e).colors.text,
|
|
465
|
+
error: (e) => y(e).colors.error,
|
|
466
|
+
success: (e) => y(e).colors.success,
|
|
467
|
+
warning: (e) => y(e).colors.warning
|
|
468
|
+
}, V = s.span`
|
|
469
|
+
display: inline-flex;
|
|
470
|
+
width: ${({ $size: e, theme: t }) => y(t).icon.sizes[e]};
|
|
471
|
+
height: ${({ $size: e, theme: t }) => y(t).icon.sizes[e]};
|
|
472
|
+
flex: 0 0 auto;
|
|
473
|
+
align-items: center;
|
|
474
|
+
justify-content: center;
|
|
475
|
+
color: ${({ $type: e, theme: t }) => B[e](t)};
|
|
476
|
+
|
|
477
|
+
& > svg {
|
|
478
|
+
display: block;
|
|
479
|
+
width: 100%;
|
|
480
|
+
height: 100%;
|
|
481
|
+
}
|
|
482
|
+
`;
|
|
483
|
+
// src/components/atoms/AIcon/AIcon.tsx
|
|
484
|
+
function H({ children: e, size: t = "md", type: n = "default", title: r, "aria-label": i, ...a }) {
|
|
485
|
+
let o = r ?? i;
|
|
486
|
+
return /* @__PURE__ */ c(V, {
|
|
487
|
+
$size: t,
|
|
488
|
+
$type: n,
|
|
489
|
+
"aria-hidden": !o || void 0,
|
|
490
|
+
"aria-label": o,
|
|
491
|
+
role: o ? "img" : void 0,
|
|
492
|
+
title: r,
|
|
493
|
+
...a,
|
|
494
|
+
children: e
|
|
495
|
+
});
|
|
496
|
+
}
|
|
497
|
+
// src/components/atoms/AIconButton/AIconButton.styles.ts
|
|
498
|
+
var U = C("iconButton"), ee = {
|
|
499
|
+
primary: o`
|
|
500
|
+
background: ${({ theme: e }) => y(e).colors.primary};
|
|
501
|
+
color: ${({ theme: e }) => y(e).colors.primaryText};
|
|
502
|
+
|
|
503
|
+
&:hover:not(:disabled) {
|
|
504
|
+
background: ${({ theme: e }) => p(y(e).colors.primary, y(e).colors.ink)};
|
|
505
|
+
}
|
|
506
|
+
`,
|
|
507
|
+
secondary: o`
|
|
508
|
+
background: ${({ theme: e }) => y(e).colors.secondary};
|
|
509
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
510
|
+
|
|
511
|
+
&:hover:not(:disabled) {
|
|
512
|
+
background: ${({ theme: e }) => p(y(e).colors.secondary, y(e).colors.ink)};
|
|
513
|
+
}
|
|
514
|
+
`
|
|
515
|
+
}, te = o`
|
|
516
|
+
display: inline-flex;
|
|
517
|
+
align-items: center;
|
|
518
|
+
justify-content: center;
|
|
519
|
+
gap: ${({ theme: e }) => y(e).space.sm};
|
|
520
|
+
font-family: ${({ theme: e }) => y(e).font.sans};
|
|
521
|
+
font-size: ${({ theme: e }) => y(e).button.fontSize};
|
|
522
|
+
font-weight: ${({ theme: e }) => y(e).font.weight.semibold};
|
|
523
|
+
text-transform: ${({ theme: e }) => y(e).button.textTransform};
|
|
524
|
+
cursor: pointer;
|
|
525
|
+
transition:
|
|
526
|
+
background-color 0.15s ease,
|
|
527
|
+
transform 0.15s ease,
|
|
528
|
+
box-shadow 0.15s ease;
|
|
529
|
+
|
|
530
|
+
${T("iconButton")}
|
|
531
|
+
|
|
532
|
+
&:disabled {
|
|
533
|
+
opacity: ${({ theme: e }) => y(e).opacity.disabledButton};
|
|
534
|
+
cursor: not-allowed;
|
|
535
|
+
}
|
|
536
|
+
`, ne = o`
|
|
537
|
+
border: ${({ theme: e }) => y(e).iconButton.border};
|
|
538
|
+
box-shadow: ${({ theme: e }) => y(e).shadow.button};
|
|
539
|
+
|
|
540
|
+
&:active:not(:disabled),
|
|
541
|
+
&[data-pressed='true']:not(:disabled),
|
|
542
|
+
&:disabled {
|
|
543
|
+
transform: ${({ theme: e }) => `translate(${y(e).shadow.offsetX}, ${y(e).shadow.offsetY})`};
|
|
544
|
+
box-shadow: none;
|
|
545
|
+
}
|
|
546
|
+
`, re = {
|
|
547
|
+
square: o`
|
|
548
|
+
border-radius: ${({ theme: e }) => y(e).iconButton.borderRadius};
|
|
549
|
+
`,
|
|
550
|
+
rounded: o`
|
|
551
|
+
border-radius: ${({ theme: e }) => y(e).radius.full};
|
|
552
|
+
`
|
|
553
|
+
}, ie = o`
|
|
554
|
+
background: transparent;
|
|
555
|
+
border: none;
|
|
556
|
+
box-shadow: none;
|
|
557
|
+
transform: none;
|
|
558
|
+
|
|
559
|
+
&:active:not(:disabled),
|
|
560
|
+
&[data-pressed='true']:not(:disabled) {
|
|
561
|
+
transform: none;
|
|
562
|
+
box-shadow: none;
|
|
563
|
+
}
|
|
564
|
+
`;
|
|
565
|
+
function W(e, t) {
|
|
566
|
+
return `color-mix(in srgb, ${e} ${t}, transparent)`;
|
|
567
|
+
}
|
|
568
|
+
var ae = {
|
|
569
|
+
primary: o`
|
|
570
|
+
color: ${({ theme: e }) => y(e).colors.primary};
|
|
571
|
+
|
|
572
|
+
&:hover:not(:disabled) {
|
|
573
|
+
background: ${({ theme: e }) => W(y(e).colors.primary, "18%")};
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
&:active:not(:disabled),
|
|
577
|
+
&[data-pressed='true']:not(:disabled) {
|
|
578
|
+
background: ${({ theme: e }) => p(W(y(e).colors.primary, "18%"), y(e).colors.ink)};
|
|
579
|
+
}
|
|
580
|
+
`,
|
|
581
|
+
secondary: o`
|
|
582
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
583
|
+
|
|
584
|
+
&:hover:not(:disabled) {
|
|
585
|
+
background: ${({ theme: e }) => W(y(e).colors.text, "12%")};
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
&:active:not(:disabled),
|
|
589
|
+
&[data-pressed='true']:not(:disabled) {
|
|
590
|
+
background: ${({ theme: e }) => p(W(y(e).colors.text, "12%"), y(e).colors.ink)};
|
|
591
|
+
}
|
|
592
|
+
`
|
|
593
|
+
}, oe = s.button`
|
|
594
|
+
${te}
|
|
595
|
+
padding: 0;
|
|
596
|
+
flex-shrink: 0;
|
|
597
|
+
|
|
598
|
+
${({ $size: e }) => U[e]}
|
|
599
|
+
${({ $shape: e }) => re[e]}
|
|
600
|
+
${({ $ghost: e, $variant: t }) => e ? o`
|
|
601
|
+
${ie}
|
|
602
|
+
${ae[t]}
|
|
603
|
+
` : o`
|
|
604
|
+
${ne}
|
|
605
|
+
${ee[t]}
|
|
606
|
+
`}
|
|
607
|
+
`;
|
|
608
|
+
// src/components/atoms/AIconButton/AIconButton.tsx
|
|
609
|
+
function G({ children: e, variant: t = "primary", size: n = "md", shape: r = "square", ghost: i = !1, type: a = "button", disabled: o, ref: s, onPointerDown: l, onPointerUp: u, onPointerCancel: d, onLostPointerCapture: f, ...p }) {
|
|
610
|
+
let { pressed: m, pressHandlers: h } = j({
|
|
611
|
+
disabled: o,
|
|
612
|
+
onPointerDown: l,
|
|
613
|
+
onPointerUp: u,
|
|
614
|
+
onPointerCancel: d,
|
|
615
|
+
onLostPointerCapture: f
|
|
616
|
+
});
|
|
617
|
+
return /* @__PURE__ */ c(oe, {
|
|
618
|
+
$ghost: i,
|
|
619
|
+
$shape: r,
|
|
620
|
+
$size: n,
|
|
621
|
+
$variant: t,
|
|
622
|
+
type: a,
|
|
623
|
+
disabled: o,
|
|
624
|
+
"data-pressed": m ? "true" : void 0,
|
|
625
|
+
ref: s,
|
|
626
|
+
...p,
|
|
627
|
+
...h,
|
|
628
|
+
children: /* @__PURE__ */ c(H, {
|
|
629
|
+
size: n,
|
|
630
|
+
style: { color: "inherit" },
|
|
631
|
+
children: e
|
|
632
|
+
})
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
// src/components/atoms/AIconLink/AIconLink.styles.ts
|
|
636
|
+
var se = C("iconLink"), ce = {
|
|
637
|
+
primary: o`
|
|
638
|
+
background: ${({ theme: e }) => y(e).colors.primary};
|
|
639
|
+
color: ${({ theme: e }) => y(e).colors.primaryText};
|
|
640
|
+
|
|
641
|
+
&:hover {
|
|
642
|
+
background: ${({ theme: e }) => p(y(e).colors.primary, y(e).colors.ink)};
|
|
643
|
+
}
|
|
644
|
+
`,
|
|
645
|
+
secondary: o`
|
|
646
|
+
background: ${({ theme: e }) => y(e).colors.secondary};
|
|
647
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
648
|
+
|
|
649
|
+
&:hover {
|
|
650
|
+
background: ${({ theme: e }) => p(y(e).colors.secondary, y(e).colors.ink)};
|
|
651
|
+
}
|
|
652
|
+
`
|
|
653
|
+
}, le = {
|
|
654
|
+
square: o`
|
|
655
|
+
border-radius: ${({ theme: e }) => y(e).iconLink.borderRadius};
|
|
656
|
+
`,
|
|
657
|
+
rounded: o`
|
|
658
|
+
border-radius: ${({ theme: e }) => y(e).radius.full};
|
|
659
|
+
`
|
|
660
|
+
}, ue = o`
|
|
661
|
+
background: transparent;
|
|
662
|
+
border: none;
|
|
663
|
+
box-shadow: none;
|
|
664
|
+
transform: none;
|
|
665
|
+
|
|
666
|
+
&:active,
|
|
667
|
+
&[data-pressed='true'] {
|
|
668
|
+
transform: none;
|
|
669
|
+
box-shadow: none;
|
|
670
|
+
}
|
|
671
|
+
`;
|
|
672
|
+
function K(e, t) {
|
|
673
|
+
return `color-mix(in srgb, ${e} ${t}, transparent)`;
|
|
674
|
+
}
|
|
675
|
+
var de = {
|
|
676
|
+
primary: o`
|
|
677
|
+
color: ${({ theme: e }) => y(e).colors.primary};
|
|
678
|
+
|
|
679
|
+
&:hover {
|
|
680
|
+
background: ${({ theme: e }) => K(y(e).colors.primary, "18%")};
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
&:active,
|
|
684
|
+
&[data-pressed='true'] {
|
|
685
|
+
background: ${({ theme: e }) => p(K(y(e).colors.primary, "18%"), y(e).colors.ink)};
|
|
686
|
+
}
|
|
687
|
+
`,
|
|
688
|
+
secondary: o`
|
|
689
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
690
|
+
|
|
691
|
+
&:hover {
|
|
692
|
+
background: ${({ theme: e }) => K(y(e).colors.text, "12%")};
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
&:active,
|
|
696
|
+
&[data-pressed='true'] {
|
|
697
|
+
background: ${({ theme: e }) => p(K(y(e).colors.text, "12%"), y(e).colors.ink)};
|
|
698
|
+
}
|
|
699
|
+
`
|
|
700
|
+
}, fe = s.a`
|
|
701
|
+
display: inline-flex;
|
|
702
|
+
align-items: center;
|
|
703
|
+
justify-content: center;
|
|
704
|
+
gap: ${({ theme: e }) => y(e).space.sm};
|
|
705
|
+
font-family: ${({ theme: e }) => y(e).font.sans};
|
|
706
|
+
font-size: ${({ theme: e }) => y(e).button.fontSize};
|
|
707
|
+
font-weight: ${({ theme: e }) => y(e).font.weight.semibold};
|
|
708
|
+
text-transform: ${({ theme: e }) => y(e).button.textTransform};
|
|
709
|
+
text-decoration: ${({ theme: e }) => y(e).button.textDecoration};
|
|
710
|
+
cursor: pointer;
|
|
711
|
+
transition:
|
|
712
|
+
background-color 0.15s ease,
|
|
713
|
+
transform 0.15s ease,
|
|
714
|
+
box-shadow 0.15s ease;
|
|
715
|
+
|
|
716
|
+
${T("iconLink")}
|
|
717
|
+
|
|
718
|
+
border: ${({ theme: e }) => y(e).iconLink.border};
|
|
719
|
+
box-shadow: ${({ theme: e }) => y(e).shadow.button};
|
|
720
|
+
|
|
721
|
+
&:active,
|
|
722
|
+
&[data-pressed='true'] {
|
|
723
|
+
transform: ${({ theme: e }) => `translate(${y(e).shadow.offsetX}, ${y(e).shadow.offsetY})`};
|
|
724
|
+
box-shadow: none;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
${({ $size: e }) => se[e]}
|
|
728
|
+
${({ $shape: e }) => le[e]}
|
|
729
|
+
${({ $ghost: e, $variant: t }) => e ? o`
|
|
730
|
+
${ue}
|
|
731
|
+
${de[t]}
|
|
732
|
+
` : ce[t]}
|
|
733
|
+
`;
|
|
734
|
+
// src/components/atoms/AIconLink/AIconLink.tsx
|
|
735
|
+
function q({ children: e, variant: t = "primary", size: n = "md", shape: r = "square", ghost: i = !1, onPointerDown: a, onPointerUp: o, onPointerCancel: s, onLostPointerCapture: l, ...u }) {
|
|
736
|
+
let { pressed: d, pressHandlers: f } = j({
|
|
737
|
+
onPointerDown: a,
|
|
738
|
+
onPointerUp: o,
|
|
739
|
+
onPointerCancel: s,
|
|
740
|
+
onLostPointerCapture: l
|
|
741
|
+
});
|
|
742
|
+
return /* @__PURE__ */ c(fe, {
|
|
743
|
+
$ghost: i,
|
|
744
|
+
$shape: r,
|
|
745
|
+
$size: n,
|
|
746
|
+
$variant: t,
|
|
747
|
+
"data-pressed": d ? "true" : void 0,
|
|
748
|
+
...u,
|
|
749
|
+
...f,
|
|
750
|
+
children: /* @__PURE__ */ c(H, {
|
|
751
|
+
size: n,
|
|
752
|
+
style: { color: "inherit" },
|
|
753
|
+
children: e
|
|
754
|
+
})
|
|
755
|
+
});
|
|
756
|
+
}
|
|
757
|
+
// src/components/atoms/AInput/AInput.styles.ts
|
|
758
|
+
var pe = o`
|
|
759
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
760
|
+
font-size: ${({ theme: e }) => y(e).typography.small};
|
|
761
|
+
font-weight: ${({ theme: e }) => y(e).font.weight.semibold};
|
|
762
|
+
`, me = o`
|
|
763
|
+
box-sizing: border-box;
|
|
764
|
+
width: 100%;
|
|
765
|
+
height: ${({ theme: e }) => y(e).formControl.height};
|
|
766
|
+
border: ${({ theme: e }) => y(e).formControl.border};
|
|
767
|
+
border-radius: ${({ theme: e }) => y(e).formControl.borderRadius};
|
|
768
|
+
padding: ${({ theme: e, $hasTrailingAction: t }) => t ? `${y(e).formControl.padding} ${y(e).formControl.trailingActionPadding} ${y(e).formControl.padding} ${y(e).formControl.padding}` : y(e).formControl.padding};
|
|
769
|
+
background: ${({ theme: e }) => y(e).colors.background};
|
|
770
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
771
|
+
font: inherit;
|
|
772
|
+
font-size: ${({ theme: e }) => y(e).formControl.fontSize};
|
|
773
|
+
|
|
774
|
+
${T("formControl")}
|
|
775
|
+
|
|
776
|
+
&:disabled {
|
|
777
|
+
cursor: not-allowed;
|
|
778
|
+
opacity: ${({ theme: e }) => y(e).opacity.disabled};
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
${({ $invalid: e, theme: t }) => e && o`
|
|
782
|
+
border-color: ${y(t).colors.error};
|
|
783
|
+
`}
|
|
784
|
+
|
|
785
|
+
${({ $invalid: e, $warning: t, theme: n }) => !e && t && o`
|
|
786
|
+
border-color: ${y(n).colors.warning};
|
|
787
|
+
`}
|
|
788
|
+
`, he = o`
|
|
789
|
+
color: ${({ theme: e, $type: t }) => y(e).colors[t]};
|
|
790
|
+
font-size: ${({ theme: e }) => y(e).typography.small};
|
|
791
|
+
`, ge = s.div`
|
|
792
|
+
${S}
|
|
793
|
+
`, _e = s.label`
|
|
794
|
+
${pe}
|
|
795
|
+
`, ve = s.div`
|
|
796
|
+
position: relative;
|
|
797
|
+
`, ye = s.input`
|
|
798
|
+
${me}
|
|
799
|
+
|
|
800
|
+
&:focus,
|
|
801
|
+
&:focus-visible {
|
|
802
|
+
${({ $invalid: e, $warning: t, theme: n }) => e ? o`
|
|
803
|
+
border-color: ${y(n).colors.error};
|
|
804
|
+
` : t ? o`
|
|
805
|
+
border-color: ${y(n).colors.warning};
|
|
806
|
+
` : ""}
|
|
807
|
+
/* TODO: This prevents the outline from appearing when navigating with the Tab key */
|
|
808
|
+
outline: none;
|
|
809
|
+
}
|
|
810
|
+
`, be = s(G)`
|
|
811
|
+
position: absolute;
|
|
812
|
+
top: 50%;
|
|
813
|
+
right: ${({ theme: e }) => y(e).space.md};
|
|
814
|
+
translate: 0 -50%;
|
|
815
|
+
`, J = s.div`
|
|
816
|
+
${he}
|
|
817
|
+
`;
|
|
818
|
+
// src/components/atoms/AInput/AInput.tsx
|
|
819
|
+
function xe({ visible: e }) {
|
|
820
|
+
return /* @__PURE__ */ l("svg", {
|
|
821
|
+
fill: "none",
|
|
822
|
+
viewBox: "0 0 24 24",
|
|
823
|
+
children: [/* @__PURE__ */ c("path", {
|
|
824
|
+
d: "M2.5 12s3.25-6 9.5-6 9.5 6 9.5 6-3.25 6-9.5 6-9.5-6-9.5-6Z",
|
|
825
|
+
stroke: "currentColor",
|
|
826
|
+
strokeLinecap: "round",
|
|
827
|
+
strokeLinejoin: "round",
|
|
828
|
+
strokeWidth: "1.8"
|
|
829
|
+
}), e ? /* @__PURE__ */ c("path", {
|
|
830
|
+
d: "m3 3 18 18M10.6 10.6a2 2 0 0 0 2.8 2.8",
|
|
831
|
+
stroke: "currentColor",
|
|
832
|
+
strokeLinecap: "round",
|
|
833
|
+
strokeWidth: "1.8"
|
|
834
|
+
}) : /* @__PURE__ */ c("circle", {
|
|
835
|
+
cx: "12",
|
|
836
|
+
cy: "12",
|
|
837
|
+
r: "2.5",
|
|
838
|
+
stroke: "currentColor",
|
|
839
|
+
strokeWidth: "1.8"
|
|
840
|
+
})]
|
|
841
|
+
});
|
|
842
|
+
}
|
|
843
|
+
function Se({ type: e = "text", id: n, label: i, error: a, warning: o, disabled: s, ref: u, "aria-describedby": d, "aria-invalid": f, ...p }) {
|
|
844
|
+
let m = t(), h = n ?? m, g = `${h}-error`, _ = `${h}-warning`, [v, y] = r(!1), b = !!a || f === !0 || f === "true", x = [
|
|
845
|
+
d,
|
|
846
|
+
a ? g : void 0,
|
|
847
|
+
o ? _ : void 0
|
|
848
|
+
].filter(Boolean).join(" ") || void 0;
|
|
849
|
+
return /* @__PURE__ */ l(ge, { children: [
|
|
850
|
+
i ? /* @__PURE__ */ c(_e, {
|
|
851
|
+
htmlFor: h,
|
|
852
|
+
children: i
|
|
853
|
+
}) : null,
|
|
854
|
+
/* @__PURE__ */ l(ve, { children: [/* @__PURE__ */ c(ye, {
|
|
855
|
+
...p,
|
|
856
|
+
$hasTrailingAction: e === "password",
|
|
857
|
+
$invalid: b,
|
|
858
|
+
$warning: !!o,
|
|
859
|
+
"aria-describedby": x,
|
|
860
|
+
"aria-invalid": b || void 0,
|
|
861
|
+
disabled: s,
|
|
862
|
+
id: h,
|
|
863
|
+
ref: u,
|
|
864
|
+
type: e === "password" && v ? "text" : e
|
|
865
|
+
}), e === "password" ? /* @__PURE__ */ c(be, {
|
|
866
|
+
"aria-label": v ? "Hide password" : "Show password",
|
|
867
|
+
"aria-pressed": v,
|
|
868
|
+
disabled: s,
|
|
869
|
+
ghost: !0,
|
|
870
|
+
onClick: () => {
|
|
871
|
+
y((e) => !e);
|
|
872
|
+
},
|
|
873
|
+
shape: "rounded",
|
|
874
|
+
size: "md",
|
|
875
|
+
type: "button",
|
|
876
|
+
variant: "primary",
|
|
877
|
+
children: /* @__PURE__ */ c(H, {
|
|
878
|
+
size: "md",
|
|
879
|
+
style: { color: "inherit" },
|
|
880
|
+
title: v ? "Hide password" : "Show password",
|
|
881
|
+
children: /* @__PURE__ */ c(xe, { visible: v })
|
|
882
|
+
})
|
|
883
|
+
}) : null] }),
|
|
884
|
+
a ? /* @__PURE__ */ c(J, {
|
|
885
|
+
$type: "error",
|
|
886
|
+
id: g,
|
|
887
|
+
role: "alert",
|
|
888
|
+
children: a
|
|
889
|
+
}) : null,
|
|
890
|
+
o ? /* @__PURE__ */ c(J, {
|
|
891
|
+
$type: "warning",
|
|
892
|
+
id: _,
|
|
893
|
+
role: "status",
|
|
894
|
+
children: o
|
|
895
|
+
}) : null
|
|
896
|
+
] });
|
|
897
|
+
}
|
|
898
|
+
// src/components/atoms/ALink/ALink.styles.ts
|
|
899
|
+
var Ce = C("link"), we = {
|
|
900
|
+
primary: o`
|
|
901
|
+
background: ${({ theme: e }) => y(e).colors.primary};
|
|
902
|
+
color: ${({ theme: e }) => y(e).colors.primaryText};
|
|
903
|
+
|
|
904
|
+
&:hover:not(:disabled) {
|
|
905
|
+
background: ${({ theme: e }) => p(y(e).colors.primary, y(e).colors.ink)};
|
|
906
|
+
}
|
|
907
|
+
`,
|
|
908
|
+
secondary: o`
|
|
909
|
+
background: ${({ theme: e }) => y(e).colors.secondary};
|
|
910
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
911
|
+
|
|
912
|
+
&:hover:not(:disabled) {
|
|
913
|
+
background: ${({ theme: e }) => p(y(e).colors.secondary, y(e).colors.ink)};
|
|
914
|
+
}
|
|
915
|
+
`
|
|
916
|
+
}, Te = s.a`
|
|
917
|
+
display: inline-flex;
|
|
918
|
+
align-items: center;
|
|
919
|
+
justify-content: center;
|
|
920
|
+
gap: ${({ theme: e }) => y(e).space.sm};
|
|
921
|
+
font-family: ${({ theme: e }) => y(e).font.sans};
|
|
922
|
+
font-size: ${({ theme: e }) => y(e).link.fontSize};
|
|
923
|
+
font-weight: ${({ theme: e }) => y(e).font.weight.semibold};
|
|
924
|
+
text-transform: ${({ theme: e }) => y(e).link.textTransform};
|
|
925
|
+
text-decoration: ${({ theme: e }) => y(e).link.textDecoration};
|
|
926
|
+
cursor: pointer;
|
|
927
|
+
transition:
|
|
928
|
+
background-color 0.15s ease,
|
|
929
|
+
transform 0.15s ease,
|
|
930
|
+
box-shadow 0.15s ease;
|
|
931
|
+
|
|
932
|
+
${T("link")}
|
|
933
|
+
|
|
934
|
+
border: ${({ theme: e }) => y(e).link.border};
|
|
935
|
+
box-shadow: ${({ theme: e }) => y(e).shadow.link};
|
|
936
|
+
border-radius: ${({ theme: e }) => y(e).link.borderRadius};
|
|
937
|
+
padding: ${({ theme: e }) => y(e).link.padding};
|
|
938
|
+
|
|
939
|
+
white-space: nowrap;
|
|
940
|
+
|
|
941
|
+
&:active,
|
|
942
|
+
&[data-pressed='true'] {
|
|
943
|
+
transform: ${({ theme: e }) => `translate(${y(e).shadow.offsetX}, ${y(e).shadow.offsetY})`};
|
|
944
|
+
box-shadow: none;
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
${({ $variant: e }) => we[e]}
|
|
948
|
+
${({ $size: e }) => Ce[e]}
|
|
949
|
+
`;
|
|
950
|
+
// src/components/atoms/ALink/ALink.tsx
|
|
951
|
+
function Y({ children: e, variant: t = "primary", size: n = "md", onPointerDown: r, onPointerUp: i, onPointerCancel: a, onLostPointerCapture: o, ...s }) {
|
|
952
|
+
let { pressed: l, pressHandlers: u } = j({
|
|
953
|
+
onPointerDown: r,
|
|
954
|
+
onPointerUp: i,
|
|
955
|
+
onPointerCancel: a,
|
|
956
|
+
onLostPointerCapture: o
|
|
957
|
+
});
|
|
958
|
+
return /* @__PURE__ */ c(Te, {
|
|
959
|
+
$size: n,
|
|
960
|
+
$variant: t,
|
|
961
|
+
"data-pressed": l ? "true" : void 0,
|
|
962
|
+
...s,
|
|
963
|
+
...u,
|
|
964
|
+
children: e
|
|
965
|
+
});
|
|
966
|
+
}
|
|
967
|
+
// src/components/atoms/ALogo/ALogo.styles.ts
|
|
968
|
+
var Ee = s.div`
|
|
969
|
+
--logo-size: ${({ theme: e }) => y(e).logo.size};
|
|
970
|
+
|
|
971
|
+
display: inline-flex;
|
|
972
|
+
align-items: center;
|
|
973
|
+
justify-content: center;
|
|
974
|
+
gap: ${({ theme: e }) => y(e).space.sm};
|
|
975
|
+
min-width: 0;
|
|
976
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
977
|
+
font-family: ${({ theme: e }) => y(e).font.sans};
|
|
978
|
+
font-size: ${({ theme: e }) => y(e).logo.fontSize};
|
|
979
|
+
font-weight: ${({ theme: e }) => y(e).logo.fontWeight};
|
|
980
|
+
white-space: ${({ theme: e }) => y(e).logo.whiteSpace};
|
|
981
|
+
|
|
982
|
+
& > span:first-child > svg,
|
|
983
|
+
& > span:first-child img {
|
|
984
|
+
display: block;
|
|
985
|
+
width: var(--logo-size);
|
|
986
|
+
height: var(--logo-size);
|
|
987
|
+
flex: 0 0 var(--logo-size);
|
|
988
|
+
object-fit: contain;
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
${({ $variant: e, theme: t }) => e === "icon" && o`
|
|
992
|
+
width: ${y(t).logo.size};
|
|
993
|
+
height: ${y(t).logo.size};
|
|
994
|
+
`}
|
|
995
|
+
`, De = s.span`
|
|
996
|
+
overflow: hidden;
|
|
997
|
+
text-overflow: ellipsis;
|
|
998
|
+
`;
|
|
999
|
+
// src/components/atoms/ALogo/ALogo.tsx
|
|
1000
|
+
function Oe({ logo: e, name: t, variant: n = "full", ...r }) {
|
|
1001
|
+
return /* @__PURE__ */ l(Ee, {
|
|
1002
|
+
...r,
|
|
1003
|
+
$variant: n,
|
|
1004
|
+
role: n === "icon" ? "img" : void 0,
|
|
1005
|
+
"aria-label": n === "icon" ? t : r["aria-label"],
|
|
1006
|
+
children: [/* @__PURE__ */ c("span", {
|
|
1007
|
+
"aria-hidden": "true",
|
|
1008
|
+
children: e
|
|
1009
|
+
}), n === "full" ? /* @__PURE__ */ c(De, { children: t }) : null]
|
|
1010
|
+
});
|
|
1011
|
+
}
|
|
1012
|
+
// src/components/atoms/ASearchInput/ASearchInput.styles.ts
|
|
1013
|
+
var ke = o`
|
|
1014
|
+
box-sizing: border-box;
|
|
1015
|
+
width: 100%;
|
|
1016
|
+
height: ${({ theme: e }) => y(e).formControl.height};
|
|
1017
|
+
border: ${({ theme: e }) => y(e).formControl.border};
|
|
1018
|
+
border-radius: ${({ theme: e }) => y(e).formControl.borderRadius};
|
|
1019
|
+
padding: ${({ theme: e }) => y(e).formControl.padding};
|
|
1020
|
+
background: ${({ theme: e }) => y(e).colors.background};
|
|
1021
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
1022
|
+
font: inherit;
|
|
1023
|
+
font-size: ${({ theme: e }) => y(e).formControl.fontSize};
|
|
1024
|
+
`, Ae = s.div`
|
|
1025
|
+
${S}
|
|
1026
|
+
`, je = s.div`
|
|
1027
|
+
position: relative;
|
|
1028
|
+
`, Me = s.input`
|
|
1029
|
+
${ke}
|
|
1030
|
+
padding-right: ${({ theme: e }) => y(e).formControl.trailingActionPadding};
|
|
1031
|
+
|
|
1032
|
+
/* TODO: Outline styles should be implemented for each form ui elements */
|
|
1033
|
+
|
|
1034
|
+
&:disabled {
|
|
1035
|
+
cursor: not-allowed;
|
|
1036
|
+
opacity: ${({ theme: e }) => y(e).opacity.disabled};
|
|
1037
|
+
}
|
|
1038
|
+
`, Ne = s(G)`
|
|
1039
|
+
position: absolute;
|
|
1040
|
+
top: 50%;
|
|
1041
|
+
right: ${({ theme: e }) => y(e).space.md};
|
|
1042
|
+
translate: 0 -50%;
|
|
1043
|
+
`, Pe = s.ul`
|
|
1044
|
+
position: absolute;
|
|
1045
|
+
z-index: 10;
|
|
1046
|
+
top: 100%;
|
|
1047
|
+
right: 0;
|
|
1048
|
+
left: 0;
|
|
1049
|
+
max-height: ${({ theme: e }) => y(e).formControl.optionListMaxHeight};
|
|
1050
|
+
margin: 0;
|
|
1051
|
+
padding: 0;
|
|
1052
|
+
overflow: auto;
|
|
1053
|
+
border: ${({ theme: e }) => y(e).formControl.dropdownBorder};
|
|
1054
|
+
border-radius: ${({ theme: e }) => y(e).formControl.borderRadius};
|
|
1055
|
+
background: ${({ theme: e }) => y(e).colors.background};
|
|
1056
|
+
list-style: none;
|
|
1057
|
+
`, Fe = s.li`
|
|
1058
|
+
${w}
|
|
1059
|
+
background: ${({ theme: e, $active: t }) => t ? y(e).colors.secondaryHover : "transparent"};
|
|
1060
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
1061
|
+
cursor: pointer;
|
|
1062
|
+
`;
|
|
1063
|
+
// src/components/atoms/ASearchInput/ASearchInput.tsx
|
|
1064
|
+
function Ie() {
|
|
1065
|
+
return /* @__PURE__ */ l("svg", {
|
|
1066
|
+
fill: "none",
|
|
1067
|
+
viewBox: "0 0 24 24",
|
|
1068
|
+
children: [/* @__PURE__ */ c("circle", {
|
|
1069
|
+
cx: "10.8",
|
|
1070
|
+
cy: "10.8",
|
|
1071
|
+
r: "6.3",
|
|
1072
|
+
stroke: "currentColor",
|
|
1073
|
+
strokeWidth: "1.8"
|
|
1074
|
+
}), /* @__PURE__ */ c("path", {
|
|
1075
|
+
d: "m15.5 15.5 4 4",
|
|
1076
|
+
stroke: "currentColor",
|
|
1077
|
+
strokeLinecap: "round",
|
|
1078
|
+
strokeWidth: "1.8"
|
|
1079
|
+
})]
|
|
1080
|
+
});
|
|
1081
|
+
}
|
|
1082
|
+
function Le({ options: i, value: a, defaultValue: o = "", debounceMs: s = 300, onSearch: u, onSelect: d, onChange: f, onFocus: p, onBlur: m, id: h, disabled: g, ref: _, ...v }) {
|
|
1083
|
+
let y = t(), b = h ?? y, x = `${b}-options`, S = n(null), C = n(!1), w = n(null), [T, E] = r(o), [D, O] = r(!1), [k, A] = r(-1), j = a ?? T, M = a !== void 0, N = j.trim().toLocaleLowerCase(), P = N ? i.filter((e) => e.label.toLocaleLowerCase().includes(N) || String(e.value).toLocaleLowerCase().includes(N)) : [], F = D && P.length > 0;
|
|
1084
|
+
e(() => {
|
|
1085
|
+
if (!C.current) {
|
|
1086
|
+
C.current = !0;
|
|
1087
|
+
return;
|
|
1088
|
+
}
|
|
1089
|
+
if (!u) return;
|
|
1090
|
+
let e = setTimeout(() => {
|
|
1091
|
+
w.current = null, u(j);
|
|
1092
|
+
}, s);
|
|
1093
|
+
return w.current = e, () => {
|
|
1094
|
+
clearTimeout(e), w.current === e && (w.current = null);
|
|
1095
|
+
};
|
|
1096
|
+
}, [
|
|
1097
|
+
s,
|
|
1098
|
+
u,
|
|
1099
|
+
j
|
|
1100
|
+
]);
|
|
1101
|
+
let I = (e) => {
|
|
1102
|
+
M || E(e.currentTarget.value), A(-1), f?.(e);
|
|
1103
|
+
}, L = (e) => {
|
|
1104
|
+
e.relatedTarget instanceof Node && S.current?.querySelector("[role=\"listbox\"]")?.contains(e.relatedTarget) || (O(!1), A(-1), m?.(e));
|
|
1105
|
+
}, R = (e) => {
|
|
1106
|
+
M || E(e.label), d?.(e), O(!1);
|
|
1107
|
+
}, z = (e) => {
|
|
1108
|
+
e.key === "ArrowDown" && P.length > 0 ? (e.preventDefault(), O(!0), A((e) => (e + 1) % P.length)) : e.key === "ArrowUp" && P.length > 0 ? (e.preventDefault(), O(!0), A((e) => e <= 0 ? P.length - 1 : e - 1)) : e.key === "Enter" && F && P[k] ? (e.preventDefault(), R(P[k])) : e.key === "Escape" && (O(!1), A(-1)), v.onKeyDown?.(e);
|
|
1109
|
+
};
|
|
1110
|
+
return /* @__PURE__ */ c(Ae, {
|
|
1111
|
+
ref: S,
|
|
1112
|
+
children: /* @__PURE__ */ l(je, { children: [
|
|
1113
|
+
/* @__PURE__ */ c(Me, {
|
|
1114
|
+
...v,
|
|
1115
|
+
"aria-activedescendant": F && k >= 0 ? `${x}-option-${String(k)}` : void 0,
|
|
1116
|
+
"aria-autocomplete": "list",
|
|
1117
|
+
"aria-controls": F ? x : void 0,
|
|
1118
|
+
"aria-expanded": F,
|
|
1119
|
+
"aria-haspopup": "listbox",
|
|
1120
|
+
autoComplete: "off",
|
|
1121
|
+
disabled: g,
|
|
1122
|
+
id: b,
|
|
1123
|
+
onBlur: L,
|
|
1124
|
+
onChange: I,
|
|
1125
|
+
onFocus: (e) => {
|
|
1126
|
+
O(!0), p && p(e);
|
|
1127
|
+
},
|
|
1128
|
+
onKeyDown: z,
|
|
1129
|
+
ref: _,
|
|
1130
|
+
role: "combobox",
|
|
1131
|
+
value: j
|
|
1132
|
+
}),
|
|
1133
|
+
/* @__PURE__ */ c(Ne, {
|
|
1134
|
+
"aria-label": "Search",
|
|
1135
|
+
disabled: g,
|
|
1136
|
+
ghost: !0,
|
|
1137
|
+
onClick: () => {
|
|
1138
|
+
w.current &&= (clearTimeout(w.current), null), u?.(j);
|
|
1139
|
+
},
|
|
1140
|
+
shape: "rounded",
|
|
1141
|
+
size: "md",
|
|
1142
|
+
type: "button",
|
|
1143
|
+
variant: "primary",
|
|
1144
|
+
children: /* @__PURE__ */ c(H, {
|
|
1145
|
+
size: "md",
|
|
1146
|
+
style: { color: "inherit" },
|
|
1147
|
+
title: "Search",
|
|
1148
|
+
children: /* @__PURE__ */ c(Ie, {})
|
|
1149
|
+
})
|
|
1150
|
+
}),
|
|
1151
|
+
F ? /* @__PURE__ */ c(Pe, {
|
|
1152
|
+
id: x,
|
|
1153
|
+
role: "listbox",
|
|
1154
|
+
children: P.map((e, t) => /* @__PURE__ */ c(Fe, {
|
|
1155
|
+
"aria-selected": t === k,
|
|
1156
|
+
id: `${x}-option-${String(t)}`,
|
|
1157
|
+
onClick: () => {
|
|
1158
|
+
R(e);
|
|
1159
|
+
},
|
|
1160
|
+
onMouseDown: (e) => {
|
|
1161
|
+
e.preventDefault();
|
|
1162
|
+
},
|
|
1163
|
+
role: "option",
|
|
1164
|
+
$active: t === k,
|
|
1165
|
+
children: e.label
|
|
1166
|
+
}, `${String(e.value)}-${e.label}`))
|
|
1167
|
+
}) : null
|
|
1168
|
+
] })
|
|
1169
|
+
});
|
|
1170
|
+
}
|
|
1171
|
+
// src/components/atoms/ASection/ASection.styles.ts
|
|
1172
|
+
var Re = s.section`
|
|
1173
|
+
border: ${({ theme: e }) => y(e).section.border};
|
|
1174
|
+
border-radius: ${({ theme: e }) => y(e).section.borderRadius};
|
|
1175
|
+
padding: ${({ theme: e }) => y(e).section.padding};
|
|
1176
|
+
background-color: ${({ theme: e }) => y(e).colors.surface};
|
|
1177
|
+
box-shadow: ${({ $shadow: e, theme: t }) => e ? y(t).shadow.section : "none"};
|
|
1178
|
+
`;
|
|
1179
|
+
// src/components/atoms/ASection/ASection.tsx
|
|
1180
|
+
function ze({ children: e, shadow: t = !1, ...n }) {
|
|
1181
|
+
return /* @__PURE__ */ c(Re, {
|
|
1182
|
+
$shadow: t,
|
|
1183
|
+
...n,
|
|
1184
|
+
children: e
|
|
1185
|
+
});
|
|
1186
|
+
}
|
|
1187
|
+
// src/components/atoms/ASelect/ASelect.styles.ts
|
|
1188
|
+
var Be = o`
|
|
1189
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
1190
|
+
font-size: ${({ theme: e }) => y(e).typography.small};
|
|
1191
|
+
font-weight: ${({ theme: e }) => y(e).font.weight.semibold};
|
|
1192
|
+
`, Ve = o`
|
|
1193
|
+
box-sizing: border-box;
|
|
1194
|
+
width: 100%;
|
|
1195
|
+
height: ${({ theme: e }) => y(e).formControl.height};
|
|
1196
|
+
border: ${({ theme: e }) => y(e).formControl.border};
|
|
1197
|
+
border-radius: ${({ theme: e }) => y(e).formControl.borderRadius};
|
|
1198
|
+
padding: ${({ theme: e, $hasTrailingAction: t }) => t ? `${y(e).formControl.padding} ${y(e).formControl.trailingActionPadding} ${y(e).formControl.padding} ${y(e).formControl.padding}` : y(e).formControl.padding};
|
|
1199
|
+
background: ${({ theme: e }) => y(e).colors.background};
|
|
1200
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
1201
|
+
font: inherit;
|
|
1202
|
+
font-size: ${({ theme: e }) => y(e).formControl.fontSize};
|
|
1203
|
+
|
|
1204
|
+
${T("formControl")}
|
|
1205
|
+
|
|
1206
|
+
&:disabled {
|
|
1207
|
+
cursor: not-allowed;
|
|
1208
|
+
opacity: ${({ theme: e }) => y(e).opacity.disabled};
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
${({ $invalid: e, theme: t }) => e && o`
|
|
1212
|
+
border-color: ${y(t).colors.error};
|
|
1213
|
+
`}
|
|
1214
|
+
|
|
1215
|
+
${({ $invalid: e, $warning: t, theme: n }) => !e && t && o`
|
|
1216
|
+
border-color: ${y(n).colors.warning};
|
|
1217
|
+
`}
|
|
1218
|
+
`, He = o`
|
|
1219
|
+
color: ${({ theme: e, $type: t }) => y(e).colors[t]};
|
|
1220
|
+
font-size: ${({ theme: e }) => y(e).typography.small};
|
|
1221
|
+
`, Ue = s.div`
|
|
1222
|
+
${S}
|
|
1223
|
+
`, We = s.div`
|
|
1224
|
+
position: relative;
|
|
1225
|
+
`, Ge = s.label`
|
|
1226
|
+
${Be}
|
|
1227
|
+
`, Ke = s.div`
|
|
1228
|
+
${Ve}
|
|
1229
|
+
display: flex;
|
|
1230
|
+
align-items: center;
|
|
1231
|
+
justify-content: space-between;
|
|
1232
|
+
gap: ${({ theme: e }) => y(e).space.lg};
|
|
1233
|
+
text-align: left;
|
|
1234
|
+
cursor: ${({ $disabled: e }) => e ? "not-allowed" : "pointer"};
|
|
1235
|
+
|
|
1236
|
+
${({ $disabled: e }) => e && o`
|
|
1237
|
+
opacity: ${({ theme: e }) => y(e).opacity.disabled};
|
|
1238
|
+
`}
|
|
1239
|
+
`, qe = s.div`
|
|
1240
|
+
position: absolute;
|
|
1241
|
+
z-index: 10;
|
|
1242
|
+
top: 100%;
|
|
1243
|
+
right: 0;
|
|
1244
|
+
left: 0;
|
|
1245
|
+
max-height: ${({ theme: e }) => y(e).formControl.optionListMaxHeight};
|
|
1246
|
+
overflow: auto;
|
|
1247
|
+
border: ${({ theme: e }) => y(e).formControl.dropdownBorder};
|
|
1248
|
+
border-radius: ${({ theme: e }) => y(e).formControl.borderRadius};
|
|
1249
|
+
background: ${({ theme: e }) => y(e).colors.background};
|
|
1250
|
+
`, Je = s.button`
|
|
1251
|
+
display: block;
|
|
1252
|
+
width: 100%;
|
|
1253
|
+
${w}
|
|
1254
|
+
border: 0;
|
|
1255
|
+
border-radius: 0;
|
|
1256
|
+
background: ${({ theme: e, $selected: t }) => t ? y(e).colors.secondary : "transparent"};
|
|
1257
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
1258
|
+
font: inherit;
|
|
1259
|
+
text-align: left;
|
|
1260
|
+
text-transform: ${({ theme: e }) => y(e).formControl.optionTextTransform};
|
|
1261
|
+
cursor: pointer;
|
|
1262
|
+
|
|
1263
|
+
&:hover,
|
|
1264
|
+
&:focus-visible {
|
|
1265
|
+
background: ${({ theme: e }) => y(e).colors.secondaryHover};
|
|
1266
|
+
outline: none;
|
|
1267
|
+
}
|
|
1268
|
+
`, Ye = s.select`
|
|
1269
|
+
position: absolute;
|
|
1270
|
+
width: 1px;
|
|
1271
|
+
height: 1px;
|
|
1272
|
+
padding: 0;
|
|
1273
|
+
overflow: hidden;
|
|
1274
|
+
clip: rect(0, 0, 0, 0);
|
|
1275
|
+
white-space: nowrap;
|
|
1276
|
+
border: 0;
|
|
1277
|
+
`, Xe = s.span`
|
|
1278
|
+
overflow: hidden;
|
|
1279
|
+
color: ${({ theme: e, $placeholder: t }) => t ? y(e).colors.muted : "inherit"};
|
|
1280
|
+
text-overflow: ellipsis;
|
|
1281
|
+
white-space: nowrap;
|
|
1282
|
+
`, X = s.div`
|
|
1283
|
+
${He}
|
|
1284
|
+
`;
|
|
1285
|
+
// src/components/atoms/ASelect/ASelect.tsx
|
|
1286
|
+
function Ze({ options: i, value: a, defaultValue: o, onChange: s, onValueChange: u, onBlur: d, id: f, name: p, label: m, placeholder: h = "Select an option", error: g, warning: _, disabled: v, required: y, ref: b, "aria-describedby": x, "aria-invalid": S, ...C }) {
|
|
1287
|
+
let w = t(), T = f ?? w, E = `${T}-options`, D = `${T}-error`, O = `${T}-warning`, k = n(null), A = n(null), j = n(null), [M, N] = r(o), [P, F] = r(!1), I = a ?? M, L = i.find((e) => String(e.value) === String(I)), R = !!g || S === !0 || S === "true", z = [
|
|
1288
|
+
x,
|
|
1289
|
+
g ? D : void 0,
|
|
1290
|
+
_ ? O : void 0
|
|
1291
|
+
].filter(Boolean).join(" ") || void 0, B = (e) => {
|
|
1292
|
+
s?.(e);
|
|
1293
|
+
};
|
|
1294
|
+
e(() => {
|
|
1295
|
+
if (!P) return;
|
|
1296
|
+
let e = (e) => {
|
|
1297
|
+
e.target instanceof Node && k.current?.contains(e.target) || F(!1);
|
|
1298
|
+
};
|
|
1299
|
+
return document.addEventListener("pointerdown", e), () => {
|
|
1300
|
+
document.removeEventListener("pointerdown", e);
|
|
1301
|
+
};
|
|
1302
|
+
}, [P]), e(() => {
|
|
1303
|
+
P && (k.current?.querySelector("[role=\"option\"][aria-selected=\"true\"]") ?? k.current?.querySelector("[role=\"option\"]"))?.focus();
|
|
1304
|
+
}, [P]);
|
|
1305
|
+
let V = (e) => {
|
|
1306
|
+
a === void 0 && N(e), u?.(e);
|
|
1307
|
+
let t = A.current;
|
|
1308
|
+
t && (t.value = String(e), t.dispatchEvent(new Event("change", { bubbles: !0 })));
|
|
1309
|
+
}, H = (e) => {
|
|
1310
|
+
k.current?.contains(e.relatedTarget) || (F(!1), A.current?.dispatchEvent(new FocusEvent("focusout", { bubbles: !0 })));
|
|
1311
|
+
}, U = (e, t) => {
|
|
1312
|
+
let n;
|
|
1313
|
+
e.key === "ArrowDown" && (n = (t + 1) % i.length), e.key === "ArrowUp" && (n = (t - 1 + i.length) % i.length), e.key === "Home" && (n = 0), e.key === "End" && (n = i.length - 1), e.key === "Escape" ? (e.preventDefault(), F(!1), j.current?.focus()) : n !== void 0 && (e.preventDefault(), k.current?.querySelectorAll("[role=\"option\"]")[n]?.focus());
|
|
1314
|
+
};
|
|
1315
|
+
return /* @__PURE__ */ l(Ue, {
|
|
1316
|
+
ref: k,
|
|
1317
|
+
children: [
|
|
1318
|
+
m ? /* @__PURE__ */ c(Ge, {
|
|
1319
|
+
htmlFor: T,
|
|
1320
|
+
children: m
|
|
1321
|
+
}) : null,
|
|
1322
|
+
/* @__PURE__ */ l(We, { children: [
|
|
1323
|
+
/* @__PURE__ */ l(Ye, {
|
|
1324
|
+
...C,
|
|
1325
|
+
"aria-hidden": "true",
|
|
1326
|
+
"aria-invalid": R || void 0,
|
|
1327
|
+
disabled: v,
|
|
1328
|
+
id: `${T}-native`,
|
|
1329
|
+
name: p,
|
|
1330
|
+
onBlur: d,
|
|
1331
|
+
onChange: B,
|
|
1332
|
+
ref: (e) => {
|
|
1333
|
+
A.current = e, typeof b == "function" ? b(e) : b && (b.current = e);
|
|
1334
|
+
},
|
|
1335
|
+
required: y,
|
|
1336
|
+
tabIndex: -1,
|
|
1337
|
+
value: I === void 0 ? "" : String(I),
|
|
1338
|
+
children: [/* @__PURE__ */ c("option", {
|
|
1339
|
+
value: "",
|
|
1340
|
+
children: h
|
|
1341
|
+
}), i.map((e) => /* @__PURE__ */ c("option", {
|
|
1342
|
+
value: String(e.value),
|
|
1343
|
+
children: e.label
|
|
1344
|
+
}, String(e.value)))]
|
|
1345
|
+
}),
|
|
1346
|
+
/* @__PURE__ */ l(Ke, {
|
|
1347
|
+
onClick: () => {
|
|
1348
|
+
v || F((e) => !e);
|
|
1349
|
+
},
|
|
1350
|
+
$disabled: !!v,
|
|
1351
|
+
$invalid: R,
|
|
1352
|
+
$warning: !!_,
|
|
1353
|
+
children: [/* @__PURE__ */ c(Xe, {
|
|
1354
|
+
$placeholder: !L,
|
|
1355
|
+
children: L?.label ?? h
|
|
1356
|
+
}), /* @__PURE__ */ c(G, {
|
|
1357
|
+
"aria-controls": E,
|
|
1358
|
+
"aria-describedby": z,
|
|
1359
|
+
"aria-expanded": P,
|
|
1360
|
+
"aria-haspopup": "listbox",
|
|
1361
|
+
"aria-invalid": R || void 0,
|
|
1362
|
+
"aria-label": m ?? h,
|
|
1363
|
+
disabled: v,
|
|
1364
|
+
ghost: !0,
|
|
1365
|
+
id: T,
|
|
1366
|
+
onBlur: H,
|
|
1367
|
+
onClick: (e) => {
|
|
1368
|
+
e.stopPropagation(), F((e) => !e);
|
|
1369
|
+
},
|
|
1370
|
+
onKeyDown: (e) => {
|
|
1371
|
+
e.key === "Escape" ? F(!1) : P || e.key !== "ArrowDown" && e.key !== "Enter" && e.key !== " " || (e.preventDefault(), F(!0));
|
|
1372
|
+
},
|
|
1373
|
+
ref: j,
|
|
1374
|
+
shape: "rounded",
|
|
1375
|
+
size: "md",
|
|
1376
|
+
type: "button",
|
|
1377
|
+
variant: "primary",
|
|
1378
|
+
children: /* @__PURE__ */ c("svg", {
|
|
1379
|
+
fill: "none",
|
|
1380
|
+
style: {
|
|
1381
|
+
transform: P ? "rotate(180deg)" : "rotate(0)",
|
|
1382
|
+
transition: "transform 120ms ease"
|
|
1383
|
+
},
|
|
1384
|
+
viewBox: "0 0 24 24",
|
|
1385
|
+
children: /* @__PURE__ */ c("path", {
|
|
1386
|
+
d: "m6 9 6 6 6-6",
|
|
1387
|
+
stroke: "currentColor",
|
|
1388
|
+
strokeLinecap: "round",
|
|
1389
|
+
strokeLinejoin: "round",
|
|
1390
|
+
strokeWidth: "2"
|
|
1391
|
+
})
|
|
1392
|
+
})
|
|
1393
|
+
})]
|
|
1394
|
+
}),
|
|
1395
|
+
P ? /* @__PURE__ */ c(qe, {
|
|
1396
|
+
id: E,
|
|
1397
|
+
role: "listbox",
|
|
1398
|
+
"aria-label": m,
|
|
1399
|
+
children: i.map((e, t) => {
|
|
1400
|
+
let n = String(e.value) === String(I ?? "");
|
|
1401
|
+
return /* @__PURE__ */ c(Je, {
|
|
1402
|
+
"aria-selected": n,
|
|
1403
|
+
onClick: () => {
|
|
1404
|
+
V(e.value), F(!1), j.current?.focus();
|
|
1405
|
+
},
|
|
1406
|
+
onBlur: H,
|
|
1407
|
+
onKeyDown: (e) => {
|
|
1408
|
+
U(e, t);
|
|
1409
|
+
},
|
|
1410
|
+
role: "option",
|
|
1411
|
+
tabIndex: -1,
|
|
1412
|
+
type: "button",
|
|
1413
|
+
$selected: n,
|
|
1414
|
+
children: e.label
|
|
1415
|
+
}, String(e.value));
|
|
1416
|
+
})
|
|
1417
|
+
}) : null
|
|
1418
|
+
] }),
|
|
1419
|
+
g ? /* @__PURE__ */ c(X, {
|
|
1420
|
+
$type: "error",
|
|
1421
|
+
id: D,
|
|
1422
|
+
role: "alert",
|
|
1423
|
+
children: g
|
|
1424
|
+
}) : null,
|
|
1425
|
+
_ ? /* @__PURE__ */ c(X, {
|
|
1426
|
+
$type: "warning",
|
|
1427
|
+
id: O,
|
|
1428
|
+
role: "status",
|
|
1429
|
+
children: _
|
|
1430
|
+
}) : null
|
|
1431
|
+
]
|
|
1432
|
+
});
|
|
1433
|
+
}
|
|
1434
|
+
// src/components/atoms/ATextarea/ATextarea.styles.ts
|
|
1435
|
+
var Qe = s.div`
|
|
1436
|
+
${S}
|
|
1437
|
+
`, $e = s.label`
|
|
1438
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
1439
|
+
font-size: ${({ theme: e }) => y(e).typography.small};
|
|
1440
|
+
font-weight: ${({ theme: e }) => y(e).font.weight.semibold};
|
|
1441
|
+
`, et = s.textarea`
|
|
1442
|
+
box-sizing: border-box;
|
|
1443
|
+
width: 100%;
|
|
1444
|
+
height: ${({ $height: e, theme: t }) => e == null ? y(t).formControl.textareaHeight : typeof e == "number" ? `${e.toString()}px` : e};
|
|
1445
|
+
min-height: ${({ theme: e }) => y(e).formControl.textareaHeight};
|
|
1446
|
+
border: ${({ theme: e }) => y(e).formControl.border};
|
|
1447
|
+
border-radius: ${({ theme: e }) => y(e).formControl.borderRadius};
|
|
1448
|
+
padding: ${({ theme: e }) => y(e).formControl.padding};
|
|
1449
|
+
background: ${({ theme: e }) => y(e).colors.background};
|
|
1450
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
1451
|
+
font: inherit;
|
|
1452
|
+
font-size: ${({ theme: e }) => y(e).formControl.fontSize};
|
|
1453
|
+
resize: ${({ $resizable: e }) => e ? "vertical" : "none"};
|
|
1454
|
+
|
|
1455
|
+
${T("formControl")}
|
|
1456
|
+
|
|
1457
|
+
&:disabled {
|
|
1458
|
+
cursor: not-allowed;
|
|
1459
|
+
opacity: ${({ theme: e }) => y(e).opacity.disabled};
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
${({ $invalid: e, theme: t }) => e && o`
|
|
1463
|
+
border-color: ${y(t).colors.error};
|
|
1464
|
+
`}
|
|
1465
|
+
|
|
1466
|
+
${({ $invalid: e, $warning: t, theme: n }) => !e && t && o`
|
|
1467
|
+
border-color: ${y(n).colors.warning};
|
|
1468
|
+
`}
|
|
1469
|
+
|
|
1470
|
+
&:focus,
|
|
1471
|
+
&:focus-visible {
|
|
1472
|
+
${({ $invalid: e, $warning: t, theme: n }) => e ? o`
|
|
1473
|
+
border-color: ${y(n).colors.error};
|
|
1474
|
+
` : t ? o`
|
|
1475
|
+
border-color: ${y(n).colors.warning};
|
|
1476
|
+
` : ""}
|
|
1477
|
+
outline: none;
|
|
1478
|
+
}
|
|
1479
|
+
`, Z = s.div`
|
|
1480
|
+
color: ${({ theme: e, $type: t }) => y(e).colors[t]};
|
|
1481
|
+
font-size: ${({ theme: e }) => y(e).typography.small};
|
|
1482
|
+
`;
|
|
1483
|
+
// src/components/atoms/ATextarea/ATextarea.tsx
|
|
1484
|
+
function tt({ id: e, label: n, error: r, warning: i, height: a, resizable: o = !1, ref: s, "aria-describedby": u, "aria-invalid": d, ...f }) {
|
|
1485
|
+
let p = t(), m = e ?? p, h = `${m}-error`, g = `${m}-warning`, _ = !!r || d === !0 || d === "true", v = [
|
|
1486
|
+
u,
|
|
1487
|
+
r ? h : void 0,
|
|
1488
|
+
i ? g : void 0
|
|
1489
|
+
].filter(Boolean).join(" ") || void 0;
|
|
1490
|
+
return /* @__PURE__ */ l(Qe, { children: [
|
|
1491
|
+
n ? /* @__PURE__ */ c($e, {
|
|
1492
|
+
htmlFor: m,
|
|
1493
|
+
children: n
|
|
1494
|
+
}) : null,
|
|
1495
|
+
/* @__PURE__ */ c(et, {
|
|
1496
|
+
...f,
|
|
1497
|
+
$height: a,
|
|
1498
|
+
$invalid: _,
|
|
1499
|
+
$resizable: o,
|
|
1500
|
+
$warning: !!i,
|
|
1501
|
+
"aria-describedby": v,
|
|
1502
|
+
"aria-invalid": _ || void 0,
|
|
1503
|
+
id: m,
|
|
1504
|
+
ref: s
|
|
1505
|
+
}),
|
|
1506
|
+
r ? /* @__PURE__ */ c(Z, {
|
|
1507
|
+
$type: "error",
|
|
1508
|
+
id: h,
|
|
1509
|
+
role: "alert",
|
|
1510
|
+
children: r
|
|
1511
|
+
}) : null,
|
|
1512
|
+
i ? /* @__PURE__ */ c(Z, {
|
|
1513
|
+
$type: "warning",
|
|
1514
|
+
id: g,
|
|
1515
|
+
role: "status",
|
|
1516
|
+
children: i
|
|
1517
|
+
}) : null
|
|
1518
|
+
] });
|
|
1519
|
+
}
|
|
1520
|
+
// src/components/atoms/ATypography/ATypography.styles.ts
|
|
1521
|
+
var nt = s.p`
|
|
1522
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
1523
|
+
font-family: ${({ theme: e }) => y(e).font.sans};
|
|
1524
|
+
font-size: ${({ theme: e, $fontSize: t, $tag: n }) => {
|
|
1525
|
+
if (t !== void 0) return t;
|
|
1526
|
+
let r = y(e).typography;
|
|
1527
|
+
return n && Object.hasOwn(r, n) ? r[n] : r.fallback;
|
|
1528
|
+
}};
|
|
1529
|
+
`;
|
|
1530
|
+
// src/components/atoms/ATypography/ATypography.tsx
|
|
1531
|
+
function rt({ tag: e, as: t, fontSize: n, ...r }) {
|
|
1532
|
+
let i = e ?? t ?? "p";
|
|
1533
|
+
return /* @__PURE__ */ c(nt, {
|
|
1534
|
+
$tag: typeof i == "string" ? i : void 0,
|
|
1535
|
+
$fontSize: n,
|
|
1536
|
+
as: i,
|
|
1537
|
+
...r
|
|
1538
|
+
});
|
|
1539
|
+
}
|
|
1540
|
+
// src/components/molecules/MModal/MModal.styles.ts
|
|
1541
|
+
var it = o`
|
|
1542
|
+
position: fixed;
|
|
1543
|
+
inset: 0;
|
|
1544
|
+
z-index: 1000;
|
|
1545
|
+
display: flex;
|
|
1546
|
+
align-items: center;
|
|
1547
|
+
justify-content: center;
|
|
1548
|
+
padding: ${({ theme: e }) => y(e).space.lg};
|
|
1549
|
+
`, at = o`
|
|
1550
|
+
position: absolute;
|
|
1551
|
+
inset: 0;
|
|
1552
|
+
border: none;
|
|
1553
|
+
padding: 0;
|
|
1554
|
+
cursor: pointer;
|
|
1555
|
+
background: color-mix(
|
|
1556
|
+
in srgb,
|
|
1557
|
+
${({ theme: e }) => y(e).colors.bg} 25%,
|
|
1558
|
+
transparent
|
|
1559
|
+
);
|
|
1560
|
+
`, ot = o`
|
|
1561
|
+
position: relative;
|
|
1562
|
+
z-index: 1;
|
|
1563
|
+
box-sizing: border-box;
|
|
1564
|
+
display: flex;
|
|
1565
|
+
flex-direction: column;
|
|
1566
|
+
width: 100%;
|
|
1567
|
+
max-width: ${({ theme: e }) => y(e).modal.maxWidth};
|
|
1568
|
+
max-height: ${({ theme: e }) => y(e).modal.maxHeight};
|
|
1569
|
+
padding: ${({ theme: e }) => y(e).modal.padding};
|
|
1570
|
+
overflow: hidden;
|
|
1571
|
+
background-color: ${({ theme: e }) => y(e).colors.surface};
|
|
1572
|
+
border: ${({ theme: e }) => y(e).modal.border};
|
|
1573
|
+
border-radius: ${({ theme: e }) => y(e).modal.borderRadius};
|
|
1574
|
+
box-shadow: ${({ theme: e }) => y(e).shadow.modal};
|
|
1575
|
+
`, st = o`
|
|
1576
|
+
display: flex;
|
|
1577
|
+
align-items: center;
|
|
1578
|
+
justify-content: space-between;
|
|
1579
|
+
gap: ${({ theme: e }) => y(e).space.md};
|
|
1580
|
+
flex-shrink: 0;
|
|
1581
|
+
`, ct = o`
|
|
1582
|
+
margin: 0;
|
|
1583
|
+
min-width: 0;
|
|
1584
|
+
flex: 1;
|
|
1585
|
+
font-family: ${({ theme: e }) => y(e).font.sans};
|
|
1586
|
+
font-size: ${({ theme: e }) => y(e).modal.title.fontSize};
|
|
1587
|
+
font-weight: ${({ theme: e }) => y(e).modal.title.fontWeight};
|
|
1588
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
1589
|
+
`, lt = o`
|
|
1590
|
+
flex: 1;
|
|
1591
|
+
min-height: 0;
|
|
1592
|
+
margin-top: ${({ theme: e }) => y(e).space.lg};
|
|
1593
|
+
overflow-x: hidden;
|
|
1594
|
+
overflow-y: auto;
|
|
1595
|
+
font-family: ${({ theme: e }) => y(e).font.sans};
|
|
1596
|
+
font-size: ${({ theme: e }) => y(e).modal.body.fontSize};
|
|
1597
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
1598
|
+
`, ut = s.div`
|
|
1599
|
+
${it}
|
|
1600
|
+
`, dt = s.button`
|
|
1601
|
+
${at}
|
|
1602
|
+
`, ft = s.div`
|
|
1603
|
+
${ot}
|
|
1604
|
+
`, pt = s.div`
|
|
1605
|
+
${st}
|
|
1606
|
+
`, mt = s.h2`
|
|
1607
|
+
${ct}
|
|
1608
|
+
`, ht = s.div`
|
|
1609
|
+
${lt}
|
|
1610
|
+
`;
|
|
1611
|
+
// src/components/molecules/MModal/MModal.tsx
|
|
1612
|
+
function gt() {
|
|
1613
|
+
return /* @__PURE__ */ c("svg", {
|
|
1614
|
+
viewBox: "0 0 24 24",
|
|
1615
|
+
children: /* @__PURE__ */ c("path", {
|
|
1616
|
+
fill: "currentColor",
|
|
1617
|
+
d: "M18.3 5.71a1 1 0 0 0-1.41 0L12 10.59 7.11 5.7A1 1 0 0 0 5.7 7.11L10.59 12l-4.9 4.89a1 1 0 1 0 1.42 1.42L12 13.41l4.89 4.9a1 1 0 0 0 1.42-1.42L13.41 12l4.9-4.89a1 1 0 0 0-.01-1.4Z"
|
|
1618
|
+
})
|
|
1619
|
+
});
|
|
1620
|
+
}
|
|
1621
|
+
function _t({ open: r, onClose: i, title: a, children: o, closeLabel: s = "Close" }) {
|
|
1622
|
+
let d = t(), f = n(null);
|
|
1623
|
+
return e(() => {
|
|
1624
|
+
if (!r) return;
|
|
1625
|
+
f.current?.focus();
|
|
1626
|
+
let e = document.body.style.overflow;
|
|
1627
|
+
document.body.style.overflow = "hidden";
|
|
1628
|
+
let t = (e) => {
|
|
1629
|
+
e.key === "Escape" && i();
|
|
1630
|
+
};
|
|
1631
|
+
return document.addEventListener("keydown", t), () => {
|
|
1632
|
+
document.body.style.overflow = e, document.removeEventListener("keydown", t);
|
|
1633
|
+
};
|
|
1634
|
+
}, [r, i]), !r || typeof document > "u" ? null : u(/* @__PURE__ */ l(ut, { children: [/* @__PURE__ */ c(dt, {
|
|
1635
|
+
type: "button",
|
|
1636
|
+
"aria-label": "Close overlay",
|
|
1637
|
+
onClick: i
|
|
1638
|
+
}), /* @__PURE__ */ l(ft, {
|
|
1639
|
+
ref: f,
|
|
1640
|
+
role: "dialog",
|
|
1641
|
+
"aria-modal": "true",
|
|
1642
|
+
"aria-labelledby": d,
|
|
1643
|
+
tabIndex: -1,
|
|
1644
|
+
children: [/* @__PURE__ */ l(pt, { children: [/* @__PURE__ */ c(mt, {
|
|
1645
|
+
id: d,
|
|
1646
|
+
children: a
|
|
1647
|
+
}), /* @__PURE__ */ c(G, {
|
|
1648
|
+
"aria-label": s,
|
|
1649
|
+
ghost: !0,
|
|
1650
|
+
onClick: i,
|
|
1651
|
+
shape: "rounded",
|
|
1652
|
+
size: "md",
|
|
1653
|
+
variant: "primary",
|
|
1654
|
+
children: /* @__PURE__ */ c(gt, {})
|
|
1655
|
+
})] }), o == null ? null : /* @__PURE__ */ c(ht, { children: o })]
|
|
1656
|
+
})] }), document.body);
|
|
1657
|
+
}
|
|
1658
|
+
// src/components/molecules/MNavLinks/MNavLinks.styles.ts
|
|
1659
|
+
var Q = o`
|
|
1660
|
+
display: inline-flex;
|
|
1661
|
+
align-items: center;
|
|
1662
|
+
justify-content: center;
|
|
1663
|
+
border: 0;
|
|
1664
|
+
padding: ${({ theme: e }) => y(e).navLinks.itemPadding};
|
|
1665
|
+
box-shadow: ${({ theme: e }) => y(e).shadow.link};
|
|
1666
|
+
background: ${({ theme: e }) => y(e).colors.primary};
|
|
1667
|
+
color: ${({ theme: e }) => y(e).colors.primaryText};
|
|
1668
|
+
font-family: ${({ theme: e }) => y(e).font.sans};
|
|
1669
|
+
font-size: ${({ theme: e }) => y(e).navLinks.fontSize};
|
|
1670
|
+
font-weight: ${({ theme: e }) => y(e).font.weight.semibold};
|
|
1671
|
+
text-decoration: ${({ theme: e }) => y(e).navLinks.textDecoration};
|
|
1672
|
+
text-transform: ${({ theme: e }) => y(e).navLinks.textTransform};
|
|
1673
|
+
cursor: pointer;
|
|
1674
|
+
position: relative;
|
|
1675
|
+
z-index: 1;
|
|
1676
|
+
transition:
|
|
1677
|
+
background-color 0.15s ease,
|
|
1678
|
+
box-shadow 0.15s ease,
|
|
1679
|
+
color 0.15s ease,
|
|
1680
|
+
transform 0.15s ease;
|
|
1681
|
+
|
|
1682
|
+
&:hover:not(:disabled) {
|
|
1683
|
+
background: ${({ theme: e }) => p(y(e).colors.primary, y(e).colors.ink)};
|
|
1684
|
+
}
|
|
1685
|
+
|
|
1686
|
+
&:first-child {
|
|
1687
|
+
border-top-left-radius: ${({ theme: e }) => y(e).navLinks.borderRadius};
|
|
1688
|
+
border-bottom-left-radius: ${({ theme: e }) => y(e).navLinks.borderRadius};
|
|
1689
|
+
}
|
|
1690
|
+
|
|
1691
|
+
&:last-child {
|
|
1692
|
+
border-top-right-radius: ${({ theme: e }) => y(e).navLinks.borderRadius};
|
|
1693
|
+
border-bottom-right-radius: ${({ theme: e }) => y(e).navLinks.borderRadius};
|
|
1694
|
+
}
|
|
1695
|
+
|
|
1696
|
+
${T("navLinks")}
|
|
1697
|
+
|
|
1698
|
+
&:disabled {
|
|
1699
|
+
opacity: ${({ theme: e }) => y(e).opacity.disabledButton};
|
|
1700
|
+
cursor: not-allowed;
|
|
1701
|
+
}
|
|
1702
|
+
`, vt = s.nav`
|
|
1703
|
+
display: inline-flex;
|
|
1704
|
+
align-items: center;
|
|
1705
|
+
border-radius: ${({ theme: e }) => y(e).navLinks.borderRadius};
|
|
1706
|
+
padding: 0;
|
|
1707
|
+
box-shadow: ${({ theme: e }) => y(e).shadow.navLinks};
|
|
1708
|
+
font-family: ${({ theme: e }) => y(e).font.sans};
|
|
1709
|
+
font-size: ${({ theme: e }) => y(e).navLinks.fontSize};
|
|
1710
|
+
text-transform: ${({ theme: e }) => y(e).navLinks.textTransform};
|
|
1711
|
+
|
|
1712
|
+
& > a {
|
|
1713
|
+
${Q}
|
|
1714
|
+
|
|
1715
|
+
border: ${({ theme: e }) => y(e).navLinks.border};
|
|
1716
|
+
|
|
1717
|
+
&:active,
|
|
1718
|
+
&[aria-current='page'] {
|
|
1719
|
+
z-index: 0;
|
|
1720
|
+
box-shadow: none;
|
|
1721
|
+
transform: translate(
|
|
1722
|
+
calc(0px + ${({ theme: e }) => y(e).shadow.offsetX}),
|
|
1723
|
+
${({ theme: e }) => y(e).shadow.offsetY}
|
|
1724
|
+
);
|
|
1725
|
+
}
|
|
1726
|
+
}
|
|
1727
|
+
`, yt = s.button`
|
|
1728
|
+
${Q}
|
|
1729
|
+
`;
|
|
1730
|
+
// src/components/molecules/MNavLinks/MNavLinks.tsx
|
|
1731
|
+
function bt({ links: e, ...t }) {
|
|
1732
|
+
return /* @__PURE__ */ c(vt, {
|
|
1733
|
+
...t,
|
|
1734
|
+
children: e.map((e) => "href" in e && e.href !== void 0 ? /* @__PURE__ */ c(f, {
|
|
1735
|
+
to: e.href,
|
|
1736
|
+
className: e.className,
|
|
1737
|
+
style: e.style,
|
|
1738
|
+
end: e.end,
|
|
1739
|
+
caseSensitive: e.caseSensitive,
|
|
1740
|
+
children: e.label
|
|
1741
|
+
}, e.id) : /* @__PURE__ */ c(yt, {
|
|
1742
|
+
type: "button",
|
|
1743
|
+
disabled: e.disabled,
|
|
1744
|
+
onClick: e.onClick,
|
|
1745
|
+
children: e.label
|
|
1746
|
+
}, e.id))
|
|
1747
|
+
});
|
|
1748
|
+
}
|
|
1749
|
+
// src/components/molecules/MUserBadge/MUserBadge.styles.ts
|
|
1750
|
+
var xt = s.a`
|
|
1751
|
+
display: inline-flex;
|
|
1752
|
+
align-items: center;
|
|
1753
|
+
gap: ${({ theme: e }) => y(e).space.sm};
|
|
1754
|
+
color: inherit;
|
|
1755
|
+
font-family: ${({ theme: e }) => y(e).font.sans};
|
|
1756
|
+
text-decoration: ${({ theme: e }) => y(e).userBadge.textDecoration};
|
|
1757
|
+
|
|
1758
|
+
${T("userBadge")}
|
|
1759
|
+
`;
|
|
1760
|
+
// src/components/molecules/MUserBadge/MUserBadge.tsx
|
|
1761
|
+
function St({ to: e, firstName: t, lastName: n, avatarSrc: r, size: i = "md", showName: a = !0, ...o }) {
|
|
1762
|
+
let s = `${t} ${n}`.trim();
|
|
1763
|
+
return /* @__PURE__ */ l(xt, {
|
|
1764
|
+
as: d,
|
|
1765
|
+
to: e,
|
|
1766
|
+
...o,
|
|
1767
|
+
children: [/* @__PURE__ */ c(x, {
|
|
1768
|
+
firstName: t,
|
|
1769
|
+
lastName: n,
|
|
1770
|
+
src: r,
|
|
1771
|
+
alt: a ? "" : s,
|
|
1772
|
+
size: i,
|
|
1773
|
+
"aria-hidden": a ? !0 : void 0
|
|
1774
|
+
}), a ? /* @__PURE__ */ c("span", { children: s }) : null]
|
|
1775
|
+
});
|
|
1776
|
+
}
|
|
1777
|
+
// src/components/organisms/OSidebar/OSidebar.styles.ts
|
|
1778
|
+
var Ct = s.aside`
|
|
1779
|
+
box-sizing: border-box;
|
|
1780
|
+
display: flex;
|
|
1781
|
+
flex: 0 0
|
|
1782
|
+
${({ $extended: e, theme: t }) => e ? y(t).sidebar.width.extended : y(t).sidebar.width.compact};
|
|
1783
|
+
flex-direction: column;
|
|
1784
|
+
gap: ${({ theme: e }) => y(e).space.sm};
|
|
1785
|
+
width: ${({ $extended: e, theme: t }) => e ? y(t).sidebar.width.extended : y(t).sidebar.width.compact};
|
|
1786
|
+
height: ${({ theme: e }) => y(e).sidebar.height.fallback};
|
|
1787
|
+
height: ${({ theme: e }) => y(e).sidebar.height.dynamic};
|
|
1788
|
+
min-height: 0;
|
|
1789
|
+
overflow: hidden;
|
|
1790
|
+
padding: ${({ theme: e }) => y(e).space.inset};
|
|
1791
|
+
border: ${({ theme: e }) => y(e).sidebar.border};
|
|
1792
|
+
border-radius: ${({ theme: e }) => y(e).sidebar.borderRadius};
|
|
1793
|
+
background: ${({ theme: e }) => y(e).colors.surface};
|
|
1794
|
+
box-shadow: ${({ theme: e }) => y(e).shadow.sidebar};
|
|
1795
|
+
transition:
|
|
1796
|
+
width 0.2s ease,
|
|
1797
|
+
flex-basis 0.2s ease;
|
|
1798
|
+
`, wt = s.div`
|
|
1799
|
+
display: flex;
|
|
1800
|
+
flex-direction: column;
|
|
1801
|
+
align-items: center;
|
|
1802
|
+
gap: ${({ theme: e }) => y(e).space.sm};
|
|
1803
|
+
align-items: ${({ $extended: e }) => e ? "flex-end" : "center"};
|
|
1804
|
+
`, Tt = s.nav`
|
|
1805
|
+
display: flex;
|
|
1806
|
+
min-height: 0;
|
|
1807
|
+
flex: 1;
|
|
1808
|
+
flex-direction: column;
|
|
1809
|
+
align-items: stretch;
|
|
1810
|
+
gap: ${({ theme: e }) => y(e).space.sm};
|
|
1811
|
+
margin-inline: ${({ theme: e }) => `-${y(e).space.xs}`};
|
|
1812
|
+
padding-inline: ${({ theme: e }) => y(e).space.xs};
|
|
1813
|
+
overflow-y: auto;
|
|
1814
|
+
overflow-x: hidden;
|
|
1815
|
+
`, Et = s.div`
|
|
1816
|
+
display: flex;
|
|
1817
|
+
width: 100%;
|
|
1818
|
+
min-width: 0;
|
|
1819
|
+
|
|
1820
|
+
& > a {
|
|
1821
|
+
box-sizing: border-box;
|
|
1822
|
+
width: 100%;
|
|
1823
|
+
min-width: 0;
|
|
1824
|
+
justify-content: ${({ $extended: e }) => e ? "flex-start" : "center"};
|
|
1825
|
+
}
|
|
1826
|
+
`, Dt = s.div`
|
|
1827
|
+
display: flex;
|
|
1828
|
+
flex-direction: column;
|
|
1829
|
+
gap: ${({ theme: e }) => y(e).space.sm};
|
|
1830
|
+
`;
|
|
1831
|
+
// src/components/organisms/OSidebar/OSidebar.tsx
|
|
1832
|
+
function Ot({ extended: e }) {
|
|
1833
|
+
return /* @__PURE__ */ c("svg", {
|
|
1834
|
+
viewBox: "0 0 24 24",
|
|
1835
|
+
fill: "none",
|
|
1836
|
+
"aria-hidden": "true",
|
|
1837
|
+
children: e ? /* @__PURE__ */ c("path", {
|
|
1838
|
+
d: "m15 18-6-6 6-6",
|
|
1839
|
+
stroke: "currentColor",
|
|
1840
|
+
strokeWidth: "2",
|
|
1841
|
+
strokeLinecap: "round",
|
|
1842
|
+
strokeLinejoin: "round"
|
|
1843
|
+
}) : /* @__PURE__ */ c("path", {
|
|
1844
|
+
d: "m9 18 6-6-6-6",
|
|
1845
|
+
stroke: "currentColor",
|
|
1846
|
+
strokeWidth: "2",
|
|
1847
|
+
strokeLinecap: "round",
|
|
1848
|
+
strokeLinejoin: "round"
|
|
1849
|
+
})
|
|
1850
|
+
});
|
|
1851
|
+
}
|
|
1852
|
+
function kt({ links: e, logout: t, extended: n, defaultExtended: i = !1, onExtendedChange: a, navigationLabel: o = "Primary navigation", "aria-label": s = "Application sidebar", ...u }) {
|
|
1853
|
+
let [d, f] = r(i), p = n ?? d, [m, h] = r(p);
|
|
1854
|
+
function g() {
|
|
1855
|
+
let e = !p;
|
|
1856
|
+
e || h(!0), n === void 0 && f(e), a?.(e);
|
|
1857
|
+
}
|
|
1858
|
+
function _(e) {
|
|
1859
|
+
e.target === e.currentTarget && e.propertyName === "width" && h(p);
|
|
1860
|
+
}
|
|
1861
|
+
function v(e) {
|
|
1862
|
+
return /* @__PURE__ */ c(Et, {
|
|
1863
|
+
$extended: m,
|
|
1864
|
+
children: m ? /* @__PURE__ */ l(Y, {
|
|
1865
|
+
href: e.href,
|
|
1866
|
+
children: [/* @__PURE__ */ c(H, {
|
|
1867
|
+
size: "md",
|
|
1868
|
+
style: { color: "inherit" },
|
|
1869
|
+
children: e.icon
|
|
1870
|
+
}), e.label]
|
|
1871
|
+
}) : /* @__PURE__ */ c(q, {
|
|
1872
|
+
href: e.href,
|
|
1873
|
+
"aria-label": e.label,
|
|
1874
|
+
title: e.label,
|
|
1875
|
+
children: e.icon
|
|
1876
|
+
})
|
|
1877
|
+
}, e.id);
|
|
1878
|
+
}
|
|
1879
|
+
return /* @__PURE__ */ l(Ct, {
|
|
1880
|
+
...u,
|
|
1881
|
+
$extended: p,
|
|
1882
|
+
"aria-label": s,
|
|
1883
|
+
"data-extended": p,
|
|
1884
|
+
onTransitionEnd: _,
|
|
1885
|
+
children: [
|
|
1886
|
+
/* @__PURE__ */ c(wt, {
|
|
1887
|
+
$extended: p,
|
|
1888
|
+
children: /* @__PURE__ */ c(G, {
|
|
1889
|
+
"aria-label": p ? "Collapse sidebar" : "Expand sidebar",
|
|
1890
|
+
"aria-expanded": p,
|
|
1891
|
+
onClick: g,
|
|
1892
|
+
size: "sm",
|
|
1893
|
+
ghost: !0,
|
|
1894
|
+
children: /* @__PURE__ */ c(Ot, { extended: p })
|
|
1895
|
+
})
|
|
1896
|
+
}),
|
|
1897
|
+
/* @__PURE__ */ c(Tt, {
|
|
1898
|
+
"aria-label": o,
|
|
1899
|
+
children: e.map((e) => v(e))
|
|
1900
|
+
}),
|
|
1901
|
+
/* @__PURE__ */ c(Dt, { children: v(t) })
|
|
1902
|
+
]
|
|
1903
|
+
});
|
|
1904
|
+
}
|
|
1905
|
+
// src/components/organisms/OUserCamera/OUserCamera.styles.ts
|
|
1906
|
+
var At = s.div`
|
|
1907
|
+
position: relative;
|
|
1908
|
+
display: block;
|
|
1909
|
+
width: 100%;
|
|
1910
|
+
min-width: 0;
|
|
1911
|
+
aspect-ratio: ${({ $aspectRatio: e }) => e};
|
|
1912
|
+
box-sizing: border-box;
|
|
1913
|
+
overflow: hidden;
|
|
1914
|
+
padding: ${({ theme: e }) => y(e).space.inset};
|
|
1915
|
+
border: ${({ theme: e }) => y(e).camera.border};
|
|
1916
|
+
border-radius: ${({ theme: e }) => y(e).camera.borderRadius};
|
|
1917
|
+
background: ${({ theme: e }) => y(e).colors.surface};
|
|
1918
|
+
color: ${({ theme: e }) => y(e).colors.text};
|
|
1919
|
+
`, jt = s.video`
|
|
1920
|
+
position: absolute;
|
|
1921
|
+
inset: 0;
|
|
1922
|
+
width: 100%;
|
|
1923
|
+
height: 100%;
|
|
1924
|
+
object-fit: cover;
|
|
1925
|
+
`, Mt = s.div`
|
|
1926
|
+
position: absolute;
|
|
1927
|
+
inset: 0;
|
|
1928
|
+
display: flex;
|
|
1929
|
+
align-items: center;
|
|
1930
|
+
justify-content: center;
|
|
1931
|
+
background: ${({ theme: e }) => y(e).colors.secondary};
|
|
1932
|
+
color: ${({ theme: e }) => y(e).colors.primary};
|
|
1933
|
+
font-family: ${({ theme: e }) => y(e).font.sans};
|
|
1934
|
+
font-size: ${({ theme: e }) => y(e).camera.fallbackFontSize};
|
|
1935
|
+
font-weight: ${({ theme: e }) => y(e).camera.fallbackFontWeight};
|
|
1936
|
+
`, $ = s.div`
|
|
1937
|
+
position: absolute;
|
|
1938
|
+
z-index: 1;
|
|
1939
|
+
${({ $placement: e }) => e === "top-right" ? o`
|
|
1940
|
+
top: ${({ theme: e }) => y(e).space.inset};
|
|
1941
|
+
right: ${({ theme: e }) => y(e).space.inset};
|
|
1942
|
+
` : o`
|
|
1943
|
+
right: ${({ theme: e }) => y(e).space.inset};
|
|
1944
|
+
bottom: ${({ theme: e }) => y(e).space.inset};
|
|
1945
|
+
`}
|
|
1946
|
+
`, Nt = s.span`
|
|
1947
|
+
position: absolute;
|
|
1948
|
+
z-index: 1;
|
|
1949
|
+
bottom: ${({ theme: e }) => y(e).space.inset};
|
|
1950
|
+
left: ${({ theme: e }) => y(e).space.inset};
|
|
1951
|
+
max-width: ${({ theme: e }) => `calc(100% - ${y(e).camera.nameMaxWidthOffset})`};
|
|
1952
|
+
overflow: hidden;
|
|
1953
|
+
padding: ${({ theme: e }) => `${y(e).space.xs} ${y(e).space.sm}`};
|
|
1954
|
+
border-radius: ${({ theme: e }) => y(e).camera.nameBorderRadius};
|
|
1955
|
+
background: ${({ theme: e }) => `color-mix(in srgb, ${y(e).colors.ink} 65%, transparent)`};
|
|
1956
|
+
color: ${({ theme: e }) => y(e).colors.muted};
|
|
1957
|
+
font-family: ${({ theme: e }) => y(e).font.sans};
|
|
1958
|
+
font-size: ${({ theme: e }) => y(e).typography.small};
|
|
1959
|
+
text-overflow: ellipsis;
|
|
1960
|
+
white-space: nowrap;
|
|
1961
|
+
`;
|
|
1962
|
+
// src/components/organisms/OUserCamera/OUserCamera.tsx
|
|
1963
|
+
function Pt({ disabled: e }) {
|
|
1964
|
+
return /* @__PURE__ */ l("svg", {
|
|
1965
|
+
viewBox: "0 0 24 24",
|
|
1966
|
+
fill: "none",
|
|
1967
|
+
"aria-hidden": "true",
|
|
1968
|
+
children: [/* @__PURE__ */ c("path", {
|
|
1969
|
+
d: "M4 7.5h11.5A1.5 1.5 0 0 1 17 9v1.5l4-2.5v8l-4-2.5V15a1.5 1.5 0 0 1-1.5 1.5H5.5A1.5 1.5 0 0 1 4 15V7.5Z",
|
|
1970
|
+
stroke: "currentColor",
|
|
1971
|
+
strokeWidth: "2",
|
|
1972
|
+
strokeLinecap: "round",
|
|
1973
|
+
strokeLinejoin: "round"
|
|
1974
|
+
}), e ? /* @__PURE__ */ c("path", {
|
|
1975
|
+
d: "m3 3 18 18",
|
|
1976
|
+
stroke: "currentColor",
|
|
1977
|
+
strokeWidth: "2",
|
|
1978
|
+
strokeLinecap: "round"
|
|
1979
|
+
}) : null]
|
|
1980
|
+
});
|
|
1981
|
+
}
|
|
1982
|
+
function Ft({ disabled: e }) {
|
|
1983
|
+
return /* @__PURE__ */ l("svg", {
|
|
1984
|
+
viewBox: "0 0 24 24",
|
|
1985
|
+
fill: "none",
|
|
1986
|
+
"aria-hidden": "true",
|
|
1987
|
+
children: [/* @__PURE__ */ c("path", {
|
|
1988
|
+
d: "M12 15a3 3 0 0 0 3-3V6a3 3 0 0 0-6 0v6a3 3 0 0 0 3 3Zm0 0v5m-4 0h8m-11-8a7 7 0 0 0 14 0",
|
|
1989
|
+
stroke: "currentColor",
|
|
1990
|
+
strokeWidth: "2",
|
|
1991
|
+
strokeLinecap: "round",
|
|
1992
|
+
strokeLinejoin: "round"
|
|
1993
|
+
}), e ? /* @__PURE__ */ c("path", {
|
|
1994
|
+
d: "m3 3 18 18",
|
|
1995
|
+
stroke: "currentColor",
|
|
1996
|
+
strokeWidth: "2",
|
|
1997
|
+
strokeLinecap: "round"
|
|
1998
|
+
}) : null]
|
|
1999
|
+
});
|
|
2000
|
+
}
|
|
2001
|
+
function It({ firstName: t, lastName: r, stream: i, cameraEnabled: a, audioEnabled: o, onCameraToggle: s, onAudioToggle: u, aspectRatio: d = 16 / 9, ...f }) {
|
|
2002
|
+
let p = n(null), m = `${t} ${r}`.trim(), h = `${t.charAt(0)}${r.charAt(0)}`.toUpperCase(), g = a && !!i;
|
|
2003
|
+
return e(() => {
|
|
2004
|
+
let e = p.current;
|
|
2005
|
+
if (e) return e.srcObject = g ? i ?? null : null, () => {
|
|
2006
|
+
e.srcObject = null;
|
|
2007
|
+
};
|
|
2008
|
+
}, [g, i]), /* @__PURE__ */ l(At, {
|
|
2009
|
+
...f,
|
|
2010
|
+
$aspectRatio: Number.isFinite(d) && d > 0 ? d : 16 / 9,
|
|
2011
|
+
role: "group",
|
|
2012
|
+
"aria-label": `${m} camera`,
|
|
2013
|
+
children: [
|
|
2014
|
+
g ? /* @__PURE__ */ c(jt, {
|
|
2015
|
+
ref: p,
|
|
2016
|
+
autoPlay: !0,
|
|
2017
|
+
muted: !0,
|
|
2018
|
+
playsInline: !0
|
|
2019
|
+
}) : /* @__PURE__ */ c(Mt, {
|
|
2020
|
+
"aria-hidden": "true",
|
|
2021
|
+
children: h
|
|
2022
|
+
}),
|
|
2023
|
+
/* @__PURE__ */ c($, {
|
|
2024
|
+
$placement: "top-right",
|
|
2025
|
+
children: /* @__PURE__ */ c(G, {
|
|
2026
|
+
"aria-label": `Turn camera ${a ? "off" : "on"}`,
|
|
2027
|
+
"aria-pressed": a,
|
|
2028
|
+
variant: "primary",
|
|
2029
|
+
size: "md",
|
|
2030
|
+
shape: "rounded",
|
|
2031
|
+
ghost: !0,
|
|
2032
|
+
onClick: s,
|
|
2033
|
+
children: /* @__PURE__ */ c(Pt, { disabled: !a })
|
|
2034
|
+
})
|
|
2035
|
+
}),
|
|
2036
|
+
/* @__PURE__ */ c($, {
|
|
2037
|
+
$placement: "bottom-right",
|
|
2038
|
+
children: /* @__PURE__ */ c(G, {
|
|
2039
|
+
"aria-label": `Turn audio ${o ? "off" : "on"}`,
|
|
2040
|
+
"aria-pressed": o,
|
|
2041
|
+
variant: "primary",
|
|
2042
|
+
size: "md",
|
|
2043
|
+
shape: "rounded",
|
|
2044
|
+
ghost: !0,
|
|
2045
|
+
onClick: u,
|
|
2046
|
+
children: /* @__PURE__ */ c(Ft, { disabled: !o })
|
|
2047
|
+
})
|
|
2048
|
+
}),
|
|
2049
|
+
/* @__PURE__ */ c(Nt, { children: m })
|
|
2050
|
+
]
|
|
2051
|
+
});
|
|
2052
|
+
}
|
|
2053
|
+
// src/shared/styles/GlobalStyles.ts
|
|
2054
|
+
var Lt = a`
|
|
2055
|
+
:root {
|
|
2056
|
+
--jynko-shadow-solid: ${({ theme: e }) => y(e).shadow.button};
|
|
2057
|
+
--jynko-modal-padding: ${({ theme: e }) => y(e).modal.padding};
|
|
2058
|
+
--jynko-modal-max-width: ${({ theme: e }) => y(e).modal.maxWidth};
|
|
2059
|
+
--jynko-modal-max-height: ${({ theme: e }) => y(e).modal.maxHeight};
|
|
2060
|
+
--jynko-modal-border-radius: ${({ theme: e }) => y(e).modal.borderRadius};
|
|
2061
|
+
--jynko-modal-box-shadow: ${({ theme: e }) => y(e).shadow.modal};
|
|
2062
|
+
}
|
|
2063
|
+
|
|
2064
|
+
button {
|
|
2065
|
+
border: ${({ theme: e }) => y(e).button.border};
|
|
2066
|
+
border-radius: ${({ theme: e }) => y(e).button.borderRadius};
|
|
2067
|
+
padding: ${({ theme: e }) => y(e).button.padding};
|
|
2068
|
+
font-size: ${({ theme: e }) => y(e).button.fontSize};
|
|
2069
|
+
text-transform: ${({ theme: e }) => y(e).button.textTransform};
|
|
2070
|
+
}
|
|
2071
|
+
`;
|
|
2072
|
+
// src/providers/JynkoProvider/JynkoProvider.tsx
|
|
2073
|
+
function Rt({ children: e, theme: t = v }) {
|
|
2074
|
+
return /* @__PURE__ */ l(i, {
|
|
2075
|
+
theme: t,
|
|
2076
|
+
children: [/* @__PURE__ */ c(Lt, {}), e]
|
|
2077
|
+
});
|
|
2078
|
+
}
|
|
2079
|
+
export { x as AAvatar, k as ABadge, z as AButton, H as AIcon, G as AIconButton, q as AIconLink, Se as AInput, Y as ALink, Oe as ALogo, Le as ASearchInput, ze as ASection, Ze as ASelect, tt as ATextarea, rt as ATypography, Rt as JynkoProvider, _t as MModal, bt as MNavLinks, St as MUserBadge, kt as OSidebar, It as OUserCamera, v as theme };
|
|
2080
|
+
|
|
2081
|
+
//# sourceMappingURL=index.js.map
|