@dashforge/tw 0.1.0-beta → 0.2.0-beta
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/CHANGELOG.md +108 -0
- package/dist/index.d.ts +1 -82
- package/dist/index.esm.js +1563 -2
- package/dist/src/components/AspectRatio/AspectRatio.d.ts +36 -0
- package/dist/src/components/AspectRatio/AspectRatio.d.ts.map +1 -0
- package/dist/src/components/AspectRatio/aspectRatio.types.d.ts +50 -0
- package/dist/src/components/AspectRatio/aspectRatio.types.d.ts.map +1 -0
- package/dist/src/components/Box/Box.d.ts +36 -0
- package/dist/src/components/Box/Box.d.ts.map +1 -0
- package/dist/src/components/Box/box.types.d.ts +54 -0
- package/dist/src/components/Box/box.types.d.ts.map +1 -0
- package/dist/src/components/Box/box.variants.d.ts +402 -0
- package/dist/src/components/Box/box.variants.d.ts.map +1 -0
- package/dist/src/components/Container/Container.d.ts +35 -0
- package/dist/src/components/Container/Container.d.ts.map +1 -0
- package/dist/src/components/Container/container.types.d.ts +41 -0
- package/dist/src/components/Container/container.types.d.ts.map +1 -0
- package/dist/src/components/Container/container.variants.d.ts +93 -0
- package/dist/src/components/Container/container.variants.d.ts.map +1 -0
- package/dist/src/components/Divider/Divider.d.ts +50 -0
- package/dist/src/components/Divider/Divider.d.ts.map +1 -0
- package/dist/src/components/Divider/divider.types.d.ts +47 -0
- package/dist/src/components/Divider/divider.types.d.ts.map +1 -0
- package/dist/src/components/Divider/divider.variants.d.ts +129 -0
- package/dist/src/components/Divider/divider.variants.d.ts.map +1 -0
- package/dist/src/components/Grid/Grid.d.ts +32 -0
- package/dist/src/components/Grid/Grid.d.ts.map +1 -0
- package/dist/src/components/Grid/grid.types.d.ts +103 -0
- package/dist/src/components/Grid/grid.types.d.ts.map +1 -0
- package/dist/src/components/Grid/grid.variants.d.ts +453 -0
- package/dist/src/components/Grid/grid.variants.d.ts.map +1 -0
- package/dist/src/components/Stack/Stack.d.ts +24 -0
- package/dist/src/components/Stack/Stack.d.ts.map +1 -0
- package/dist/src/components/Stack/stack.types.d.ts +61 -0
- package/dist/src/components/Stack/stack.types.d.ts.map +1 -0
- package/dist/src/components/Stack/stack.variants.d.ts +163 -0
- package/dist/src/components/Stack/stack.variants.d.ts.map +1 -0
- package/dist/src/components/Typography/Typography.d.ts +42 -0
- package/dist/src/components/Typography/Typography.d.ts.map +1 -0
- package/dist/src/components/Typography/typography.types.d.ts +61 -0
- package/dist/src/components/Typography/typography.types.d.ts.map +1 -0
- package/dist/src/components/Typography/typography.variants.d.ts +167 -0
- package/dist/src/components/Typography/typography.variants.d.ts.map +1 -0
- package/dist/src/components/VisuallyHidden/VisuallyHidden.d.ts +42 -0
- package/dist/src/components/VisuallyHidden/VisuallyHidden.d.ts.map +1 -0
- package/dist/src/components/VisuallyHidden/visuallyHidden.types.d.ts +42 -0
- package/dist/src/components/VisuallyHidden/visuallyHidden.types.d.ts.map +1 -0
- package/dist/src/index.d.ts +22 -0
- package/dist/src/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/components/AspectRatio/AspectRatio.test.tsx +173 -0
- package/src/components/AspectRatio/AspectRatio.tsx +73 -0
- package/src/components/AspectRatio/aspectRatio.types.ts +54 -0
- package/src/components/Box/Box.test.tsx +349 -0
- package/src/components/Box/Box.tsx +83 -0
- package/src/components/Box/box.types.ts +61 -0
- package/src/components/Box/box.variants.ts +211 -0
- package/src/components/Container/Container.test.tsx +209 -0
- package/src/components/Container/Container.tsx +74 -0
- package/src/components/Container/container.types.ts +45 -0
- package/src/components/Container/container.variants.ts +81 -0
- package/src/components/Divider/Divider.test.tsx +241 -0
- package/src/components/Divider/Divider.tsx +140 -0
- package/src/components/Divider/divider.types.ts +52 -0
- package/src/components/Divider/divider.variants.ts +115 -0
- package/src/components/Grid/Grid.test.tsx +321 -0
- package/src/components/Grid/Grid.tsx +148 -0
- package/src/components/Grid/grid.types.ts +112 -0
- package/src/components/Grid/grid.variants.ts +133 -0
- package/src/components/Stack/Stack.test.tsx +309 -0
- package/src/components/Stack/Stack.tsx +115 -0
- package/src/components/Stack/stack.types.ts +68 -0
- package/src/components/Stack/stack.variants.ts +80 -0
- package/src/components/Typography/Typography.test.tsx +230 -0
- package/src/components/Typography/Typography.tsx +112 -0
- package/src/components/Typography/typography.types.ts +65 -0
- package/src/components/Typography/typography.variants.ts +113 -0
- package/src/components/VisuallyHidden/VisuallyHidden.test.tsx +86 -0
- package/src/components/VisuallyHidden/VisuallyHidden.tsx +59 -0
- package/src/components/VisuallyHidden/visuallyHidden.types.ts +45 -0
- package/src/index.ts +49 -0
- package/dist/components/AppShell/AppShell.d.ts +0 -32
- package/dist/components/AppShell/AppShell.d.ts.map +0 -1
- package/dist/components/AppShell/appShell.types.d.ts +0 -62
- package/dist/components/AppShell/appShell.types.d.ts.map +0 -1
- package/dist/components/AppShell/appShell.variants.d.ts +0 -65
- package/dist/components/AppShell/appShell.variants.d.ts.map +0 -1
- package/dist/components/Autocomplete/Autocomplete.d.ts +0 -32
- package/dist/components/Autocomplete/Autocomplete.d.ts.map +0 -1
- package/dist/components/Autocomplete/autocomplete.types.d.ts +0 -214
- package/dist/components/Autocomplete/autocomplete.types.d.ts.map +0 -1
- package/dist/components/Autocomplete/autocomplete.variants.d.ts +0 -214
- package/dist/components/Autocomplete/autocomplete.variants.d.ts.map +0 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +0 -23
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts.map +0 -1
- package/dist/components/Breadcrumbs/breadcrumbs.types.d.ts +0 -98
- package/dist/components/Breadcrumbs/breadcrumbs.types.d.ts.map +0 -1
- package/dist/components/Breadcrumbs/breadcrumbs.variants.d.ts +0 -85
- package/dist/components/Breadcrumbs/breadcrumbs.variants.d.ts.map +0 -1
- package/dist/components/Button/Button.d.ts +0 -44
- package/dist/components/Button/Button.d.ts.map +0 -1
- package/dist/components/Button/button.types.d.ts +0 -66
- package/dist/components/Button/button.types.d.ts.map +0 -1
- package/dist/components/Button/button.variants.d.ts +0 -104
- package/dist/components/Button/button.variants.d.ts.map +0 -1
- package/dist/components/Checkbox/Checkbox.d.ts +0 -31
- package/dist/components/Checkbox/Checkbox.d.ts.map +0 -1
- package/dist/components/Checkbox/checkbox.types.d.ts +0 -86
- package/dist/components/Checkbox/checkbox.types.d.ts.map +0 -1
- package/dist/components/Checkbox/checkbox.variants.d.ts +0 -109
- package/dist/components/Checkbox/checkbox.variants.d.ts.map +0 -1
- package/dist/components/ConfirmDialog/ConfirmDialog.d.ts +0 -38
- package/dist/components/ConfirmDialog/ConfirmDialog.d.ts.map +0 -1
- package/dist/components/ConfirmDialog/confirmDialog.types.d.ts +0 -80
- package/dist/components/ConfirmDialog/confirmDialog.types.d.ts.map +0 -1
- package/dist/components/ConfirmDialog/confirmDialog.variants.d.ts +0 -90
- package/dist/components/ConfirmDialog/confirmDialog.variants.d.ts.map +0 -1
- package/dist/components/DateTimePicker/DateTimePicker.d.ts +0 -49
- package/dist/components/DateTimePicker/DateTimePicker.d.ts.map +0 -1
- package/dist/components/DateTimePicker/dateTimePicker.types.d.ts +0 -95
- package/dist/components/DateTimePicker/dateTimePicker.types.d.ts.map +0 -1
- package/dist/components/DateTimePicker/dateTimePicker.variants.d.ts +0 -165
- package/dist/components/DateTimePicker/dateTimePicker.variants.d.ts.map +0 -1
- package/dist/components/LeftNav/LeftNav.d.ts +0 -34
- package/dist/components/LeftNav/LeftNav.d.ts.map +0 -1
- package/dist/components/LeftNav/leftNav.types.d.ts +0 -136
- package/dist/components/LeftNav/leftNav.types.d.ts.map +0 -1
- package/dist/components/LeftNav/leftNav.variants.d.ts +0 -143
- package/dist/components/LeftNav/leftNav.variants.d.ts.map +0 -1
- package/dist/components/NumberField/NumberField.d.ts +0 -18
- package/dist/components/NumberField/NumberField.d.ts.map +0 -1
- package/dist/components/NumberField/numberField.types.d.ts +0 -79
- package/dist/components/NumberField/numberField.types.d.ts.map +0 -1
- package/dist/components/NumberField/numberField.variants.d.ts +0 -169
- package/dist/components/NumberField/numberField.variants.d.ts.map +0 -1
- package/dist/components/OTPField/OTPField.d.ts +0 -25
- package/dist/components/OTPField/OTPField.d.ts.map +0 -1
- package/dist/components/OTPField/otpField.types.d.ts +0 -74
- package/dist/components/OTPField/otpField.types.d.ts.map +0 -1
- package/dist/components/OTPField/otpField.variants.d.ts +0 -105
- package/dist/components/OTPField/otpField.variants.d.ts.map +0 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +0 -35
- package/dist/components/RadioGroup/RadioGroup.d.ts.map +0 -1
- package/dist/components/RadioGroup/radioGroup.types.d.ts +0 -103
- package/dist/components/RadioGroup/radioGroup.types.d.ts.map +0 -1
- package/dist/components/RadioGroup/radioGroup.variants.d.ts +0 -166
- package/dist/components/RadioGroup/radioGroup.variants.d.ts.map +0 -1
- package/dist/components/Snackbar/Snackbar.d.ts +0 -37
- package/dist/components/Snackbar/Snackbar.d.ts.map +0 -1
- package/dist/components/Snackbar/snackbar.types.d.ts +0 -86
- package/dist/components/Snackbar/snackbar.types.d.ts.map +0 -1
- package/dist/components/Snackbar/snackbar.variants.d.ts +0 -153
- package/dist/components/Snackbar/snackbar.variants.d.ts.map +0 -1
- package/dist/components/Switch/Switch.d.ts +0 -15
- package/dist/components/Switch/Switch.d.ts.map +0 -1
- package/dist/components/Switch/switch.types.d.ts +0 -47
- package/dist/components/Switch/switch.types.d.ts.map +0 -1
- package/dist/components/Switch/switch.variants.d.ts +0 -105
- package/dist/components/Switch/switch.variants.d.ts.map +0 -1
- package/dist/components/TextField/TextField.d.ts +0 -25
- package/dist/components/TextField/TextField.d.ts.map +0 -1
- package/dist/components/TextField/textField.types.d.ts +0 -72
- package/dist/components/TextField/textField.types.d.ts.map +0 -1
- package/dist/components/TextField/textField.variants.d.ts +0 -160
- package/dist/components/TextField/textField.variants.d.ts.map +0 -1
- package/dist/components/Textarea/Textarea.d.ts +0 -16
- package/dist/components/Textarea/Textarea.d.ts.map +0 -1
- package/dist/components/Textarea/textarea.types.d.ts +0 -63
- package/dist/components/Textarea/textarea.types.d.ts.map +0 -1
- package/dist/components/Textarea/textarea.variants.d.ts +0 -197
- package/dist/components/Textarea/textarea.variants.d.ts.map +0 -1
- package/dist/components/TopBar/TopBar.d.ts +0 -33
- package/dist/components/TopBar/TopBar.d.ts.map +0 -1
- package/dist/components/TopBar/topBar.types.d.ts +0 -49
- package/dist/components/TopBar/topBar.types.d.ts.map +0 -1
- package/dist/components/TopBar/topBar.variants.d.ts +0 -79
- package/dist/components/TopBar/topBar.variants.d.ts.map +0 -1
- package/dist/components/_shared/resolveValidationState.d.ts +0 -42
- package/dist/components/_shared/resolveValidationState.d.ts.map +0 -1
- package/dist/hooks/useAccessState.d.ts +0 -37
- package/dist/hooks/useAccessState.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/tsconfig.lib.tsbuildinfo +0 -1
- package/dist/utils/cn.d.ts +0 -26
- package/dist/utils/cn.d.ts.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"autocomplete.types.d.ts","sourceRoot":"","sources":["../../../src/components/Autocomplete/autocomplete.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAEvE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,kBAAkB;IACjC,mCAAmC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,KAAK,EAAE,SAAS,CAAC;IACjB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CA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;IACxB,gEAAgE;IAChE,cAAc,CAAC,EAAE,SAAS,CAAC;IAI3B;;;OAGG;IACH,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,MAAM,CAAC;IAC7C;;;OAGG;IACH,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,SAAS,CAAC;IAChD;;;OAGG;IACH,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC;IACjD;;;;OAIG;IACH,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,MAAM,CAAC;CAC5C"}
|
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
import { type VariantProps } from 'tailwind-variants';
|
|
2
|
-
/**
|
|
3
|
-
* Tailwind-variants recipe for `<Autocomplete>` with slots.
|
|
4
|
-
*
|
|
5
|
-
* Slots:
|
|
6
|
-
* - `root` — outer wrapper (label + combobox + helper/error)
|
|
7
|
-
* - `label` — text label above the input
|
|
8
|
-
* - `requiredMark` — red `*` for required fields
|
|
9
|
-
* - `inputWrapper` — surface holding the input + clear/trigger buttons
|
|
10
|
-
* - `input` — the typeable text input
|
|
11
|
-
* - `trigger` — caret / chevron button that opens the popover
|
|
12
|
-
* - `clearButton` — `×` button to clear the current selection
|
|
13
|
-
* - `popover` — floating panel containing the option list
|
|
14
|
-
* - `listBox` — list element wrapping the options
|
|
15
|
-
* - `listItem` — single option row
|
|
16
|
-
* - `emptyState` — fallback when no options match the filter
|
|
17
|
-
* - `helperText` — descriptive line below the input
|
|
18
|
-
* - `errorText` — semantic counterpart for error mode
|
|
19
|
-
* - `chipsList` — wrapper around selected chips (multi-select only)
|
|
20
|
-
* - `chip` — individual selected chip
|
|
21
|
-
* - `chipRemove` — `×` button on a chip
|
|
22
|
-
*/
|
|
23
|
-
export declare const autocompleteVariants: import("tailwind-variants").TVReturnType<{
|
|
24
|
-
size: {
|
|
25
|
-
sm: {
|
|
26
|
-
inputWrapper: string;
|
|
27
|
-
input: string;
|
|
28
|
-
trigger: string;
|
|
29
|
-
clearButton: string;
|
|
30
|
-
};
|
|
31
|
-
md: {
|
|
32
|
-
inputWrapper: string;
|
|
33
|
-
input: string;
|
|
34
|
-
trigger: string;
|
|
35
|
-
clearButton: string;
|
|
36
|
-
};
|
|
37
|
-
lg: {
|
|
38
|
-
inputWrapper: string;
|
|
39
|
-
input: string;
|
|
40
|
-
trigger: string;
|
|
41
|
-
clearButton: string;
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
layout: {
|
|
45
|
-
stacked: {
|
|
46
|
-
root: string;
|
|
47
|
-
};
|
|
48
|
-
inline: {
|
|
49
|
-
root: string;
|
|
50
|
-
label: string;
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
error: {
|
|
54
|
-
true: {
|
|
55
|
-
inputWrapper: string;
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
fullWidth: {
|
|
59
|
-
true: {
|
|
60
|
-
root: string;
|
|
61
|
-
inputWrapper: string;
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
disabled: {
|
|
65
|
-
true: {
|
|
66
|
-
inputWrapper: string;
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
}, {
|
|
70
|
-
root: string;
|
|
71
|
-
label: string;
|
|
72
|
-
requiredMark: string;
|
|
73
|
-
inputWrapper: string[];
|
|
74
|
-
input: string[];
|
|
75
|
-
trigger: string[];
|
|
76
|
-
clearButton: string[];
|
|
77
|
-
popover: string[];
|
|
78
|
-
listBox: string;
|
|
79
|
-
listItem: string[];
|
|
80
|
-
emptyState: string;
|
|
81
|
-
helperText: string;
|
|
82
|
-
errorText: string;
|
|
83
|
-
chipsList: string;
|
|
84
|
-
chip: string[];
|
|
85
|
-
chipRemove: string[];
|
|
86
|
-
}, undefined, {
|
|
87
|
-
size: {
|
|
88
|
-
sm: {
|
|
89
|
-
inputWrapper: string;
|
|
90
|
-
input: string;
|
|
91
|
-
trigger: string;
|
|
92
|
-
clearButton: string;
|
|
93
|
-
};
|
|
94
|
-
md: {
|
|
95
|
-
inputWrapper: string;
|
|
96
|
-
input: string;
|
|
97
|
-
trigger: string;
|
|
98
|
-
clearButton: string;
|
|
99
|
-
};
|
|
100
|
-
lg: {
|
|
101
|
-
inputWrapper: string;
|
|
102
|
-
input: string;
|
|
103
|
-
trigger: string;
|
|
104
|
-
clearButton: string;
|
|
105
|
-
};
|
|
106
|
-
};
|
|
107
|
-
layout: {
|
|
108
|
-
stacked: {
|
|
109
|
-
root: string;
|
|
110
|
-
};
|
|
111
|
-
inline: {
|
|
112
|
-
root: string;
|
|
113
|
-
label: string;
|
|
114
|
-
};
|
|
115
|
-
};
|
|
116
|
-
error: {
|
|
117
|
-
true: {
|
|
118
|
-
inputWrapper: string;
|
|
119
|
-
};
|
|
120
|
-
};
|
|
121
|
-
fullWidth: {
|
|
122
|
-
true: {
|
|
123
|
-
root: string;
|
|
124
|
-
inputWrapper: string;
|
|
125
|
-
};
|
|
126
|
-
};
|
|
127
|
-
disabled: {
|
|
128
|
-
true: {
|
|
129
|
-
inputWrapper: string;
|
|
130
|
-
};
|
|
131
|
-
};
|
|
132
|
-
}, {
|
|
133
|
-
root: string;
|
|
134
|
-
label: string;
|
|
135
|
-
requiredMark: string;
|
|
136
|
-
inputWrapper: string[];
|
|
137
|
-
input: string[];
|
|
138
|
-
trigger: string[];
|
|
139
|
-
clearButton: string[];
|
|
140
|
-
popover: string[];
|
|
141
|
-
listBox: string;
|
|
142
|
-
listItem: string[];
|
|
143
|
-
emptyState: string;
|
|
144
|
-
helperText: string;
|
|
145
|
-
errorText: string;
|
|
146
|
-
chipsList: string;
|
|
147
|
-
chip: string[];
|
|
148
|
-
chipRemove: string[];
|
|
149
|
-
}, import("tailwind-variants").TVReturnType<{
|
|
150
|
-
size: {
|
|
151
|
-
sm: {
|
|
152
|
-
inputWrapper: string;
|
|
153
|
-
input: string;
|
|
154
|
-
trigger: string;
|
|
155
|
-
clearButton: string;
|
|
156
|
-
};
|
|
157
|
-
md: {
|
|
158
|
-
inputWrapper: string;
|
|
159
|
-
input: string;
|
|
160
|
-
trigger: string;
|
|
161
|
-
clearButton: string;
|
|
162
|
-
};
|
|
163
|
-
lg: {
|
|
164
|
-
inputWrapper: string;
|
|
165
|
-
input: string;
|
|
166
|
-
trigger: string;
|
|
167
|
-
clearButton: string;
|
|
168
|
-
};
|
|
169
|
-
};
|
|
170
|
-
layout: {
|
|
171
|
-
stacked: {
|
|
172
|
-
root: string;
|
|
173
|
-
};
|
|
174
|
-
inline: {
|
|
175
|
-
root: string;
|
|
176
|
-
label: string;
|
|
177
|
-
};
|
|
178
|
-
};
|
|
179
|
-
error: {
|
|
180
|
-
true: {
|
|
181
|
-
inputWrapper: string;
|
|
182
|
-
};
|
|
183
|
-
};
|
|
184
|
-
fullWidth: {
|
|
185
|
-
true: {
|
|
186
|
-
root: string;
|
|
187
|
-
inputWrapper: string;
|
|
188
|
-
};
|
|
189
|
-
};
|
|
190
|
-
disabled: {
|
|
191
|
-
true: {
|
|
192
|
-
inputWrapper: string;
|
|
193
|
-
};
|
|
194
|
-
};
|
|
195
|
-
}, {
|
|
196
|
-
root: string;
|
|
197
|
-
label: string;
|
|
198
|
-
requiredMark: string;
|
|
199
|
-
inputWrapper: string[];
|
|
200
|
-
input: string[];
|
|
201
|
-
trigger: string[];
|
|
202
|
-
clearButton: string[];
|
|
203
|
-
popover: string[];
|
|
204
|
-
listBox: string;
|
|
205
|
-
listItem: string[];
|
|
206
|
-
emptyState: string;
|
|
207
|
-
helperText: string;
|
|
208
|
-
errorText: string;
|
|
209
|
-
chipsList: string;
|
|
210
|
-
chip: string[];
|
|
211
|
-
chipRemove: string[];
|
|
212
|
-
}, undefined, unknown, unknown, undefined>>;
|
|
213
|
-
export type AutocompleteVariants = VariantProps<typeof autocompleteVariants>;
|
|
214
|
-
//# sourceMappingURL=autocomplete.variants.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"autocomplete.variants.d.ts","sourceRoot":"","sources":["../../../src/components/Autocomplete/autocomplete.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CA6G/B,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,YAAY,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { BreadcrumbsProps } from './breadcrumbs.types.js';
|
|
2
|
-
/**
|
|
3
|
-
* Dashforge TW Breadcrumbs — router-agnostic navigation trail.
|
|
4
|
-
*
|
|
5
|
-
* Pure presentational. The consumer derives `items` from their routing
|
|
6
|
-
* layer (no automatic location read) — that keeps the component usable
|
|
7
|
-
* with React Router, Next.js App Router, TanStack Router, Wouter, etc.
|
|
8
|
-
*
|
|
9
|
-
* Truncation policy: when `items.length > maxItems > 0`, the middle is
|
|
10
|
-
* collapsed into a non-interactive `…` placeholder. `itemsBeforeCollapse`
|
|
11
|
-
* (default 1) and `itemsAfterCollapse` (default 1) control how many
|
|
12
|
-
* crumbs survive at each end — set both to 0 to keep only first+last,
|
|
13
|
-
* or higher to preserve more context.
|
|
14
|
-
*
|
|
15
|
-
* **A11y**:
|
|
16
|
-
* - `<nav aria-label="Breadcrumb">` landmark
|
|
17
|
-
* - `<ol>` semantic list (screen readers announce position-in-list)
|
|
18
|
-
* - `aria-current="page"` on the last (or `current: true`) crumb
|
|
19
|
-
* - Separator nodes carry `aria-hidden="true"` (decorative)
|
|
20
|
-
* - The truncation ellipsis is a `<span aria-label="More breadcrumbs">`
|
|
21
|
-
*/
|
|
22
|
-
export declare function Breadcrumbs(props: BreadcrumbsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
23
|
-
//# sourceMappingURL=Breadcrumbs.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAEV,gBAAgB,EACjB,MAAM,wBAAwB,CAAC;AAEhC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,kDA8KlD"}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import type { ReactNode, ComponentType, AnchorHTMLAttributes } from 'react';
|
|
2
|
-
import type { BreadcrumbsVariants } from './breadcrumbs.variants.js';
|
|
3
|
-
/**
|
|
4
|
-
* A single crumb in the trail.
|
|
5
|
-
*
|
|
6
|
-
* - `label` is the visible text (or any React node).
|
|
7
|
-
* - `href` makes it a navigation link. Omit for a non-link crumb (e.g.,
|
|
8
|
-
* the current page).
|
|
9
|
-
* - `onClick` is fired in addition to (or instead of) `href`; useful
|
|
10
|
-
* when the consumer wants to intercept SPA navigation.
|
|
11
|
-
* - `current: true` flags the LAST crumb as the active page; gets
|
|
12
|
-
* `aria-current="page"` and is rendered as plain text (no link).
|
|
13
|
-
*/
|
|
14
|
-
export interface BreadcrumbItem {
|
|
15
|
-
/** Stable key for React reconciliation + accessibility id. */
|
|
16
|
-
id: string;
|
|
17
|
-
label: ReactNode;
|
|
18
|
-
href?: string;
|
|
19
|
-
onClick?: (event: React.MouseEvent) => void;
|
|
20
|
-
current?: boolean;
|
|
21
|
-
/** Per-item disabled flag — renders as plain text, no interaction. */
|
|
22
|
-
disabled?: boolean;
|
|
23
|
-
/** Optional icon prepended to the label. */
|
|
24
|
-
icon?: ReactNode;
|
|
25
|
-
}
|
|
26
|
-
export interface BreadcrumbsSlotProps {
|
|
27
|
-
root?: {
|
|
28
|
-
className?: string;
|
|
29
|
-
};
|
|
30
|
-
list?: {
|
|
31
|
-
className?: string;
|
|
32
|
-
};
|
|
33
|
-
item?: {
|
|
34
|
-
className?: string;
|
|
35
|
-
};
|
|
36
|
-
link?: {
|
|
37
|
-
className?: string;
|
|
38
|
-
};
|
|
39
|
-
current?: {
|
|
40
|
-
className?: string;
|
|
41
|
-
};
|
|
42
|
-
separator?: {
|
|
43
|
-
className?: string;
|
|
44
|
-
};
|
|
45
|
-
ellipsis?: {
|
|
46
|
-
className?: string;
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Polymorphic link component prop. Defaults to the native `<a>`.
|
|
51
|
-
*
|
|
52
|
-
* Pass a router-aware component (e.g., `react-router-dom`'s `Link`,
|
|
53
|
-
* Next's `Link`) for SPA navigation. The component must accept
|
|
54
|
-
* `href` (or its router-equivalent — bring your own adapter) plus
|
|
55
|
-
* standard anchor props (className, onClick, children, ref).
|
|
56
|
-
*/
|
|
57
|
-
export type BreadcrumbLinkComponent = ComponentType<AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
58
|
-
ref?: React.Ref<HTMLAnchorElement>;
|
|
59
|
-
}>;
|
|
60
|
-
/**
|
|
61
|
-
* Props for `<Breadcrumbs>`.
|
|
62
|
-
*
|
|
63
|
-
* Renders a router-agnostic navigation trail. Bridge-free — pure
|
|
64
|
-
* presentational, accepts a fully-resolved item list from the consumer
|
|
65
|
-
* (typically derived from route metadata).
|
|
66
|
-
*
|
|
67
|
-
* **Truncation**: when `items.length > maxItems`, the middle crumbs
|
|
68
|
-
* collapse into an ellipsis (`…`). Always preserved: first + last
|
|
69
|
-
* crumb. Tunable via `itemsBeforeCollapse` / `itemsAfterCollapse` for
|
|
70
|
-
* asymmetric trails (defaults: 1 + 1).
|
|
71
|
-
*/
|
|
72
|
-
export interface BreadcrumbsProps extends BreadcrumbsVariants {
|
|
73
|
-
items: BreadcrumbItem[];
|
|
74
|
-
/** Separator node between crumbs. @default '/' */
|
|
75
|
-
separator?: ReactNode;
|
|
76
|
-
/**
|
|
77
|
-
* Max crumbs to show before collapsing the middle. `0` / negative ⇒
|
|
78
|
-
* never collapse. @default 0
|
|
79
|
-
*/
|
|
80
|
-
maxItems?: number;
|
|
81
|
-
/**
|
|
82
|
-
* Crumbs preserved at the START when collapsed. @default 1
|
|
83
|
-
*/
|
|
84
|
-
itemsBeforeCollapse?: number;
|
|
85
|
-
/**
|
|
86
|
-
* Crumbs preserved at the END when collapsed. @default 1
|
|
87
|
-
*/
|
|
88
|
-
itemsAfterCollapse?: number;
|
|
89
|
-
/** Per-slot className overrides. */
|
|
90
|
-
slotProps?: BreadcrumbsSlotProps;
|
|
91
|
-
/** Root className shortcut. */
|
|
92
|
-
sx?: string;
|
|
93
|
-
/** Override the link component (router integration). @default 'a' */
|
|
94
|
-
linkComponent?: BreadcrumbLinkComponent;
|
|
95
|
-
/** Visible label of the nav landmark. @default 'Breadcrumb' */
|
|
96
|
-
ariaLabel?: string;
|
|
97
|
-
}
|
|
98
|
-
//# sourceMappingURL=breadcrumbs.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumbs.types.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumbs/breadcrumbs.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAErE;;;;;;;;;;GAUG;AACH,MAAM,WAAW,cAAc;IAC7B,8DAA8D;IAC9D,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,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AS,CAAC,EAAE,oBAAoB,CAAC;IACjC,+BAA+B;IAC/B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,qEAAqE;IACrE,aAAa,CAAC,EAAE,uBAAuB,CAAC;IACxC,+DAA+D;IAC/D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { type VariantProps } from 'tailwind-variants';
|
|
2
|
-
/**
|
|
3
|
-
* Tailwind-variants recipe for `<Breadcrumbs>`.
|
|
4
|
-
*
|
|
5
|
-
* Slots:
|
|
6
|
-
* - `root` — `<nav>` landmark
|
|
7
|
-
* - `list` — flex `<ol>`
|
|
8
|
-
* - `item` — `<li>` wrapper
|
|
9
|
-
* - `link` — non-current crumb (clickable / focusable)
|
|
10
|
-
* - `current` — last crumb (no link, aria-current="page")
|
|
11
|
-
* - `separator` — between-crumbs marker
|
|
12
|
-
* - `ellipsis` — collapsed-middle placeholder (`…`)
|
|
13
|
-
*/
|
|
14
|
-
export declare const breadcrumbsVariants: import("tailwind-variants").TVReturnType<{
|
|
15
|
-
size: {
|
|
16
|
-
sm: {
|
|
17
|
-
root: string;
|
|
18
|
-
list: string;
|
|
19
|
-
separator: string;
|
|
20
|
-
};
|
|
21
|
-
md: {
|
|
22
|
-
root: string;
|
|
23
|
-
};
|
|
24
|
-
lg: {
|
|
25
|
-
root: string;
|
|
26
|
-
list: string;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
}, {
|
|
30
|
-
root: string;
|
|
31
|
-
list: string;
|
|
32
|
-
item: string;
|
|
33
|
-
link: string[];
|
|
34
|
-
current: string[];
|
|
35
|
-
separator: string;
|
|
36
|
-
ellipsis: string[];
|
|
37
|
-
}, undefined, {
|
|
38
|
-
size: {
|
|
39
|
-
sm: {
|
|
40
|
-
root: string;
|
|
41
|
-
list: string;
|
|
42
|
-
separator: string;
|
|
43
|
-
};
|
|
44
|
-
md: {
|
|
45
|
-
root: string;
|
|
46
|
-
};
|
|
47
|
-
lg: {
|
|
48
|
-
root: string;
|
|
49
|
-
list: string;
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
}, {
|
|
53
|
-
root: string;
|
|
54
|
-
list: string;
|
|
55
|
-
item: string;
|
|
56
|
-
link: string[];
|
|
57
|
-
current: string[];
|
|
58
|
-
separator: string;
|
|
59
|
-
ellipsis: string[];
|
|
60
|
-
}, import("tailwind-variants").TVReturnType<{
|
|
61
|
-
size: {
|
|
62
|
-
sm: {
|
|
63
|
-
root: string;
|
|
64
|
-
list: string;
|
|
65
|
-
separator: string;
|
|
66
|
-
};
|
|
67
|
-
md: {
|
|
68
|
-
root: string;
|
|
69
|
-
};
|
|
70
|
-
lg: {
|
|
71
|
-
root: string;
|
|
72
|
-
list: string;
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
|
-
}, {
|
|
76
|
-
root: string;
|
|
77
|
-
list: string;
|
|
78
|
-
item: string;
|
|
79
|
-
link: string[];
|
|
80
|
-
current: string[];
|
|
81
|
-
separator: string;
|
|
82
|
-
ellipsis: string[];
|
|
83
|
-
}, undefined, unknown, unknown, undefined>>;
|
|
84
|
-
export type BreadcrumbsVariants = VariantProps<typeof breadcrumbsVariants>;
|
|
85
|
-
//# sourceMappingURL=breadcrumbs.variants.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumbs.variants.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumbs/breadcrumbs.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAgC9B,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { ButtonProps } from './button.types.js';
|
|
2
|
-
/**
|
|
3
|
-
* Dashforge TW Button — action component with RBAC support.
|
|
4
|
-
*
|
|
5
|
-
* Mirrors the public contract of the MUI-side
|
|
6
|
-
* `@dashforge/ui/Button` (RBAC behaviour identical) while rendering
|
|
7
|
-
* through Tailwind classes + the `dashforgePreset` color scales. Like
|
|
8
|
-
* the MUI version, this is NOT a form field — there is no bridge
|
|
9
|
-
* integration and no `DashFormContext` consumption.
|
|
10
|
-
*
|
|
11
|
-
* **`asChild`** mirrors the shadcn/Radix pattern: when set, the
|
|
12
|
-
* immediate child element receives the Button's resolved className
|
|
13
|
-
* and the Button DOM is not emitted. Useful for router Links, anchor
|
|
14
|
-
* tags, or any element that should look like a button without
|
|
15
|
-
* nesting one inside it.
|
|
16
|
-
*
|
|
17
|
-
* **Override precedence**: `sx` wins over variant classes via
|
|
18
|
-
* `tailwind-merge` inside `cn()`. Variants win over the `base` class
|
|
19
|
-
* group (TV's `compoundVariants` handle color×variant combos
|
|
20
|
-
* explicitly).
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* ```tsx
|
|
24
|
-
* <Button onClick={onSave}>Save</Button>
|
|
25
|
-
*
|
|
26
|
-
* <Button variant="outline" color="danger" size="lg" sx="ml-4">
|
|
27
|
-
* Delete
|
|
28
|
-
* </Button>
|
|
29
|
-
*
|
|
30
|
-
* <Button asChild variant="solid" color="primary">
|
|
31
|
-
* <Link to="/dashboard">Open Dashboard</Link>
|
|
32
|
-
* </Button>
|
|
33
|
-
*
|
|
34
|
-
* <Button
|
|
35
|
-
* loading
|
|
36
|
-
* access={{ resource: 'article', action: 'publish', onUnauthorized: 'disable' }}
|
|
37
|
-
* onClick={onPublish}
|
|
38
|
-
* >
|
|
39
|
-
* Publish
|
|
40
|
-
* </Button>
|
|
41
|
-
* ```
|
|
42
|
-
*/
|
|
43
|
-
export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
44
|
-
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AA8BrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,eAAO,MAAM,MAAM,2GA8DjB,CAAC"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import type { ButtonHTMLAttributes } from 'react';
|
|
2
|
-
import type { AccessRequirement } from '@dashforge/rbac';
|
|
3
|
-
import type { ButtonVariants } from './button.variants.js';
|
|
4
|
-
/**
|
|
5
|
-
* Props for the Dashforge TW `<Button>` component.
|
|
6
|
-
*
|
|
7
|
-
* Extends the native `<button>` attributes (so `onClick`, `type`,
|
|
8
|
-
* `aria-*`, `data-*` etc. all flow through), narrowed in two places:
|
|
9
|
-
*
|
|
10
|
-
* - `disabled` is kept (combines with RBAC + loading via OR)
|
|
11
|
-
* - `className` is omitted — use `sx` instead. This keeps the
|
|
12
|
-
* override path **single and explicit**: `sx` is the escape hatch
|
|
13
|
-
* for adding utility classes, and `tailwind-merge` (via `cn()`)
|
|
14
|
-
* guarantees it wins over any conflicting variant class.
|
|
15
|
-
*
|
|
16
|
-
* Plus the variant axes from `tailwind-variants` and Dashforge-specific
|
|
17
|
-
* additions:
|
|
18
|
-
*
|
|
19
|
-
* - `access` — RBAC requirement (hide / disable / readonly)
|
|
20
|
-
* - `asChild` — Radix Slot polymorphism: when `true`, renders the
|
|
21
|
-
* immediate child element with the Button's class merged in, so
|
|
22
|
-
* `<Button asChild><a href="/x">Go</a></Button>` produces a styled
|
|
23
|
-
* `<a>` with no extra wrapper DOM
|
|
24
|
-
*/
|
|
25
|
-
export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'className' | 'color'>, Pick<ButtonVariants, 'variant' | 'color' | 'size' | 'fullWidth' | 'loading'> {
|
|
26
|
-
/**
|
|
27
|
-
* RBAC access control requirement.
|
|
28
|
-
*
|
|
29
|
-
* Controls button visibility and interaction based on user
|
|
30
|
-
* permissions:
|
|
31
|
-
* - `onUnauthorized: 'hide'` → button does not render
|
|
32
|
-
* - `onUnauthorized: 'disable'` → button renders disabled
|
|
33
|
-
* - `onUnauthorized: 'readonly'` → button renders disabled
|
|
34
|
-
* (buttons do not support true readonly semantics; disabled is
|
|
35
|
-
* used as fallback)
|
|
36
|
-
*
|
|
37
|
-
* Combines with `disabled` and `loading` props via OR logic.
|
|
38
|
-
*/
|
|
39
|
-
access?: AccessRequirement;
|
|
40
|
-
/**
|
|
41
|
-
* When `true`, the immediate child element is rendered with the
|
|
42
|
-
* Button's classes merged in (via `@radix-ui/react-slot`). The
|
|
43
|
-
* Button DOM element is not emitted.
|
|
44
|
-
*
|
|
45
|
-
* Common pattern: render a router `Link` with Button styling.
|
|
46
|
-
*
|
|
47
|
-
* @example
|
|
48
|
-
* ```tsx
|
|
49
|
-
* <Button asChild variant="solid">
|
|
50
|
-
* <Link to="/dashboard">Dashboard</Link>
|
|
51
|
-
* </Button>
|
|
52
|
-
* ```
|
|
53
|
-
*/
|
|
54
|
-
asChild?: boolean;
|
|
55
|
-
/**
|
|
56
|
-
* Tailwind utility classes appended **after** the variant classes,
|
|
57
|
-
* so they win on any conflict via `tailwind-merge`.
|
|
58
|
-
*
|
|
59
|
-
* @example
|
|
60
|
-
* ```tsx
|
|
61
|
-
* <Button sx="md:w-1/2 shadow-xl">Save</Button>
|
|
62
|
-
* ```
|
|
63
|
-
*/
|
|
64
|
-
sx?: string;
|
|
65
|
-
}
|
|
66
|
-
//# sourceMappingURL=button.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"button.types.d.ts","sourceRoot":"","sources":["../../../src/components/Button/button.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,WAAW,WAKf,SAAQ,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,EAC1E,IAAI,CAAC,cAAc,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,WAAW,GAAG,SAAS,CAAC;IAC9E;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAE3B;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;;;;;OAQG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;CACb"}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { type VariantProps } from 'tailwind-variants';
|
|
2
|
-
/**
|
|
3
|
-
* Tailwind-variants recipe for `<Button>`.
|
|
4
|
-
*
|
|
5
|
-
* Three independent axes plus two booleans:
|
|
6
|
-
* - `variant`: visual treatment (solid / outline / ghost / link)
|
|
7
|
-
* - `color`: semantic intent role (primary / secondary / success /
|
|
8
|
-
* warning / danger)
|
|
9
|
-
* - `size`: sm / md / lg
|
|
10
|
-
* - `fullWidth`: stretches to container width
|
|
11
|
-
* - `loading`: visually + functionally disabled, used together with
|
|
12
|
-
* an inline spinner rendered by the component
|
|
13
|
-
*
|
|
14
|
-
* Color × variant combinations are expressed via `compoundVariants` so
|
|
15
|
-
* each pair owns its bg / text / border / hover / focus quartet without
|
|
16
|
-
* a `dark:` variant explosion. Dark mode swap is delegated entirely to
|
|
17
|
-
* the runtime CSS-vars from `@dashforge/tw-theme` — the same class
|
|
18
|
-
* resolves to a different value when `data-dash-tw-theme="dark"` flips.
|
|
19
|
-
*
|
|
20
|
-
* Token references:
|
|
21
|
-
* - Surface bg / border / text → `*-primary-*`, `*-danger-*`, etc.
|
|
22
|
-
* (resolved via `dashforgePreset()`)
|
|
23
|
-
* - Hover / focus / active states→ one tone deeper on the same scale
|
|
24
|
-
* (`primary-600` from `primary-500`)
|
|
25
|
-
* - Disabled → opacity drop + no pointer-events
|
|
26
|
-
*/
|
|
27
|
-
export declare const buttonVariants: import("tailwind-variants").TVReturnType<{
|
|
28
|
-
variant: {
|
|
29
|
-
solid: string;
|
|
30
|
-
outline: string;
|
|
31
|
-
ghost: string;
|
|
32
|
-
link: string;
|
|
33
|
-
};
|
|
34
|
-
color: {
|
|
35
|
-
primary: string;
|
|
36
|
-
secondary: string;
|
|
37
|
-
success: string;
|
|
38
|
-
warning: string;
|
|
39
|
-
danger: string;
|
|
40
|
-
};
|
|
41
|
-
size: {
|
|
42
|
-
sm: string;
|
|
43
|
-
md: string;
|
|
44
|
-
lg: string;
|
|
45
|
-
};
|
|
46
|
-
fullWidth: {
|
|
47
|
-
true: string;
|
|
48
|
-
};
|
|
49
|
-
loading: {
|
|
50
|
-
true: string;
|
|
51
|
-
};
|
|
52
|
-
}, undefined, string[], {
|
|
53
|
-
variant: {
|
|
54
|
-
solid: string;
|
|
55
|
-
outline: string;
|
|
56
|
-
ghost: string;
|
|
57
|
-
link: string;
|
|
58
|
-
};
|
|
59
|
-
color: {
|
|
60
|
-
primary: string;
|
|
61
|
-
secondary: string;
|
|
62
|
-
success: string;
|
|
63
|
-
warning: string;
|
|
64
|
-
danger: string;
|
|
65
|
-
};
|
|
66
|
-
size: {
|
|
67
|
-
sm: string;
|
|
68
|
-
md: string;
|
|
69
|
-
lg: string;
|
|
70
|
-
};
|
|
71
|
-
fullWidth: {
|
|
72
|
-
true: string;
|
|
73
|
-
};
|
|
74
|
-
loading: {
|
|
75
|
-
true: string;
|
|
76
|
-
};
|
|
77
|
-
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
78
|
-
variant: {
|
|
79
|
-
solid: string;
|
|
80
|
-
outline: string;
|
|
81
|
-
ghost: string;
|
|
82
|
-
link: string;
|
|
83
|
-
};
|
|
84
|
-
color: {
|
|
85
|
-
primary: string;
|
|
86
|
-
secondary: string;
|
|
87
|
-
success: string;
|
|
88
|
-
warning: string;
|
|
89
|
-
danger: string;
|
|
90
|
-
};
|
|
91
|
-
size: {
|
|
92
|
-
sm: string;
|
|
93
|
-
md: string;
|
|
94
|
-
lg: string;
|
|
95
|
-
};
|
|
96
|
-
fullWidth: {
|
|
97
|
-
true: string;
|
|
98
|
-
};
|
|
99
|
-
loading: {
|
|
100
|
-
true: string;
|
|
101
|
-
};
|
|
102
|
-
}, undefined, string[], unknown, unknown, undefined>>;
|
|
103
|
-
export type ButtonVariants = VariantProps<typeof buttonVariants>;
|
|
104
|
-
//# sourceMappingURL=button.variants.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"button.variants.d.ts","sourceRoot":"","sources":["../../../src/components/Button/button.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qDAiIzB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC"}
|