@directo-ui/web 0.0.0-stage → 1.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 +44 -2
- package/dist/bundle.d.ts +2 -0
- package/dist/components/Accordion.d.ts +16 -0
- package/dist/components/Alert.d.ts +14 -0
- package/dist/components/Avatar.d.ts +16 -0
- package/dist/components/Badge.d.ts +11 -0
- package/dist/components/BottomSheet.d.ts +9 -0
- package/dist/components/Breadcrumb.d.ts +15 -0
- package/dist/components/Button.d.ts +3 -0
- package/dist/components/Card.d.ts +15 -0
- package/dist/components/Checkbox.d.ts +4 -0
- package/dist/components/DatePicker.d.ts +15 -0
- package/dist/components/Dialog.d.ts +28 -0
- package/dist/components/Divider.d.ts +6 -0
- package/dist/components/Dropdown.d.ts +20 -0
- package/dist/components/EmptyState.d.ts +9 -0
- package/dist/components/IconButton.d.ts +10 -0
- package/dist/components/Loading.d.ts +31 -0
- package/dist/components/Pagination.d.ts +9 -0
- package/dist/components/RadioGroup.d.ts +6 -0
- package/dist/components/Select.d.ts +5 -0
- package/dist/components/SlidingButton.d.ts +7 -0
- package/dist/components/Switch.d.ts +4 -0
- package/dist/components/Tabs.d.ts +6 -0
- package/dist/components/TextField.d.ts +11 -0
- package/dist/components/Textarea.d.ts +10 -0
- package/dist/components/Toast.d.ts +7 -0
- package/dist/components/Tooltip.d.ts +10 -0
- package/dist/components/index.d.ts +28 -0
- package/dist/core/dates.d.ts +6 -0
- package/dist/core/generated.d.ts +34 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/core/pagination.d.ts +3 -0
- package/dist/core/toast.d.ts +19 -0
- package/dist/core/tokens.d.ts +178 -0
- package/dist/core/types.d.ts +227 -0
- package/dist/figma-components-directo.js +1288 -0
- package/dist/figma-components-directo.js.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/styles.css +2 -0
- package/dist/tokens.css +321 -0
- package/dist/wari/MultiSelect.d.ts +44 -0
- package/dist/wari/StatusTag.d.ts +14 -0
- package/dist/wari/WariDateField.d.ts +28 -0
- package/dist/wari/WariSchedule.d.ts +32 -0
- package/dist/wari/WariSelect.d.ts +29 -0
- package/dist/wari/WariServiceMeta.d.ts +8 -0
- package/dist/wari/WariStatusSelect.d.ts +14 -0
- package/dist/wari/WariStepper.d.ts +16 -0
- package/dist/wari/WariSwitchList.d.ts +17 -0
- package/dist/wari/WariTimeField.d.ts +23 -0
- package/dist/wari/WariTripAttributes.d.ts +24 -0
- package/dist/wari/datetime.d.ts +57 -0
- package/dist/wari/icons.d.ts +16 -0
- package/dist/wari/index.d.ts +30 -0
- package/dist/wari/logic.d.ts +14 -0
- package/dist/wari/statuses.d.ts +34 -0
- package/dist/wari/trip.d.ts +56 -0
- package/dist/wari.js +1735 -0
- package/dist/wari.js.map +1 -0
- package/package.json +55 -4
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
export { colors } from './generated.js';
|
|
2
|
+
export declare const spacing: {
|
|
3
|
+
readonly 0: 0;
|
|
4
|
+
readonly 1: 4;
|
|
5
|
+
readonly 2: 8;
|
|
6
|
+
readonly 3: 12;
|
|
7
|
+
readonly 4: 16;
|
|
8
|
+
readonly 5: 20;
|
|
9
|
+
readonly 6: 24;
|
|
10
|
+
readonly 8: 32;
|
|
11
|
+
readonly 10: 40;
|
|
12
|
+
readonly 12: 48;
|
|
13
|
+
readonly 16: 64;
|
|
14
|
+
readonly md: 8;
|
|
15
|
+
readonly lg: 12;
|
|
16
|
+
readonly xl: 16;
|
|
17
|
+
};
|
|
18
|
+
export declare const radii: {
|
|
19
|
+
readonly none: 0;
|
|
20
|
+
readonly sm: 4;
|
|
21
|
+
readonly md: 8;
|
|
22
|
+
readonly lg: 12;
|
|
23
|
+
readonly xl: 16;
|
|
24
|
+
readonly '2xl': 24;
|
|
25
|
+
readonly full: 9999;
|
|
26
|
+
};
|
|
27
|
+
export declare const fontSize: {
|
|
28
|
+
readonly xs: 12;
|
|
29
|
+
readonly sm: 14;
|
|
30
|
+
readonly md: 14;
|
|
31
|
+
readonly lg: 16;
|
|
32
|
+
readonly xl: 16;
|
|
33
|
+
readonly '2xl': 18;
|
|
34
|
+
readonly '3xl': 20;
|
|
35
|
+
};
|
|
36
|
+
export declare const fontWeight: {
|
|
37
|
+
regular: "400";
|
|
38
|
+
medium: "500";
|
|
39
|
+
semibold: "600";
|
|
40
|
+
bold: "700";
|
|
41
|
+
};
|
|
42
|
+
export declare const lineHeight: {
|
|
43
|
+
readonly tight: 1.25;
|
|
44
|
+
readonly normal: 1.5;
|
|
45
|
+
readonly relaxed: 1.75;
|
|
46
|
+
};
|
|
47
|
+
export declare const buttonTokens: {
|
|
48
|
+
readonly sizes: {
|
|
49
|
+
readonly xs: {
|
|
50
|
+
readonly height: 32;
|
|
51
|
+
readonly paddingX: 12;
|
|
52
|
+
readonly paddingY: 0;
|
|
53
|
+
readonly gap: 4;
|
|
54
|
+
readonly radius: 12;
|
|
55
|
+
readonly fontSize: 14;
|
|
56
|
+
readonly iconSize: 16;
|
|
57
|
+
};
|
|
58
|
+
readonly sm: {
|
|
59
|
+
readonly height: 36;
|
|
60
|
+
readonly paddingX: 12;
|
|
61
|
+
readonly paddingY: 0;
|
|
62
|
+
readonly gap: 4;
|
|
63
|
+
readonly radius: 12;
|
|
64
|
+
readonly fontSize: 14;
|
|
65
|
+
readonly iconSize: 20;
|
|
66
|
+
};
|
|
67
|
+
readonly md: {
|
|
68
|
+
readonly height: 40;
|
|
69
|
+
readonly paddingX: 14;
|
|
70
|
+
readonly paddingY: 0;
|
|
71
|
+
readonly gap: 8;
|
|
72
|
+
readonly radius: 12;
|
|
73
|
+
readonly fontSize: 14;
|
|
74
|
+
readonly iconSize: 20;
|
|
75
|
+
};
|
|
76
|
+
readonly lg: {
|
|
77
|
+
readonly height: 44;
|
|
78
|
+
readonly paddingX: 16;
|
|
79
|
+
readonly paddingY: 0;
|
|
80
|
+
readonly gap: 8;
|
|
81
|
+
readonly radius: 16;
|
|
82
|
+
readonly fontSize: 16;
|
|
83
|
+
readonly iconSize: 20;
|
|
84
|
+
};
|
|
85
|
+
readonly xl: {
|
|
86
|
+
readonly height: 48;
|
|
87
|
+
readonly paddingX: 16;
|
|
88
|
+
readonly paddingY: 0;
|
|
89
|
+
readonly gap: 8;
|
|
90
|
+
readonly radius: 16;
|
|
91
|
+
readonly fontSize: 16;
|
|
92
|
+
readonly iconSize: 20;
|
|
93
|
+
};
|
|
94
|
+
readonly '2xl': {
|
|
95
|
+
readonly height: 56;
|
|
96
|
+
readonly paddingX: 16;
|
|
97
|
+
readonly paddingY: 0;
|
|
98
|
+
readonly gap: 8;
|
|
99
|
+
readonly radius: 16;
|
|
100
|
+
readonly fontSize: 18;
|
|
101
|
+
readonly iconSize: 24;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
readonly variants: {
|
|
105
|
+
readonly primary: {
|
|
106
|
+
readonly bg: "#0A50E6";
|
|
107
|
+
readonly bgHover: "#0840B8";
|
|
108
|
+
readonly bgPressed: "#3A71EF";
|
|
109
|
+
readonly text: "#FFFFFF";
|
|
110
|
+
readonly border: "transparent";
|
|
111
|
+
};
|
|
112
|
+
readonly secondary: {
|
|
113
|
+
readonly bg: "#E2E6F0";
|
|
114
|
+
readonly bgHover: "#CAD0E0";
|
|
115
|
+
readonly bgPressed: "#A9B0C4";
|
|
116
|
+
readonly text: "#1E222B";
|
|
117
|
+
readonly border: "transparent";
|
|
118
|
+
};
|
|
119
|
+
readonly tertiary: {
|
|
120
|
+
readonly bg: "transparent";
|
|
121
|
+
readonly bgHover: "#E2E6F0";
|
|
122
|
+
readonly bgPressed: "#CAD0E0";
|
|
123
|
+
readonly text: "#0A50E6";
|
|
124
|
+
readonly border: "#0A50E6";
|
|
125
|
+
};
|
|
126
|
+
readonly text: {
|
|
127
|
+
readonly bg: "transparent";
|
|
128
|
+
readonly bgHover: "#E2E6F0";
|
|
129
|
+
readonly bgPressed: "#CAD0E0";
|
|
130
|
+
readonly text: "#0A50E6";
|
|
131
|
+
readonly border: "transparent";
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
export declare const switchTokens: {
|
|
136
|
+
readonly trackWidth: 52;
|
|
137
|
+
readonly trackHeight: 32;
|
|
138
|
+
readonly handleSize: 24;
|
|
139
|
+
readonly handlePressedSize: 28;
|
|
140
|
+
readonly handleRadius: 23;
|
|
141
|
+
readonly trackRadius: 100;
|
|
142
|
+
readonly handleDisabledRadius: 100;
|
|
143
|
+
readonly on: {
|
|
144
|
+
readonly track: "#0A50E6";
|
|
145
|
+
readonly handle: "#FFFFFF";
|
|
146
|
+
readonly hoverHandle: "#CEDCFA";
|
|
147
|
+
readonly pressedHandle: "#CEDCFA";
|
|
148
|
+
readonly stateLayer: "rgba(10, 80, 230, 0.15)";
|
|
149
|
+
};
|
|
150
|
+
readonly off: {
|
|
151
|
+
readonly track: "#DADBDE";
|
|
152
|
+
readonly handle: "#FFFFFF";
|
|
153
|
+
readonly hoverHandle: "rgba(71, 77, 89, 0.15)";
|
|
154
|
+
readonly pressedHandle: "rgba(71, 77, 89, 0.15)";
|
|
155
|
+
readonly stateLayer: "rgba(28, 27, 31, 0.12)";
|
|
156
|
+
};
|
|
157
|
+
readonly disabled: {
|
|
158
|
+
readonly handle: "rgba(71, 77, 89, 0.15)";
|
|
159
|
+
readonly trackBorder: "#DADBDE";
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
export declare const checkboxTokens: {
|
|
163
|
+
readonly size: 20;
|
|
164
|
+
readonly borderWidth: 2;
|
|
165
|
+
readonly radius: 4;
|
|
166
|
+
readonly checkSize: 12;
|
|
167
|
+
readonly checkedBg: "#0A50E6";
|
|
168
|
+
readonly uncheckedBorder: "#A9B0C4";
|
|
169
|
+
readonly checkColor: "#FFFFFF";
|
|
170
|
+
};
|
|
171
|
+
export declare const radioTokens: {
|
|
172
|
+
readonly size: 20;
|
|
173
|
+
readonly borderWidth: 2;
|
|
174
|
+
readonly indicatorSize: 10;
|
|
175
|
+
readonly selectedBorder: "#0A50E6";
|
|
176
|
+
readonly unselectedBorder: "#A9B0C4";
|
|
177
|
+
readonly indicatorColor: "#0A50E6";
|
|
178
|
+
};
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import type { CheckboxProps as PrimitiveCheckboxProps } from '@radix-ui/react-checkbox';
|
|
2
|
+
import type { SwitchProps as PrimitiveSwitchProps } from '@radix-ui/react-switch';
|
|
3
|
+
import type { SelectProps as PrimitiveSelectProps } from '@radix-ui/react-select';
|
|
4
|
+
import type { DialogProps as PrimitiveDialogProps, DialogContentProps as PrimitiveDialogContentProps } from '@radix-ui/react-dialog';
|
|
5
|
+
export interface TabsProps {
|
|
6
|
+
defaultValue?: string;
|
|
7
|
+
value?: string;
|
|
8
|
+
onValueChange?: (value: string) => void;
|
|
9
|
+
orientation?: 'horizontal' | 'vertical';
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export interface TabListProps {
|
|
13
|
+
variant?: 'default' | 'pills' | 'underline' | 'enclosed';
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export interface TabProps {
|
|
17
|
+
value: string;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
}
|
|
21
|
+
export interface TabPanelProps {
|
|
22
|
+
value: string;
|
|
23
|
+
children: React.ReactNode;
|
|
24
|
+
}
|
|
25
|
+
export interface SelectProps extends PrimitiveSelectProps {
|
|
26
|
+
id?: string;
|
|
27
|
+
/** Visible label rendered above the trigger. */
|
|
28
|
+
label?: string;
|
|
29
|
+
supportingText?: string;
|
|
30
|
+
error?: boolean;
|
|
31
|
+
ariaLabel?: string;
|
|
32
|
+
value?: string;
|
|
33
|
+
onValueChange?: (value: string) => void;
|
|
34
|
+
placeholder?: string;
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
children: React.ReactNode;
|
|
37
|
+
}
|
|
38
|
+
export interface SelectItemProps {
|
|
39
|
+
value: string;
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
children: React.ReactNode;
|
|
42
|
+
}
|
|
43
|
+
export interface DialogProps extends PrimitiveDialogProps {
|
|
44
|
+
open?: boolean;
|
|
45
|
+
onOpenChange?: (open: boolean) => void;
|
|
46
|
+
children: React.ReactNode;
|
|
47
|
+
}
|
|
48
|
+
export interface DialogTriggerProps {
|
|
49
|
+
children: React.ReactNode;
|
|
50
|
+
asChild?: boolean;
|
|
51
|
+
}
|
|
52
|
+
export interface DialogContentProps extends PrimitiveDialogContentProps {
|
|
53
|
+
children: React.ReactNode;
|
|
54
|
+
className?: string;
|
|
55
|
+
size?: 'sm' | 'md' | 'lg';
|
|
56
|
+
/** Shows the close button in the top-right corner. */
|
|
57
|
+
showClose?: boolean;
|
|
58
|
+
}
|
|
59
|
+
export interface CheckboxProps extends PrimitiveCheckboxProps {
|
|
60
|
+
checked?: boolean | 'indeterminate';
|
|
61
|
+
onCheckedChange?: (checked: boolean | 'indeterminate') => void;
|
|
62
|
+
disabled?: boolean;
|
|
63
|
+
label?: string;
|
|
64
|
+
id?: string;
|
|
65
|
+
}
|
|
66
|
+
export interface RadioGroupProps {
|
|
67
|
+
defaultValue?: string;
|
|
68
|
+
name?: string;
|
|
69
|
+
orientation?: 'horizontal' | 'vertical';
|
|
70
|
+
value?: string;
|
|
71
|
+
onValueChange?: (value: string) => void;
|
|
72
|
+
disabled?: boolean;
|
|
73
|
+
ariaLabel?: string;
|
|
74
|
+
children: React.ReactNode;
|
|
75
|
+
}
|
|
76
|
+
export interface RadioItemProps {
|
|
77
|
+
value: string;
|
|
78
|
+
disabled?: boolean;
|
|
79
|
+
label?: string;
|
|
80
|
+
id?: string;
|
|
81
|
+
}
|
|
82
|
+
export interface SwitchProps extends PrimitiveSwitchProps {
|
|
83
|
+
checked?: boolean;
|
|
84
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
85
|
+
disabled?: boolean;
|
|
86
|
+
label?: string;
|
|
87
|
+
id?: string;
|
|
88
|
+
}
|
|
89
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
90
|
+
variant?: 'primary' | 'secondary' | 'tertiary' | 'text' | 'danger';
|
|
91
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
92
|
+
disabled?: boolean;
|
|
93
|
+
children: React.ReactNode;
|
|
94
|
+
loading?: boolean;
|
|
95
|
+
fullWidth?: boolean;
|
|
96
|
+
/** Icon rendered before the label (decorative). */
|
|
97
|
+
leftIcon?: React.ReactNode;
|
|
98
|
+
/** Icon rendered after the label (decorative). */
|
|
99
|
+
rightIcon?: React.ReactNode;
|
|
100
|
+
}
|
|
101
|
+
export type ComponentStatus = 'stable' | 'beta' | 'deprecated';
|
|
102
|
+
export interface Property {
|
|
103
|
+
name: string;
|
|
104
|
+
type: string;
|
|
105
|
+
default: string;
|
|
106
|
+
description: string;
|
|
107
|
+
options?: string[];
|
|
108
|
+
}
|
|
109
|
+
export interface Variant {
|
|
110
|
+
name: string;
|
|
111
|
+
description: string;
|
|
112
|
+
preview?: string;
|
|
113
|
+
}
|
|
114
|
+
export interface State {
|
|
115
|
+
name: string;
|
|
116
|
+
description: string;
|
|
117
|
+
css?: string;
|
|
118
|
+
}
|
|
119
|
+
export interface DesignToken {
|
|
120
|
+
category: string;
|
|
121
|
+
tokens: {
|
|
122
|
+
name: string;
|
|
123
|
+
value: string;
|
|
124
|
+
cssVariable?: string;
|
|
125
|
+
}[];
|
|
126
|
+
}
|
|
127
|
+
export interface UsageRule {
|
|
128
|
+
type: 'do' | 'dont';
|
|
129
|
+
text: string;
|
|
130
|
+
}
|
|
131
|
+
export interface AccessibilityRule {
|
|
132
|
+
text: string;
|
|
133
|
+
icon?: string;
|
|
134
|
+
}
|
|
135
|
+
export interface CodeSnippet {
|
|
136
|
+
language: string;
|
|
137
|
+
code: string;
|
|
138
|
+
}
|
|
139
|
+
export interface ComponentData {
|
|
140
|
+
name: string;
|
|
141
|
+
description: string;
|
|
142
|
+
status: ComponentStatus;
|
|
143
|
+
version: string;
|
|
144
|
+
lastUpdated: string;
|
|
145
|
+
figmaUrl?: string;
|
|
146
|
+
category: string;
|
|
147
|
+
variants: Variant[];
|
|
148
|
+
states: State[];
|
|
149
|
+
properties: Property[];
|
|
150
|
+
tokens: DesignToken[];
|
|
151
|
+
usage: {
|
|
152
|
+
dos: UsageRule[];
|
|
153
|
+
donts: UsageRule[];
|
|
154
|
+
};
|
|
155
|
+
accessibility: AccessibilityRule[];
|
|
156
|
+
responsive: {
|
|
157
|
+
desktop: string;
|
|
158
|
+
tablet: string;
|
|
159
|
+
mobile: string;
|
|
160
|
+
};
|
|
161
|
+
code: {
|
|
162
|
+
react: string;
|
|
163
|
+
angular?: string;
|
|
164
|
+
css: string;
|
|
165
|
+
tokens?: string;
|
|
166
|
+
};
|
|
167
|
+
figma: {
|
|
168
|
+
componentName: string;
|
|
169
|
+
figmaPath: string;
|
|
170
|
+
properties: string[];
|
|
171
|
+
figmaValues?: Record<string, string[]>;
|
|
172
|
+
};
|
|
173
|
+
relatedComponents: string[];
|
|
174
|
+
/** Mobile-specific overrides — merged on top of base data when platform === 'mobile' */
|
|
175
|
+
mobile?: {
|
|
176
|
+
description?: string;
|
|
177
|
+
version?: string;
|
|
178
|
+
lastUpdated?: string;
|
|
179
|
+
figmaUrl?: string;
|
|
180
|
+
variants?: Variant[];
|
|
181
|
+
states?: State[];
|
|
182
|
+
properties?: Property[];
|
|
183
|
+
tokens?: DesignToken[];
|
|
184
|
+
usage?: {
|
|
185
|
+
dos: UsageRule[];
|
|
186
|
+
donts: UsageRule[];
|
|
187
|
+
};
|
|
188
|
+
accessibility?: AccessibilityRule[];
|
|
189
|
+
responsive?: {
|
|
190
|
+
desktop?: string;
|
|
191
|
+
tablet?: string;
|
|
192
|
+
mobile?: string;
|
|
193
|
+
};
|
|
194
|
+
code?: {
|
|
195
|
+
react?: string;
|
|
196
|
+
css?: string;
|
|
197
|
+
tokens?: string;
|
|
198
|
+
};
|
|
199
|
+
figma?: {
|
|
200
|
+
componentName: string;
|
|
201
|
+
figmaPath: string;
|
|
202
|
+
properties: string[];
|
|
203
|
+
figmaValues?: Record<string, string[]>;
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
export interface TokenGroup {
|
|
208
|
+
name: string;
|
|
209
|
+
tokens: {
|
|
210
|
+
name: string;
|
|
211
|
+
value: string;
|
|
212
|
+
preview?: string;
|
|
213
|
+
token: string;
|
|
214
|
+
}[];
|
|
215
|
+
}
|
|
216
|
+
export interface NavItem {
|
|
217
|
+
label: string;
|
|
218
|
+
path: string;
|
|
219
|
+
icon?: string;
|
|
220
|
+
children?: NavItem[];
|
|
221
|
+
}
|
|
222
|
+
export interface SearchResult {
|
|
223
|
+
type: 'component' | 'foundation' | 'documentation';
|
|
224
|
+
title: string;
|
|
225
|
+
description: string;
|
|
226
|
+
path: string;
|
|
227
|
+
}
|