@brycks/core-front 0.1.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/README.md +163 -0
- package/dist/colors-B_8a3coi.js +106 -0
- package/dist/colors-B_8a3coi.js.map +1 -0
- package/dist/colors-Bp6ROxvx.cjs +2 -0
- package/dist/colors-Bp6ROxvx.cjs.map +1 -0
- package/dist/components/feedback/Alert/Alert.d.ts +29 -0
- package/dist/components/feedback/Alert/Alert.d.ts.map +1 -0
- package/dist/components/feedback/Alert/index.d.ts +3 -0
- package/dist/components/feedback/Alert/index.d.ts.map +1 -0
- package/dist/components/feedback/Modal/Modal.d.ts +28 -0
- package/dist/components/feedback/Modal/Modal.d.ts.map +1 -0
- package/dist/components/feedback/Modal/index.d.ts +3 -0
- package/dist/components/feedback/Modal/index.d.ts.map +1 -0
- package/dist/components/feedback/Tooltip/Tooltip.d.ts +20 -0
- package/dist/components/feedback/Tooltip/Tooltip.d.ts.map +1 -0
- package/dist/components/feedback/Tooltip/index.d.ts +3 -0
- package/dist/components/feedback/Tooltip/index.d.ts.map +1 -0
- package/dist/components/feedback/index.d.ts +9 -0
- package/dist/components/feedback/index.d.ts.map +1 -0
- package/dist/components/form/Checkbox/Checkbox.d.ts +20 -0
- package/dist/components/form/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/components/form/Checkbox/index.d.ts +3 -0
- package/dist/components/form/Checkbox/index.d.ts.map +1 -0
- package/dist/components/form/Input/Input.d.ts +21 -0
- package/dist/components/form/Input/Input.d.ts.map +1 -0
- package/dist/components/form/Input/index.d.ts +3 -0
- package/dist/components/form/Input/index.d.ts.map +1 -0
- package/dist/components/form/Select/Select.d.ts +21 -0
- package/dist/components/form/Select/Select.d.ts.map +1 -0
- package/dist/components/form/Select/index.d.ts +3 -0
- package/dist/components/form/Select/index.d.ts.map +1 -0
- package/dist/components/form/Switch/Switch.d.ts +16 -0
- package/dist/components/form/Switch/Switch.d.ts.map +1 -0
- package/dist/components/form/Switch/index.d.ts +3 -0
- package/dist/components/form/Switch/index.d.ts.map +1 -0
- package/dist/components/form/TextField/TextField.d.ts +16 -0
- package/dist/components/form/TextField/TextField.d.ts.map +1 -0
- package/dist/components/form/TextField/index.d.ts +3 -0
- package/dist/components/form/TextField/index.d.ts.map +1 -0
- package/dist/components/form/Textarea/Textarea.d.ts +27 -0
- package/dist/components/form/Textarea/Textarea.d.ts.map +1 -0
- package/dist/components/form/Textarea/index.d.ts +3 -0
- package/dist/components/form/Textarea/index.d.ts.map +1 -0
- package/dist/components/form/index.d.ts +12 -0
- package/dist/components/form/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +12 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/layout/Box/Box.d.ts +11 -0
- package/dist/components/layout/Box/Box.d.ts.map +1 -0
- package/dist/components/layout/Box/Box.styles.d.ts +4 -0
- package/dist/components/layout/Box/Box.styles.d.ts.map +1 -0
- package/dist/components/layout/Box/Box.types.d.ts +38 -0
- package/dist/components/layout/Box/Box.types.d.ts.map +1 -0
- package/dist/components/layout/Box/index.d.ts +3 -0
- package/dist/components/layout/Box/index.d.ts.map +1 -0
- package/dist/components/layout/Container/Container.d.ts +31 -0
- package/dist/components/layout/Container/Container.d.ts.map +1 -0
- package/dist/components/layout/Container/index.d.ts +3 -0
- package/dist/components/layout/Container/index.d.ts.map +1 -0
- package/dist/components/layout/Grid/Grid.d.ts +80 -0
- package/dist/components/layout/Grid/Grid.d.ts.map +1 -0
- package/dist/components/layout/Grid/index.d.ts +3 -0
- package/dist/components/layout/Grid/index.d.ts.map +1 -0
- package/dist/components/layout/Stack/Stack.d.ts +13 -0
- package/dist/components/layout/Stack/Stack.d.ts.map +1 -0
- package/dist/components/layout/Stack/Stack.types.d.ts +33 -0
- package/dist/components/layout/Stack/Stack.types.d.ts.map +1 -0
- package/dist/components/layout/Stack/index.d.ts +3 -0
- package/dist/components/layout/Stack/index.d.ts.map +1 -0
- package/dist/components/layout/index.d.ts +10 -0
- package/dist/components/layout/index.d.ts.map +1 -0
- package/dist/components/primitives/Button/Button.d.ts +12 -0
- package/dist/components/primitives/Button/Button.d.ts.map +1 -0
- package/dist/components/primitives/Button/Button.styles.d.ts +29 -0
- package/dist/components/primitives/Button/Button.styles.d.ts.map +1 -0
- package/dist/components/primitives/Button/Button.types.d.ts +37 -0
- package/dist/components/primitives/Button/Button.types.d.ts.map +1 -0
- package/dist/components/primitives/Button/index.d.ts +3 -0
- package/dist/components/primitives/Button/index.d.ts.map +1 -0
- package/dist/components/primitives/index.d.ts +7 -0
- package/dist/components/primitives/index.d.ts.map +1 -0
- package/dist/components/typography/Heading/Heading.d.ts +38 -0
- package/dist/components/typography/Heading/Heading.d.ts.map +1 -0
- package/dist/components/typography/Heading/index.d.ts +3 -0
- package/dist/components/typography/Heading/index.d.ts.map +1 -0
- package/dist/components/typography/Text/Text.d.ts +41 -0
- package/dist/components/typography/Text/Text.d.ts.map +1 -0
- package/dist/components/typography/Text/index.d.ts +3 -0
- package/dist/components/typography/Text/index.d.ts.map +1 -0
- package/dist/components/typography/index.d.ts +8 -0
- package/dist/components/typography/index.d.ts.map +1 -0
- package/dist/components/utility/Badge/Badge.d.ts +20 -0
- package/dist/components/utility/Badge/Badge.d.ts.map +1 -0
- package/dist/components/utility/Badge/index.d.ts +3 -0
- package/dist/components/utility/Badge/index.d.ts.map +1 -0
- package/dist/components/utility/Divider/Divider.d.ts +19 -0
- package/dist/components/utility/Divider/Divider.d.ts.map +1 -0
- package/dist/components/utility/Divider/index.d.ts +3 -0
- package/dist/components/utility/Divider/index.d.ts.map +1 -0
- package/dist/components/utility/EmptyState/EmptyState.d.ts +26 -0
- package/dist/components/utility/EmptyState/EmptyState.d.ts.map +1 -0
- package/dist/components/utility/EmptyState/index.d.ts +3 -0
- package/dist/components/utility/EmptyState/index.d.ts.map +1 -0
- package/dist/components/utility/Loader/Loader.d.ts +21 -0
- package/dist/components/utility/Loader/Loader.d.ts.map +1 -0
- package/dist/components/utility/Loader/index.d.ts +3 -0
- package/dist/components/utility/Loader/index.d.ts.map +1 -0
- package/dist/components/utility/Skeleton/Skeleton.d.ts +35 -0
- package/dist/components/utility/Skeleton/Skeleton.d.ts.map +1 -0
- package/dist/components/utility/Skeleton/index.d.ts +3 -0
- package/dist/components/utility/Skeleton/index.d.ts.map +1 -0
- package/dist/components/utility/index.d.ts +11 -0
- package/dist/components/utility/index.d.ts.map +1 -0
- package/dist/cssVariables-CU3jCd8f.js +273 -0
- package/dist/cssVariables-CU3jCd8f.js.map +1 -0
- package/dist/cssVariables-D_naqeoR.cjs +2 -0
- package/dist/cssVariables-D_naqeoR.cjs.map +1 -0
- package/dist/design-system/index.d.ts +16 -0
- package/dist/design-system/index.d.ts.map +1 -0
- package/dist/design-system/primitives/focus.d.ts +67 -0
- package/dist/design-system/primitives/focus.d.ts.map +1 -0
- package/dist/design-system/primitives/index.d.ts +14 -0
- package/dist/design-system/primitives/index.d.ts.map +1 -0
- package/dist/design-system/primitives/opacity.d.ts +88 -0
- package/dist/design-system/primitives/opacity.d.ts.map +1 -0
- package/dist/design-system/primitives/sizing.d.ts +155 -0
- package/dist/design-system/primitives/sizing.d.ts.map +1 -0
- package/dist/design-system/primitives/transitions.d.ts +92 -0
- package/dist/design-system/primitives/transitions.d.ts.map +1 -0
- package/dist/design-system/primitives/typography.d.ts +164 -0
- package/dist/design-system/primitives/typography.d.ts.map +1 -0
- package/dist/design-system/themes/ThemeProvider.d.ts +18 -0
- package/dist/design-system/themes/ThemeProvider.d.ts.map +1 -0
- package/dist/design-system/themes/cssVariables.d.ts +52 -0
- package/dist/design-system/themes/cssVariables.d.ts.map +1 -0
- package/dist/design-system/themes/darkTheme.d.ts +3 -0
- package/dist/design-system/themes/darkTheme.d.ts.map +1 -0
- package/dist/design-system/themes/index.d.ts +11 -0
- package/dist/design-system/themes/index.d.ts.map +1 -0
- package/dist/design-system/themes/lightTheme.d.ts +3 -0
- package/dist/design-system/themes/lightTheme.d.ts.map +1 -0
- package/dist/design-system/themes/types.d.ts +134 -0
- package/dist/design-system/themes/types.d.ts.map +1 -0
- package/dist/design-system/tokens/borders.d.ts +86 -0
- package/dist/design-system/tokens/borders.d.ts.map +1 -0
- package/dist/design-system/tokens/breakpoints.d.ts +66 -0
- package/dist/design-system/tokens/breakpoints.d.ts.map +1 -0
- package/dist/design-system/tokens/colors.d.ts +206 -0
- package/dist/design-system/tokens/colors.d.ts.map +1 -0
- package/dist/design-system/tokens/index.d.ts +23 -0
- package/dist/design-system/tokens/index.d.ts.map +1 -0
- package/dist/design-system/tokens/motion.d.ts +204 -0
- package/dist/design-system/tokens/motion.d.ts.map +1 -0
- package/dist/design-system/tokens/shadows.d.ts +55 -0
- package/dist/design-system/tokens/shadows.d.ts.map +1 -0
- package/dist/design-system/tokens/spacing.d.ts +104 -0
- package/dist/design-system/tokens/spacing.d.ts.map +1 -0
- package/dist/design-system/tokens/typography.d.ts +214 -0
- package/dist/design-system/tokens/typography.d.ts.map +1 -0
- package/dist/design-system/tokens/zIndex.d.ts +36 -0
- package/dist/design-system/tokens/zIndex.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +8 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/useDisclosure.d.ts +19 -0
- package/dist/hooks/useDisclosure.d.ts.map +1 -0
- package/dist/hooks/useMediaQuery.d.ts +13 -0
- package/dist/hooks/useMediaQuery.d.ts.map +1 -0
- package/dist/index.cjs +89 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +60 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3215 -0
- package/dist/index.js.map +1 -0
- package/dist/themes.cjs +2 -0
- package/dist/themes.cjs.map +1 -0
- package/dist/themes.d.ts +2 -0
- package/dist/themes.js +11 -0
- package/dist/themes.js.map +1 -0
- package/dist/tokens.cjs +2 -0
- package/dist/tokens.cjs.map +1 -0
- package/dist/tokens.d.ts +2 -0
- package/dist/tokens.js +627 -0
- package/dist/tokens.js.map +1 -0
- package/dist/types/common.d.ts +90 -0
- package/dist/types/common.d.ts.map +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/styles.d.ts +17 -0
- package/dist/utils/styles.d.ts.map +1 -0
- package/package.json +78 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,3215 @@
|
|
|
1
|
+
import { a as xt, c as wt, e as St, i as Ct, n as zt, p as $t, s as Bt, w as Wt } from "./colors-B_8a3coi.js";
|
|
2
|
+
import { spacing as C, durations as j, easings as R, fontSizes as ee, fontWeights as oe, lineHeights as de, fontFamilies as P, containers as We, textStyles as Q } from "./tokens.js";
|
|
3
|
+
import { animations as It, borderStyles as Tt, borderWidths as Nt, breakpoints as Lt, focusRings as Rt, glows as Mt, letterSpacings as Ft, mediaQueries as jt, radii as Ot, semanticSpacing as Dt, shadows as Xt, transitions as Et, zIndex as Pt } from "./tokens.js";
|
|
4
|
+
import { T as Gt, c as _t, d as Yt, l as At, u as Kt, a as qt } from "./cssVariables-CU3jCd8f.js";
|
|
5
|
+
import { forwardRef as $, useState as V, useId as He, useRef as ne, useCallback as se, useEffect as ae } from "react";
|
|
6
|
+
import { jsx as n, jsxs as p, Fragment as ce } from "react/jsx-runtime";
|
|
7
|
+
import { createPortal as he } from "react-dom";
|
|
8
|
+
const U = {
|
|
9
|
+
/** 24px - Micro elements (tags, small badges) */
|
|
10
|
+
xs: C[6],
|
|
11
|
+
/** 32px - Small inputs, compact buttons */
|
|
12
|
+
sm: C[8],
|
|
13
|
+
/** 40px - Default size for most interactive elements */
|
|
14
|
+
md: C[10],
|
|
15
|
+
/** 48px - Large inputs, prominent buttons */
|
|
16
|
+
lg: C[12],
|
|
17
|
+
/** 56px - Extra large, hero CTAs */
|
|
18
|
+
xl: C[14]
|
|
19
|
+
}, ie = {
|
|
20
|
+
/** 12px */
|
|
21
|
+
xs: C[3],
|
|
22
|
+
/** 16px */
|
|
23
|
+
sm: C[4],
|
|
24
|
+
/** 20px */
|
|
25
|
+
md: C[5],
|
|
26
|
+
/** 24px */
|
|
27
|
+
lg: C[6],
|
|
28
|
+
/** 32px */
|
|
29
|
+
xl: C[8]
|
|
30
|
+
}, Z = {
|
|
31
|
+
/** 8px */
|
|
32
|
+
xs: C[2],
|
|
33
|
+
/** 12px */
|
|
34
|
+
sm: C[3],
|
|
35
|
+
/** 16px */
|
|
36
|
+
md: C[4],
|
|
37
|
+
/** 20px */
|
|
38
|
+
lg: C[5],
|
|
39
|
+
/** 24px */
|
|
40
|
+
xl: C[6]
|
|
41
|
+
}, Jr = {
|
|
42
|
+
/** 4px */
|
|
43
|
+
xs: C[1],
|
|
44
|
+
/** 6px */
|
|
45
|
+
sm: C[1.5],
|
|
46
|
+
/** 8px */
|
|
47
|
+
md: C[2],
|
|
48
|
+
/** 10px */
|
|
49
|
+
lg: C[2.5],
|
|
50
|
+
/** 12px */
|
|
51
|
+
xl: C[3]
|
|
52
|
+
}, G = {
|
|
53
|
+
/** 4px - Tight spacing between icons and text */
|
|
54
|
+
xs: C[1],
|
|
55
|
+
/** 6px */
|
|
56
|
+
sm: C[1.5],
|
|
57
|
+
/** 8px - Default internal spacing */
|
|
58
|
+
md: C[2],
|
|
59
|
+
/** 10px */
|
|
60
|
+
lg: C[2.5],
|
|
61
|
+
/** 12px - Spacious internal spacing */
|
|
62
|
+
xl: C[3]
|
|
63
|
+
}, et = {
|
|
64
|
+
/** 400px - Small dialogs, confirmations */
|
|
65
|
+
sm: 400,
|
|
66
|
+
/** 500px - Medium dialogs */
|
|
67
|
+
md: 500,
|
|
68
|
+
/** 640px - Large dialogs */
|
|
69
|
+
lg: 640,
|
|
70
|
+
/** 800px - Extra large dialogs */
|
|
71
|
+
xl: 800,
|
|
72
|
+
/** Full width minus margins */
|
|
73
|
+
full: "calc(100vw - 48px)"
|
|
74
|
+
}, rt = {
|
|
75
|
+
/** Default tooltip max width */
|
|
76
|
+
tooltipMaxWidth: 300,
|
|
77
|
+
/** Default popover max width */
|
|
78
|
+
popoverMaxWidth: 400,
|
|
79
|
+
/** Arrow size for tooltips */
|
|
80
|
+
arrowSize: C[2],
|
|
81
|
+
/** Gap between trigger and popover */
|
|
82
|
+
offset: C[2]
|
|
83
|
+
}, Ie = {
|
|
84
|
+
sm: {
|
|
85
|
+
box: 16,
|
|
86
|
+
icon: 10
|
|
87
|
+
},
|
|
88
|
+
md: {
|
|
89
|
+
box: 18,
|
|
90
|
+
icon: 12
|
|
91
|
+
},
|
|
92
|
+
lg: {
|
|
93
|
+
box: 22,
|
|
94
|
+
icon: 14
|
|
95
|
+
}
|
|
96
|
+
}, Te = {
|
|
97
|
+
sm: {
|
|
98
|
+
width: 36,
|
|
99
|
+
height: 20,
|
|
100
|
+
thumb: 16
|
|
101
|
+
},
|
|
102
|
+
md: {
|
|
103
|
+
width: 44,
|
|
104
|
+
height: 24,
|
|
105
|
+
thumb: 20
|
|
106
|
+
},
|
|
107
|
+
lg: {
|
|
108
|
+
width: 52,
|
|
109
|
+
height: 28,
|
|
110
|
+
thumb: 24
|
|
111
|
+
}
|
|
112
|
+
}, J = {
|
|
113
|
+
/** Default focus ring - primary color */
|
|
114
|
+
default: "0 0 0 3px var(--brycks-focus-ring-color, rgba(85, 120, 244, 0.35))",
|
|
115
|
+
/** Error state focus ring */
|
|
116
|
+
error: "0 0 0 3px var(--brycks-focus-ring-error, rgba(239, 68, 68, 0.35))",
|
|
117
|
+
/** Success state focus ring */
|
|
118
|
+
success: "0 0 0 3px var(--brycks-focus-ring-success, rgba(16, 185, 129, 0.35))",
|
|
119
|
+
/** Subtle focus ring - for nested elements */
|
|
120
|
+
subtle: "0 0 0 2px var(--brycks-focus-ring-color, rgba(85, 120, 244, 0.25))",
|
|
121
|
+
/** None - explicitly no focus ring */
|
|
122
|
+
none: "none"
|
|
123
|
+
}, tt = {
|
|
124
|
+
default: "0 0 0 2px var(--brycks-background-app), 0 0 0 4px var(--brycks-primary-default)",
|
|
125
|
+
error: "0 0 0 2px var(--brycks-background-app), 0 0 0 4px var(--brycks-error-default)"
|
|
126
|
+
}, ot = {
|
|
127
|
+
/** Outline-based focus (native) */
|
|
128
|
+
outline: {
|
|
129
|
+
outline: "2px solid var(--brycks-border-focus)",
|
|
130
|
+
outlineOffset: "2px"
|
|
131
|
+
},
|
|
132
|
+
/** Box-shadow based focus (custom) */
|
|
133
|
+
ring: {
|
|
134
|
+
outline: "none",
|
|
135
|
+
boxShadow: J.default
|
|
136
|
+
},
|
|
137
|
+
/** Error state focus */
|
|
138
|
+
ringError: {
|
|
139
|
+
outline: "none",
|
|
140
|
+
boxShadow: J.error
|
|
141
|
+
},
|
|
142
|
+
/** Remove focus styles (use sparingly) */
|
|
143
|
+
none: {
|
|
144
|
+
outline: "none",
|
|
145
|
+
boxShadow: "none"
|
|
146
|
+
}
|
|
147
|
+
}, te = {
|
|
148
|
+
/** No transition */
|
|
149
|
+
none: "none",
|
|
150
|
+
/** Ultra-fast - for micro-interactions (50ms) */
|
|
151
|
+
instant: `all ${j.faster}ms ${R.easeOut}`,
|
|
152
|
+
/** Fast - for hover states, toggles (100ms) */
|
|
153
|
+
fast: `all ${j.fast}ms ${R.easeOut}`,
|
|
154
|
+
/** Quick - standard interactive feedback (150ms) */
|
|
155
|
+
quick: `all ${j.quick}ms ${R.easeOut}`,
|
|
156
|
+
/** Default - most state changes (200ms) */
|
|
157
|
+
default: `all ${j.normal}ms ${R.easeOut}`,
|
|
158
|
+
/** Smooth - focus states, form elements (300ms) */
|
|
159
|
+
smooth: `all ${j.relaxed}ms ${R.smooth}`,
|
|
160
|
+
/** Slow - reveals, modals (400ms) */
|
|
161
|
+
slow: `all ${j.slow}ms ${R.easeOut}`,
|
|
162
|
+
/** Spring - bouncy, tactile feel (300ms) */
|
|
163
|
+
spring: `all ${j.relaxed}ms ${R.softSpring}`,
|
|
164
|
+
/** Colors only - optimized for color transitions */
|
|
165
|
+
colors: `color ${j.fast}ms ${R.easeOut}, background-color ${j.fast}ms ${R.easeOut}, border-color ${j.fast}ms ${R.easeOut}`,
|
|
166
|
+
/** Transform only - for scale, translate */
|
|
167
|
+
transform: `transform ${j.normal}ms ${R.easeOut}`,
|
|
168
|
+
/** Opacity only - for fade effects */
|
|
169
|
+
opacity: `opacity ${j.normal}ms ${R.easeOut}`,
|
|
170
|
+
/** Shadow only - for elevation changes */
|
|
171
|
+
shadow: `box-shadow ${j.normal}ms ${R.easeOut}`
|
|
172
|
+
}, nt = {
|
|
173
|
+
all: "all",
|
|
174
|
+
colors: "color, background-color, border-color, fill, stroke",
|
|
175
|
+
opacity: "opacity",
|
|
176
|
+
shadow: "box-shadow",
|
|
177
|
+
transform: "transform",
|
|
178
|
+
dimensions: "width, height, padding, margin"
|
|
179
|
+
}, st = {
|
|
180
|
+
instant: j.faster,
|
|
181
|
+
fast: j.fast,
|
|
182
|
+
quick: j.quick,
|
|
183
|
+
default: j.normal,
|
|
184
|
+
smooth: j.relaxed,
|
|
185
|
+
slow: j.slow,
|
|
186
|
+
slower: j.slower
|
|
187
|
+
}, at = {
|
|
188
|
+
linear: R.linear,
|
|
189
|
+
ease: R.ease,
|
|
190
|
+
easeIn: R.easeIn,
|
|
191
|
+
easeOut: R.easeOut,
|
|
192
|
+
easeInOut: R.easeInOut,
|
|
193
|
+
spring: R.spring,
|
|
194
|
+
softSpring: R.softSpring,
|
|
195
|
+
smooth: R.smooth,
|
|
196
|
+
snappy: R.snappy
|
|
197
|
+
}, it = {
|
|
198
|
+
fadeIn: `
|
|
199
|
+
@keyframes brycks-fade-in {
|
|
200
|
+
from { opacity: 0; }
|
|
201
|
+
to { opacity: 1; }
|
|
202
|
+
}
|
|
203
|
+
`,
|
|
204
|
+
fadeOut: `
|
|
205
|
+
@keyframes brycks-fade-out {
|
|
206
|
+
from { opacity: 1; }
|
|
207
|
+
to { opacity: 0; }
|
|
208
|
+
}
|
|
209
|
+
`,
|
|
210
|
+
scaleIn: `
|
|
211
|
+
@keyframes brycks-scale-in {
|
|
212
|
+
from { opacity: 0; transform: scale(0.95); }
|
|
213
|
+
to { opacity: 1; transform: scale(1); }
|
|
214
|
+
}
|
|
215
|
+
`,
|
|
216
|
+
scaleOut: `
|
|
217
|
+
@keyframes brycks-scale-out {
|
|
218
|
+
from { opacity: 1; transform: scale(1); }
|
|
219
|
+
to { opacity: 0; transform: scale(0.95); }
|
|
220
|
+
}
|
|
221
|
+
`,
|
|
222
|
+
slideUp: `
|
|
223
|
+
@keyframes brycks-slide-up {
|
|
224
|
+
from { opacity: 0; transform: translateY(8px); }
|
|
225
|
+
to { opacity: 1; transform: translateY(0); }
|
|
226
|
+
}
|
|
227
|
+
`,
|
|
228
|
+
slideDown: `
|
|
229
|
+
@keyframes brycks-slide-down {
|
|
230
|
+
from { opacity: 0; transform: translateY(-8px); }
|
|
231
|
+
to { opacity: 1; transform: translateY(0); }
|
|
232
|
+
}
|
|
233
|
+
`,
|
|
234
|
+
spin: `
|
|
235
|
+
@keyframes brycks-spin {
|
|
236
|
+
from { transform: rotate(0deg); }
|
|
237
|
+
to { transform: rotate(360deg); }
|
|
238
|
+
}
|
|
239
|
+
`,
|
|
240
|
+
pulse: `
|
|
241
|
+
@keyframes brycks-pulse {
|
|
242
|
+
0%, 100% { opacity: 1; }
|
|
243
|
+
50% { opacity: 0.5; }
|
|
244
|
+
}
|
|
245
|
+
`,
|
|
246
|
+
shimmer: `
|
|
247
|
+
@keyframes brycks-shimmer {
|
|
248
|
+
0% { transform: translateX(-100%); }
|
|
249
|
+
100% { transform: translateX(100%); }
|
|
250
|
+
}
|
|
251
|
+
`,
|
|
252
|
+
bounce: `
|
|
253
|
+
@keyframes brycks-bounce {
|
|
254
|
+
0%, 80%, 100% { transform: scale(0); opacity: 0.5; }
|
|
255
|
+
40% { transform: scale(1); opacity: 1; }
|
|
256
|
+
}
|
|
257
|
+
`
|
|
258
|
+
}, N = {
|
|
259
|
+
/** 11px - Extra small labels, badges */
|
|
260
|
+
xs: ee.xs,
|
|
261
|
+
/** 12px - Small text, captions, helper text */
|
|
262
|
+
sm: ee.sm,
|
|
263
|
+
/** 14px - Default component text */
|
|
264
|
+
md: ee.base,
|
|
265
|
+
/** 15px - Large component text */
|
|
266
|
+
lg: 15,
|
|
267
|
+
/** 16px - Extra large component text */
|
|
268
|
+
xl: ee.md
|
|
269
|
+
}, E = {
|
|
270
|
+
/** 400 - Regular body text */
|
|
271
|
+
regular: oe.regular,
|
|
272
|
+
/** 500 - Labels, emphasized text */
|
|
273
|
+
medium: oe.medium,
|
|
274
|
+
/** 600 - Headings, titles */
|
|
275
|
+
semibold: oe.semibold,
|
|
276
|
+
/** 700 - Strong emphasis */
|
|
277
|
+
bold: oe.bold
|
|
278
|
+
}, F = {
|
|
279
|
+
/** 1 - Single line, badges */
|
|
280
|
+
none: de.none,
|
|
281
|
+
/** 1.25 - Tight, headings */
|
|
282
|
+
tight: de.snug,
|
|
283
|
+
/** 1.4 - Slightly relaxed, labels */
|
|
284
|
+
snug: 1.4,
|
|
285
|
+
/** 1.5 - Default body text */
|
|
286
|
+
normal: de.normal,
|
|
287
|
+
/** 1.6 - Relaxed, helper text */
|
|
288
|
+
relaxed: 1.6
|
|
289
|
+
}, ct = {
|
|
290
|
+
/** Form field labels */
|
|
291
|
+
label: {
|
|
292
|
+
fontFamily: P.sans,
|
|
293
|
+
fontSize: N.sm,
|
|
294
|
+
fontWeight: E.medium,
|
|
295
|
+
lineHeight: F.normal
|
|
296
|
+
},
|
|
297
|
+
/** Helper/hint text below inputs */
|
|
298
|
+
helperText: {
|
|
299
|
+
fontFamily: P.sans,
|
|
300
|
+
fontSize: N.xs,
|
|
301
|
+
fontWeight: E.regular,
|
|
302
|
+
lineHeight: F.relaxed
|
|
303
|
+
},
|
|
304
|
+
/** Error messages */
|
|
305
|
+
errorText: {
|
|
306
|
+
fontFamily: P.sans,
|
|
307
|
+
fontSize: N.xs,
|
|
308
|
+
fontWeight: E.regular,
|
|
309
|
+
lineHeight: F.relaxed
|
|
310
|
+
},
|
|
311
|
+
/** Button text - small */
|
|
312
|
+
buttonSm: {
|
|
313
|
+
fontFamily: P.sans,
|
|
314
|
+
fontSize: N.sm,
|
|
315
|
+
fontWeight: E.medium,
|
|
316
|
+
lineHeight: F.none
|
|
317
|
+
},
|
|
318
|
+
/** Button text - medium (default) */
|
|
319
|
+
buttonMd: {
|
|
320
|
+
fontFamily: P.sans,
|
|
321
|
+
fontSize: N.md,
|
|
322
|
+
fontWeight: E.medium,
|
|
323
|
+
lineHeight: F.none
|
|
324
|
+
},
|
|
325
|
+
/** Button text - large */
|
|
326
|
+
buttonLg: {
|
|
327
|
+
fontFamily: P.sans,
|
|
328
|
+
fontSize: N.lg,
|
|
329
|
+
fontWeight: E.medium,
|
|
330
|
+
lineHeight: F.none
|
|
331
|
+
},
|
|
332
|
+
/** Badge text */
|
|
333
|
+
badge: {
|
|
334
|
+
fontFamily: P.sans,
|
|
335
|
+
fontSize: N.xs,
|
|
336
|
+
fontWeight: E.medium,
|
|
337
|
+
lineHeight: F.none
|
|
338
|
+
},
|
|
339
|
+
/** Tooltip text */
|
|
340
|
+
tooltip: {
|
|
341
|
+
fontFamily: P.sans,
|
|
342
|
+
fontSize: N.xs,
|
|
343
|
+
fontWeight: E.medium,
|
|
344
|
+
lineHeight: F.snug
|
|
345
|
+
},
|
|
346
|
+
/** Alert title */
|
|
347
|
+
alertTitle: {
|
|
348
|
+
fontFamily: P.sans,
|
|
349
|
+
fontSize: N.md,
|
|
350
|
+
fontWeight: E.semibold,
|
|
351
|
+
lineHeight: F.tight
|
|
352
|
+
},
|
|
353
|
+
/** Alert description */
|
|
354
|
+
alertDescription: {
|
|
355
|
+
fontFamily: P.sans,
|
|
356
|
+
fontSize: N.md,
|
|
357
|
+
fontWeight: E.regular,
|
|
358
|
+
lineHeight: F.normal
|
|
359
|
+
},
|
|
360
|
+
/** Modal title */
|
|
361
|
+
modalTitle: {
|
|
362
|
+
fontFamily: P.sans,
|
|
363
|
+
fontSize: ee.lg,
|
|
364
|
+
fontWeight: E.semibold,
|
|
365
|
+
lineHeight: F.tight
|
|
366
|
+
},
|
|
367
|
+
/** Modal description */
|
|
368
|
+
modalDescription: {
|
|
369
|
+
fontFamily: P.sans,
|
|
370
|
+
fontSize: N.md,
|
|
371
|
+
fontWeight: E.regular,
|
|
372
|
+
lineHeight: F.normal
|
|
373
|
+
},
|
|
374
|
+
/** Empty state title */
|
|
375
|
+
emptyStateTitle: {
|
|
376
|
+
fontFamily: P.sans,
|
|
377
|
+
fontSize: ee.lg,
|
|
378
|
+
fontWeight: E.semibold,
|
|
379
|
+
lineHeight: F.tight
|
|
380
|
+
},
|
|
381
|
+
/** Empty state description */
|
|
382
|
+
emptyStateDescription: {
|
|
383
|
+
fontFamily: P.sans,
|
|
384
|
+
fontSize: N.md,
|
|
385
|
+
fontWeight: E.regular,
|
|
386
|
+
lineHeight: F.normal
|
|
387
|
+
},
|
|
388
|
+
/** Divider label */
|
|
389
|
+
dividerLabel: {
|
|
390
|
+
fontFamily: P.sans,
|
|
391
|
+
fontSize: N.xs,
|
|
392
|
+
fontWeight: E.medium,
|
|
393
|
+
lineHeight: F.normal
|
|
394
|
+
}
|
|
395
|
+
}, q = {
|
|
396
|
+
/** 0 - Fully transparent */
|
|
397
|
+
transparent: 0,
|
|
398
|
+
/** 0.05 - Barely visible */
|
|
399
|
+
5: 0.05,
|
|
400
|
+
/** 0.1 - Subtle hint */
|
|
401
|
+
10: 0.1,
|
|
402
|
+
/** 0.15 - Light overlay */
|
|
403
|
+
15: 0.15,
|
|
404
|
+
/** 0.2 - Soft background */
|
|
405
|
+
20: 0.2,
|
|
406
|
+
/** 0.25 - Quarter visible */
|
|
407
|
+
25: 0.25,
|
|
408
|
+
/** 0.3 - Light emphasis */
|
|
409
|
+
30: 0.3,
|
|
410
|
+
/** 0.4 - Medium-light */
|
|
411
|
+
40: 0.4,
|
|
412
|
+
/** 0.5 - Half visible (disabled) */
|
|
413
|
+
50: 0.5,
|
|
414
|
+
/** 0.6 - Medium */
|
|
415
|
+
60: 0.6,
|
|
416
|
+
/** 0.7 - Medium-strong */
|
|
417
|
+
70: 0.7,
|
|
418
|
+
/** 0.75 - Three-quarter visible */
|
|
419
|
+
75: 0.75,
|
|
420
|
+
/** 0.8 - Strong */
|
|
421
|
+
80: 0.8,
|
|
422
|
+
/** 0.9 - Almost opaque */
|
|
423
|
+
90: 0.9,
|
|
424
|
+
/** 0.95 - Nearly opaque */
|
|
425
|
+
95: 0.95,
|
|
426
|
+
/** 1 - Fully opaque */
|
|
427
|
+
opaque: 1
|
|
428
|
+
}, ue = {
|
|
429
|
+
/** Disabled elements */
|
|
430
|
+
disabled: q[50],
|
|
431
|
+
/** Placeholder text */
|
|
432
|
+
placeholder: q[50],
|
|
433
|
+
/** Hover overlay */
|
|
434
|
+
hoverOverlay: q[5],
|
|
435
|
+
/** Active/pressed overlay */
|
|
436
|
+
activeOverlay: q[10],
|
|
437
|
+
/** Modal backdrop */
|
|
438
|
+
backdrop: q[40],
|
|
439
|
+
/** Loading state */
|
|
440
|
+
loading: q[70],
|
|
441
|
+
/** Secondary text */
|
|
442
|
+
muted: q[60],
|
|
443
|
+
/** Subtle decorative elements */
|
|
444
|
+
subtle: q[30]
|
|
445
|
+
}, re = {
|
|
446
|
+
/** Pressed state - subtle shrink */
|
|
447
|
+
pressed: 0.98,
|
|
448
|
+
/** Strong pressed - more noticeable */
|
|
449
|
+
pressedStrong: 0.95,
|
|
450
|
+
/** Checkbox pressed */
|
|
451
|
+
controlPressed: 0.92,
|
|
452
|
+
/** Hidden/initial state for animations */
|
|
453
|
+
hidden: 0.95,
|
|
454
|
+
/** Normal state */
|
|
455
|
+
normal: 1,
|
|
456
|
+
/** Slight grow on hover */
|
|
457
|
+
hover: 1.02,
|
|
458
|
+
/** Emphasized grow */
|
|
459
|
+
emphasized: 1.05
|
|
460
|
+
};
|
|
461
|
+
function I(...e) {
|
|
462
|
+
return e.filter(Boolean).join(" ");
|
|
463
|
+
}
|
|
464
|
+
function lt(e) {
|
|
465
|
+
return C[e];
|
|
466
|
+
}
|
|
467
|
+
function H(e) {
|
|
468
|
+
if (e === void 0) return;
|
|
469
|
+
const t = C[e];
|
|
470
|
+
return t === 0 ? "0" : `${t}px`;
|
|
471
|
+
}
|
|
472
|
+
function ye(e) {
|
|
473
|
+
const t = {};
|
|
474
|
+
return e.m !== void 0 && (t.margin = H(e.m)), e.mx !== void 0 && (t.marginLeft = H(e.mx), t.marginRight = H(e.mx)), e.my !== void 0 && (t.marginTop = H(e.my), t.marginBottom = H(e.my)), e.mt !== void 0 && (t.marginTop = H(e.mt)), e.mr !== void 0 && (t.marginRight = H(e.mr)), e.mb !== void 0 && (t.marginBottom = H(e.mb)), e.ml !== void 0 && (t.marginLeft = H(e.ml)), e.p !== void 0 && (t.padding = H(e.p)), e.px !== void 0 && (t.paddingLeft = H(e.px), t.paddingRight = H(e.px)), e.py !== void 0 && (t.paddingTop = H(e.py), t.paddingBottom = H(e.py)), e.pt !== void 0 && (t.paddingTop = H(e.pt)), e.pr !== void 0 && (t.paddingRight = H(e.pr)), e.pb !== void 0 && (t.paddingBottom = H(e.pb)), e.pl !== void 0 && (t.paddingLeft = H(e.pl)), t;
|
|
475
|
+
}
|
|
476
|
+
let Ne = 0;
|
|
477
|
+
function dt(e = "brycks") {
|
|
478
|
+
return `${e}-${++Ne}`;
|
|
479
|
+
}
|
|
480
|
+
function ut(e, t) {
|
|
481
|
+
const r = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
|
|
482
|
+
if (!r) return e;
|
|
483
|
+
const o = parseInt(r[1], 16), s = parseInt(r[2], 16), a = parseInt(r[3], 16);
|
|
484
|
+
return `rgba(${o}, ${s}, ${a}, ${t})`;
|
|
485
|
+
}
|
|
486
|
+
const Le = {
|
|
487
|
+
none: "0",
|
|
488
|
+
xs: "var(--brycks-radius-xs)",
|
|
489
|
+
sm: "var(--brycks-radius-sm)",
|
|
490
|
+
md: "var(--brycks-radius-md)",
|
|
491
|
+
lg: "var(--brycks-radius-lg)",
|
|
492
|
+
xl: "var(--brycks-radius-xl)",
|
|
493
|
+
"2xl": "var(--brycks-radius-2xl)",
|
|
494
|
+
"3xl": "var(--brycks-radius-3xl)",
|
|
495
|
+
full: "var(--brycks-radius-full)"
|
|
496
|
+
}, Re = {
|
|
497
|
+
none: "none",
|
|
498
|
+
xs: "var(--brycks-shadow-xs)",
|
|
499
|
+
sm: "var(--brycks-shadow-sm)",
|
|
500
|
+
md: "var(--brycks-shadow-md)",
|
|
501
|
+
lg: "var(--brycks-shadow-lg)",
|
|
502
|
+
xl: "var(--brycks-shadow-xl)",
|
|
503
|
+
"2xl": "var(--brycks-shadow-2xl)"
|
|
504
|
+
};
|
|
505
|
+
function Me(e) {
|
|
506
|
+
const r = {
|
|
507
|
+
...ye(e)
|
|
508
|
+
};
|
|
509
|
+
return e.display && (r.display = e.display), e.position && (r.position = e.position), e.width && (r.width = e.width), e.height && (r.height = e.height), e.minWidth && (r.minWidth = e.minWidth), e.maxWidth && (r.maxWidth = e.maxWidth), e.minHeight && (r.minHeight = e.minHeight), e.maxHeight && (r.maxHeight = e.maxHeight), e.overflow && (r.overflow = e.overflow), e.bg && (r.backgroundColor = e.bg), e.radius && (r.borderRadius = Le[e.radius]), e.shadow && (r.boxShadow = Re[e.shadow]), r;
|
|
510
|
+
}
|
|
511
|
+
const Fe = [
|
|
512
|
+
"m",
|
|
513
|
+
"mx",
|
|
514
|
+
"my",
|
|
515
|
+
"mt",
|
|
516
|
+
"mr",
|
|
517
|
+
"mb",
|
|
518
|
+
"ml",
|
|
519
|
+
"p",
|
|
520
|
+
"px",
|
|
521
|
+
"py",
|
|
522
|
+
"pt",
|
|
523
|
+
"pr",
|
|
524
|
+
"pb",
|
|
525
|
+
"pl",
|
|
526
|
+
"display",
|
|
527
|
+
"position",
|
|
528
|
+
"width",
|
|
529
|
+
"height",
|
|
530
|
+
"minWidth",
|
|
531
|
+
"maxWidth",
|
|
532
|
+
"minHeight",
|
|
533
|
+
"maxHeight",
|
|
534
|
+
"overflow",
|
|
535
|
+
"bg",
|
|
536
|
+
"radius",
|
|
537
|
+
"shadow",
|
|
538
|
+
"testId"
|
|
539
|
+
];
|
|
540
|
+
function je(e) {
|
|
541
|
+
const t = { ...e };
|
|
542
|
+
for (const r of Fe)
|
|
543
|
+
delete t[r];
|
|
544
|
+
return t;
|
|
545
|
+
}
|
|
546
|
+
const Oe = ({ as: e, className: t, style: r, children: o, testId: s, ...a }, b) => {
|
|
547
|
+
const l = e || "div", c = Me(a), i = je(a);
|
|
548
|
+
return /* @__PURE__ */ n(
|
|
549
|
+
l,
|
|
550
|
+
{
|
|
551
|
+
ref: b,
|
|
552
|
+
className: I("brycks-box", t),
|
|
553
|
+
style: { ...c, ...r },
|
|
554
|
+
"data-testid": s,
|
|
555
|
+
...i,
|
|
556
|
+
children: o
|
|
557
|
+
}
|
|
558
|
+
);
|
|
559
|
+
}, De = $(Oe);
|
|
560
|
+
De.displayName = "Box";
|
|
561
|
+
const Xe = [
|
|
562
|
+
"m",
|
|
563
|
+
"mx",
|
|
564
|
+
"my",
|
|
565
|
+
"mt",
|
|
566
|
+
"mr",
|
|
567
|
+
"mb",
|
|
568
|
+
"ml",
|
|
569
|
+
"p",
|
|
570
|
+
"px",
|
|
571
|
+
"py",
|
|
572
|
+
"pt",
|
|
573
|
+
"pr",
|
|
574
|
+
"pb",
|
|
575
|
+
"pl",
|
|
576
|
+
"direction",
|
|
577
|
+
"gap",
|
|
578
|
+
"gapX",
|
|
579
|
+
"gapY",
|
|
580
|
+
"align",
|
|
581
|
+
"justify",
|
|
582
|
+
"wrap",
|
|
583
|
+
"inline",
|
|
584
|
+
"testId"
|
|
585
|
+
];
|
|
586
|
+
function Ee(e) {
|
|
587
|
+
const t = { ...e };
|
|
588
|
+
for (const r of Xe)
|
|
589
|
+
delete t[r];
|
|
590
|
+
return t;
|
|
591
|
+
}
|
|
592
|
+
function Pe(e) {
|
|
593
|
+
const r = {
|
|
594
|
+
...ye(e),
|
|
595
|
+
display: e.inline ? "inline-flex" : "flex",
|
|
596
|
+
flexDirection: e.direction ?? "column"
|
|
597
|
+
};
|
|
598
|
+
return e.gap !== void 0 ? r.gap = H(e.gap) : (e.gapX !== void 0 && (r.columnGap = H(e.gapX)), e.gapY !== void 0 && (r.rowGap = H(e.gapY))), e.align && (r.alignItems = e.align), e.justify && (r.justifyContent = e.justify), e.wrap && (r.flexWrap = e.wrap), r;
|
|
599
|
+
}
|
|
600
|
+
const Ve = ({ as: e, className: t, style: r, children: o, testId: s, ...a }, b) => {
|
|
601
|
+
const l = e || "div", c = Pe(a), i = Ee(a);
|
|
602
|
+
return /* @__PURE__ */ n(
|
|
603
|
+
l,
|
|
604
|
+
{
|
|
605
|
+
ref: b,
|
|
606
|
+
className: I("brycks-stack", t),
|
|
607
|
+
style: { ...c, ...r },
|
|
608
|
+
"data-testid": s,
|
|
609
|
+
...i,
|
|
610
|
+
children: o
|
|
611
|
+
}
|
|
612
|
+
);
|
|
613
|
+
}, ge = $(Ve);
|
|
614
|
+
ge.displayName = "Stack";
|
|
615
|
+
const Ge = (e, t) => /* @__PURE__ */ n(ge, { ref: t, direction: "row", align: "center", ...e }), _e = $(Ge);
|
|
616
|
+
_e.displayName = "HStack";
|
|
617
|
+
const Ye = (e, t) => /* @__PURE__ */ n(ge, { ref: t, direction: "column", ...e }), Ae = $(Ye);
|
|
618
|
+
Ae.displayName = "VStack";
|
|
619
|
+
const Ke = [
|
|
620
|
+
"m",
|
|
621
|
+
"mx",
|
|
622
|
+
"my",
|
|
623
|
+
"mt",
|
|
624
|
+
"mr",
|
|
625
|
+
"mb",
|
|
626
|
+
"ml",
|
|
627
|
+
"p",
|
|
628
|
+
"px",
|
|
629
|
+
"py",
|
|
630
|
+
"pt",
|
|
631
|
+
"pr",
|
|
632
|
+
"pb",
|
|
633
|
+
"pl",
|
|
634
|
+
"columns",
|
|
635
|
+
"rows",
|
|
636
|
+
"gap",
|
|
637
|
+
"gapX",
|
|
638
|
+
"gapY",
|
|
639
|
+
"align",
|
|
640
|
+
"justify",
|
|
641
|
+
"templateColumns",
|
|
642
|
+
"templateRows",
|
|
643
|
+
"flow",
|
|
644
|
+
"inline",
|
|
645
|
+
"testId"
|
|
646
|
+
];
|
|
647
|
+
function qe(e) {
|
|
648
|
+
const t = { ...e };
|
|
649
|
+
for (const r of Ke)
|
|
650
|
+
delete t[r];
|
|
651
|
+
return t;
|
|
652
|
+
}
|
|
653
|
+
function Qe(e) {
|
|
654
|
+
const r = {
|
|
655
|
+
...ye(e),
|
|
656
|
+
display: e.inline ? "inline-grid" : "grid"
|
|
657
|
+
};
|
|
658
|
+
return e.columns !== void 0 && (r.gridTemplateColumns = typeof e.columns == "number" ? `repeat(${e.columns}, 1fr)` : e.columns), e.rows !== void 0 && (r.gridTemplateRows = typeof e.rows == "number" ? `repeat(${e.rows}, 1fr)` : e.rows), e.templateColumns && (r.gridTemplateColumns = e.templateColumns), e.templateRows && (r.gridTemplateRows = e.templateRows), e.gap !== void 0 ? r.gap = H(e.gap) : (e.gapX !== void 0 && (r.columnGap = H(e.gapX)), e.gapY !== void 0 && (r.rowGap = H(e.gapY))), e.align && (r.alignItems = e.align), e.justify && (r.justifyItems = e.justify), e.flow && (r.gridAutoFlow = e.flow), r;
|
|
659
|
+
}
|
|
660
|
+
const Ue = ({ as: e, className: t, style: r, children: o, testId: s, ...a }, b) => {
|
|
661
|
+
const l = e || "div", c = Qe(a), i = qe(a);
|
|
662
|
+
return /* @__PURE__ */ n(
|
|
663
|
+
l,
|
|
664
|
+
{
|
|
665
|
+
ref: b,
|
|
666
|
+
className: I("brycks-grid", t),
|
|
667
|
+
style: { ...c, ...r },
|
|
668
|
+
"data-testid": s,
|
|
669
|
+
...i,
|
|
670
|
+
children: o
|
|
671
|
+
}
|
|
672
|
+
);
|
|
673
|
+
}, Ze = $(Ue);
|
|
674
|
+
Ze.displayName = "Grid";
|
|
675
|
+
const Je = ({
|
|
676
|
+
as: e,
|
|
677
|
+
className: t,
|
|
678
|
+
style: r,
|
|
679
|
+
children: o,
|
|
680
|
+
testId: s,
|
|
681
|
+
colSpan: a,
|
|
682
|
+
rowSpan: b,
|
|
683
|
+
colStart: l,
|
|
684
|
+
colEnd: c,
|
|
685
|
+
rowStart: i,
|
|
686
|
+
rowEnd: f,
|
|
687
|
+
...h
|
|
688
|
+
}, g) => {
|
|
689
|
+
const u = e || "div", y = {};
|
|
690
|
+
return a !== void 0 && (y.gridColumn = a === "full" ? "1 / -1" : `span ${a}`), b !== void 0 && (y.gridRow = `span ${b}`), l !== void 0 && (y.gridColumnStart = l), c !== void 0 && (y.gridColumnEnd = c), i !== void 0 && (y.gridRowStart = i), f !== void 0 && (y.gridRowEnd = f), /* @__PURE__ */ n(
|
|
691
|
+
u,
|
|
692
|
+
{
|
|
693
|
+
ref: g,
|
|
694
|
+
className: I("brycks-grid-item", t),
|
|
695
|
+
style: { ...y, ...r },
|
|
696
|
+
"data-testid": s,
|
|
697
|
+
...h,
|
|
698
|
+
children: o
|
|
699
|
+
}
|
|
700
|
+
);
|
|
701
|
+
}, er = $(Je);
|
|
702
|
+
er.displayName = "GridItem";
|
|
703
|
+
const rr = [
|
|
704
|
+
"m",
|
|
705
|
+
"mx",
|
|
706
|
+
"my",
|
|
707
|
+
"mt",
|
|
708
|
+
"mr",
|
|
709
|
+
"mb",
|
|
710
|
+
"ml",
|
|
711
|
+
"p",
|
|
712
|
+
"px",
|
|
713
|
+
"py",
|
|
714
|
+
"pt",
|
|
715
|
+
"pr",
|
|
716
|
+
"pb",
|
|
717
|
+
"pl",
|
|
718
|
+
"size",
|
|
719
|
+
"centered",
|
|
720
|
+
"padded",
|
|
721
|
+
"testId"
|
|
722
|
+
];
|
|
723
|
+
function tr(e) {
|
|
724
|
+
const t = { ...e };
|
|
725
|
+
for (const r of rr)
|
|
726
|
+
delete t[r];
|
|
727
|
+
return t;
|
|
728
|
+
}
|
|
729
|
+
function or(e) {
|
|
730
|
+
const t = ye(e), r = e.size ?? "xl", o = We[r], s = {
|
|
731
|
+
...t,
|
|
732
|
+
width: "100%",
|
|
733
|
+
maxWidth: typeof o == "number" ? `${o}px` : o
|
|
734
|
+
};
|
|
735
|
+
return e.centered !== !1 && (s.marginLeft = "auto", s.marginRight = "auto"), e.padded !== !1 && (s.paddingLeft = "var(--brycks-space-4)", s.paddingRight = "var(--brycks-space-4)"), s;
|
|
736
|
+
}
|
|
737
|
+
const nr = ({ as: e, className: t, style: r, children: o, testId: s, ...a }, b) => {
|
|
738
|
+
const l = e || "div", c = or(a), i = tr(a);
|
|
739
|
+
return /* @__PURE__ */ n(
|
|
740
|
+
l,
|
|
741
|
+
{
|
|
742
|
+
ref: b,
|
|
743
|
+
className: I("brycks-container", t),
|
|
744
|
+
style: { ...c, ...r },
|
|
745
|
+
"data-testid": s,
|
|
746
|
+
...i,
|
|
747
|
+
children: o
|
|
748
|
+
}
|
|
749
|
+
);
|
|
750
|
+
}, sr = $(nr);
|
|
751
|
+
sr.displayName = "Container";
|
|
752
|
+
const ke = {
|
|
753
|
+
body: { element: "p", styles: Q.bodyDefault },
|
|
754
|
+
bodyLarge: { element: "p", styles: Q.bodyLarge },
|
|
755
|
+
bodySmall: { element: "p", styles: Q.bodySmall },
|
|
756
|
+
label: { element: "span", styles: Q.label },
|
|
757
|
+
caption: { element: "span", styles: Q.caption },
|
|
758
|
+
overline: { element: "span", styles: Q.overline },
|
|
759
|
+
code: { element: "code", styles: Q.code }
|
|
760
|
+
};
|
|
761
|
+
function ar(e) {
|
|
762
|
+
const t = e.variant ?? "body", r = ke[t].styles, o = {
|
|
763
|
+
fontFamily: r.fontFamily,
|
|
764
|
+
fontSize: e.size ? ee[e.size] : r.fontSize,
|
|
765
|
+
fontWeight: e.weight ? oe[e.weight] : r.fontWeight,
|
|
766
|
+
lineHeight: e.leading ? de[e.leading] : r.lineHeight,
|
|
767
|
+
letterSpacing: r.letterSpacing
|
|
768
|
+
};
|
|
769
|
+
return "textTransform" in r && (o.textTransform = r.textTransform), e.align && (o.textAlign = e.align), e.color && (o.color = e.color), e.truncate && (o.overflow = "hidden", o.textOverflow = "ellipsis", o.whiteSpace = "nowrap"), e.lineClamp && (o.display = "-webkit-box", o.WebkitLineClamp = e.lineClamp, o.WebkitBoxOrient = "vertical", o.overflow = "hidden"), o;
|
|
770
|
+
}
|
|
771
|
+
const ir = ({ as: e, variant: t = "body", className: r, style: o, children: s, testId: a, ...b }, l) => {
|
|
772
|
+
const c = e || ke[t].element, i = ar({ variant: t, ...b }), {
|
|
773
|
+
size: f,
|
|
774
|
+
weight: h,
|
|
775
|
+
leading: g,
|
|
776
|
+
align: u,
|
|
777
|
+
color: y,
|
|
778
|
+
truncate: m,
|
|
779
|
+
lineClamp: d,
|
|
780
|
+
...k
|
|
781
|
+
} = b;
|
|
782
|
+
return /* @__PURE__ */ n(
|
|
783
|
+
c,
|
|
784
|
+
{
|
|
785
|
+
ref: l,
|
|
786
|
+
className: I("brycks-text", `brycks-text--${t}`, r),
|
|
787
|
+
style: { ...i, ...o },
|
|
788
|
+
"data-testid": a,
|
|
789
|
+
...k,
|
|
790
|
+
children: s
|
|
791
|
+
}
|
|
792
|
+
);
|
|
793
|
+
}, pe = $(ir);
|
|
794
|
+
pe.displayName = "Text";
|
|
795
|
+
const cr = (e, t) => /* @__PURE__ */ n(
|
|
796
|
+
pe,
|
|
797
|
+
{
|
|
798
|
+
...e,
|
|
799
|
+
ref: t,
|
|
800
|
+
variant: "code",
|
|
801
|
+
style: {
|
|
802
|
+
backgroundColor: "var(--brycks-background-muted)",
|
|
803
|
+
padding: `${C[0.5]}px ${C[1.5]}px`,
|
|
804
|
+
borderRadius: "var(--brycks-radius-sm)",
|
|
805
|
+
...e.style
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
), lr = $(cr);
|
|
809
|
+
lr.displayName = "Code";
|
|
810
|
+
const dr = {
|
|
811
|
+
1: "h1",
|
|
812
|
+
2: "h2",
|
|
813
|
+
3: "h3",
|
|
814
|
+
4: "h4",
|
|
815
|
+
5: "h5",
|
|
816
|
+
6: "h6",
|
|
817
|
+
display: "displayMedium",
|
|
818
|
+
displayLarge: "displayLarge",
|
|
819
|
+
displaySmall: "displaySmall"
|
|
820
|
+
};
|
|
821
|
+
function ur(e) {
|
|
822
|
+
const t = e.level ?? 2, r = e.size ?? t, o = dr[r], s = Q[o], a = {
|
|
823
|
+
fontFamily: s.fontFamily,
|
|
824
|
+
fontSize: s.fontSize,
|
|
825
|
+
fontWeight: e.weight ? oe[e.weight] : s.fontWeight,
|
|
826
|
+
lineHeight: s.lineHeight,
|
|
827
|
+
letterSpacing: s.letterSpacing,
|
|
828
|
+
margin: 0
|
|
829
|
+
};
|
|
830
|
+
return e.align && (a.textAlign = e.align), e.color && (a.color = e.color), e.truncate && (a.overflow = "hidden", a.textOverflow = "ellipsis", a.whiteSpace = "nowrap"), a;
|
|
831
|
+
}
|
|
832
|
+
const yr = ({ as: e, level: t = 2, className: r, style: o, children: s, testId: a, ...b }, l) => {
|
|
833
|
+
const c = e || `h${t}`, i = ur({ level: t, ...b }), {
|
|
834
|
+
size: f,
|
|
835
|
+
weight: h,
|
|
836
|
+
align: g,
|
|
837
|
+
color: u,
|
|
838
|
+
truncate: y,
|
|
839
|
+
...m
|
|
840
|
+
} = b;
|
|
841
|
+
return /* @__PURE__ */ n(
|
|
842
|
+
c,
|
|
843
|
+
{
|
|
844
|
+
ref: l,
|
|
845
|
+
className: I("brycks-heading", `brycks-heading--${t}`, r),
|
|
846
|
+
style: { ...i, ...o },
|
|
847
|
+
"data-testid": a,
|
|
848
|
+
...m,
|
|
849
|
+
children: s
|
|
850
|
+
}
|
|
851
|
+
);
|
|
852
|
+
}, ve = $(yr);
|
|
853
|
+
ve.displayName = "Heading";
|
|
854
|
+
const br = ({ size: e = "display", ...t }, r) => /* @__PURE__ */ n(ve, { ref: r, level: 1, size: e, ...t }), fr = $(br);
|
|
855
|
+
fr.displayName = "Display";
|
|
856
|
+
const xe = {
|
|
857
|
+
xs: {
|
|
858
|
+
height: U.xs,
|
|
859
|
+
paddingX: Z.xs,
|
|
860
|
+
fontSize: N.xs,
|
|
861
|
+
iconSize: ie.xs,
|
|
862
|
+
gap: G.xs,
|
|
863
|
+
radius: "var(--brycks-radius-md)"
|
|
864
|
+
},
|
|
865
|
+
sm: {
|
|
866
|
+
height: U.sm,
|
|
867
|
+
paddingX: Z.sm,
|
|
868
|
+
fontSize: N.sm,
|
|
869
|
+
iconSize: ie.sm,
|
|
870
|
+
gap: G.sm,
|
|
871
|
+
radius: "var(--brycks-radius-md)"
|
|
872
|
+
},
|
|
873
|
+
md: {
|
|
874
|
+
height: U.md,
|
|
875
|
+
paddingX: Z.md,
|
|
876
|
+
fontSize: N.md,
|
|
877
|
+
iconSize: ie.md,
|
|
878
|
+
gap: G.md,
|
|
879
|
+
radius: "var(--brycks-radius-default)"
|
|
880
|
+
},
|
|
881
|
+
lg: {
|
|
882
|
+
height: U.lg,
|
|
883
|
+
paddingX: Z.lg,
|
|
884
|
+
fontSize: N.lg,
|
|
885
|
+
iconSize: ie.lg,
|
|
886
|
+
gap: G.md,
|
|
887
|
+
radius: "var(--brycks-radius-lg)"
|
|
888
|
+
},
|
|
889
|
+
xl: {
|
|
890
|
+
height: U.xl,
|
|
891
|
+
paddingX: Z.xl,
|
|
892
|
+
fontSize: N.xl,
|
|
893
|
+
iconSize: ie.xl,
|
|
894
|
+
gap: G.lg,
|
|
895
|
+
radius: "var(--brycks-radius-xl)"
|
|
896
|
+
}
|
|
897
|
+
}, gr = {
|
|
898
|
+
primary: {
|
|
899
|
+
solid: {
|
|
900
|
+
bg: "var(--brycks-primary-default)",
|
|
901
|
+
hoverBg: "var(--brycks-primary-hover)",
|
|
902
|
+
activeBg: "var(--brycks-primary-active)",
|
|
903
|
+
text: "var(--brycks-primary-foreground)"
|
|
904
|
+
},
|
|
905
|
+
outline: {
|
|
906
|
+
border: "var(--brycks-primary-default)",
|
|
907
|
+
hoverBg: "var(--brycks-primary-muted)",
|
|
908
|
+
text: "var(--brycks-primary-default)"
|
|
909
|
+
},
|
|
910
|
+
ghost: {
|
|
911
|
+
hoverBg: "var(--brycks-primary-muted)",
|
|
912
|
+
text: "var(--brycks-primary-default)"
|
|
913
|
+
},
|
|
914
|
+
soft: {
|
|
915
|
+
bg: "var(--brycks-primary-muted)",
|
|
916
|
+
hoverBg: "var(--brycks-primary-soft-hover)",
|
|
917
|
+
text: "var(--brycks-primary-default)"
|
|
918
|
+
},
|
|
919
|
+
link: {
|
|
920
|
+
text: "var(--brycks-primary-default)",
|
|
921
|
+
hoverText: "var(--brycks-primary-hover)"
|
|
922
|
+
}
|
|
923
|
+
},
|
|
924
|
+
accent: {
|
|
925
|
+
solid: {
|
|
926
|
+
bg: "var(--brycks-accent-default)",
|
|
927
|
+
hoverBg: "var(--brycks-accent-hover)",
|
|
928
|
+
activeBg: "var(--brycks-accent-active)",
|
|
929
|
+
text: "var(--brycks-accent-foreground)"
|
|
930
|
+
},
|
|
931
|
+
outline: {
|
|
932
|
+
border: "var(--brycks-accent-default)",
|
|
933
|
+
hoverBg: "var(--brycks-accent-muted)",
|
|
934
|
+
text: "var(--brycks-accent-default)"
|
|
935
|
+
},
|
|
936
|
+
ghost: {
|
|
937
|
+
hoverBg: "var(--brycks-accent-muted)",
|
|
938
|
+
text: "var(--brycks-accent-default)"
|
|
939
|
+
},
|
|
940
|
+
soft: {
|
|
941
|
+
bg: "var(--brycks-accent-muted)",
|
|
942
|
+
hoverBg: "var(--brycks-accent-soft-hover)",
|
|
943
|
+
text: "var(--brycks-accent-default)"
|
|
944
|
+
},
|
|
945
|
+
link: {
|
|
946
|
+
text: "var(--brycks-accent-default)",
|
|
947
|
+
hoverText: "var(--brycks-accent-hover)"
|
|
948
|
+
}
|
|
949
|
+
},
|
|
950
|
+
neutral: {
|
|
951
|
+
solid: {
|
|
952
|
+
bg: "var(--brycks-foreground-default)",
|
|
953
|
+
hoverBg: "var(--brycks-foreground-muted)",
|
|
954
|
+
activeBg: "var(--brycks-foreground-subtle)",
|
|
955
|
+
text: "var(--brycks-background-app)"
|
|
956
|
+
},
|
|
957
|
+
outline: {
|
|
958
|
+
border: "var(--brycks-border-strong)",
|
|
959
|
+
hoverBg: "var(--brycks-background-muted)",
|
|
960
|
+
text: "var(--brycks-foreground-default)"
|
|
961
|
+
},
|
|
962
|
+
ghost: {
|
|
963
|
+
hoverBg: "var(--brycks-background-muted)",
|
|
964
|
+
text: "var(--brycks-foreground-default)"
|
|
965
|
+
},
|
|
966
|
+
soft: {
|
|
967
|
+
bg: "var(--brycks-background-muted)",
|
|
968
|
+
hoverBg: "var(--brycks-background-subtle)",
|
|
969
|
+
text: "var(--brycks-foreground-default)"
|
|
970
|
+
},
|
|
971
|
+
link: {
|
|
972
|
+
text: "var(--brycks-foreground-default)",
|
|
973
|
+
hoverText: "var(--brycks-foreground-muted)"
|
|
974
|
+
}
|
|
975
|
+
},
|
|
976
|
+
success: {
|
|
977
|
+
solid: {
|
|
978
|
+
bg: "var(--brycks-success-default)",
|
|
979
|
+
hoverBg: "var(--brycks-success-hover)",
|
|
980
|
+
activeBg: "var(--brycks-success-hover)",
|
|
981
|
+
text: "var(--brycks-success-foreground)"
|
|
982
|
+
},
|
|
983
|
+
outline: {
|
|
984
|
+
border: "var(--brycks-success-default)",
|
|
985
|
+
hoverBg: "var(--brycks-success-muted)",
|
|
986
|
+
text: "var(--brycks-success-default)"
|
|
987
|
+
},
|
|
988
|
+
ghost: {
|
|
989
|
+
hoverBg: "var(--brycks-success-muted)",
|
|
990
|
+
text: "var(--brycks-success-default)"
|
|
991
|
+
},
|
|
992
|
+
soft: {
|
|
993
|
+
bg: "var(--brycks-success-muted)",
|
|
994
|
+
hoverBg: "var(--brycks-success-soft-hover)",
|
|
995
|
+
text: "var(--brycks-success-default)"
|
|
996
|
+
},
|
|
997
|
+
link: {
|
|
998
|
+
text: "var(--brycks-success-default)",
|
|
999
|
+
hoverText: "var(--brycks-success-hover)"
|
|
1000
|
+
}
|
|
1001
|
+
},
|
|
1002
|
+
warning: {
|
|
1003
|
+
solid: {
|
|
1004
|
+
bg: "var(--brycks-warning-default)",
|
|
1005
|
+
hoverBg: "var(--brycks-warning-hover)",
|
|
1006
|
+
activeBg: "var(--brycks-warning-hover)",
|
|
1007
|
+
text: "var(--brycks-warning-foreground)"
|
|
1008
|
+
},
|
|
1009
|
+
outline: {
|
|
1010
|
+
border: "var(--brycks-warning-default)",
|
|
1011
|
+
hoverBg: "var(--brycks-warning-muted)",
|
|
1012
|
+
text: "var(--brycks-warning-default)"
|
|
1013
|
+
},
|
|
1014
|
+
ghost: {
|
|
1015
|
+
hoverBg: "var(--brycks-warning-muted)",
|
|
1016
|
+
text: "var(--brycks-warning-default)"
|
|
1017
|
+
},
|
|
1018
|
+
soft: {
|
|
1019
|
+
bg: "var(--brycks-warning-muted)",
|
|
1020
|
+
hoverBg: "var(--brycks-warning-soft-hover)",
|
|
1021
|
+
text: "var(--brycks-warning-default)"
|
|
1022
|
+
},
|
|
1023
|
+
link: {
|
|
1024
|
+
text: "var(--brycks-warning-default)",
|
|
1025
|
+
hoverText: "var(--brycks-warning-hover)"
|
|
1026
|
+
}
|
|
1027
|
+
},
|
|
1028
|
+
error: {
|
|
1029
|
+
solid: {
|
|
1030
|
+
bg: "var(--brycks-error-default)",
|
|
1031
|
+
hoverBg: "var(--brycks-error-hover)",
|
|
1032
|
+
activeBg: "var(--brycks-error-hover)",
|
|
1033
|
+
text: "var(--brycks-error-foreground)"
|
|
1034
|
+
},
|
|
1035
|
+
outline: {
|
|
1036
|
+
border: "var(--brycks-error-default)",
|
|
1037
|
+
hoverBg: "var(--brycks-error-muted)",
|
|
1038
|
+
text: "var(--brycks-error-default)"
|
|
1039
|
+
},
|
|
1040
|
+
ghost: {
|
|
1041
|
+
hoverBg: "var(--brycks-error-muted)",
|
|
1042
|
+
text: "var(--brycks-error-default)"
|
|
1043
|
+
},
|
|
1044
|
+
soft: {
|
|
1045
|
+
bg: "var(--brycks-error-muted)",
|
|
1046
|
+
hoverBg: "var(--brycks-error-soft-hover)",
|
|
1047
|
+
text: "var(--brycks-error-default)"
|
|
1048
|
+
},
|
|
1049
|
+
link: {
|
|
1050
|
+
text: "var(--brycks-error-default)",
|
|
1051
|
+
hoverText: "var(--brycks-error-hover)"
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
};
|
|
1055
|
+
function mr(e) {
|
|
1056
|
+
const { variant: t, intent: r, size: o, fullWidth: s, isIconOnly: a } = e, b = xe[o], l = gr[r][t], c = {
|
|
1057
|
+
display: "inline-flex",
|
|
1058
|
+
alignItems: "center",
|
|
1059
|
+
justifyContent: "center",
|
|
1060
|
+
gap: b.gap,
|
|
1061
|
+
height: b.height,
|
|
1062
|
+
minWidth: a ? b.height : void 0,
|
|
1063
|
+
width: s ? "100%" : void 0,
|
|
1064
|
+
padding: a ? 0 : `0 ${b.paddingX}px`,
|
|
1065
|
+
fontSize: b.fontSize,
|
|
1066
|
+
fontWeight: E.medium,
|
|
1067
|
+
fontFamily: "var(--brycks-font-sans)",
|
|
1068
|
+
lineHeight: F.none,
|
|
1069
|
+
borderRadius: b.radius,
|
|
1070
|
+
border: "none",
|
|
1071
|
+
outline: "none",
|
|
1072
|
+
cursor: "pointer",
|
|
1073
|
+
userSelect: "none",
|
|
1074
|
+
textDecoration: "none",
|
|
1075
|
+
transition: te.quick,
|
|
1076
|
+
WebkitTapHighlightColor: "transparent"
|
|
1077
|
+
};
|
|
1078
|
+
switch (t) {
|
|
1079
|
+
case "solid": {
|
|
1080
|
+
const u = l;
|
|
1081
|
+
Object.assign(c, {
|
|
1082
|
+
backgroundColor: u.bg,
|
|
1083
|
+
color: u.text,
|
|
1084
|
+
boxShadow: "var(--brycks-shadow-xs)"
|
|
1085
|
+
});
|
|
1086
|
+
break;
|
|
1087
|
+
}
|
|
1088
|
+
case "outline": {
|
|
1089
|
+
const u = l;
|
|
1090
|
+
Object.assign(c, {
|
|
1091
|
+
backgroundColor: "transparent",
|
|
1092
|
+
color: u.text,
|
|
1093
|
+
border: `1px solid ${u.border}`
|
|
1094
|
+
});
|
|
1095
|
+
break;
|
|
1096
|
+
}
|
|
1097
|
+
case "ghost": {
|
|
1098
|
+
Object.assign(c, {
|
|
1099
|
+
backgroundColor: "transparent",
|
|
1100
|
+
color: l.text
|
|
1101
|
+
});
|
|
1102
|
+
break;
|
|
1103
|
+
}
|
|
1104
|
+
case "soft": {
|
|
1105
|
+
const u = l;
|
|
1106
|
+
Object.assign(c, {
|
|
1107
|
+
backgroundColor: u.bg,
|
|
1108
|
+
color: u.text
|
|
1109
|
+
});
|
|
1110
|
+
break;
|
|
1111
|
+
}
|
|
1112
|
+
case "link": {
|
|
1113
|
+
Object.assign(c, {
|
|
1114
|
+
backgroundColor: "transparent",
|
|
1115
|
+
color: l.text,
|
|
1116
|
+
height: "auto",
|
|
1117
|
+
padding: 0,
|
|
1118
|
+
borderRadius: 0
|
|
1119
|
+
});
|
|
1120
|
+
break;
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
const i = {};
|
|
1124
|
+
switch (t) {
|
|
1125
|
+
case "solid": {
|
|
1126
|
+
const u = l;
|
|
1127
|
+
i.backgroundColor = u.hoverBg, i.boxShadow = "var(--brycks-shadow-sm)";
|
|
1128
|
+
break;
|
|
1129
|
+
}
|
|
1130
|
+
case "outline": {
|
|
1131
|
+
const u = l;
|
|
1132
|
+
i.backgroundColor = u.hoverBg;
|
|
1133
|
+
break;
|
|
1134
|
+
}
|
|
1135
|
+
case "ghost": {
|
|
1136
|
+
const u = l;
|
|
1137
|
+
i.backgroundColor = u.hoverBg;
|
|
1138
|
+
break;
|
|
1139
|
+
}
|
|
1140
|
+
case "soft": {
|
|
1141
|
+
const u = l;
|
|
1142
|
+
i.backgroundColor = u.hoverBg;
|
|
1143
|
+
break;
|
|
1144
|
+
}
|
|
1145
|
+
case "link": {
|
|
1146
|
+
const u = l;
|
|
1147
|
+
i.color = u.hoverText, i.textDecoration = "underline";
|
|
1148
|
+
break;
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
const f = {
|
|
1152
|
+
transform: t !== "link" ? `scale(${re.pressed})` : void 0
|
|
1153
|
+
};
|
|
1154
|
+
if (t === "solid") {
|
|
1155
|
+
const u = l;
|
|
1156
|
+
f.backgroundColor = u.activeBg, f.boxShadow = "var(--brycks-shadow-xs)";
|
|
1157
|
+
}
|
|
1158
|
+
const h = {
|
|
1159
|
+
opacity: ue.disabled,
|
|
1160
|
+
cursor: "not-allowed",
|
|
1161
|
+
pointerEvents: "none"
|
|
1162
|
+
};
|
|
1163
|
+
return { base: c, hover: i, active: f, disabled: h, loading: {
|
|
1164
|
+
cursor: "wait",
|
|
1165
|
+
pointerEvents: "none"
|
|
1166
|
+
} };
|
|
1167
|
+
}
|
|
1168
|
+
function hr({ size: e }) {
|
|
1169
|
+
return /* @__PURE__ */ p(
|
|
1170
|
+
"svg",
|
|
1171
|
+
{
|
|
1172
|
+
width: e,
|
|
1173
|
+
height: e,
|
|
1174
|
+
viewBox: "0 0 24 24",
|
|
1175
|
+
fill: "none",
|
|
1176
|
+
style: {
|
|
1177
|
+
animation: "brycks-spin 1s linear infinite"
|
|
1178
|
+
},
|
|
1179
|
+
children: [
|
|
1180
|
+
/* @__PURE__ */ n("style", { children: `
|
|
1181
|
+
@keyframes brycks-spin {
|
|
1182
|
+
from { transform: rotate(0deg); }
|
|
1183
|
+
to { transform: rotate(360deg); }
|
|
1184
|
+
}
|
|
1185
|
+
` }),
|
|
1186
|
+
/* @__PURE__ */ n(
|
|
1187
|
+
"circle",
|
|
1188
|
+
{
|
|
1189
|
+
cx: "12",
|
|
1190
|
+
cy: "12",
|
|
1191
|
+
r: "10",
|
|
1192
|
+
stroke: "currentColor",
|
|
1193
|
+
strokeWidth: "2",
|
|
1194
|
+
strokeLinecap: "round",
|
|
1195
|
+
strokeDasharray: "31.4 31.4",
|
|
1196
|
+
opacity: "0.25"
|
|
1197
|
+
}
|
|
1198
|
+
),
|
|
1199
|
+
/* @__PURE__ */ n(
|
|
1200
|
+
"circle",
|
|
1201
|
+
{
|
|
1202
|
+
cx: "12",
|
|
1203
|
+
cy: "12",
|
|
1204
|
+
r: "10",
|
|
1205
|
+
stroke: "currentColor",
|
|
1206
|
+
strokeWidth: "2",
|
|
1207
|
+
strokeLinecap: "round",
|
|
1208
|
+
strokeDasharray: "31.4 31.4",
|
|
1209
|
+
strokeDashoffset: "62.8",
|
|
1210
|
+
style: { transform: "rotate(-90deg)", transformOrigin: "center" }
|
|
1211
|
+
}
|
|
1212
|
+
)
|
|
1213
|
+
]
|
|
1214
|
+
}
|
|
1215
|
+
);
|
|
1216
|
+
}
|
|
1217
|
+
const kr = ({
|
|
1218
|
+
as: e,
|
|
1219
|
+
variant: t = "solid",
|
|
1220
|
+
intent: r = "primary",
|
|
1221
|
+
size: o = "md",
|
|
1222
|
+
fullWidth: s,
|
|
1223
|
+
isLoading: a,
|
|
1224
|
+
isDisabled: b,
|
|
1225
|
+
leftIcon: l,
|
|
1226
|
+
rightIcon: c,
|
|
1227
|
+
isIconOnly: i,
|
|
1228
|
+
className: f,
|
|
1229
|
+
style: h,
|
|
1230
|
+
children: g,
|
|
1231
|
+
testId: u,
|
|
1232
|
+
onMouseEnter: y,
|
|
1233
|
+
onMouseLeave: m,
|
|
1234
|
+
onMouseDown: d,
|
|
1235
|
+
onMouseUp: k,
|
|
1236
|
+
...W
|
|
1237
|
+
}, T) => {
|
|
1238
|
+
const B = e || "button", [M, x] = V(!1), [w, S] = V(!1), L = b || a, z = mr({
|
|
1239
|
+
variant: t,
|
|
1240
|
+
intent: r,
|
|
1241
|
+
size: o,
|
|
1242
|
+
fullWidth: s,
|
|
1243
|
+
isIconOnly: i
|
|
1244
|
+
}), v = {
|
|
1245
|
+
...z.base,
|
|
1246
|
+
...M && !L ? z.hover : {},
|
|
1247
|
+
...w && !L ? z.active : {},
|
|
1248
|
+
...L ? z.disabled : {},
|
|
1249
|
+
...a ? z.loading : {},
|
|
1250
|
+
...h
|
|
1251
|
+
}, O = xe[o], X = (_) => {
|
|
1252
|
+
x(!0), y == null || y(_);
|
|
1253
|
+
}, Y = (_) => {
|
|
1254
|
+
x(!1), S(!1), m == null || m(_);
|
|
1255
|
+
}, A = (_) => {
|
|
1256
|
+
S(!0), d == null || d(_);
|
|
1257
|
+
}, K = (_) => {
|
|
1258
|
+
S(!1), k == null || k(_);
|
|
1259
|
+
}, be = I(
|
|
1260
|
+
"brycks-button",
|
|
1261
|
+
`brycks-button--${t}`,
|
|
1262
|
+
`brycks-button--${r}`,
|
|
1263
|
+
`brycks-button--${o}`,
|
|
1264
|
+
s && "brycks-button--full-width",
|
|
1265
|
+
i && "brycks-button--icon-only",
|
|
1266
|
+
a && "brycks-button--loading",
|
|
1267
|
+
L && "brycks-button--disabled",
|
|
1268
|
+
f
|
|
1269
|
+
), fe = B === "button" || e === void 0 ? {
|
|
1270
|
+
type: W.type ?? "button",
|
|
1271
|
+
disabled: L
|
|
1272
|
+
} : {
|
|
1273
|
+
"aria-disabled": L || void 0,
|
|
1274
|
+
role: "button",
|
|
1275
|
+
tabIndex: L ? -1 : 0
|
|
1276
|
+
};
|
|
1277
|
+
return /* @__PURE__ */ p(
|
|
1278
|
+
B,
|
|
1279
|
+
{
|
|
1280
|
+
ref: T,
|
|
1281
|
+
className: be,
|
|
1282
|
+
style: v,
|
|
1283
|
+
"data-testid": u,
|
|
1284
|
+
onMouseEnter: X,
|
|
1285
|
+
onMouseLeave: Y,
|
|
1286
|
+
onMouseDown: A,
|
|
1287
|
+
onMouseUp: K,
|
|
1288
|
+
...fe,
|
|
1289
|
+
...W,
|
|
1290
|
+
children: [
|
|
1291
|
+
a && /* @__PURE__ */ n(
|
|
1292
|
+
"span",
|
|
1293
|
+
{
|
|
1294
|
+
style: {
|
|
1295
|
+
display: "inline-flex",
|
|
1296
|
+
position: i ? "absolute" : "relative"
|
|
1297
|
+
},
|
|
1298
|
+
children: /* @__PURE__ */ n(hr, { size: O.iconSize })
|
|
1299
|
+
}
|
|
1300
|
+
),
|
|
1301
|
+
!a && l && /* @__PURE__ */ n(
|
|
1302
|
+
"span",
|
|
1303
|
+
{
|
|
1304
|
+
style: {
|
|
1305
|
+
display: "inline-flex",
|
|
1306
|
+
width: O.iconSize,
|
|
1307
|
+
height: O.iconSize
|
|
1308
|
+
},
|
|
1309
|
+
children: l
|
|
1310
|
+
}
|
|
1311
|
+
),
|
|
1312
|
+
!i && /* @__PURE__ */ n(
|
|
1313
|
+
"span",
|
|
1314
|
+
{
|
|
1315
|
+
style: {
|
|
1316
|
+
opacity: a && !i ? 0.5 : 1
|
|
1317
|
+
},
|
|
1318
|
+
children: g
|
|
1319
|
+
}
|
|
1320
|
+
),
|
|
1321
|
+
!a && c && /* @__PURE__ */ n(
|
|
1322
|
+
"span",
|
|
1323
|
+
{
|
|
1324
|
+
style: {
|
|
1325
|
+
display: "inline-flex",
|
|
1326
|
+
width: O.iconSize,
|
|
1327
|
+
height: O.iconSize
|
|
1328
|
+
},
|
|
1329
|
+
children: c
|
|
1330
|
+
}
|
|
1331
|
+
),
|
|
1332
|
+
i && !a && g
|
|
1333
|
+
]
|
|
1334
|
+
}
|
|
1335
|
+
);
|
|
1336
|
+
}, we = $(kr);
|
|
1337
|
+
we.displayName = "Button";
|
|
1338
|
+
const pr = (e, t) => /* @__PURE__ */ n(we, { ref: t, isIconOnly: !0, ...e }), vr = $(pr);
|
|
1339
|
+
vr.displayName = "IconButton";
|
|
1340
|
+
const xr = {
|
|
1341
|
+
sm: {
|
|
1342
|
+
height: U.sm,
|
|
1343
|
+
fontSize: N.sm,
|
|
1344
|
+
paddingX: Z.sm,
|
|
1345
|
+
radius: "var(--brycks-radius-md)"
|
|
1346
|
+
},
|
|
1347
|
+
md: {
|
|
1348
|
+
height: U.md,
|
|
1349
|
+
fontSize: N.md,
|
|
1350
|
+
paddingX: Z.md,
|
|
1351
|
+
radius: "var(--brycks-radius-default)"
|
|
1352
|
+
},
|
|
1353
|
+
lg: {
|
|
1354
|
+
height: U.lg,
|
|
1355
|
+
fontSize: N.lg,
|
|
1356
|
+
paddingX: Z.lg,
|
|
1357
|
+
radius: "var(--brycks-radius-lg)"
|
|
1358
|
+
}
|
|
1359
|
+
}, Se = $(function({
|
|
1360
|
+
size: t = "md",
|
|
1361
|
+
variant: r = "outline",
|
|
1362
|
+
isInvalid: o,
|
|
1363
|
+
leftElement: s,
|
|
1364
|
+
rightElement: a,
|
|
1365
|
+
className: b,
|
|
1366
|
+
style: l,
|
|
1367
|
+
testId: c,
|
|
1368
|
+
disabled: i,
|
|
1369
|
+
onFocus: f,
|
|
1370
|
+
onBlur: h,
|
|
1371
|
+
...g
|
|
1372
|
+
}, u) {
|
|
1373
|
+
const [y, m] = V(!1), d = xr[t], k = () => {
|
|
1374
|
+
const x = {
|
|
1375
|
+
display: "flex",
|
|
1376
|
+
alignItems: "center",
|
|
1377
|
+
width: "100%",
|
|
1378
|
+
position: "relative",
|
|
1379
|
+
height: d.height,
|
|
1380
|
+
borderRadius: d.radius,
|
|
1381
|
+
transition: te.default
|
|
1382
|
+
};
|
|
1383
|
+
switch (r) {
|
|
1384
|
+
case "outline":
|
|
1385
|
+
Object.assign(x, {
|
|
1386
|
+
backgroundColor: "var(--brycks-background-app)",
|
|
1387
|
+
border: `1px solid ${o ? "var(--brycks-error-default)" : y ? "var(--brycks-border-focus)" : "var(--brycks-border-default)"}`,
|
|
1388
|
+
boxShadow: y ? o ? J.error : J.default : J.none
|
|
1389
|
+
});
|
|
1390
|
+
break;
|
|
1391
|
+
case "filled":
|
|
1392
|
+
Object.assign(x, {
|
|
1393
|
+
backgroundColor: "var(--brycks-background-muted)",
|
|
1394
|
+
border: "1px solid transparent",
|
|
1395
|
+
borderColor: o ? "var(--brycks-error-default)" : y ? "var(--brycks-border-focus)" : "transparent"
|
|
1396
|
+
});
|
|
1397
|
+
break;
|
|
1398
|
+
case "flushed":
|
|
1399
|
+
Object.assign(x, {
|
|
1400
|
+
backgroundColor: "transparent",
|
|
1401
|
+
borderRadius: 0,
|
|
1402
|
+
borderBottom: `2px solid ${o ? "var(--brycks-error-default)" : y ? "var(--brycks-border-focus)" : "var(--brycks-border-default)"}`
|
|
1403
|
+
});
|
|
1404
|
+
break;
|
|
1405
|
+
}
|
|
1406
|
+
return i && Object.assign(x, {
|
|
1407
|
+
opacity: ue.disabled,
|
|
1408
|
+
cursor: "not-allowed"
|
|
1409
|
+
}), x;
|
|
1410
|
+
}, W = {
|
|
1411
|
+
width: "100%",
|
|
1412
|
+
height: d.height,
|
|
1413
|
+
fontFamily: "var(--brycks-font-sans)",
|
|
1414
|
+
fontSize: d.fontSize,
|
|
1415
|
+
color: "var(--brycks-foreground-default)",
|
|
1416
|
+
backgroundColor: "transparent",
|
|
1417
|
+
border: "none",
|
|
1418
|
+
outline: "none",
|
|
1419
|
+
borderRadius: d.radius,
|
|
1420
|
+
paddingLeft: s ? G.md : d.paddingX,
|
|
1421
|
+
paddingRight: a ? G.md : d.paddingX,
|
|
1422
|
+
cursor: i ? "not-allowed" : "text",
|
|
1423
|
+
transition: te.default
|
|
1424
|
+
}, T = (x) => {
|
|
1425
|
+
m(!0), f == null || f(x);
|
|
1426
|
+
}, B = (x) => {
|
|
1427
|
+
m(!1), h == null || h(x);
|
|
1428
|
+
}, M = {
|
|
1429
|
+
display: "flex",
|
|
1430
|
+
alignItems: "center",
|
|
1431
|
+
justifyContent: "center",
|
|
1432
|
+
color: "var(--brycks-foreground-muted)",
|
|
1433
|
+
flexShrink: 0
|
|
1434
|
+
};
|
|
1435
|
+
return /* @__PURE__ */ p(
|
|
1436
|
+
"div",
|
|
1437
|
+
{
|
|
1438
|
+
className: I(
|
|
1439
|
+
"brycks-input-wrapper",
|
|
1440
|
+
`brycks-input-wrapper--${r}`,
|
|
1441
|
+
`brycks-input-wrapper--${t}`,
|
|
1442
|
+
o && "brycks-input-wrapper--invalid",
|
|
1443
|
+
i && "brycks-input-wrapper--disabled",
|
|
1444
|
+
b
|
|
1445
|
+
),
|
|
1446
|
+
style: { ...k(), ...l },
|
|
1447
|
+
children: [
|
|
1448
|
+
s && /* @__PURE__ */ n(
|
|
1449
|
+
"span",
|
|
1450
|
+
{
|
|
1451
|
+
className: "brycks-input-left-element",
|
|
1452
|
+
style: { ...M, paddingLeft: d.paddingX },
|
|
1453
|
+
children: s
|
|
1454
|
+
}
|
|
1455
|
+
),
|
|
1456
|
+
/* @__PURE__ */ n(
|
|
1457
|
+
"input",
|
|
1458
|
+
{
|
|
1459
|
+
ref: u,
|
|
1460
|
+
className: "brycks-input",
|
|
1461
|
+
style: W,
|
|
1462
|
+
disabled: i,
|
|
1463
|
+
"aria-invalid": o,
|
|
1464
|
+
"data-testid": c,
|
|
1465
|
+
onFocus: T,
|
|
1466
|
+
onBlur: B,
|
|
1467
|
+
...g
|
|
1468
|
+
}
|
|
1469
|
+
),
|
|
1470
|
+
a && /* @__PURE__ */ n(
|
|
1471
|
+
"span",
|
|
1472
|
+
{
|
|
1473
|
+
className: "brycks-input-right-element",
|
|
1474
|
+
style: { ...M, paddingRight: d.paddingX },
|
|
1475
|
+
children: a
|
|
1476
|
+
}
|
|
1477
|
+
)
|
|
1478
|
+
]
|
|
1479
|
+
}
|
|
1480
|
+
);
|
|
1481
|
+
});
|
|
1482
|
+
Se.displayName = "Input";
|
|
1483
|
+
const wr = $(function({
|
|
1484
|
+
label: t,
|
|
1485
|
+
helperText: r,
|
|
1486
|
+
errorMessage: o,
|
|
1487
|
+
isRequired: s,
|
|
1488
|
+
hideLabel: a,
|
|
1489
|
+
isInvalid: b,
|
|
1490
|
+
id: l,
|
|
1491
|
+
className: c,
|
|
1492
|
+
testId: i,
|
|
1493
|
+
...f
|
|
1494
|
+
}, h) {
|
|
1495
|
+
const g = He(), u = l ?? g, y = `${u}-helper`, m = `${u}-error`, d = !!o || b, k = [d && m, r && y].filter(Boolean).join(" "), W = {
|
|
1496
|
+
display: "block",
|
|
1497
|
+
marginBottom: 6,
|
|
1498
|
+
fontSize: 13,
|
|
1499
|
+
fontWeight: 500,
|
|
1500
|
+
color: "var(--brycks-foreground-default)",
|
|
1501
|
+
...a && {
|
|
1502
|
+
position: "absolute",
|
|
1503
|
+
width: 1,
|
|
1504
|
+
height: 1,
|
|
1505
|
+
padding: 0,
|
|
1506
|
+
margin: -1,
|
|
1507
|
+
overflow: "hidden",
|
|
1508
|
+
clip: "rect(0, 0, 0, 0)",
|
|
1509
|
+
whiteSpace: "nowrap",
|
|
1510
|
+
border: 0
|
|
1511
|
+
}
|
|
1512
|
+
}, T = {
|
|
1513
|
+
display: "block",
|
|
1514
|
+
marginTop: 6,
|
|
1515
|
+
fontSize: 12,
|
|
1516
|
+
lineHeight: 1.5,
|
|
1517
|
+
color: "var(--brycks-foreground-muted)"
|
|
1518
|
+
}, B = {
|
|
1519
|
+
...T,
|
|
1520
|
+
color: "var(--brycks-error-default)"
|
|
1521
|
+
};
|
|
1522
|
+
return /* @__PURE__ */ p(
|
|
1523
|
+
"div",
|
|
1524
|
+
{
|
|
1525
|
+
className: I(
|
|
1526
|
+
"brycks-text-field",
|
|
1527
|
+
d && "brycks-text-field--error",
|
|
1528
|
+
c
|
|
1529
|
+
),
|
|
1530
|
+
"data-testid": i,
|
|
1531
|
+
children: [
|
|
1532
|
+
t && /* @__PURE__ */ p("label", { htmlFor: u, style: W, children: [
|
|
1533
|
+
t,
|
|
1534
|
+
s && /* @__PURE__ */ n(
|
|
1535
|
+
"span",
|
|
1536
|
+
{
|
|
1537
|
+
"aria-hidden": "true",
|
|
1538
|
+
style: {
|
|
1539
|
+
color: "var(--brycks-error-default)",
|
|
1540
|
+
marginLeft: 2
|
|
1541
|
+
},
|
|
1542
|
+
children: "*"
|
|
1543
|
+
}
|
|
1544
|
+
)
|
|
1545
|
+
] }),
|
|
1546
|
+
/* @__PURE__ */ n(
|
|
1547
|
+
Se,
|
|
1548
|
+
{
|
|
1549
|
+
ref: h,
|
|
1550
|
+
id: u,
|
|
1551
|
+
isInvalid: d,
|
|
1552
|
+
"aria-describedby": k || void 0,
|
|
1553
|
+
"aria-required": s,
|
|
1554
|
+
...f
|
|
1555
|
+
}
|
|
1556
|
+
),
|
|
1557
|
+
d && o && /* @__PURE__ */ n("span", { id: m, role: "alert", style: B, children: o }),
|
|
1558
|
+
!d && r && /* @__PURE__ */ n("span", { id: y, style: T, children: r })
|
|
1559
|
+
]
|
|
1560
|
+
}
|
|
1561
|
+
);
|
|
1562
|
+
});
|
|
1563
|
+
wr.displayName = "TextField";
|
|
1564
|
+
const Sr = {
|
|
1565
|
+
sm: { height: 32, fontSize: 13, padding: 10 },
|
|
1566
|
+
md: { height: 40, fontSize: 14, padding: 12 },
|
|
1567
|
+
lg: { height: 48, fontSize: 15, padding: 14 }
|
|
1568
|
+
};
|
|
1569
|
+
function Cr() {
|
|
1570
|
+
return /* @__PURE__ */ n("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ n(
|
|
1571
|
+
"path",
|
|
1572
|
+
{
|
|
1573
|
+
d: "M2.5 4.5L6 8L9.5 4.5",
|
|
1574
|
+
stroke: "currentColor",
|
|
1575
|
+
strokeWidth: "1.5",
|
|
1576
|
+
strokeLinecap: "round",
|
|
1577
|
+
strokeLinejoin: "round"
|
|
1578
|
+
}
|
|
1579
|
+
) });
|
|
1580
|
+
}
|
|
1581
|
+
const zr = $(function({
|
|
1582
|
+
size: t = "md",
|
|
1583
|
+
variant: r = "outline",
|
|
1584
|
+
isInvalid: o,
|
|
1585
|
+
placeholder: s,
|
|
1586
|
+
className: a,
|
|
1587
|
+
style: b,
|
|
1588
|
+
testId: l,
|
|
1589
|
+
disabled: c,
|
|
1590
|
+
children: i,
|
|
1591
|
+
onFocus: f,
|
|
1592
|
+
onBlur: h,
|
|
1593
|
+
value: g,
|
|
1594
|
+
...u
|
|
1595
|
+
}, y) {
|
|
1596
|
+
const [m, d] = V(!1), k = Sr[t], W = g !== void 0 && g !== "", T = {
|
|
1597
|
+
position: "relative",
|
|
1598
|
+
display: "inline-flex",
|
|
1599
|
+
width: "100%"
|
|
1600
|
+
}, B = () => {
|
|
1601
|
+
const S = {
|
|
1602
|
+
width: "100%",
|
|
1603
|
+
height: k.height,
|
|
1604
|
+
paddingLeft: k.padding,
|
|
1605
|
+
paddingRight: k.padding + 24,
|
|
1606
|
+
fontSize: k.fontSize,
|
|
1607
|
+
fontFamily: "var(--brycks-font-sans)",
|
|
1608
|
+
color: W || !s ? "var(--brycks-foreground-default)" : "var(--brycks-foreground-muted)",
|
|
1609
|
+
backgroundColor: r === "filled" ? "var(--brycks-background-muted)" : "var(--brycks-background-app)",
|
|
1610
|
+
border: `1px solid ${o ? "var(--brycks-error-default)" : m ? "var(--brycks-border-focus)" : r === "filled" ? "transparent" : "var(--brycks-border-default)"}`,
|
|
1611
|
+
borderRadius: "var(--brycks-radius-default)",
|
|
1612
|
+
outline: "none",
|
|
1613
|
+
cursor: c ? "not-allowed" : "pointer",
|
|
1614
|
+
appearance: "none",
|
|
1615
|
+
WebkitAppearance: "none",
|
|
1616
|
+
transition: "all 200ms ease-out",
|
|
1617
|
+
boxShadow: m ? o ? "0 0 0 3px rgba(239, 68, 68, 0.15)" : "0 0 0 3px rgba(85, 120, 244, 0.15)" : "none"
|
|
1618
|
+
};
|
|
1619
|
+
return c && (S.opacity = 0.5), S;
|
|
1620
|
+
}, M = {
|
|
1621
|
+
position: "absolute",
|
|
1622
|
+
right: k.padding,
|
|
1623
|
+
top: "50%",
|
|
1624
|
+
transform: "translateY(-50%)",
|
|
1625
|
+
pointerEvents: "none",
|
|
1626
|
+
color: "var(--brycks-foreground-muted)",
|
|
1627
|
+
transition: "transform 200ms ease-out"
|
|
1628
|
+
}, x = (S) => {
|
|
1629
|
+
d(!0), f == null || f(S);
|
|
1630
|
+
}, w = (S) => {
|
|
1631
|
+
d(!1), h == null || h(S);
|
|
1632
|
+
};
|
|
1633
|
+
return /* @__PURE__ */ p(
|
|
1634
|
+
"div",
|
|
1635
|
+
{
|
|
1636
|
+
className: I(
|
|
1637
|
+
"brycks-select-wrapper",
|
|
1638
|
+
`brycks-select-wrapper--${r}`,
|
|
1639
|
+
`brycks-select-wrapper--${t}`,
|
|
1640
|
+
o && "brycks-select-wrapper--invalid",
|
|
1641
|
+
c && "brycks-select-wrapper--disabled",
|
|
1642
|
+
a
|
|
1643
|
+
),
|
|
1644
|
+
style: { ...T, ...b },
|
|
1645
|
+
children: [
|
|
1646
|
+
/* @__PURE__ */ p(
|
|
1647
|
+
"select",
|
|
1648
|
+
{
|
|
1649
|
+
ref: y,
|
|
1650
|
+
className: "brycks-select",
|
|
1651
|
+
style: B(),
|
|
1652
|
+
disabled: c,
|
|
1653
|
+
"aria-invalid": o,
|
|
1654
|
+
"data-testid": l,
|
|
1655
|
+
value: g,
|
|
1656
|
+
onFocus: x,
|
|
1657
|
+
onBlur: w,
|
|
1658
|
+
...u,
|
|
1659
|
+
children: [
|
|
1660
|
+
s && /* @__PURE__ */ n("option", { value: "", disabled: !0, children: s }),
|
|
1661
|
+
i
|
|
1662
|
+
]
|
|
1663
|
+
}
|
|
1664
|
+
),
|
|
1665
|
+
/* @__PURE__ */ n("span", { style: M, children: /* @__PURE__ */ n(Cr, {}) })
|
|
1666
|
+
]
|
|
1667
|
+
}
|
|
1668
|
+
);
|
|
1669
|
+
});
|
|
1670
|
+
zr.displayName = "Select";
|
|
1671
|
+
function $r({ size: e }) {
|
|
1672
|
+
return /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ n(
|
|
1673
|
+
"path",
|
|
1674
|
+
{
|
|
1675
|
+
d: "M2.5 6L5 8.5L9.5 4",
|
|
1676
|
+
stroke: "currentColor",
|
|
1677
|
+
strokeWidth: "2",
|
|
1678
|
+
strokeLinecap: "round",
|
|
1679
|
+
strokeLinejoin: "round"
|
|
1680
|
+
}
|
|
1681
|
+
) });
|
|
1682
|
+
}
|
|
1683
|
+
function Br({ size: e }) {
|
|
1684
|
+
return /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ n(
|
|
1685
|
+
"path",
|
|
1686
|
+
{
|
|
1687
|
+
d: "M2.5 6H9.5",
|
|
1688
|
+
stroke: "currentColor",
|
|
1689
|
+
strokeWidth: "2",
|
|
1690
|
+
strokeLinecap: "round"
|
|
1691
|
+
}
|
|
1692
|
+
) });
|
|
1693
|
+
}
|
|
1694
|
+
const Wr = $(function({
|
|
1695
|
+
size: t = "md",
|
|
1696
|
+
label: r,
|
|
1697
|
+
description: o,
|
|
1698
|
+
isInvalid: s,
|
|
1699
|
+
isIndeterminate: a,
|
|
1700
|
+
className: b,
|
|
1701
|
+
style: l,
|
|
1702
|
+
testId: c,
|
|
1703
|
+
disabled: i,
|
|
1704
|
+
checked: f,
|
|
1705
|
+
onChange: h,
|
|
1706
|
+
...g
|
|
1707
|
+
}, u) {
|
|
1708
|
+
const [y, m] = V(!1), [d, k] = V(!1), [W, T] = V(!1), B = Ie[t], M = N[t], x = f || a, w = {
|
|
1709
|
+
display: "inline-flex",
|
|
1710
|
+
alignItems: "flex-start",
|
|
1711
|
+
gap: G.lg,
|
|
1712
|
+
cursor: i ? "not-allowed" : "pointer",
|
|
1713
|
+
opacity: i ? ue.disabled : 1
|
|
1714
|
+
}, S = {
|
|
1715
|
+
position: "relative",
|
|
1716
|
+
width: B.box,
|
|
1717
|
+
height: B.box,
|
|
1718
|
+
borderRadius: "var(--brycks-radius-sm)",
|
|
1719
|
+
border: `1.5px solid ${s ? "var(--brycks-error-default)" : x ? "var(--brycks-primary-default)" : y ? "var(--brycks-border-focus)" : "var(--brycks-border-default)"}`,
|
|
1720
|
+
backgroundColor: x ? "var(--brycks-primary-default)" : d ? "var(--brycks-background-subtle)" : "var(--brycks-background-app)",
|
|
1721
|
+
transition: te.quick,
|
|
1722
|
+
transform: W ? `scale(${re.controlPressed})` : `scale(${re.normal})`,
|
|
1723
|
+
boxShadow: y ? J.default : J.none,
|
|
1724
|
+
display: "flex",
|
|
1725
|
+
alignItems: "center",
|
|
1726
|
+
justifyContent: "center",
|
|
1727
|
+
flexShrink: 0
|
|
1728
|
+
}, L = {
|
|
1729
|
+
color: "var(--brycks-primary-foreground)",
|
|
1730
|
+
opacity: x ? 1 : 0,
|
|
1731
|
+
transform: x ? `scale(${re.normal})` : `scale(${re.hidden})`,
|
|
1732
|
+
transition: te.quick
|
|
1733
|
+
}, z = {
|
|
1734
|
+
position: "absolute",
|
|
1735
|
+
width: "100%",
|
|
1736
|
+
height: "100%",
|
|
1737
|
+
opacity: 0,
|
|
1738
|
+
cursor: i ? "not-allowed" : "pointer",
|
|
1739
|
+
margin: 0
|
|
1740
|
+
}, v = {
|
|
1741
|
+
display: "flex",
|
|
1742
|
+
flexDirection: "column",
|
|
1743
|
+
gap: G.xs,
|
|
1744
|
+
paddingTop: (B.box - M) / 2
|
|
1745
|
+
}, O = {
|
|
1746
|
+
fontSize: M,
|
|
1747
|
+
lineHeight: F.snug,
|
|
1748
|
+
color: "var(--brycks-foreground-default)",
|
|
1749
|
+
userSelect: "none"
|
|
1750
|
+
}, X = {
|
|
1751
|
+
fontSize: M - 1,
|
|
1752
|
+
lineHeight: F.snug,
|
|
1753
|
+
color: "var(--brycks-foreground-muted)",
|
|
1754
|
+
userSelect: "none"
|
|
1755
|
+
};
|
|
1756
|
+
return /* @__PURE__ */ p(
|
|
1757
|
+
"label",
|
|
1758
|
+
{
|
|
1759
|
+
className: I(
|
|
1760
|
+
"brycks-checkbox",
|
|
1761
|
+
`brycks-checkbox--${t}`,
|
|
1762
|
+
x && "brycks-checkbox--checked",
|
|
1763
|
+
s && "brycks-checkbox--invalid",
|
|
1764
|
+
i && "brycks-checkbox--disabled",
|
|
1765
|
+
b
|
|
1766
|
+
),
|
|
1767
|
+
style: { ...w, ...l },
|
|
1768
|
+
"data-testid": c,
|
|
1769
|
+
onMouseEnter: () => k(!0),
|
|
1770
|
+
onMouseLeave: () => {
|
|
1771
|
+
k(!1), T(!1);
|
|
1772
|
+
},
|
|
1773
|
+
onMouseDown: () => T(!0),
|
|
1774
|
+
onMouseUp: () => T(!1),
|
|
1775
|
+
children: [
|
|
1776
|
+
/* @__PURE__ */ p("span", { style: S, children: [
|
|
1777
|
+
/* @__PURE__ */ n(
|
|
1778
|
+
"input",
|
|
1779
|
+
{
|
|
1780
|
+
ref: u,
|
|
1781
|
+
type: "checkbox",
|
|
1782
|
+
style: z,
|
|
1783
|
+
checked: f,
|
|
1784
|
+
disabled: i,
|
|
1785
|
+
"aria-invalid": s,
|
|
1786
|
+
onChange: h,
|
|
1787
|
+
onFocus: () => m(!0),
|
|
1788
|
+
onBlur: () => m(!1),
|
|
1789
|
+
...g
|
|
1790
|
+
}
|
|
1791
|
+
),
|
|
1792
|
+
/* @__PURE__ */ n("span", { style: L, children: a ? /* @__PURE__ */ n(Br, { size: B.icon }) : /* @__PURE__ */ n($r, { size: B.icon }) })
|
|
1793
|
+
] }),
|
|
1794
|
+
(r || o) && /* @__PURE__ */ p("span", { style: v, children: [
|
|
1795
|
+
r && /* @__PURE__ */ n("span", { style: O, children: r }),
|
|
1796
|
+
o && /* @__PURE__ */ n("span", { style: X, children: o })
|
|
1797
|
+
] })
|
|
1798
|
+
]
|
|
1799
|
+
}
|
|
1800
|
+
);
|
|
1801
|
+
});
|
|
1802
|
+
Wr.displayName = "Checkbox";
|
|
1803
|
+
const Hr = $(function({
|
|
1804
|
+
size: t = "md",
|
|
1805
|
+
label: r,
|
|
1806
|
+
description: o,
|
|
1807
|
+
className: s,
|
|
1808
|
+
style: a,
|
|
1809
|
+
testId: b,
|
|
1810
|
+
disabled: l,
|
|
1811
|
+
checked: c,
|
|
1812
|
+
onChange: i,
|
|
1813
|
+
...f
|
|
1814
|
+
}, h) {
|
|
1815
|
+
const [g, u] = V(!1), [y, m] = V(!1), d = Te[t], k = N[t], W = (d.height - d.thumb) / 2, T = d.width - d.thumb - W * 2, B = {
|
|
1816
|
+
display: "inline-flex",
|
|
1817
|
+
alignItems: "flex-start",
|
|
1818
|
+
gap: G.xl,
|
|
1819
|
+
cursor: l ? "not-allowed" : "pointer",
|
|
1820
|
+
opacity: l ? ue.disabled : 1
|
|
1821
|
+
}, M = {
|
|
1822
|
+
position: "relative",
|
|
1823
|
+
width: d.width,
|
|
1824
|
+
height: d.height,
|
|
1825
|
+
borderRadius: d.height / 2,
|
|
1826
|
+
backgroundColor: c ? "var(--brycks-primary-default)" : "var(--brycks-background-muted)",
|
|
1827
|
+
border: `1px solid ${c ? "var(--brycks-primary-default)" : "var(--brycks-border-default)"}`,
|
|
1828
|
+
transition: te.spring,
|
|
1829
|
+
boxShadow: g ? J.default : "inset 0 1px 2px rgba(0,0,0,0.05)",
|
|
1830
|
+
flexShrink: 0
|
|
1831
|
+
}, x = {
|
|
1832
|
+
position: "absolute",
|
|
1833
|
+
top: W,
|
|
1834
|
+
left: c ? W + T : W,
|
|
1835
|
+
width: y ? d.thumb + 4 : d.thumb,
|
|
1836
|
+
height: d.thumb,
|
|
1837
|
+
borderRadius: d.thumb / 2,
|
|
1838
|
+
backgroundColor: "var(--brycks-background-elevated)",
|
|
1839
|
+
boxShadow: "var(--brycks-shadow-sm)",
|
|
1840
|
+
transition: te.spring,
|
|
1841
|
+
transform: y ? `scale(${re.pressedStrong})` : `scale(${re.normal})`
|
|
1842
|
+
}, w = {
|
|
1843
|
+
position: "absolute",
|
|
1844
|
+
width: "100%",
|
|
1845
|
+
height: "100%",
|
|
1846
|
+
opacity: 0,
|
|
1847
|
+
cursor: l ? "not-allowed" : "pointer",
|
|
1848
|
+
margin: 0
|
|
1849
|
+
}, S = {
|
|
1850
|
+
display: "flex",
|
|
1851
|
+
flexDirection: "column",
|
|
1852
|
+
gap: G.xs,
|
|
1853
|
+
paddingTop: (d.height - k * F.snug) / 2
|
|
1854
|
+
}, L = {
|
|
1855
|
+
fontSize: k,
|
|
1856
|
+
lineHeight: F.snug,
|
|
1857
|
+
color: "var(--brycks-foreground-default)",
|
|
1858
|
+
userSelect: "none"
|
|
1859
|
+
}, z = {
|
|
1860
|
+
fontSize: k - 1,
|
|
1861
|
+
lineHeight: F.snug,
|
|
1862
|
+
color: "var(--brycks-foreground-muted)",
|
|
1863
|
+
userSelect: "none"
|
|
1864
|
+
};
|
|
1865
|
+
return /* @__PURE__ */ p(
|
|
1866
|
+
"label",
|
|
1867
|
+
{
|
|
1868
|
+
className: I(
|
|
1869
|
+
"brycks-switch",
|
|
1870
|
+
`brycks-switch--${t}`,
|
|
1871
|
+
c && "brycks-switch--checked",
|
|
1872
|
+
l && "brycks-switch--disabled",
|
|
1873
|
+
s
|
|
1874
|
+
),
|
|
1875
|
+
style: { ...B, ...a },
|
|
1876
|
+
"data-testid": b,
|
|
1877
|
+
onMouseDown: () => m(!0),
|
|
1878
|
+
onMouseUp: () => m(!1),
|
|
1879
|
+
onMouseLeave: () => m(!1),
|
|
1880
|
+
children: [
|
|
1881
|
+
/* @__PURE__ */ p("span", { style: M, children: [
|
|
1882
|
+
/* @__PURE__ */ n(
|
|
1883
|
+
"input",
|
|
1884
|
+
{
|
|
1885
|
+
ref: h,
|
|
1886
|
+
type: "checkbox",
|
|
1887
|
+
role: "switch",
|
|
1888
|
+
style: w,
|
|
1889
|
+
checked: c,
|
|
1890
|
+
disabled: l,
|
|
1891
|
+
"aria-checked": c,
|
|
1892
|
+
onChange: i,
|
|
1893
|
+
onFocus: () => u(!0),
|
|
1894
|
+
onBlur: () => u(!1),
|
|
1895
|
+
...f
|
|
1896
|
+
}
|
|
1897
|
+
),
|
|
1898
|
+
/* @__PURE__ */ n("span", { style: x })
|
|
1899
|
+
] }),
|
|
1900
|
+
(r || o) && /* @__PURE__ */ p("span", { style: S, children: [
|
|
1901
|
+
r && /* @__PURE__ */ n("span", { style: L, children: r }),
|
|
1902
|
+
o && /* @__PURE__ */ n("span", { style: z, children: o })
|
|
1903
|
+
] })
|
|
1904
|
+
]
|
|
1905
|
+
}
|
|
1906
|
+
);
|
|
1907
|
+
});
|
|
1908
|
+
Hr.displayName = "Switch";
|
|
1909
|
+
const Ir = {
|
|
1910
|
+
sm: { fontSize: 13, padding: 10, lineHeight: 1.5 },
|
|
1911
|
+
md: { fontSize: 14, padding: 12, lineHeight: 1.5 },
|
|
1912
|
+
lg: { fontSize: 15, padding: 14, lineHeight: 1.5 }
|
|
1913
|
+
}, Tr = $(function({
|
|
1914
|
+
size: t = "md",
|
|
1915
|
+
variant: r = "outline",
|
|
1916
|
+
isInvalid: o,
|
|
1917
|
+
autoResize: s,
|
|
1918
|
+
minRows: a = 3,
|
|
1919
|
+
maxRows: b = 10,
|
|
1920
|
+
showCount: l,
|
|
1921
|
+
maxLength: c,
|
|
1922
|
+
className: i,
|
|
1923
|
+
style: f,
|
|
1924
|
+
testId: h,
|
|
1925
|
+
disabled: g,
|
|
1926
|
+
value: u,
|
|
1927
|
+
defaultValue: y,
|
|
1928
|
+
onChange: m,
|
|
1929
|
+
onFocus: d,
|
|
1930
|
+
onBlur: k,
|
|
1931
|
+
...W
|
|
1932
|
+
}, T) {
|
|
1933
|
+
const [B, M] = V(!1), [x, w] = V(0), S = ne(null), L = T || S, z = Ir[t], v = z.fontSize * z.lineHeight, O = v * a + z.padding * 2, X = v * b + z.padding * 2, Y = se(() => {
|
|
1934
|
+
const D = L.current;
|
|
1935
|
+
if (!D || !s) return;
|
|
1936
|
+
D.style.height = "auto";
|
|
1937
|
+
const $e = D.scrollHeight, Be = Math.min(Math.max($e, O), X);
|
|
1938
|
+
D.style.height = `${Be}px`;
|
|
1939
|
+
}, [s, O, X, L]);
|
|
1940
|
+
ae(() => {
|
|
1941
|
+
Y();
|
|
1942
|
+
}, [u, Y]), ae(() => {
|
|
1943
|
+
const D = String(u ?? y ?? "");
|
|
1944
|
+
w(D.length);
|
|
1945
|
+
}, [u, y]);
|
|
1946
|
+
const A = () => {
|
|
1947
|
+
const D = {
|
|
1948
|
+
width: "100%",
|
|
1949
|
+
minHeight: O,
|
|
1950
|
+
maxHeight: s ? X : void 0,
|
|
1951
|
+
padding: z.padding,
|
|
1952
|
+
fontSize: z.fontSize,
|
|
1953
|
+
lineHeight: z.lineHeight,
|
|
1954
|
+
fontFamily: "var(--brycks-font-sans)",
|
|
1955
|
+
color: "var(--brycks-foreground-default)",
|
|
1956
|
+
backgroundColor: r === "filled" ? "var(--brycks-background-muted)" : "var(--brycks-background-app)",
|
|
1957
|
+
border: `1px solid ${o ? "var(--brycks-error-default)" : B ? "var(--brycks-border-focus)" : r === "filled" ? "transparent" : "var(--brycks-border-default)"}`,
|
|
1958
|
+
borderRadius: "var(--brycks-radius-default)",
|
|
1959
|
+
outline: "none",
|
|
1960
|
+
resize: s ? "none" : "vertical",
|
|
1961
|
+
transition: "all 200ms ease-out",
|
|
1962
|
+
boxShadow: B ? o ? "0 0 0 3px rgba(239, 68, 68, 0.15)" : "0 0 0 3px rgba(85, 120, 244, 0.15)" : "none"
|
|
1963
|
+
};
|
|
1964
|
+
return g && (D.opacity = 0.5, D.cursor = "not-allowed", D.resize = "none"), D;
|
|
1965
|
+
}, K = {
|
|
1966
|
+
position: "relative",
|
|
1967
|
+
width: "100%"
|
|
1968
|
+
}, be = {
|
|
1969
|
+
position: "absolute",
|
|
1970
|
+
bottom: 8,
|
|
1971
|
+
right: 12,
|
|
1972
|
+
fontSize: 11,
|
|
1973
|
+
color: x >= (c ?? 1 / 0) ? "var(--brycks-error-default)" : "var(--brycks-foreground-muted)",
|
|
1974
|
+
pointerEvents: "none",
|
|
1975
|
+
transition: "color 150ms ease-out"
|
|
1976
|
+
}, me = (D) => {
|
|
1977
|
+
w(D.target.value.length), m == null || m(D);
|
|
1978
|
+
}, fe = (D) => {
|
|
1979
|
+
M(!0), d == null || d(D);
|
|
1980
|
+
}, _ = (D) => {
|
|
1981
|
+
M(!1), k == null || k(D);
|
|
1982
|
+
};
|
|
1983
|
+
return /* @__PURE__ */ p(
|
|
1984
|
+
"div",
|
|
1985
|
+
{
|
|
1986
|
+
className: I(
|
|
1987
|
+
"brycks-textarea-wrapper",
|
|
1988
|
+
`brycks-textarea-wrapper--${r}`,
|
|
1989
|
+
`brycks-textarea-wrapper--${t}`,
|
|
1990
|
+
o && "brycks-textarea-wrapper--invalid",
|
|
1991
|
+
g && "brycks-textarea-wrapper--disabled",
|
|
1992
|
+
i
|
|
1993
|
+
),
|
|
1994
|
+
style: { ...K, ...f },
|
|
1995
|
+
children: [
|
|
1996
|
+
/* @__PURE__ */ n(
|
|
1997
|
+
"textarea",
|
|
1998
|
+
{
|
|
1999
|
+
ref: L,
|
|
2000
|
+
className: "brycks-textarea",
|
|
2001
|
+
style: A(),
|
|
2002
|
+
disabled: g,
|
|
2003
|
+
"aria-invalid": o,
|
|
2004
|
+
"data-testid": h,
|
|
2005
|
+
value: u,
|
|
2006
|
+
defaultValue: y,
|
|
2007
|
+
maxLength: c,
|
|
2008
|
+
onChange: me,
|
|
2009
|
+
onFocus: fe,
|
|
2010
|
+
onBlur: _,
|
|
2011
|
+
...W
|
|
2012
|
+
}
|
|
2013
|
+
),
|
|
2014
|
+
l && /* @__PURE__ */ p("span", { style: be, children: [
|
|
2015
|
+
x,
|
|
2016
|
+
c ? `/${c}` : ""
|
|
2017
|
+
] })
|
|
2018
|
+
]
|
|
2019
|
+
}
|
|
2020
|
+
);
|
|
2021
|
+
});
|
|
2022
|
+
Tr.displayName = "Textarea";
|
|
2023
|
+
const Nr = {
|
|
2024
|
+
sm: "400px",
|
|
2025
|
+
md: "500px",
|
|
2026
|
+
lg: "640px",
|
|
2027
|
+
xl: "800px",
|
|
2028
|
+
full: "calc(100vw - 48px)"
|
|
2029
|
+
};
|
|
2030
|
+
function Lr() {
|
|
2031
|
+
return /* @__PURE__ */ n("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ n(
|
|
2032
|
+
"path",
|
|
2033
|
+
{
|
|
2034
|
+
d: "M4 4L12 12M12 4L4 12",
|
|
2035
|
+
stroke: "currentColor",
|
|
2036
|
+
strokeWidth: "1.5",
|
|
2037
|
+
strokeLinecap: "round"
|
|
2038
|
+
}
|
|
2039
|
+
) });
|
|
2040
|
+
}
|
|
2041
|
+
const Rr = $(function({
|
|
2042
|
+
isOpen: t,
|
|
2043
|
+
onClose: r,
|
|
2044
|
+
size: o = "md",
|
|
2045
|
+
title: s,
|
|
2046
|
+
description: a,
|
|
2047
|
+
closeOnOverlayClick: b = !0,
|
|
2048
|
+
closeOnEscape: l = !0,
|
|
2049
|
+
showCloseButton: c = !0,
|
|
2050
|
+
className: i,
|
|
2051
|
+
style: f,
|
|
2052
|
+
testId: h,
|
|
2053
|
+
children: g,
|
|
2054
|
+
...u
|
|
2055
|
+
}, y) {
|
|
2056
|
+
const m = ne(null), d = ne(null);
|
|
2057
|
+
ae(() => {
|
|
2058
|
+
if (!t) return;
|
|
2059
|
+
d.current = document.activeElement;
|
|
2060
|
+
const v = m.current;
|
|
2061
|
+
v && v.focus();
|
|
2062
|
+
const O = (X) => {
|
|
2063
|
+
if (X.key === "Escape" && l) {
|
|
2064
|
+
r();
|
|
2065
|
+
return;
|
|
2066
|
+
}
|
|
2067
|
+
if (X.key === "Tab" && v) {
|
|
2068
|
+
const Y = v.querySelectorAll(
|
|
2069
|
+
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
2070
|
+
), A = Y[0], K = Y[Y.length - 1];
|
|
2071
|
+
X.shiftKey && document.activeElement === A ? (X.preventDefault(), K == null || K.focus()) : !X.shiftKey && document.activeElement === K && (X.preventDefault(), A == null || A.focus());
|
|
2072
|
+
}
|
|
2073
|
+
};
|
|
2074
|
+
return document.addEventListener("keydown", O), document.body.style.overflow = "hidden", () => {
|
|
2075
|
+
var X;
|
|
2076
|
+
document.removeEventListener("keydown", O), document.body.style.overflow = "", (X = d.current) == null || X.focus();
|
|
2077
|
+
};
|
|
2078
|
+
}, [t, l, r]);
|
|
2079
|
+
const k = se(
|
|
2080
|
+
(v) => {
|
|
2081
|
+
v.target === v.currentTarget && b && r();
|
|
2082
|
+
},
|
|
2083
|
+
[b, r]
|
|
2084
|
+
);
|
|
2085
|
+
if (!t) return null;
|
|
2086
|
+
const W = {
|
|
2087
|
+
position: "fixed",
|
|
2088
|
+
inset: 0,
|
|
2089
|
+
zIndex: "var(--brycks-z-modal)",
|
|
2090
|
+
display: "flex",
|
|
2091
|
+
alignItems: "center",
|
|
2092
|
+
justifyContent: "center",
|
|
2093
|
+
padding: 24,
|
|
2094
|
+
backgroundColor: "var(--brycks-background-overlay)",
|
|
2095
|
+
backdropFilter: "blur(4px)",
|
|
2096
|
+
animation: "brycks-fade-in 200ms ease-out"
|
|
2097
|
+
}, T = {
|
|
2098
|
+
position: "relative",
|
|
2099
|
+
width: "100%",
|
|
2100
|
+
maxWidth: Nr[o],
|
|
2101
|
+
maxHeight: o === "full" ? "calc(100vh - 48px)" : "85vh",
|
|
2102
|
+
backgroundColor: "var(--brycks-background-elevated)",
|
|
2103
|
+
borderRadius: "var(--brycks-radius-xl)",
|
|
2104
|
+
boxShadow: "var(--brycks-shadow-2xl)",
|
|
2105
|
+
display: "flex",
|
|
2106
|
+
flexDirection: "column",
|
|
2107
|
+
overflow: "hidden",
|
|
2108
|
+
animation: "brycks-scale-in 200ms cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
2109
|
+
outline: "none",
|
|
2110
|
+
...f
|
|
2111
|
+
}, B = {
|
|
2112
|
+
display: "flex",
|
|
2113
|
+
alignItems: "flex-start",
|
|
2114
|
+
justifyContent: "space-between",
|
|
2115
|
+
padding: "20px 24px",
|
|
2116
|
+
borderBottom: "1px solid var(--brycks-border-muted)"
|
|
2117
|
+
}, M = {
|
|
2118
|
+
display: "flex",
|
|
2119
|
+
flexDirection: "column",
|
|
2120
|
+
gap: 4
|
|
2121
|
+
}, x = {
|
|
2122
|
+
fontSize: 18,
|
|
2123
|
+
fontWeight: 600,
|
|
2124
|
+
color: "var(--brycks-foreground-default)",
|
|
2125
|
+
margin: 0,
|
|
2126
|
+
lineHeight: 1.3
|
|
2127
|
+
}, w = {
|
|
2128
|
+
fontSize: 14,
|
|
2129
|
+
color: "var(--brycks-foreground-muted)",
|
|
2130
|
+
margin: 0
|
|
2131
|
+
}, S = {
|
|
2132
|
+
display: "flex",
|
|
2133
|
+
alignItems: "center",
|
|
2134
|
+
justifyContent: "center",
|
|
2135
|
+
width: 32,
|
|
2136
|
+
height: 32,
|
|
2137
|
+
borderRadius: "var(--brycks-radius-md)",
|
|
2138
|
+
color: "var(--brycks-foreground-muted)",
|
|
2139
|
+
transition: "all 150ms ease-out",
|
|
2140
|
+
marginLeft: 12,
|
|
2141
|
+
flexShrink: 0
|
|
2142
|
+
}, L = {
|
|
2143
|
+
flex: 1,
|
|
2144
|
+
overflow: "auto",
|
|
2145
|
+
padding: 24
|
|
2146
|
+
}, z = /* @__PURE__ */ p(ce, { children: [
|
|
2147
|
+
/* @__PURE__ */ n("style", { children: `
|
|
2148
|
+
@keyframes brycks-fade-in {
|
|
2149
|
+
from { opacity: 0; }
|
|
2150
|
+
to { opacity: 1; }
|
|
2151
|
+
}
|
|
2152
|
+
@keyframes brycks-scale-in {
|
|
2153
|
+
from { opacity: 0; transform: scale(0.95); }
|
|
2154
|
+
to { opacity: 1; transform: scale(1); }
|
|
2155
|
+
}
|
|
2156
|
+
` }),
|
|
2157
|
+
/* @__PURE__ */ n(
|
|
2158
|
+
"div",
|
|
2159
|
+
{
|
|
2160
|
+
className: "brycks-modal-overlay",
|
|
2161
|
+
style: W,
|
|
2162
|
+
onClick: k,
|
|
2163
|
+
"aria-hidden": "true",
|
|
2164
|
+
children: /* @__PURE__ */ p(
|
|
2165
|
+
"div",
|
|
2166
|
+
{
|
|
2167
|
+
ref: (v) => {
|
|
2168
|
+
m.current = v, typeof y == "function" ? y(v) : y && (y.current = v);
|
|
2169
|
+
},
|
|
2170
|
+
role: "dialog",
|
|
2171
|
+
"aria-modal": "true",
|
|
2172
|
+
"aria-labelledby": s ? "brycks-modal-title" : void 0,
|
|
2173
|
+
"aria-describedby": a ? "brycks-modal-description" : void 0,
|
|
2174
|
+
className: I("brycks-modal", `brycks-modal--${o}`, i),
|
|
2175
|
+
style: T,
|
|
2176
|
+
tabIndex: -1,
|
|
2177
|
+
"data-testid": h,
|
|
2178
|
+
...u,
|
|
2179
|
+
children: [
|
|
2180
|
+
(s || c) && /* @__PURE__ */ p("div", { className: "brycks-modal-header", style: B, children: [
|
|
2181
|
+
/* @__PURE__ */ p("div", { style: M, children: [
|
|
2182
|
+
s && /* @__PURE__ */ n("h2", { id: "brycks-modal-title", style: x, children: s }),
|
|
2183
|
+
a && /* @__PURE__ */ n("p", { id: "brycks-modal-description", style: w, children: a })
|
|
2184
|
+
] }),
|
|
2185
|
+
c && /* @__PURE__ */ n(
|
|
2186
|
+
"button",
|
|
2187
|
+
{
|
|
2188
|
+
type: "button",
|
|
2189
|
+
className: "brycks-modal-close",
|
|
2190
|
+
style: S,
|
|
2191
|
+
onClick: r,
|
|
2192
|
+
"aria-label": "Close modal",
|
|
2193
|
+
onMouseEnter: (v) => {
|
|
2194
|
+
v.currentTarget.style.backgroundColor = "var(--brycks-background-muted)", v.currentTarget.style.color = "var(--brycks-foreground-default)";
|
|
2195
|
+
},
|
|
2196
|
+
onMouseLeave: (v) => {
|
|
2197
|
+
v.currentTarget.style.backgroundColor = "transparent", v.currentTarget.style.color = "var(--brycks-foreground-muted)";
|
|
2198
|
+
},
|
|
2199
|
+
children: /* @__PURE__ */ n(Lr, {})
|
|
2200
|
+
}
|
|
2201
|
+
)
|
|
2202
|
+
] }),
|
|
2203
|
+
/* @__PURE__ */ n("div", { className: "brycks-modal-content", style: L, children: g })
|
|
2204
|
+
]
|
|
2205
|
+
}
|
|
2206
|
+
)
|
|
2207
|
+
}
|
|
2208
|
+
)
|
|
2209
|
+
] });
|
|
2210
|
+
return he(z, document.body);
|
|
2211
|
+
});
|
|
2212
|
+
Rr.displayName = "Modal";
|
|
2213
|
+
const Mr = {
|
|
2214
|
+
info: {
|
|
2215
|
+
icon: /* @__PURE__ */ p("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", children: [
|
|
2216
|
+
/* @__PURE__ */ n("circle", { cx: "9", cy: "9", r: "7.5", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
2217
|
+
/* @__PURE__ */ n("path", { d: "M9 8V12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
|
|
2218
|
+
/* @__PURE__ */ n("circle", { cx: "9", cy: "5.5", r: "0.75", fill: "currentColor" })
|
|
2219
|
+
] }),
|
|
2220
|
+
colors: {
|
|
2221
|
+
subtle: {
|
|
2222
|
+
backgroundColor: "var(--brycks-info-muted)",
|
|
2223
|
+
color: "var(--brycks-info-default)",
|
|
2224
|
+
borderColor: "transparent"
|
|
2225
|
+
},
|
|
2226
|
+
solid: {
|
|
2227
|
+
backgroundColor: "var(--brycks-info-default)",
|
|
2228
|
+
color: "var(--brycks-info-foreground)",
|
|
2229
|
+
borderColor: "transparent"
|
|
2230
|
+
},
|
|
2231
|
+
outline: {
|
|
2232
|
+
backgroundColor: "transparent",
|
|
2233
|
+
color: "var(--brycks-info-default)",
|
|
2234
|
+
borderColor: "var(--brycks-info-default)"
|
|
2235
|
+
}
|
|
2236
|
+
}
|
|
2237
|
+
},
|
|
2238
|
+
success: {
|
|
2239
|
+
icon: /* @__PURE__ */ p("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", children: [
|
|
2240
|
+
/* @__PURE__ */ n("circle", { cx: "9", cy: "9", r: "7.5", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
2241
|
+
/* @__PURE__ */ n("path", { d: "M6 9L8 11L12 7", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
2242
|
+
] }),
|
|
2243
|
+
colors: {
|
|
2244
|
+
subtle: {
|
|
2245
|
+
backgroundColor: "var(--brycks-success-muted)",
|
|
2246
|
+
color: "var(--brycks-success-default)",
|
|
2247
|
+
borderColor: "transparent"
|
|
2248
|
+
},
|
|
2249
|
+
solid: {
|
|
2250
|
+
backgroundColor: "var(--brycks-success-default)",
|
|
2251
|
+
color: "var(--brycks-success-foreground)",
|
|
2252
|
+
borderColor: "transparent"
|
|
2253
|
+
},
|
|
2254
|
+
outline: {
|
|
2255
|
+
backgroundColor: "transparent",
|
|
2256
|
+
color: "var(--brycks-success-default)",
|
|
2257
|
+
borderColor: "var(--brycks-success-default)"
|
|
2258
|
+
}
|
|
2259
|
+
}
|
|
2260
|
+
},
|
|
2261
|
+
warning: {
|
|
2262
|
+
icon: /* @__PURE__ */ p("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", children: [
|
|
2263
|
+
/* @__PURE__ */ n("path", { d: "M9 2L16.5 15H1.5L9 2Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }),
|
|
2264
|
+
/* @__PURE__ */ n("path", { d: "M9 7V10", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
|
|
2265
|
+
/* @__PURE__ */ n("circle", { cx: "9", cy: "12.5", r: "0.75", fill: "currentColor" })
|
|
2266
|
+
] }),
|
|
2267
|
+
colors: {
|
|
2268
|
+
subtle: {
|
|
2269
|
+
backgroundColor: "var(--brycks-warning-muted)",
|
|
2270
|
+
color: "var(--brycks-warning-default)",
|
|
2271
|
+
borderColor: "transparent"
|
|
2272
|
+
},
|
|
2273
|
+
solid: {
|
|
2274
|
+
backgroundColor: "var(--brycks-warning-default)",
|
|
2275
|
+
color: "var(--brycks-warning-foreground)",
|
|
2276
|
+
borderColor: "transparent"
|
|
2277
|
+
},
|
|
2278
|
+
outline: {
|
|
2279
|
+
backgroundColor: "transparent",
|
|
2280
|
+
color: "var(--brycks-warning-default)",
|
|
2281
|
+
borderColor: "var(--brycks-warning-default)"
|
|
2282
|
+
}
|
|
2283
|
+
}
|
|
2284
|
+
},
|
|
2285
|
+
error: {
|
|
2286
|
+
icon: /* @__PURE__ */ p("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", children: [
|
|
2287
|
+
/* @__PURE__ */ n("circle", { cx: "9", cy: "9", r: "7.5", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
2288
|
+
/* @__PURE__ */ n("path", { d: "M6.5 6.5L11.5 11.5M11.5 6.5L6.5 11.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
2289
|
+
] }),
|
|
2290
|
+
colors: {
|
|
2291
|
+
subtle: {
|
|
2292
|
+
backgroundColor: "var(--brycks-error-muted)",
|
|
2293
|
+
color: "var(--brycks-error-default)",
|
|
2294
|
+
borderColor: "transparent"
|
|
2295
|
+
},
|
|
2296
|
+
solid: {
|
|
2297
|
+
backgroundColor: "var(--brycks-error-default)",
|
|
2298
|
+
color: "var(--brycks-error-foreground)",
|
|
2299
|
+
borderColor: "transparent"
|
|
2300
|
+
},
|
|
2301
|
+
outline: {
|
|
2302
|
+
backgroundColor: "transparent",
|
|
2303
|
+
color: "var(--brycks-error-default)",
|
|
2304
|
+
borderColor: "var(--brycks-error-default)"
|
|
2305
|
+
}
|
|
2306
|
+
}
|
|
2307
|
+
}
|
|
2308
|
+
}, Fr = $(function({
|
|
2309
|
+
intent: t = "info",
|
|
2310
|
+
variant: r = "subtle",
|
|
2311
|
+
title: o,
|
|
2312
|
+
icon: s,
|
|
2313
|
+
showIcon: a = !0,
|
|
2314
|
+
action: b,
|
|
2315
|
+
isDismissible: l,
|
|
2316
|
+
onDismiss: c,
|
|
2317
|
+
className: i,
|
|
2318
|
+
style: f,
|
|
2319
|
+
testId: h,
|
|
2320
|
+
children: g,
|
|
2321
|
+
...u
|
|
2322
|
+
}, y) {
|
|
2323
|
+
const m = Mr[t], d = m.colors[r], k = {
|
|
2324
|
+
display: "flex",
|
|
2325
|
+
alignItems: "flex-start",
|
|
2326
|
+
gap: 12,
|
|
2327
|
+
padding: "12px 16px",
|
|
2328
|
+
borderRadius: "var(--brycks-radius-default)",
|
|
2329
|
+
border: `1px solid ${d.borderColor}`,
|
|
2330
|
+
backgroundColor: d.backgroundColor,
|
|
2331
|
+
color: r === "solid" ? d.color : "var(--brycks-foreground-default)",
|
|
2332
|
+
...f
|
|
2333
|
+
}, W = {
|
|
2334
|
+
flexShrink: 0,
|
|
2335
|
+
color: d.color,
|
|
2336
|
+
marginTop: 1
|
|
2337
|
+
}, T = {
|
|
2338
|
+
flex: 1,
|
|
2339
|
+
minWidth: 0
|
|
2340
|
+
}, B = {
|
|
2341
|
+
fontSize: 14,
|
|
2342
|
+
fontWeight: 600,
|
|
2343
|
+
marginBottom: g ? 4 : 0,
|
|
2344
|
+
color: d.color
|
|
2345
|
+
}, M = {
|
|
2346
|
+
fontSize: 14,
|
|
2347
|
+
lineHeight: 1.5,
|
|
2348
|
+
color: r === "solid" ? d.color : "var(--brycks-foreground-muted)"
|
|
2349
|
+
}, x = {
|
|
2350
|
+
display: "flex",
|
|
2351
|
+
alignItems: "center",
|
|
2352
|
+
gap: 8,
|
|
2353
|
+
flexShrink: 0
|
|
2354
|
+
}, w = {
|
|
2355
|
+
display: "flex",
|
|
2356
|
+
alignItems: "center",
|
|
2357
|
+
justifyContent: "center",
|
|
2358
|
+
width: 24,
|
|
2359
|
+
height: 24,
|
|
2360
|
+
borderRadius: "var(--brycks-radius-sm)",
|
|
2361
|
+
color: r === "solid" ? d.color : "var(--brycks-foreground-muted)",
|
|
2362
|
+
transition: "all 150ms ease-out",
|
|
2363
|
+
opacity: 0.7
|
|
2364
|
+
};
|
|
2365
|
+
return /* @__PURE__ */ p(
|
|
2366
|
+
"div",
|
|
2367
|
+
{
|
|
2368
|
+
ref: y,
|
|
2369
|
+
role: "alert",
|
|
2370
|
+
className: I(
|
|
2371
|
+
"brycks-alert",
|
|
2372
|
+
`brycks-alert--${t}`,
|
|
2373
|
+
`brycks-alert--${r}`,
|
|
2374
|
+
i
|
|
2375
|
+
),
|
|
2376
|
+
style: k,
|
|
2377
|
+
"data-testid": h,
|
|
2378
|
+
...u,
|
|
2379
|
+
children: [
|
|
2380
|
+
a && /* @__PURE__ */ n("span", { className: "brycks-alert-icon", style: W, children: s ?? m.icon }),
|
|
2381
|
+
/* @__PURE__ */ p("div", { className: "brycks-alert-content", style: T, children: [
|
|
2382
|
+
o && /* @__PURE__ */ n("div", { className: "brycks-alert-title", style: B, children: o }),
|
|
2383
|
+
g && /* @__PURE__ */ n("div", { className: "brycks-alert-description", style: M, children: g })
|
|
2384
|
+
] }),
|
|
2385
|
+
(b || l) && /* @__PURE__ */ p("div", { className: "brycks-alert-actions", style: x, children: [
|
|
2386
|
+
b,
|
|
2387
|
+
l && /* @__PURE__ */ n(
|
|
2388
|
+
"button",
|
|
2389
|
+
{
|
|
2390
|
+
type: "button",
|
|
2391
|
+
className: "brycks-alert-dismiss",
|
|
2392
|
+
style: w,
|
|
2393
|
+
onClick: c,
|
|
2394
|
+
"aria-label": "Dismiss alert",
|
|
2395
|
+
onMouseEnter: (S) => {
|
|
2396
|
+
S.currentTarget.style.opacity = "1";
|
|
2397
|
+
},
|
|
2398
|
+
onMouseLeave: (S) => {
|
|
2399
|
+
S.currentTarget.style.opacity = "0.7";
|
|
2400
|
+
},
|
|
2401
|
+
children: /* @__PURE__ */ n("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ n("path", { d: "M3 3L11 11M11 3L3 11", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) })
|
|
2402
|
+
}
|
|
2403
|
+
)
|
|
2404
|
+
] })
|
|
2405
|
+
]
|
|
2406
|
+
}
|
|
2407
|
+
);
|
|
2408
|
+
});
|
|
2409
|
+
Fr.displayName = "Alert";
|
|
2410
|
+
const jr = $(function({
|
|
2411
|
+
content: t,
|
|
2412
|
+
placement: r = "top",
|
|
2413
|
+
delay: o = 200,
|
|
2414
|
+
isDisabled: s,
|
|
2415
|
+
className: a,
|
|
2416
|
+
testId: b,
|
|
2417
|
+
children: l,
|
|
2418
|
+
...c
|
|
2419
|
+
}, i) {
|
|
2420
|
+
const [f, h] = V(!1), [g, u] = V({ top: 0, left: 0 }), y = ne(null), m = ne(null), d = ne(), k = se(() => {
|
|
2421
|
+
if (!y.current || !m.current) return;
|
|
2422
|
+
const w = y.current.getBoundingClientRect(), S = m.current.getBoundingClientRect(), L = 8;
|
|
2423
|
+
let z = 0, v = 0;
|
|
2424
|
+
switch (r) {
|
|
2425
|
+
case "top":
|
|
2426
|
+
z = w.top - S.height - L, v = w.left + (w.width - S.width) / 2;
|
|
2427
|
+
break;
|
|
2428
|
+
case "bottom":
|
|
2429
|
+
z = w.bottom + L, v = w.left + (w.width - S.width) / 2;
|
|
2430
|
+
break;
|
|
2431
|
+
case "left":
|
|
2432
|
+
z = w.top + (w.height - S.height) / 2, v = w.left - S.width - L;
|
|
2433
|
+
break;
|
|
2434
|
+
case "right":
|
|
2435
|
+
z = w.top + (w.height - S.height) / 2, v = w.right + L;
|
|
2436
|
+
break;
|
|
2437
|
+
}
|
|
2438
|
+
const O = 8;
|
|
2439
|
+
v = Math.max(O, Math.min(v, window.innerWidth - S.width - O)), z = Math.max(O, Math.min(z, window.innerHeight - S.height - O)), u({ top: z, left: v });
|
|
2440
|
+
}, [r]);
|
|
2441
|
+
ae(() => (f && (k(), window.addEventListener("scroll", k, !0), window.addEventListener("resize", k)), () => {
|
|
2442
|
+
window.removeEventListener("scroll", k, !0), window.removeEventListener("resize", k);
|
|
2443
|
+
}), [f, k]);
|
|
2444
|
+
const W = () => {
|
|
2445
|
+
s || (d.current = setTimeout(() => {
|
|
2446
|
+
h(!0);
|
|
2447
|
+
}, o));
|
|
2448
|
+
}, T = () => {
|
|
2449
|
+
d.current && clearTimeout(d.current), h(!1);
|
|
2450
|
+
};
|
|
2451
|
+
ae(() => () => {
|
|
2452
|
+
d.current && clearTimeout(d.current);
|
|
2453
|
+
}, []);
|
|
2454
|
+
const B = {
|
|
2455
|
+
display: "inline-flex"
|
|
2456
|
+
}, M = {
|
|
2457
|
+
position: "fixed",
|
|
2458
|
+
top: g.top,
|
|
2459
|
+
left: g.left,
|
|
2460
|
+
zIndex: "var(--brycks-z-tooltip)",
|
|
2461
|
+
maxWidth: 300,
|
|
2462
|
+
padding: "6px 10px",
|
|
2463
|
+
fontSize: 12,
|
|
2464
|
+
fontWeight: 500,
|
|
2465
|
+
lineHeight: 1.4,
|
|
2466
|
+
color: "var(--brycks-foreground-inverse)",
|
|
2467
|
+
backgroundColor: "var(--brycks-background-inverse)",
|
|
2468
|
+
borderRadius: "var(--brycks-radius-md)",
|
|
2469
|
+
boxShadow: "var(--brycks-shadow-lg)",
|
|
2470
|
+
pointerEvents: "none",
|
|
2471
|
+
animation: "brycks-tooltip-in 150ms ease-out"
|
|
2472
|
+
}, x = {
|
|
2473
|
+
position: "absolute",
|
|
2474
|
+
width: 8,
|
|
2475
|
+
height: 8,
|
|
2476
|
+
backgroundColor: "var(--brycks-background-inverse)",
|
|
2477
|
+
transform: "rotate(45deg)",
|
|
2478
|
+
...r === "top" && { bottom: -4, left: "50%", marginLeft: -4 },
|
|
2479
|
+
...r === "bottom" && { top: -4, left: "50%", marginLeft: -4 },
|
|
2480
|
+
...r === "left" && { right: -4, top: "50%", marginTop: -4 },
|
|
2481
|
+
...r === "right" && { left: -4, top: "50%", marginTop: -4 }
|
|
2482
|
+
};
|
|
2483
|
+
return /* @__PURE__ */ p(ce, { children: [
|
|
2484
|
+
/* @__PURE__ */ n(
|
|
2485
|
+
"div",
|
|
2486
|
+
{
|
|
2487
|
+
ref: y,
|
|
2488
|
+
style: B,
|
|
2489
|
+
onMouseEnter: W,
|
|
2490
|
+
onMouseLeave: T,
|
|
2491
|
+
onFocus: W,
|
|
2492
|
+
onBlur: T,
|
|
2493
|
+
children: l
|
|
2494
|
+
}
|
|
2495
|
+
),
|
|
2496
|
+
f && he(
|
|
2497
|
+
/* @__PURE__ */ p(ce, { children: [
|
|
2498
|
+
/* @__PURE__ */ n("style", { children: `
|
|
2499
|
+
@keyframes brycks-tooltip-in {
|
|
2500
|
+
from { opacity: 0; transform: scale(0.95); }
|
|
2501
|
+
to { opacity: 1; transform: scale(1); }
|
|
2502
|
+
}
|
|
2503
|
+
` }),
|
|
2504
|
+
/* @__PURE__ */ p(
|
|
2505
|
+
"div",
|
|
2506
|
+
{
|
|
2507
|
+
ref: (w) => {
|
|
2508
|
+
m.current = w, typeof i == "function" ? i(w) : i && (i.current = w);
|
|
2509
|
+
},
|
|
2510
|
+
role: "tooltip",
|
|
2511
|
+
className: I("brycks-tooltip", `brycks-tooltip--${r}`, a),
|
|
2512
|
+
style: M,
|
|
2513
|
+
"data-testid": b,
|
|
2514
|
+
...c,
|
|
2515
|
+
children: [
|
|
2516
|
+
t,
|
|
2517
|
+
/* @__PURE__ */ n("span", { style: x })
|
|
2518
|
+
]
|
|
2519
|
+
}
|
|
2520
|
+
)
|
|
2521
|
+
] }),
|
|
2522
|
+
document.body
|
|
2523
|
+
)
|
|
2524
|
+
] });
|
|
2525
|
+
});
|
|
2526
|
+
jr.displayName = "Tooltip";
|
|
2527
|
+
const Or = {
|
|
2528
|
+
sm: { fontSize: 10, padding: "2px 6px", height: 18 },
|
|
2529
|
+
md: { fontSize: 11, padding: "3px 8px", height: 22 },
|
|
2530
|
+
lg: { fontSize: 12, padding: "4px 10px", height: 26 }
|
|
2531
|
+
}, Dr = {
|
|
2532
|
+
neutral: {
|
|
2533
|
+
solid: { backgroundColor: "var(--brycks-foreground-default)", color: "var(--brycks-background-app)" },
|
|
2534
|
+
subtle: { backgroundColor: "var(--brycks-background-muted)", color: "var(--brycks-foreground-default)" },
|
|
2535
|
+
outline: { backgroundColor: "transparent", color: "var(--brycks-foreground-default)", borderColor: "var(--brycks-border-default)" }
|
|
2536
|
+
},
|
|
2537
|
+
primary: {
|
|
2538
|
+
solid: { backgroundColor: "var(--brycks-primary-default)", color: "var(--brycks-primary-foreground)" },
|
|
2539
|
+
subtle: { backgroundColor: "var(--brycks-primary-muted)", color: "var(--brycks-primary-default)" },
|
|
2540
|
+
outline: { backgroundColor: "transparent", color: "var(--brycks-primary-default)", borderColor: "var(--brycks-primary-default)" }
|
|
2541
|
+
},
|
|
2542
|
+
accent: {
|
|
2543
|
+
solid: { backgroundColor: "var(--brycks-accent-default)", color: "var(--brycks-accent-foreground)" },
|
|
2544
|
+
subtle: { backgroundColor: "var(--brycks-accent-muted)", color: "var(--brycks-accent-default)" },
|
|
2545
|
+
outline: { backgroundColor: "transparent", color: "var(--brycks-accent-default)", borderColor: "var(--brycks-accent-default)" }
|
|
2546
|
+
},
|
|
2547
|
+
success: {
|
|
2548
|
+
solid: { backgroundColor: "var(--brycks-success-default)", color: "var(--brycks-success-foreground)" },
|
|
2549
|
+
subtle: { backgroundColor: "var(--brycks-success-muted)", color: "var(--brycks-success-default)" },
|
|
2550
|
+
outline: { backgroundColor: "transparent", color: "var(--brycks-success-default)", borderColor: "var(--brycks-success-default)" }
|
|
2551
|
+
},
|
|
2552
|
+
warning: {
|
|
2553
|
+
solid: { backgroundColor: "var(--brycks-warning-default)", color: "var(--brycks-warning-foreground)" },
|
|
2554
|
+
subtle: { backgroundColor: "var(--brycks-warning-muted)", color: "var(--brycks-warning-default)" },
|
|
2555
|
+
outline: { backgroundColor: "transparent", color: "var(--brycks-warning-default)", borderColor: "var(--brycks-warning-default)" }
|
|
2556
|
+
},
|
|
2557
|
+
error: {
|
|
2558
|
+
solid: { backgroundColor: "var(--brycks-error-default)", color: "var(--brycks-error-foreground)" },
|
|
2559
|
+
subtle: { backgroundColor: "var(--brycks-error-muted)", color: "var(--brycks-error-default)" },
|
|
2560
|
+
outline: { backgroundColor: "transparent", color: "var(--brycks-error-default)", borderColor: "var(--brycks-error-default)" }
|
|
2561
|
+
},
|
|
2562
|
+
info: {
|
|
2563
|
+
solid: { backgroundColor: "var(--brycks-info-default)", color: "var(--brycks-info-foreground)" },
|
|
2564
|
+
subtle: { backgroundColor: "var(--brycks-info-muted)", color: "var(--brycks-info-default)" },
|
|
2565
|
+
outline: { backgroundColor: "transparent", color: "var(--brycks-info-default)", borderColor: "var(--brycks-info-default)" }
|
|
2566
|
+
}
|
|
2567
|
+
}, Xr = $(function({
|
|
2568
|
+
variant: t = "subtle",
|
|
2569
|
+
intent: r = "neutral",
|
|
2570
|
+
size: o = "md",
|
|
2571
|
+
className: s,
|
|
2572
|
+
style: a,
|
|
2573
|
+
testId: b,
|
|
2574
|
+
children: l,
|
|
2575
|
+
...c
|
|
2576
|
+
}, i) {
|
|
2577
|
+
const f = Or[o], h = Dr[r][t], g = {
|
|
2578
|
+
display: "inline-flex",
|
|
2579
|
+
alignItems: "center",
|
|
2580
|
+
justifyContent: "center",
|
|
2581
|
+
fontWeight: 500,
|
|
2582
|
+
fontFamily: "var(--brycks-font-sans)",
|
|
2583
|
+
lineHeight: 1,
|
|
2584
|
+
borderRadius: "var(--brycks-radius-full)",
|
|
2585
|
+
whiteSpace: "nowrap",
|
|
2586
|
+
border: t === "outline" ? "1px solid" : "none",
|
|
2587
|
+
...f,
|
|
2588
|
+
...h,
|
|
2589
|
+
...a
|
|
2590
|
+
};
|
|
2591
|
+
return /* @__PURE__ */ n(
|
|
2592
|
+
"span",
|
|
2593
|
+
{
|
|
2594
|
+
ref: i,
|
|
2595
|
+
className: I(
|
|
2596
|
+
"brycks-badge",
|
|
2597
|
+
`brycks-badge--${t}`,
|
|
2598
|
+
`brycks-badge--${r}`,
|
|
2599
|
+
`brycks-badge--${o}`,
|
|
2600
|
+
s
|
|
2601
|
+
),
|
|
2602
|
+
style: g,
|
|
2603
|
+
"data-testid": b,
|
|
2604
|
+
...c,
|
|
2605
|
+
children: l
|
|
2606
|
+
}
|
|
2607
|
+
);
|
|
2608
|
+
});
|
|
2609
|
+
Xr.displayName = "Badge";
|
|
2610
|
+
const Er = {
|
|
2611
|
+
xs: 14,
|
|
2612
|
+
sm: 18,
|
|
2613
|
+
md: 24,
|
|
2614
|
+
lg: 32,
|
|
2615
|
+
xl: 48
|
|
2616
|
+
};
|
|
2617
|
+
function Pr({ size: e, color: t }) {
|
|
2618
|
+
return /* @__PURE__ */ p(
|
|
2619
|
+
"svg",
|
|
2620
|
+
{
|
|
2621
|
+
width: e,
|
|
2622
|
+
height: e,
|
|
2623
|
+
viewBox: "0 0 24 24",
|
|
2624
|
+
fill: "none",
|
|
2625
|
+
style: { animation: "brycks-spin 1s linear infinite" },
|
|
2626
|
+
children: [
|
|
2627
|
+
/* @__PURE__ */ n(
|
|
2628
|
+
"circle",
|
|
2629
|
+
{
|
|
2630
|
+
cx: "12",
|
|
2631
|
+
cy: "12",
|
|
2632
|
+
r: "10",
|
|
2633
|
+
stroke: t,
|
|
2634
|
+
strokeWidth: "2.5",
|
|
2635
|
+
strokeLinecap: "round",
|
|
2636
|
+
opacity: "0.2"
|
|
2637
|
+
}
|
|
2638
|
+
),
|
|
2639
|
+
/* @__PURE__ */ n(
|
|
2640
|
+
"path",
|
|
2641
|
+
{
|
|
2642
|
+
d: "M12 2C6.47715 2 2 6.47715 2 12",
|
|
2643
|
+
stroke: t,
|
|
2644
|
+
strokeWidth: "2.5",
|
|
2645
|
+
strokeLinecap: "round"
|
|
2646
|
+
}
|
|
2647
|
+
)
|
|
2648
|
+
]
|
|
2649
|
+
}
|
|
2650
|
+
);
|
|
2651
|
+
}
|
|
2652
|
+
function Vr({ size: e, color: t }) {
|
|
2653
|
+
const r = e / 4, o = e / 6;
|
|
2654
|
+
return /* @__PURE__ */ n(
|
|
2655
|
+
"div",
|
|
2656
|
+
{
|
|
2657
|
+
style: {
|
|
2658
|
+
display: "flex",
|
|
2659
|
+
alignItems: "center",
|
|
2660
|
+
gap: o,
|
|
2661
|
+
height: e
|
|
2662
|
+
},
|
|
2663
|
+
children: [0, 1, 2].map((s) => /* @__PURE__ */ n(
|
|
2664
|
+
"span",
|
|
2665
|
+
{
|
|
2666
|
+
style: {
|
|
2667
|
+
width: r,
|
|
2668
|
+
height: r,
|
|
2669
|
+
borderRadius: "50%",
|
|
2670
|
+
backgroundColor: t,
|
|
2671
|
+
animation: "brycks-bounce 1.4s ease-in-out infinite",
|
|
2672
|
+
animationDelay: `${s * 0.16}s`
|
|
2673
|
+
}
|
|
2674
|
+
},
|
|
2675
|
+
s
|
|
2676
|
+
))
|
|
2677
|
+
}
|
|
2678
|
+
);
|
|
2679
|
+
}
|
|
2680
|
+
function Gr({ size: e, color: t }) {
|
|
2681
|
+
return /* @__PURE__ */ n(
|
|
2682
|
+
"span",
|
|
2683
|
+
{
|
|
2684
|
+
style: {
|
|
2685
|
+
display: "block",
|
|
2686
|
+
width: e,
|
|
2687
|
+
height: e,
|
|
2688
|
+
borderRadius: "50%",
|
|
2689
|
+
backgroundColor: t,
|
|
2690
|
+
animation: "brycks-pulse 1.5s ease-in-out infinite"
|
|
2691
|
+
}
|
|
2692
|
+
}
|
|
2693
|
+
);
|
|
2694
|
+
}
|
|
2695
|
+
const Ce = $(function({
|
|
2696
|
+
size: t = "md",
|
|
2697
|
+
variant: r = "spinner",
|
|
2698
|
+
color: o = "var(--brycks-primary-default)",
|
|
2699
|
+
label: s = "Loading",
|
|
2700
|
+
className: a,
|
|
2701
|
+
style: b,
|
|
2702
|
+
testId: l,
|
|
2703
|
+
...c
|
|
2704
|
+
}, i) {
|
|
2705
|
+
const f = Er[t], h = {
|
|
2706
|
+
display: "inline-flex",
|
|
2707
|
+
alignItems: "center",
|
|
2708
|
+
justifyContent: "center",
|
|
2709
|
+
...b
|
|
2710
|
+
}, g = () => {
|
|
2711
|
+
switch (r) {
|
|
2712
|
+
case "dots":
|
|
2713
|
+
return /* @__PURE__ */ n(Vr, { size: f, color: o });
|
|
2714
|
+
case "pulse":
|
|
2715
|
+
return /* @__PURE__ */ n(Gr, { size: f, color: o });
|
|
2716
|
+
default:
|
|
2717
|
+
return /* @__PURE__ */ n(Pr, { size: f, color: o });
|
|
2718
|
+
}
|
|
2719
|
+
};
|
|
2720
|
+
return /* @__PURE__ */ p(ce, { children: [
|
|
2721
|
+
/* @__PURE__ */ n("style", { children: `
|
|
2722
|
+
@keyframes brycks-spin {
|
|
2723
|
+
from { transform: rotate(0deg); }
|
|
2724
|
+
to { transform: rotate(360deg); }
|
|
2725
|
+
}
|
|
2726
|
+
@keyframes brycks-bounce {
|
|
2727
|
+
0%, 80%, 100% { transform: scale(0); opacity: 0.5; }
|
|
2728
|
+
40% { transform: scale(1); opacity: 1; }
|
|
2729
|
+
}
|
|
2730
|
+
@keyframes brycks-pulse {
|
|
2731
|
+
0%, 100% { transform: scale(0.8); opacity: 0.5; }
|
|
2732
|
+
50% { transform: scale(1); opacity: 1; }
|
|
2733
|
+
}
|
|
2734
|
+
` }),
|
|
2735
|
+
/* @__PURE__ */ p(
|
|
2736
|
+
"div",
|
|
2737
|
+
{
|
|
2738
|
+
ref: i,
|
|
2739
|
+
role: "status",
|
|
2740
|
+
"aria-label": s,
|
|
2741
|
+
className: I(
|
|
2742
|
+
"brycks-loader",
|
|
2743
|
+
`brycks-loader--${r}`,
|
|
2744
|
+
`brycks-loader--${t}`,
|
|
2745
|
+
a
|
|
2746
|
+
),
|
|
2747
|
+
style: h,
|
|
2748
|
+
"data-testid": l,
|
|
2749
|
+
...c,
|
|
2750
|
+
children: [
|
|
2751
|
+
g(),
|
|
2752
|
+
/* @__PURE__ */ n(
|
|
2753
|
+
"span",
|
|
2754
|
+
{
|
|
2755
|
+
style: {
|
|
2756
|
+
position: "absolute",
|
|
2757
|
+
width: 1,
|
|
2758
|
+
height: 1,
|
|
2759
|
+
padding: 0,
|
|
2760
|
+
margin: -1,
|
|
2761
|
+
overflow: "hidden",
|
|
2762
|
+
clip: "rect(0, 0, 0, 0)",
|
|
2763
|
+
whiteSpace: "nowrap",
|
|
2764
|
+
border: 0
|
|
2765
|
+
},
|
|
2766
|
+
children: s
|
|
2767
|
+
}
|
|
2768
|
+
)
|
|
2769
|
+
]
|
|
2770
|
+
}
|
|
2771
|
+
)
|
|
2772
|
+
] });
|
|
2773
|
+
});
|
|
2774
|
+
Ce.displayName = "Loader";
|
|
2775
|
+
const yt = Ce, ze = $(function({
|
|
2776
|
+
variant: t = "rectangular",
|
|
2777
|
+
width: r,
|
|
2778
|
+
height: o,
|
|
2779
|
+
radius: s,
|
|
2780
|
+
animate: a = !0,
|
|
2781
|
+
className: b,
|
|
2782
|
+
style: l,
|
|
2783
|
+
testId: c,
|
|
2784
|
+
...i
|
|
2785
|
+
}, f) {
|
|
2786
|
+
const g = {
|
|
2787
|
+
...(() => {
|
|
2788
|
+
const y = {
|
|
2789
|
+
backgroundColor: "var(--brycks-background-muted)",
|
|
2790
|
+
position: "relative",
|
|
2791
|
+
overflow: "hidden"
|
|
2792
|
+
};
|
|
2793
|
+
switch (t) {
|
|
2794
|
+
case "text":
|
|
2795
|
+
y.width = r ?? "100%", y.height = o ?? "1em", y.borderRadius = "var(--brycks-radius-sm)";
|
|
2796
|
+
break;
|
|
2797
|
+
case "circular":
|
|
2798
|
+
y.width = r ?? 40, y.height = o ?? r ?? 40, y.borderRadius = "50%";
|
|
2799
|
+
break;
|
|
2800
|
+
case "rectangular":
|
|
2801
|
+
y.width = r ?? "100%", y.height = o ?? 40, y.borderRadius = s ?? "var(--brycks-radius-default)";
|
|
2802
|
+
break;
|
|
2803
|
+
}
|
|
2804
|
+
return y;
|
|
2805
|
+
})(),
|
|
2806
|
+
...l
|
|
2807
|
+
}, u = {
|
|
2808
|
+
position: "absolute",
|
|
2809
|
+
top: 0,
|
|
2810
|
+
left: 0,
|
|
2811
|
+
right: 0,
|
|
2812
|
+
bottom: 0,
|
|
2813
|
+
background: "linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%)",
|
|
2814
|
+
animation: a ? "brycks-shimmer 1.5s infinite" : "none"
|
|
2815
|
+
};
|
|
2816
|
+
return /* @__PURE__ */ p(ce, { children: [
|
|
2817
|
+
a && /* @__PURE__ */ n("style", { children: `
|
|
2818
|
+
@keyframes brycks-shimmer {
|
|
2819
|
+
0% { transform: translateX(-100%); }
|
|
2820
|
+
100% { transform: translateX(100%); }
|
|
2821
|
+
}
|
|
2822
|
+
` }),
|
|
2823
|
+
/* @__PURE__ */ n(
|
|
2824
|
+
"div",
|
|
2825
|
+
{
|
|
2826
|
+
ref: f,
|
|
2827
|
+
className: I(
|
|
2828
|
+
"brycks-skeleton",
|
|
2829
|
+
`brycks-skeleton--${t}`,
|
|
2830
|
+
a && "brycks-skeleton--animated",
|
|
2831
|
+
b
|
|
2832
|
+
),
|
|
2833
|
+
style: g,
|
|
2834
|
+
"data-testid": c,
|
|
2835
|
+
"aria-hidden": "true",
|
|
2836
|
+
...i,
|
|
2837
|
+
children: a && /* @__PURE__ */ n("div", { style: u })
|
|
2838
|
+
}
|
|
2839
|
+
)
|
|
2840
|
+
] });
|
|
2841
|
+
});
|
|
2842
|
+
ze.displayName = "Skeleton";
|
|
2843
|
+
function _r({
|
|
2844
|
+
lines: e = 3,
|
|
2845
|
+
gap: t = 8,
|
|
2846
|
+
lastLineWidth: r = "80%",
|
|
2847
|
+
className: o
|
|
2848
|
+
}) {
|
|
2849
|
+
return /* @__PURE__ */ n(
|
|
2850
|
+
"div",
|
|
2851
|
+
{
|
|
2852
|
+
className: I("brycks-skeleton-text", o),
|
|
2853
|
+
style: { display: "flex", flexDirection: "column", gap: t },
|
|
2854
|
+
children: Array.from({ length: e }).map((s, a) => /* @__PURE__ */ n(
|
|
2855
|
+
ze,
|
|
2856
|
+
{
|
|
2857
|
+
variant: "text",
|
|
2858
|
+
width: a === e - 1 ? r : "100%"
|
|
2859
|
+
},
|
|
2860
|
+
a
|
|
2861
|
+
))
|
|
2862
|
+
}
|
|
2863
|
+
);
|
|
2864
|
+
}
|
|
2865
|
+
_r.displayName = "SkeletonText";
|
|
2866
|
+
const Yr = $(function({
|
|
2867
|
+
orientation: t = "horizontal",
|
|
2868
|
+
variant: r = "solid",
|
|
2869
|
+
label: o,
|
|
2870
|
+
labelPosition: s = "center",
|
|
2871
|
+
className: a,
|
|
2872
|
+
style: b,
|
|
2873
|
+
testId: l,
|
|
2874
|
+
...c
|
|
2875
|
+
}, i) {
|
|
2876
|
+
const f = t === "horizontal", h = {
|
|
2877
|
+
display: "flex",
|
|
2878
|
+
alignItems: "center",
|
|
2879
|
+
width: f ? "100%" : void 0,
|
|
2880
|
+
height: f ? void 0 : "100%",
|
|
2881
|
+
flexDirection: f ? "row" : "column",
|
|
2882
|
+
...b
|
|
2883
|
+
}, g = {
|
|
2884
|
+
flex: 1,
|
|
2885
|
+
backgroundColor: r === "solid" ? "var(--brycks-border-muted)" : "transparent",
|
|
2886
|
+
borderStyle: r,
|
|
2887
|
+
borderColor: "var(--brycks-border-muted)",
|
|
2888
|
+
...f ? {
|
|
2889
|
+
height: 1,
|
|
2890
|
+
borderWidth: r === "solid" ? 0 : "1px 0 0 0"
|
|
2891
|
+
} : {
|
|
2892
|
+
width: 1,
|
|
2893
|
+
borderWidth: r === "solid" ? 0 : "0 0 0 1px"
|
|
2894
|
+
}
|
|
2895
|
+
}, u = {
|
|
2896
|
+
padding: f ? "0 12px" : "12px 0",
|
|
2897
|
+
fontSize: 12,
|
|
2898
|
+
fontWeight: 500,
|
|
2899
|
+
color: "var(--brycks-foreground-muted)",
|
|
2900
|
+
whiteSpace: "nowrap"
|
|
2901
|
+
};
|
|
2902
|
+
if (!o)
|
|
2903
|
+
return /* @__PURE__ */ n(
|
|
2904
|
+
"div",
|
|
2905
|
+
{
|
|
2906
|
+
ref: i,
|
|
2907
|
+
role: "separator",
|
|
2908
|
+
"aria-orientation": t,
|
|
2909
|
+
className: I(
|
|
2910
|
+
"brycks-divider",
|
|
2911
|
+
`brycks-divider--${t}`,
|
|
2912
|
+
`brycks-divider--${r}`,
|
|
2913
|
+
a
|
|
2914
|
+
),
|
|
2915
|
+
style: { ...g, ...b },
|
|
2916
|
+
"data-testid": l,
|
|
2917
|
+
...c
|
|
2918
|
+
}
|
|
2919
|
+
);
|
|
2920
|
+
const y = s === "center" || s === "end", m = s === "center" || s === "start";
|
|
2921
|
+
return /* @__PURE__ */ p(
|
|
2922
|
+
"div",
|
|
2923
|
+
{
|
|
2924
|
+
ref: i,
|
|
2925
|
+
role: "separator",
|
|
2926
|
+
"aria-orientation": t,
|
|
2927
|
+
className: I(
|
|
2928
|
+
"brycks-divider",
|
|
2929
|
+
`brycks-divider--${t}`,
|
|
2930
|
+
`brycks-divider--${r}`,
|
|
2931
|
+
"brycks-divider--with-label",
|
|
2932
|
+
a
|
|
2933
|
+
),
|
|
2934
|
+
style: h,
|
|
2935
|
+
"data-testid": l,
|
|
2936
|
+
...c,
|
|
2937
|
+
children: [
|
|
2938
|
+
y && /* @__PURE__ */ n("span", { style: g }),
|
|
2939
|
+
/* @__PURE__ */ n("span", { style: u, children: o }),
|
|
2940
|
+
m && /* @__PURE__ */ n("span", { style: g })
|
|
2941
|
+
]
|
|
2942
|
+
}
|
|
2943
|
+
);
|
|
2944
|
+
});
|
|
2945
|
+
Yr.displayName = "Divider";
|
|
2946
|
+
const Ar = $(function({
|
|
2947
|
+
icon: t,
|
|
2948
|
+
title: r,
|
|
2949
|
+
description: o,
|
|
2950
|
+
action: s,
|
|
2951
|
+
secondaryAction: a,
|
|
2952
|
+
className: b,
|
|
2953
|
+
style: l,
|
|
2954
|
+
testId: c,
|
|
2955
|
+
children: i,
|
|
2956
|
+
...f
|
|
2957
|
+
}, h) {
|
|
2958
|
+
const g = {
|
|
2959
|
+
display: "flex",
|
|
2960
|
+
flexDirection: "column",
|
|
2961
|
+
alignItems: "center",
|
|
2962
|
+
justifyContent: "center",
|
|
2963
|
+
textAlign: "center",
|
|
2964
|
+
padding: "48px 24px",
|
|
2965
|
+
...l
|
|
2966
|
+
}, u = {
|
|
2967
|
+
marginBottom: 16,
|
|
2968
|
+
color: "var(--brycks-foreground-subtle)"
|
|
2969
|
+
}, y = {
|
|
2970
|
+
fontSize: 18,
|
|
2971
|
+
fontWeight: 600,
|
|
2972
|
+
color: "var(--brycks-foreground-default)",
|
|
2973
|
+
marginBottom: o ? 8 : 0,
|
|
2974
|
+
maxWidth: 400
|
|
2975
|
+
}, m = {
|
|
2976
|
+
fontSize: 14,
|
|
2977
|
+
color: "var(--brycks-foreground-muted)",
|
|
2978
|
+
lineHeight: 1.5,
|
|
2979
|
+
maxWidth: 400
|
|
2980
|
+
}, d = {
|
|
2981
|
+
display: "flex",
|
|
2982
|
+
alignItems: "center",
|
|
2983
|
+
gap: 12,
|
|
2984
|
+
marginTop: 24
|
|
2985
|
+
};
|
|
2986
|
+
return /* @__PURE__ */ p(
|
|
2987
|
+
"div",
|
|
2988
|
+
{
|
|
2989
|
+
ref: h,
|
|
2990
|
+
className: I("brycks-empty-state", b),
|
|
2991
|
+
style: g,
|
|
2992
|
+
"data-testid": c,
|
|
2993
|
+
...f,
|
|
2994
|
+
children: [
|
|
2995
|
+
t && /* @__PURE__ */ n("div", { style: u, children: t }),
|
|
2996
|
+
r && /* @__PURE__ */ n("h3", { style: y, children: r }),
|
|
2997
|
+
o && /* @__PURE__ */ n("p", { style: m, children: o }),
|
|
2998
|
+
i,
|
|
2999
|
+
(s || a) && /* @__PURE__ */ p("div", { style: d, children: [
|
|
3000
|
+
s,
|
|
3001
|
+
a
|
|
3002
|
+
] })
|
|
3003
|
+
]
|
|
3004
|
+
}
|
|
3005
|
+
);
|
|
3006
|
+
});
|
|
3007
|
+
Ar.displayName = "EmptyState";
|
|
3008
|
+
function Kr({ size: e = 64 }) {
|
|
3009
|
+
return /* @__PURE__ */ p(
|
|
3010
|
+
"svg",
|
|
3011
|
+
{
|
|
3012
|
+
width: e,
|
|
3013
|
+
height: e,
|
|
3014
|
+
viewBox: "0 0 64 64",
|
|
3015
|
+
fill: "none",
|
|
3016
|
+
style: { opacity: 0.5 },
|
|
3017
|
+
children: [
|
|
3018
|
+
/* @__PURE__ */ n(
|
|
3019
|
+
"rect",
|
|
3020
|
+
{
|
|
3021
|
+
x: "8",
|
|
3022
|
+
y: "12",
|
|
3023
|
+
width: "48",
|
|
3024
|
+
height: "40",
|
|
3025
|
+
rx: "4",
|
|
3026
|
+
stroke: "currentColor",
|
|
3027
|
+
strokeWidth: "2"
|
|
3028
|
+
}
|
|
3029
|
+
),
|
|
3030
|
+
/* @__PURE__ */ n(
|
|
3031
|
+
"path",
|
|
3032
|
+
{
|
|
3033
|
+
d: "M8 24h48",
|
|
3034
|
+
stroke: "currentColor",
|
|
3035
|
+
strokeWidth: "2"
|
|
3036
|
+
}
|
|
3037
|
+
),
|
|
3038
|
+
/* @__PURE__ */ n("circle", { cx: "16", cy: "18", r: "2", fill: "currentColor" }),
|
|
3039
|
+
/* @__PURE__ */ n("circle", { cx: "24", cy: "18", r: "2", fill: "currentColor" }),
|
|
3040
|
+
/* @__PURE__ */ n("circle", { cx: "32", cy: "18", r: "2", fill: "currentColor" }),
|
|
3041
|
+
/* @__PURE__ */ n(
|
|
3042
|
+
"rect",
|
|
3043
|
+
{
|
|
3044
|
+
x: "16",
|
|
3045
|
+
y: "32",
|
|
3046
|
+
width: "32",
|
|
3047
|
+
height: "4",
|
|
3048
|
+
rx: "2",
|
|
3049
|
+
fill: "currentColor",
|
|
3050
|
+
opacity: "0.3"
|
|
3051
|
+
}
|
|
3052
|
+
),
|
|
3053
|
+
/* @__PURE__ */ n(
|
|
3054
|
+
"rect",
|
|
3055
|
+
{
|
|
3056
|
+
x: "16",
|
|
3057
|
+
y: "40",
|
|
3058
|
+
width: "20",
|
|
3059
|
+
height: "4",
|
|
3060
|
+
rx: "2",
|
|
3061
|
+
fill: "currentColor",
|
|
3062
|
+
opacity: "0.3"
|
|
3063
|
+
}
|
|
3064
|
+
)
|
|
3065
|
+
]
|
|
3066
|
+
}
|
|
3067
|
+
);
|
|
3068
|
+
}
|
|
3069
|
+
Kr.displayName = "EmptyStateIcon";
|
|
3070
|
+
function le(e) {
|
|
3071
|
+
const [t, r] = V(() => typeof window > "u" ? !1 : window.matchMedia(e).matches);
|
|
3072
|
+
return ae(() => {
|
|
3073
|
+
if (typeof window > "u") return;
|
|
3074
|
+
const o = window.matchMedia(e), s = (a) => r(a.matches);
|
|
3075
|
+
return r(o.matches), o.addEventListener("change", s), () => o.removeEventListener("change", s);
|
|
3076
|
+
}, [e]), t;
|
|
3077
|
+
}
|
|
3078
|
+
function bt() {
|
|
3079
|
+
return le("(max-width: 639px)");
|
|
3080
|
+
}
|
|
3081
|
+
function ft() {
|
|
3082
|
+
return le("(min-width: 640px) and (max-width: 1023px)");
|
|
3083
|
+
}
|
|
3084
|
+
function gt() {
|
|
3085
|
+
return le("(min-width: 1024px)");
|
|
3086
|
+
}
|
|
3087
|
+
function mt() {
|
|
3088
|
+
return le("(prefers-reduced-motion: reduce)");
|
|
3089
|
+
}
|
|
3090
|
+
function ht() {
|
|
3091
|
+
return le("(prefers-color-scheme: dark)");
|
|
3092
|
+
}
|
|
3093
|
+
function kt(e = {}) {
|
|
3094
|
+
const { defaultIsOpen: t = !1, onOpen: r, onClose: o } = e, [s, a] = V(t), b = se(() => {
|
|
3095
|
+
a(!0), r == null || r();
|
|
3096
|
+
}, [r]), l = se(() => {
|
|
3097
|
+
a(!1), o == null || o();
|
|
3098
|
+
}, [o]), c = se(() => {
|
|
3099
|
+
const i = !s;
|
|
3100
|
+
a(i), i ? r == null || r() : o == null || o();
|
|
3101
|
+
}, [s, r, o]);
|
|
3102
|
+
return {
|
|
3103
|
+
isOpen: s,
|
|
3104
|
+
onOpen: b,
|
|
3105
|
+
onClose: l,
|
|
3106
|
+
onToggle: c,
|
|
3107
|
+
setIsOpen: a
|
|
3108
|
+
};
|
|
3109
|
+
}
|
|
3110
|
+
export {
|
|
3111
|
+
Fr as Alert,
|
|
3112
|
+
Xr as Badge,
|
|
3113
|
+
De as Box,
|
|
3114
|
+
we as Button,
|
|
3115
|
+
Wr as Checkbox,
|
|
3116
|
+
lr as Code,
|
|
3117
|
+
sr as Container,
|
|
3118
|
+
fr as Display,
|
|
3119
|
+
Yr as Divider,
|
|
3120
|
+
Ar as EmptyState,
|
|
3121
|
+
Kr as EmptyStateIcon,
|
|
3122
|
+
Ze as Grid,
|
|
3123
|
+
er as GridItem,
|
|
3124
|
+
_e as HStack,
|
|
3125
|
+
ve as Heading,
|
|
3126
|
+
vr as IconButton,
|
|
3127
|
+
Se as Input,
|
|
3128
|
+
Ce as Loader,
|
|
3129
|
+
Rr as Modal,
|
|
3130
|
+
zr as Select,
|
|
3131
|
+
ze as Skeleton,
|
|
3132
|
+
_r as SkeletonText,
|
|
3133
|
+
yt as Spinner,
|
|
3134
|
+
ge as Stack,
|
|
3135
|
+
Hr as Switch,
|
|
3136
|
+
pe as Text,
|
|
3137
|
+
wr as TextField,
|
|
3138
|
+
Tr as Textarea,
|
|
3139
|
+
Gt as ThemeProvider,
|
|
3140
|
+
jr as Tooltip,
|
|
3141
|
+
Ae as VStack,
|
|
3142
|
+
xt as accent,
|
|
3143
|
+
It as animations,
|
|
3144
|
+
Tt as borderStyles,
|
|
3145
|
+
Nt as borderWidths,
|
|
3146
|
+
Lt as breakpoints,
|
|
3147
|
+
ye as buildSpacingStyles,
|
|
3148
|
+
wt as colors,
|
|
3149
|
+
N as componentFontSize,
|
|
3150
|
+
E as componentFontWeight,
|
|
3151
|
+
G as componentGap,
|
|
3152
|
+
U as componentHeights,
|
|
3153
|
+
F as componentLineHeight,
|
|
3154
|
+
Z as componentPaddingX,
|
|
3155
|
+
Jr as componentPaddingY,
|
|
3156
|
+
ct as componentTypography,
|
|
3157
|
+
We as containers,
|
|
3158
|
+
Ie as controlSizes,
|
|
3159
|
+
_t as cssVar,
|
|
3160
|
+
I as cx,
|
|
3161
|
+
Yt as darkTheme,
|
|
3162
|
+
st as duration,
|
|
3163
|
+
j as durations,
|
|
3164
|
+
at as easing,
|
|
3165
|
+
R as easings,
|
|
3166
|
+
St as error,
|
|
3167
|
+
J as focusRing,
|
|
3168
|
+
tt as focusRingOffset,
|
|
3169
|
+
Rt as focusRings,
|
|
3170
|
+
ot as focusStyles,
|
|
3171
|
+
P as fontFamilies,
|
|
3172
|
+
ee as fontSizes,
|
|
3173
|
+
oe as fontWeights,
|
|
3174
|
+
dt as generateId,
|
|
3175
|
+
lt as getSpacingValue,
|
|
3176
|
+
Mt as glows,
|
|
3177
|
+
ut as hexToRgba,
|
|
3178
|
+
ie as iconSizes,
|
|
3179
|
+
Ct as info,
|
|
3180
|
+
it as keyframes,
|
|
3181
|
+
Ft as letterSpacings,
|
|
3182
|
+
At as lightTheme,
|
|
3183
|
+
de as lineHeights,
|
|
3184
|
+
jt as mediaQueries,
|
|
3185
|
+
et as modalWidths,
|
|
3186
|
+
zt as neutrals,
|
|
3187
|
+
q as opacity,
|
|
3188
|
+
rt as popoverSizing,
|
|
3189
|
+
$t as primary,
|
|
3190
|
+
Ot as radii,
|
|
3191
|
+
re as scale,
|
|
3192
|
+
Dt as semanticSpacing,
|
|
3193
|
+
Xt as shadows,
|
|
3194
|
+
C as spacing,
|
|
3195
|
+
H as spacingToCss,
|
|
3196
|
+
ue as stateOpacity,
|
|
3197
|
+
Bt as success,
|
|
3198
|
+
Te as switchSizes,
|
|
3199
|
+
Q as textStyles,
|
|
3200
|
+
te as transition,
|
|
3201
|
+
nt as transitionProperties,
|
|
3202
|
+
Et as transitions,
|
|
3203
|
+
kt as useDisclosure,
|
|
3204
|
+
gt as useIsDesktop,
|
|
3205
|
+
bt as useIsMobile,
|
|
3206
|
+
ft as useIsTablet,
|
|
3207
|
+
le as useMediaQuery,
|
|
3208
|
+
ht as usePrefersDarkMode,
|
|
3209
|
+
mt as usePrefersReducedMotion,
|
|
3210
|
+
Kt as useTheme,
|
|
3211
|
+
qt as useThemeColors,
|
|
3212
|
+
Wt as warning,
|
|
3213
|
+
Pt as zIndex
|
|
3214
|
+
};
|
|
3215
|
+
//# sourceMappingURL=index.js.map
|