@qasa/qds-ui 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +456 -206
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/preset.css +36 -36
- package/package.json +27 -28
package/dist/index.d.ts
CHANGED
|
@@ -8,10 +8,10 @@ import { LucideIcon } from 'lucide-react';
|
|
|
8
8
|
|
|
9
9
|
type LanguageCode = 'en' | 'sv' | 'fi' | 'fr' | 'nb';
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
type QdsProviderProps = {
|
|
12
12
|
children: ReactNode;
|
|
13
13
|
locale: LanguageCode;
|
|
14
|
-
}
|
|
14
|
+
};
|
|
15
15
|
declare function QdsProvider({ children, locale }: QdsProviderProps): react_jsx_runtime.JSX.Element;
|
|
16
16
|
|
|
17
17
|
type LegitimateAny = any;
|
|
@@ -42,10 +42,10 @@ type ResponsiveProp<T> = T | BreakpointsConfig$1<T>;
|
|
|
42
42
|
* call and emits `@source inline(...)` directives so Tailwind compiles the
|
|
43
43
|
* breakpoint-prefixed variants.
|
|
44
44
|
*/
|
|
45
|
-
|
|
45
|
+
type ResponsiveClassMap<T extends string> = {
|
|
46
46
|
readonly classes: Record<T, string>;
|
|
47
47
|
readonly default: T;
|
|
48
|
-
}
|
|
48
|
+
};
|
|
49
49
|
/**
|
|
50
50
|
* Derives the size literal union from a class map.
|
|
51
51
|
*
|
|
@@ -57,7 +57,7 @@ type ResponsiveSize<M> = M extends ResponsiveClassMap<infer T> ? T : never;
|
|
|
57
57
|
|
|
58
58
|
declare const SIZE_CLASSES$7: ResponsiveClassMap<"sm" | "md" | "lg" | "xl" | "2xl" | "xs">;
|
|
59
59
|
type AvatarSize = ResponsiveSize<typeof SIZE_CLASSES$7>;
|
|
60
|
-
|
|
60
|
+
type AvatarOptions = {
|
|
61
61
|
/**
|
|
62
62
|
* Source url of the image to display. If not passed
|
|
63
63
|
* it will display a fallback icon.
|
|
@@ -78,10 +78,9 @@ interface AvatarOptions {
|
|
|
78
78
|
* defaults to the `name` prop.
|
|
79
79
|
*/
|
|
80
80
|
imageAlt?: string;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
declare const Avatar: react.ForwardRefExoticComponent<AvatarProps & react.RefAttributes<HTMLSpanElement>>;
|
|
81
|
+
};
|
|
82
|
+
type AvatarProps = {} & HTMLQdsProps<'span'> & AvatarOptions;
|
|
83
|
+
declare const Avatar: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & AvatarOptions & react.RefAttributes<HTMLSpanElement>>;
|
|
85
84
|
|
|
86
85
|
/**
|
|
87
86
|
* This file is originally from `@radix-ui/react-polymorphic` before the package
|
|
@@ -101,7 +100,7 @@ type IntrinsicElement<E> = E extends ForwardRefComponent<infer I, any> ? I : nev
|
|
|
101
100
|
type ForwardRefExoticComponent<E, OwnProps> = react.ForwardRefExoticComponent<Merge<E extends react.ElementType ? react.ComponentPropsWithRef<E> : never, OwnProps & {
|
|
102
101
|
as?: E;
|
|
103
102
|
}>>;
|
|
104
|
-
|
|
103
|
+
type ForwardRefComponent<IntrinsicElementString, OwnProps = {}> = {
|
|
105
104
|
/**
|
|
106
105
|
* When `as` prop is passed, use this overload.
|
|
107
106
|
* Merges original own props (without DOM props) and the inferred props
|
|
@@ -117,45 +116,17 @@ interface ForwardRefComponent<IntrinsicElementString, OwnProps = {}> extends For
|
|
|
117
116
|
}> : As extends keyof react.JSX.IntrinsicElements ? Merge<react.JSX.IntrinsicElements[As], OwnProps & {
|
|
118
117
|
as: As;
|
|
119
118
|
}> : never): react.ReactElement | null;
|
|
120
|
-
}
|
|
119
|
+
} & ForwardRefExoticComponent<IntrinsicElementString, OwnProps>;
|
|
121
120
|
/**
|
|
122
121
|
* Infers the props of a React component
|
|
123
122
|
*/
|
|
124
123
|
type PropsOf<E> = E extends react.ComponentType<infer P> ? P : never;
|
|
125
124
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
readonly negative: "text-[color:var(--stroke-negative)]";
|
|
132
|
-
readonly warning: "text-[color:var(--stroke-warning)]";
|
|
133
|
-
readonly positive: "text-[color:var(--stroke-positive)]";
|
|
134
|
-
readonly onBrandPrimary: "text-[color:var(--stroke-onBrandPrimary)]";
|
|
135
|
-
readonly onBrandSecondary: "text-[color:var(--stroke-onBrandSecondary)]";
|
|
136
|
-
readonly onBrandTertiary: "text-[color:var(--stroke-onBrandTertiary)]";
|
|
137
|
-
};
|
|
138
|
-
type IconSize = 12 | 16 | 20 | 24 | 32;
|
|
139
|
-
type IconColor = keyof typeof ICON_COLOR_CLASSES | 'currentColor';
|
|
140
|
-
interface IconOptions {
|
|
141
|
-
/**
|
|
142
|
-
* The size of the icon.
|
|
143
|
-
*
|
|
144
|
-
* @default 24
|
|
145
|
-
*/
|
|
146
|
-
size?: IconSize;
|
|
147
|
-
/**
|
|
148
|
-
* The color of the icon.
|
|
149
|
-
*
|
|
150
|
-
* @default 'default'
|
|
151
|
-
*/
|
|
152
|
-
color?: IconColor;
|
|
153
|
-
}
|
|
154
|
-
type OmittedProps$9 = 'color' | 'onClick' | 'width' | 'height' | 'fontSize';
|
|
155
|
-
interface IconProps extends Omit<SVGAttributes<SVGElement>, OmittedProps$9>, IconOptions {
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
interface CreateIconOptions {
|
|
125
|
+
/**
|
|
126
|
+
* This function is heavily inspired by the `createIcon` function from
|
|
127
|
+
* Chakra UI (https://chakra-ui.com/).
|
|
128
|
+
*/
|
|
129
|
+
type CreateIconOptions = {
|
|
159
130
|
/**
|
|
160
131
|
* The `svg`'s `viewBox` attribute
|
|
161
132
|
*/
|
|
@@ -185,62 +156,243 @@ interface CreateIconOptions {
|
|
|
185
156
|
* and internal use.
|
|
186
157
|
*/
|
|
187
158
|
displayName?: string;
|
|
188
|
-
}
|
|
159
|
+
};
|
|
189
160
|
/**
|
|
190
161
|
* Helper function to create an icon component.
|
|
191
162
|
*/
|
|
192
|
-
declare const createIcon: (options: CreateIconOptions) => react.ForwardRefExoticComponent<
|
|
163
|
+
declare const createIcon: (options: CreateIconOptions) => react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
164
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
165
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
166
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
167
|
+
|
|
168
|
+
declare const createLucideIcon: (Icon: LucideIcon) => react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
169
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
170
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
171
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
193
172
|
|
|
194
|
-
declare const
|
|
173
|
+
declare const AlertCircleIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
174
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
175
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
176
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
177
|
+
declare const AlertTriangleIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
178
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
179
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
180
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
181
|
+
declare const ArrowDownIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
182
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
183
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
184
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
185
|
+
declare const ArrowLeftIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
186
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
187
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
188
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
189
|
+
declare const ArrowRightIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
190
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
191
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
192
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
193
|
+
declare const ArrowUpIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
194
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
195
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
196
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
197
|
+
declare const BellIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
198
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
199
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
200
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
201
|
+
declare const BellOffIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
202
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
203
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
204
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
205
|
+
declare const BookmarkFilledIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
206
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
207
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
208
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
209
|
+
declare const BookmarkIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
210
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
211
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
212
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
213
|
+
declare const CalendarIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
214
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
215
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
216
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
217
|
+
declare const CameraIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
218
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
219
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
220
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
221
|
+
declare const CheckCircleIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
222
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
223
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
224
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
225
|
+
declare const CheckIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
226
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
227
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
228
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
229
|
+
declare const ChevronDownIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
230
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
231
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
232
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
233
|
+
declare const ChevronLeftIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
234
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
235
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
236
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
237
|
+
declare const ChevronRightIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
238
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
239
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
240
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
241
|
+
declare const ChevronUpIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
242
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
243
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
244
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
245
|
+
declare const GlobeIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
246
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
247
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
248
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
249
|
+
declare const HeartFilledIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
250
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
251
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
252
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
253
|
+
declare const HeartIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
254
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
255
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
256
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
257
|
+
declare const HelpCircleIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
258
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
259
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
260
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
261
|
+
declare const HistoryIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
262
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
263
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
264
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
265
|
+
declare const HomeIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
266
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
267
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
268
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
269
|
+
declare const ImageIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
270
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
271
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
272
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
273
|
+
declare const InfoIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
274
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
275
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
276
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
277
|
+
declare const ListIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
278
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
279
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
280
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
281
|
+
declare const ListFilterIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
282
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
283
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
284
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
285
|
+
declare const LogOutIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
286
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
287
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
288
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
289
|
+
declare const MapIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
290
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
291
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
292
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
293
|
+
declare const MapPinIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
294
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
295
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
296
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
297
|
+
declare const MenuIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
298
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
299
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
300
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
301
|
+
declare const MessageCircleIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
302
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
303
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
304
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
305
|
+
declare const MinusIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
306
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
307
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
308
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
309
|
+
declare const MoreHorizontalIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
310
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
311
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
312
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
313
|
+
declare const MoreVerticalIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
314
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
315
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
316
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
317
|
+
declare const PenIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
318
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
319
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
320
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
321
|
+
declare const PlusIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
322
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
323
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
324
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
325
|
+
declare const SearchIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
326
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
327
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
328
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
329
|
+
declare const SettingsIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
330
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
331
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
332
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
333
|
+
declare const ShareIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
334
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
335
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
336
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
337
|
+
declare const SlidersIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
338
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
339
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
340
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
341
|
+
declare const StarFilledIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
342
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
343
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
344
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
345
|
+
declare const StarIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
346
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
347
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
348
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
349
|
+
declare const TrashIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
350
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
351
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
352
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
353
|
+
declare const UserIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
354
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
355
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
356
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
357
|
+
declare const XCircleIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
358
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
359
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
360
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
361
|
+
declare const XIcon: react.ForwardRefExoticComponent<Omit<react.SVGAttributes<SVGElement>, "color" | "onClick" | "width" | "height" | "fontSize"> & {
|
|
362
|
+
size?: 12 | 16 | 20 | 24 | 32;
|
|
363
|
+
color?: "strong" | "default" | "subtle" | "disabled" | "negative" | "warning" | "positive" | "onBrandPrimary" | "onBrandSecondary" | "onBrandTertiary" | "currentColor";
|
|
364
|
+
} & react.RefAttributes<SVGSVGElement>>;
|
|
195
365
|
|
|
196
|
-
declare const
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
declare const MapPinIcon: react.ForwardRefExoticComponent<IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
227
|
-
declare const MenuIcon: react.ForwardRefExoticComponent<IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
228
|
-
declare const MessageCircleIcon: react.ForwardRefExoticComponent<IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
229
|
-
declare const MinusIcon: react.ForwardRefExoticComponent<IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
230
|
-
declare const MoreHorizontalIcon: react.ForwardRefExoticComponent<IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
231
|
-
declare const MoreVerticalIcon: react.ForwardRefExoticComponent<IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
232
|
-
declare const PenIcon: react.ForwardRefExoticComponent<IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
233
|
-
declare const PlusIcon: react.ForwardRefExoticComponent<IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
234
|
-
declare const SearchIcon: react.ForwardRefExoticComponent<IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
235
|
-
declare const SettingsIcon: react.ForwardRefExoticComponent<IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
236
|
-
declare const ShareIcon: react.ForwardRefExoticComponent<IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
237
|
-
declare const SlidersIcon: react.ForwardRefExoticComponent<IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
238
|
-
declare const StarFilledIcon: react.ForwardRefExoticComponent<IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
239
|
-
declare const StarIcon: react.ForwardRefExoticComponent<IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
240
|
-
declare const TrashIcon: react.ForwardRefExoticComponent<IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
241
|
-
declare const UserIcon: react.ForwardRefExoticComponent<IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
242
|
-
declare const XCircleIcon: react.ForwardRefExoticComponent<IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
243
|
-
declare const XIcon: react.ForwardRefExoticComponent<IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
366
|
+
declare const ICON_COLOR_CLASSES: {
|
|
367
|
+
readonly default: "text-[color:var(--stroke-default)]";
|
|
368
|
+
readonly strong: "text-[color:var(--stroke-strong)]";
|
|
369
|
+
readonly subtle: "text-[color:var(--stroke-subtle)]";
|
|
370
|
+
readonly disabled: "text-[color:var(--stroke-disabled)]";
|
|
371
|
+
readonly negative: "text-[color:var(--stroke-negative)]";
|
|
372
|
+
readonly warning: "text-[color:var(--stroke-warning)]";
|
|
373
|
+
readonly positive: "text-[color:var(--stroke-positive)]";
|
|
374
|
+
readonly onBrandPrimary: "text-[color:var(--stroke-onBrandPrimary)]";
|
|
375
|
+
readonly onBrandSecondary: "text-[color:var(--stroke-onBrandSecondary)]";
|
|
376
|
+
readonly onBrandTertiary: "text-[color:var(--stroke-onBrandTertiary)]";
|
|
377
|
+
};
|
|
378
|
+
type IconSize = 12 | 16 | 20 | 24 | 32;
|
|
379
|
+
type IconColor = keyof typeof ICON_COLOR_CLASSES | 'currentColor';
|
|
380
|
+
type IconOptions = {
|
|
381
|
+
/**
|
|
382
|
+
* The size of the icon.
|
|
383
|
+
*
|
|
384
|
+
* @default 24
|
|
385
|
+
*/
|
|
386
|
+
size?: IconSize;
|
|
387
|
+
/**
|
|
388
|
+
* The color of the icon.
|
|
389
|
+
*
|
|
390
|
+
* @default 'default'
|
|
391
|
+
*/
|
|
392
|
+
color?: IconColor;
|
|
393
|
+
};
|
|
394
|
+
type OmittedProps$9 = 'color' | 'onClick' | 'width' | 'height' | 'fontSize';
|
|
395
|
+
type IconProps = {} & Omit<SVGAttributes<SVGElement>, OmittedProps$9> & IconOptions;
|
|
244
396
|
|
|
245
397
|
declare const SIZE_CLASSES$6: ResponsiveClassMap<"sm" | "md" | "lg" | "xl" | "xs">;
|
|
246
398
|
declare const buttonVariants: (props?: ({
|
|
@@ -248,7 +400,7 @@ declare const buttonVariants: (props?: ({
|
|
|
248
400
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
249
401
|
type ButtonSize = ResponsiveSize<typeof SIZE_CLASSES$6>;
|
|
250
402
|
type ButtonVariant = NonNullable<VariantProps<typeof buttonVariants>['variant']>;
|
|
251
|
-
|
|
403
|
+
type ButtonOptions = {
|
|
252
404
|
/**
|
|
253
405
|
* Sets the size of the button
|
|
254
406
|
* @default 'md'
|
|
@@ -287,7 +439,7 @@ interface ButtonOptions {
|
|
|
287
439
|
* @default 'button'
|
|
288
440
|
*/
|
|
289
441
|
type?: 'button' | 'submit' | 'reset';
|
|
290
|
-
}
|
|
442
|
+
};
|
|
291
443
|
type PolymorphicButton = ForwardRefComponent<'button', ButtonOptions>;
|
|
292
444
|
type ButtonProps = PropsOf<PolymorphicButton>;
|
|
293
445
|
declare const Button: PolymorphicButton;
|
|
@@ -308,7 +460,7 @@ declare const TEXT_WRAP_CLASSES: {
|
|
|
308
460
|
type DisplaySize = ResponsiveSize<typeof SIZE_CLASSES$5>;
|
|
309
461
|
type DisplayTextAlign = keyof typeof TEXT_ALIGN_CLASSES$2;
|
|
310
462
|
type DisplayTextWrap = keyof typeof TEXT_WRAP_CLASSES;
|
|
311
|
-
|
|
463
|
+
type DisplayTextOptions = {
|
|
312
464
|
/**
|
|
313
465
|
* Sets the visual size of the display text.
|
|
314
466
|
* To override the rendered tag, use the `as` prop.
|
|
@@ -330,7 +482,7 @@ interface DisplayTextOptions {
|
|
|
330
482
|
* @default 'pretty'
|
|
331
483
|
*/
|
|
332
484
|
textWrap?: DisplayTextWrap;
|
|
333
|
-
}
|
|
485
|
+
};
|
|
334
486
|
type DisplayTextComponent = ForwardRefComponent<'h2', DisplayTextOptions>;
|
|
335
487
|
/**
|
|
336
488
|
* @deprecated
|
|
@@ -341,7 +493,7 @@ type DisplayTextProps = PropsOf<DisplayTextComponent>;
|
|
|
341
493
|
*/
|
|
342
494
|
declare const DisplayText: DisplayTextComponent;
|
|
343
495
|
|
|
344
|
-
|
|
496
|
+
type CheckboxOptions = {
|
|
345
497
|
/**
|
|
346
498
|
* The label for the checkbox. Accepts a string, or a React component for rendering links within the label.
|
|
347
499
|
*
|
|
@@ -413,24 +565,23 @@ interface CheckboxOptions {
|
|
|
413
565
|
* The value given as data when submitted with a `name`.
|
|
414
566
|
*/
|
|
415
567
|
value?: string;
|
|
416
|
-
}
|
|
568
|
+
};
|
|
417
569
|
type CheckboxProps = Omit<Checkbox$1.CheckboxProps, 'asChild' | 'children' | 'checked' | 'defaultChecked' | keyof CheckboxOptions> & CheckboxOptions;
|
|
418
570
|
declare const Checkbox: react.ForwardRefExoticComponent<Omit<Checkbox$1.CheckboxProps, "children" | "asChild" | keyof CheckboxOptions> & CheckboxOptions & react.RefAttributes<HTMLButtonElement>>;
|
|
419
571
|
|
|
420
|
-
|
|
572
|
+
type DividerOptions = {
|
|
421
573
|
/**
|
|
422
574
|
* The orientation of the divider.
|
|
423
575
|
*
|
|
424
576
|
* @default 'horizontal'
|
|
425
577
|
*/
|
|
426
578
|
orientation?: 'horizontal' | 'vertical';
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
declare const Divider: react.ForwardRefExoticComponent<DividerProps & react.RefAttributes<HTMLSpanElement>>;
|
|
579
|
+
};
|
|
580
|
+
type DividerProps = {} & HTMLQdsProps<'span'> & DividerOptions;
|
|
581
|
+
declare const Divider: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & DividerOptions & react.RefAttributes<HTMLSpanElement>>;
|
|
431
582
|
|
|
432
583
|
type PrimitiveContentProps = DropdownMenu$1.DropdownMenuContentProps;
|
|
433
|
-
|
|
584
|
+
type DropdownMenuContentOptions = {
|
|
434
585
|
/**
|
|
435
586
|
* Event handler called when focus moves to the trigger after closing.
|
|
436
587
|
* It can be prevented by calling `event.preventDefault`.
|
|
@@ -488,13 +639,12 @@ interface DropdownMenuContentOptions {
|
|
|
488
639
|
* @default false
|
|
489
640
|
*/
|
|
490
641
|
hideWhenDetached?: PrimitiveContentProps['hideWhenDetached'];
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
}
|
|
642
|
+
};
|
|
643
|
+
type DropdownMenuContentProps = {} & HTMLQdsProps<'div'> & DropdownMenuContentOptions;
|
|
494
644
|
|
|
495
645
|
type DropdownMenuDividerProps = HTMLQdsProps<'div'>;
|
|
496
646
|
|
|
497
|
-
|
|
647
|
+
type DropdownMenuItemOptions = {
|
|
498
648
|
/**
|
|
499
649
|
* If `true`, the item will be disabled
|
|
500
650
|
*/
|
|
@@ -514,14 +664,13 @@ interface DropdownMenuItemOptions {
|
|
|
514
664
|
* Optional icon to display on the left side of the item content.
|
|
515
665
|
*/
|
|
516
666
|
icon?: ElementType<IconProps>;
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
}
|
|
667
|
+
};
|
|
668
|
+
type DropdownMenuItemProps = {} & Omit<DropdownMenu$1.DropdownMenuItemProps, 'asChild' | keyof DropdownMenuItemOptions> & DropdownMenuItemOptions;
|
|
520
669
|
|
|
521
670
|
type DropdownTriggerComponent = ForwardRefComponent<'button'>;
|
|
522
671
|
type DropdownMenuTriggerProps = PropsOf<DropdownTriggerComponent>;
|
|
523
672
|
|
|
524
|
-
|
|
673
|
+
type DropdownMenuRootProps = {
|
|
525
674
|
children: ReactNode;
|
|
526
675
|
/**
|
|
527
676
|
* If `true` the dropdown menu will be open
|
|
@@ -536,12 +685,49 @@ interface DropdownMenuRootProps {
|
|
|
536
685
|
* Callback invoked open state changes
|
|
537
686
|
*/
|
|
538
687
|
onOpenChange?: (isOpen: boolean) => void;
|
|
539
|
-
}
|
|
688
|
+
};
|
|
540
689
|
declare function DropdownMenuRoot(props: DropdownMenuRootProps): react_jsx_runtime.JSX.Element;
|
|
541
690
|
declare const DropdownMenu: typeof DropdownMenuRoot & {
|
|
542
|
-
Trigger:
|
|
543
|
-
|
|
544
|
-
|
|
691
|
+
Trigger: (<As = "button">(props: As extends "" ? {
|
|
692
|
+
as: keyof React.JSX.IntrinsicElements;
|
|
693
|
+
} : As extends react.ComponentType<infer P> ? Merge<P, {
|
|
694
|
+
as: As;
|
|
695
|
+
}> : As extends keyof react.JSX.IntrinsicElements ? Merge<react.JSX.IntrinsicElements[As], {
|
|
696
|
+
as: As;
|
|
697
|
+
}> : never) => React.ReactElement | null) & react.ForwardRefExoticComponent<Merge<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
698
|
+
as?: "button" | undefined;
|
|
699
|
+
}>>;
|
|
700
|
+
Content: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
701
|
+
onCloseAutofocus?: ((event: Event) => void) | undefined;
|
|
702
|
+
onEscapeKeyDown?: ((event: KeyboardEvent) => void) | undefined;
|
|
703
|
+
onPointerDownOutside?: ((event: CustomEvent<{
|
|
704
|
+
originalEvent: PointerEvent;
|
|
705
|
+
}>) => void) | undefined;
|
|
706
|
+
onFocusOutside?: ((event: CustomEvent<{
|
|
707
|
+
originalEvent: FocusEvent;
|
|
708
|
+
}>) => void) | undefined;
|
|
709
|
+
onInteractOutside?: ((event: CustomEvent<{
|
|
710
|
+
originalEvent: PointerEvent;
|
|
711
|
+
}> | CustomEvent<{
|
|
712
|
+
originalEvent: FocusEvent;
|
|
713
|
+
}>) => void) | undefined;
|
|
714
|
+
side?: "bottom" | "left" | "right" | "top" | undefined;
|
|
715
|
+
sideOffset?: number | undefined;
|
|
716
|
+
align?: "center" | "end" | "start" | undefined;
|
|
717
|
+
collisionBoundary?: (Element | null) | (Element | null)[] | undefined;
|
|
718
|
+
hideWhenDetached?: boolean | undefined;
|
|
719
|
+
} & react.RefAttributes<HTMLDivElement>>;
|
|
720
|
+
Item: react.ForwardRefExoticComponent<Omit<DropdownMenu$1.DropdownMenuItemProps, "asChild" | keyof {
|
|
721
|
+
isDisabled?: boolean;
|
|
722
|
+
onSelect?: (event: Event) => void;
|
|
723
|
+
textValue?: string;
|
|
724
|
+
icon?: react.ElementType<IconProps>;
|
|
725
|
+
}> & {
|
|
726
|
+
isDisabled?: boolean;
|
|
727
|
+
onSelect?: (event: Event) => void;
|
|
728
|
+
textValue?: string;
|
|
729
|
+
icon?: react.ElementType<IconProps>;
|
|
730
|
+
} & react.RefAttributes<HTMLDivElement>>;
|
|
545
731
|
Divider: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
546
732
|
};
|
|
547
733
|
|
|
@@ -566,7 +752,7 @@ declare const TEXT_ALIGN_CLASSES$1: {
|
|
|
566
752
|
type HeadingSize = ResponsiveSize<typeof SIZE_CLASSES$4>;
|
|
567
753
|
type HeadingColor = keyof typeof COLOR_CLASSES$2;
|
|
568
754
|
type HeadingTextAlign = keyof typeof TEXT_ALIGN_CLASSES$1;
|
|
569
|
-
|
|
755
|
+
type HeadingOptions = {
|
|
570
756
|
/**
|
|
571
757
|
* Sets the visual size of the heading.
|
|
572
758
|
* To override the rendered tag, use the `as` prop.
|
|
@@ -588,7 +774,7 @@ interface HeadingOptions {
|
|
|
588
774
|
* @default 'left'
|
|
589
775
|
*/
|
|
590
776
|
textAlign?: HeadingTextAlign;
|
|
591
|
-
}
|
|
777
|
+
};
|
|
592
778
|
type HeadingComponent = ForwardRefComponent<'h2', HeadingOptions>;
|
|
593
779
|
/**
|
|
594
780
|
* @deprecated
|
|
@@ -611,7 +797,7 @@ declare const iconButtonVariants: (props?: ({
|
|
|
611
797
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
612
798
|
type IconButtonSize = ResponsiveSize<typeof SIZE_CLASSES$3>;
|
|
613
799
|
type IconButtonVariant = NonNullable<VariantProps<typeof iconButtonVariants>['variant']>;
|
|
614
|
-
|
|
800
|
+
type IconButtonOptions = {
|
|
615
801
|
icon: ElementType<IconProps>;
|
|
616
802
|
/**
|
|
617
803
|
* A visually hidden label read by screen readers.
|
|
@@ -629,12 +815,12 @@ interface IconButtonOptions {
|
|
|
629
815
|
* If `true` the button will be disabled
|
|
630
816
|
*/
|
|
631
817
|
isDisabled?: boolean;
|
|
632
|
-
}
|
|
818
|
+
};
|
|
633
819
|
type IconButtonComponent = ForwardRefComponent<'button', IconButtonOptions>;
|
|
634
820
|
type IconButtonProps = PropsOf<IconButtonComponent>;
|
|
635
821
|
declare const IconButton: IconButtonComponent;
|
|
636
822
|
|
|
637
|
-
|
|
823
|
+
type InputBaseOptions = {
|
|
638
824
|
/**
|
|
639
825
|
* If `true`, the input will be invalid
|
|
640
826
|
*/
|
|
@@ -647,13 +833,12 @@ interface InputBaseOptions {
|
|
|
647
833
|
* If `true` the input will be required
|
|
648
834
|
*/
|
|
649
835
|
isRequired?: boolean;
|
|
650
|
-
}
|
|
836
|
+
};
|
|
651
837
|
type OmittedProps$8 = 'children' | 'readOnly' | 'size' | 'disabled' | 'required';
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
declare const InputBase: react.ForwardRefExoticComponent<InputBaseProps & react.RefAttributes<HTMLInputElement>>;
|
|
838
|
+
type InputBaseProps = {} & Omit<HTMLQdsProps<'input'>, OmittedProps$8> & InputBaseOptions;
|
|
839
|
+
declare const InputBase: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, OmittedProps$8> & InputBaseOptions & react.RefAttributes<HTMLInputElement>>;
|
|
655
840
|
|
|
656
|
-
|
|
841
|
+
type TextFieldOptions = {
|
|
657
842
|
/**
|
|
658
843
|
* The label for the input
|
|
659
844
|
*/
|
|
@@ -676,11 +861,33 @@ interface TextFieldOptions extends InputBaseOptions {
|
|
|
676
861
|
* This is useful for e.g. displaying units of measurement.
|
|
677
862
|
*/
|
|
678
863
|
suffix?: string;
|
|
679
|
-
}
|
|
864
|
+
} & InputBaseOptions;
|
|
680
865
|
type OmittedProps$7 = 'children' | 'readOnly' | 'size';
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
866
|
+
type TextFieldProps = {} & Omit<HTMLQdsProps<'input'>, OmittedProps$7> & TextFieldOptions;
|
|
867
|
+
declare const TextField: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, OmittedProps$7> & {
|
|
868
|
+
/**
|
|
869
|
+
* The label for the input
|
|
870
|
+
*/
|
|
871
|
+
label: string;
|
|
872
|
+
/**
|
|
873
|
+
* The error message to display if `isInvalid` is `true`
|
|
874
|
+
*/
|
|
875
|
+
errorMessage?: string;
|
|
876
|
+
/**
|
|
877
|
+
* If `true`, the input will display an optional indicator.
|
|
878
|
+
* If the `isRequired` prop is also `true`, this prop will be ignored.
|
|
879
|
+
*/
|
|
880
|
+
isOptional?: boolean;
|
|
881
|
+
/**
|
|
882
|
+
* Text that provides additional guidance to the user
|
|
883
|
+
*/
|
|
884
|
+
helperText?: string;
|
|
885
|
+
/**
|
|
886
|
+
* Suffixed text to display after the input.
|
|
887
|
+
* This is useful for e.g. displaying units of measurement.
|
|
888
|
+
*/
|
|
889
|
+
suffix?: string;
|
|
890
|
+
} & InputBaseOptions & react.RefAttributes<HTMLInputElement>>;
|
|
684
891
|
|
|
685
892
|
declare const SIZE_CLASSES$2: ResponsiveClassMap<"sm" | "md">;
|
|
686
893
|
declare const COLOR_CLASSES$1: {
|
|
@@ -697,7 +904,7 @@ declare const COLOR_CLASSES$1: {
|
|
|
697
904
|
};
|
|
698
905
|
type LabelSize = ResponsiveSize<typeof SIZE_CLASSES$2>;
|
|
699
906
|
type LabelColor = keyof typeof COLOR_CLASSES$1;
|
|
700
|
-
|
|
907
|
+
type LabelOptions = {
|
|
701
908
|
/**
|
|
702
909
|
* Size of the label
|
|
703
910
|
*/
|
|
@@ -707,12 +914,12 @@ interface LabelOptions {
|
|
|
707
914
|
* @default 'default'
|
|
708
915
|
*/
|
|
709
916
|
color?: LabelColor;
|
|
710
|
-
}
|
|
917
|
+
};
|
|
711
918
|
type LabelComponent = ForwardRefComponent<'label', LabelOptions>;
|
|
712
919
|
type LabelProps = PropsOf<LabelComponent>;
|
|
713
920
|
declare const Label: LabelComponent;
|
|
714
921
|
|
|
715
|
-
|
|
922
|
+
type LinkOptions = {
|
|
716
923
|
/**
|
|
717
924
|
* The URL to link to.
|
|
718
925
|
*/
|
|
@@ -721,19 +928,18 @@ interface LinkOptions {
|
|
|
721
928
|
* If `true`, the link will open in new tab
|
|
722
929
|
*/
|
|
723
930
|
isExternal?: boolean;
|
|
724
|
-
}
|
|
931
|
+
};
|
|
725
932
|
type LinkComponent = ForwardRefComponent<'a', LinkOptions>;
|
|
726
933
|
type LinkProps = PropsOf<LinkComponent>;
|
|
727
934
|
declare const Link: LinkComponent;
|
|
728
935
|
|
|
729
936
|
declare const SIZE_CLASSES$1: ResponsiveClassMap<"sm" | "md">;
|
|
730
937
|
type LoadingDotsSize = ResponsiveSize<typeof SIZE_CLASSES$1>;
|
|
731
|
-
|
|
938
|
+
type LoadingDotsOptions = {
|
|
732
939
|
size?: ResponsiveProp<LoadingDotsSize>;
|
|
733
|
-
}
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
declare const LoadingDots: react.ForwardRefExoticComponent<LoadingDotsProps & react.RefAttributes<HTMLSpanElement>>;
|
|
940
|
+
};
|
|
941
|
+
type LoadingDotsProps = {} & HTMLQdsProps<'span'> & LoadingDotsOptions;
|
|
942
|
+
declare const LoadingDots: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & LoadingDotsOptions & react.RefAttributes<HTMLSpanElement>>;
|
|
737
943
|
|
|
738
944
|
declare const SIZE_CLASSES: ResponsiveClassMap<"sm" | "md" | "lg" | "xl" | "xs">;
|
|
739
945
|
declare const COLOR_CLASSES: {
|
|
@@ -756,7 +962,7 @@ declare const TEXT_ALIGN_CLASSES: {
|
|
|
756
962
|
type ParagraphSize = ResponsiveSize<typeof SIZE_CLASSES>;
|
|
757
963
|
type ParagraphColor = keyof typeof COLOR_CLASSES;
|
|
758
964
|
type ParagraphTextAlign = keyof typeof TEXT_ALIGN_CLASSES;
|
|
759
|
-
|
|
965
|
+
type ParagraphOptions = {
|
|
760
966
|
/**
|
|
761
967
|
* Sets the visual size of the text
|
|
762
968
|
* @default 'md'
|
|
@@ -776,7 +982,7 @@ interface ParagraphOptions {
|
|
|
776
982
|
* @default 'left'
|
|
777
983
|
*/
|
|
778
984
|
textAlign?: ParagraphTextAlign;
|
|
779
|
-
}
|
|
985
|
+
};
|
|
780
986
|
type ParagraphComponent = ForwardRefComponent<'p', ParagraphOptions>;
|
|
781
987
|
/**
|
|
782
988
|
* @deprecated
|
|
@@ -787,7 +993,7 @@ type ParagraphProps = PropsOf<ParagraphComponent>;
|
|
|
787
993
|
*/
|
|
788
994
|
declare const Paragraph: ParagraphComponent;
|
|
789
995
|
|
|
790
|
-
|
|
996
|
+
type SelectBaseOptions = {
|
|
791
997
|
/**
|
|
792
998
|
* The placeholder for the select. We render an `<option/>` element that has
|
|
793
999
|
* empty value.
|
|
@@ -809,14 +1015,12 @@ interface SelectBaseOptions {
|
|
|
809
1015
|
* If `true` the select will be required
|
|
810
1016
|
*/
|
|
811
1017
|
isRequired?: boolean;
|
|
812
|
-
}
|
|
1018
|
+
};
|
|
813
1019
|
type OmittedProps$6 = 'readOnly' | 'size' | 'multiple' | 'disabled' | 'required';
|
|
814
|
-
|
|
815
|
-
}
|
|
816
|
-
declare const SelectBase: react.ForwardRefExoticComponent<SelectBaseProps & react.RefAttributes<HTMLSelectElement>>;
|
|
1020
|
+
declare const SelectBase: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, "ref">, OmittedProps$6> & SelectBaseOptions & react.RefAttributes<HTMLSelectElement>>;
|
|
817
1021
|
|
|
818
1022
|
type ResizeProp = 'none' | 'both' | 'horizontal' | 'vertical';
|
|
819
|
-
|
|
1023
|
+
type TextareaBaseOptions = {
|
|
820
1024
|
/**
|
|
821
1025
|
* If `true`, the textarea will be invalid
|
|
822
1026
|
*/
|
|
@@ -842,13 +1046,12 @@ interface TextareaBaseOptions {
|
|
|
842
1046
|
* @default 3
|
|
843
1047
|
*/
|
|
844
1048
|
minRows?: number;
|
|
845
|
-
}
|
|
1049
|
+
};
|
|
846
1050
|
type OmittedProps$5 = 'children' | 'readOnly' | 'size' | 'disabled' | 'required' | 'rows' | 'cols';
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
declare const TextareaBase: react.ForwardRefExoticComponent<TextareaBaseProps & react.RefAttributes<HTMLTextAreaElement>>;
|
|
1051
|
+
type TextareaBaseProps = {} & Omit<HTMLQdsProps<'textarea'>, OmittedProps$5> & TextareaBaseOptions;
|
|
1052
|
+
declare const TextareaBase: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref">, OmittedProps$5> & TextareaBaseOptions & react.RefAttributes<HTMLTextAreaElement>>;
|
|
850
1053
|
|
|
851
|
-
|
|
1054
|
+
type RadioCardOptions = {
|
|
852
1055
|
/**
|
|
853
1056
|
* The label for the radio card
|
|
854
1057
|
*/
|
|
@@ -867,11 +1070,10 @@ interface RadioCardOptions {
|
|
|
867
1070
|
* @default false
|
|
868
1071
|
*/
|
|
869
1072
|
isDisabled?: boolean;
|
|
870
|
-
}
|
|
871
|
-
|
|
872
|
-
}
|
|
1073
|
+
};
|
|
1074
|
+
type RadioCardProps = {} & Omit<RadioGroup$1.RadioGroupItemProps, 'asChild' | keyof RadioCardOptions> & RadioCardOptions;
|
|
873
1075
|
|
|
874
|
-
|
|
1076
|
+
type RadioButtonOptions = {
|
|
875
1077
|
/**
|
|
876
1078
|
* The label for the radio button
|
|
877
1079
|
*/
|
|
@@ -886,13 +1088,12 @@ interface RadioButtonOptions {
|
|
|
886
1088
|
* @default false
|
|
887
1089
|
*/
|
|
888
1090
|
isDisabled?: boolean;
|
|
889
|
-
}
|
|
890
|
-
|
|
891
|
-
}
|
|
1091
|
+
};
|
|
1092
|
+
type RadioButtonProps = {} & Omit<RadioGroup$1.RadioGroupItemProps, 'asChild' | keyof RadioButtonOptions> & RadioButtonOptions;
|
|
892
1093
|
|
|
893
1094
|
type RadioGroupLabelProps = HTMLQdsProps<'span'>;
|
|
894
1095
|
|
|
895
|
-
|
|
1096
|
+
type RadioGroupOptions = {
|
|
896
1097
|
/**
|
|
897
1098
|
* The value of the radio item that should be checked when initially rendered.
|
|
898
1099
|
* Use when you do not need to control the state of the radio items.
|
|
@@ -930,23 +1131,39 @@ interface RadioGroupOptions {
|
|
|
930
1131
|
* The error message to display if `isInvalid` is `true`
|
|
931
1132
|
*/
|
|
932
1133
|
errorMessage?: string;
|
|
933
|
-
}
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
1134
|
+
};
|
|
1135
|
+
type RadioGroupProps = {} & Omit<RadioGroup$1.RadioGroupProps, 'asChild' | keyof RadioGroupOptions> & RadioGroupOptions;
|
|
1136
|
+
declare const RadioGroup: react.ForwardRefExoticComponent<Omit<RadioGroup$1.RadioGroupProps, "asChild" | keyof RadioGroupOptions> & RadioGroupOptions & react.RefAttributes<HTMLDivElement>> & {
|
|
1137
|
+
Card: react.ForwardRefExoticComponent<Omit<RadioGroup$1.RadioGroupItemProps, "asChild" | keyof {
|
|
1138
|
+
label: string;
|
|
1139
|
+
helperText?: string;
|
|
1140
|
+
isRequired?: boolean;
|
|
1141
|
+
isDisabled?: boolean;
|
|
1142
|
+
}> & {
|
|
1143
|
+
label: string;
|
|
1144
|
+
helperText?: string;
|
|
1145
|
+
isRequired?: boolean;
|
|
1146
|
+
isDisabled?: boolean;
|
|
1147
|
+
} & react.RefAttributes<HTMLButtonElement>>;
|
|
1148
|
+
Button: react.ForwardRefExoticComponent<Omit<RadioGroup$1.RadioGroupItemProps, "asChild" | keyof {
|
|
1149
|
+
label: string;
|
|
1150
|
+
isRequired?: boolean;
|
|
1151
|
+
isDisabled?: boolean;
|
|
1152
|
+
}> & {
|
|
1153
|
+
label: string;
|
|
1154
|
+
isRequired?: boolean;
|
|
1155
|
+
isDisabled?: boolean;
|
|
1156
|
+
} & react.RefAttributes<HTMLButtonElement>>;
|
|
939
1157
|
Label: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & react.RefAttributes<HTMLSpanElement>>;
|
|
940
1158
|
};
|
|
941
1159
|
|
|
942
|
-
|
|
1160
|
+
type SelectOptionOptions = {
|
|
943
1161
|
isDisabled?: boolean;
|
|
944
|
-
}
|
|
1162
|
+
};
|
|
945
1163
|
type OmittedProps$4 = 'disabled' | 'label';
|
|
946
|
-
|
|
947
|
-
}
|
|
1164
|
+
type SelectOptionProps = {} & Omit<HTMLQdsProps<'option'>, OmittedProps$4> & SelectOptionOptions;
|
|
948
1165
|
|
|
949
|
-
|
|
1166
|
+
type SelectOptions = {
|
|
950
1167
|
/**
|
|
951
1168
|
* The label for the select field
|
|
952
1169
|
*/
|
|
@@ -964,30 +1181,48 @@ interface SelectOptions extends SelectBaseOptions {
|
|
|
964
1181
|
* If the `isRequired` prop is also `true`, this prop will be ignored.
|
|
965
1182
|
*/
|
|
966
1183
|
isOptional?: boolean;
|
|
967
|
-
}
|
|
1184
|
+
} & SelectBaseOptions;
|
|
968
1185
|
type OmittedProps$3 = 'readOnly' | 'size';
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
1186
|
+
type SelectProps = {} & Omit<HTMLQdsProps<'select'>, OmittedProps$3> & SelectOptions;
|
|
1187
|
+
declare const Select: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, "ref">, OmittedProps$3> & {
|
|
1188
|
+
/**
|
|
1189
|
+
* The label for the select field
|
|
1190
|
+
*/
|
|
1191
|
+
label: string;
|
|
1192
|
+
/**
|
|
1193
|
+
* The error message to display if `isInvalid` is `true`
|
|
1194
|
+
*/
|
|
1195
|
+
errorMessage?: string;
|
|
1196
|
+
/**
|
|
1197
|
+
* Text that provides additional guidance to the user
|
|
1198
|
+
*/
|
|
1199
|
+
helperText?: string;
|
|
1200
|
+
/**
|
|
1201
|
+
* If `true`, the select field will display an optional indicator.
|
|
1202
|
+
* If the `isRequired` prop is also `true`, this prop will be ignored.
|
|
1203
|
+
*/
|
|
1204
|
+
isOptional?: boolean;
|
|
1205
|
+
} & SelectBaseOptions & react.RefAttributes<HTMLSelectElement>> & {
|
|
1206
|
+
Option: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.OptionHTMLAttributes<HTMLOptionElement>, HTMLOptionElement>, "ref">, "label" | "disabled"> & {
|
|
1207
|
+
isDisabled?: boolean;
|
|
1208
|
+
} & react.RefAttributes<HTMLOptionElement>>;
|
|
973
1209
|
};
|
|
974
1210
|
|
|
975
1211
|
declare const X_SIZE_CLASSES: ResponsiveClassMap<"0x" | "1x" | "2x" | "3x" | "4x" | "5x" | "6x" | "8x" | "10x" | "12x" | "14x" | "16x" | "20x" | "24x">;
|
|
976
1212
|
declare const Y_SIZE_CLASSES: ResponsiveClassMap<"0x" | "1x" | "2x" | "3x" | "4x" | "5x" | "6x" | "8x" | "10x" | "12x" | "14x" | "16x" | "20x" | "24x">;
|
|
977
1213
|
type Spacing = ResponsiveSize<typeof X_SIZE_CLASSES> & ResponsiveSize<typeof Y_SIZE_CLASSES>;
|
|
978
|
-
|
|
1214
|
+
type SpacerOptions = {
|
|
979
1215
|
axis?: 'x' | 'y';
|
|
980
1216
|
size: ResponsiveProp<Spacing>;
|
|
981
|
-
}
|
|
1217
|
+
};
|
|
982
1218
|
/**
|
|
983
1219
|
* @deprecated
|
|
984
1220
|
*/
|
|
985
|
-
|
|
986
|
-
}
|
|
1221
|
+
type SpacerProps = {} & HTMLQdsProps<'span'> & SpacerOptions;
|
|
987
1222
|
/**
|
|
988
1223
|
* @deprecated Use Tailwind CSS instead.
|
|
989
1224
|
*/
|
|
990
|
-
declare const Spacer: react.ForwardRefExoticComponent<
|
|
1225
|
+
declare const Spacer: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & SpacerOptions & react.RefAttributes<HTMLSpanElement>>;
|
|
991
1226
|
|
|
992
1227
|
declare const DIRECTION_CLASSES: ResponsiveClassMap<"row" | "column" | "column-reverse" | "row-reverse">;
|
|
993
1228
|
declare const JUSTIFY_CONTENT_CLASSES: ResponsiveClassMap<"center" | "space-around" | "space-between" | "space-evenly" | "flex-end" | "flex-start">;
|
|
@@ -1003,7 +1238,7 @@ type JustifyContent = ResponsiveSize<typeof JUSTIFY_CONTENT_CLASSES>;
|
|
|
1003
1238
|
type AlignItems = ResponsiveSize<typeof ALIGN_ITEMS_CLASSES>;
|
|
1004
1239
|
type GapProp = ResponsiveSize<typeof GAP_CLASSES>;
|
|
1005
1240
|
type FlexWrap = keyof typeof WRAP_CLASSES;
|
|
1006
|
-
|
|
1241
|
+
type StackOptions = {
|
|
1007
1242
|
/**
|
|
1008
1243
|
* The direction of the stack.
|
|
1009
1244
|
* @default 'column'
|
|
@@ -1036,7 +1271,7 @@ interface StackOptions {
|
|
|
1036
1271
|
* Wrap them in a `div` or other element._
|
|
1037
1272
|
*/
|
|
1038
1273
|
divider?: ReactNode;
|
|
1039
|
-
}
|
|
1274
|
+
};
|
|
1040
1275
|
type StackComponent = ForwardRefComponent<'div', StackOptions>;
|
|
1041
1276
|
/**
|
|
1042
1277
|
* @deprecated
|
|
@@ -1047,7 +1282,7 @@ type StackProps = PropsOf<StackComponent>;
|
|
|
1047
1282
|
*/
|
|
1048
1283
|
declare const Stack: StackComponent;
|
|
1049
1284
|
|
|
1050
|
-
|
|
1285
|
+
type SwitchOptions = {
|
|
1051
1286
|
/**
|
|
1052
1287
|
* The label for the switch
|
|
1053
1288
|
*/
|
|
@@ -1075,12 +1310,11 @@ interface SwitchOptions {
|
|
|
1075
1310
|
*/
|
|
1076
1311
|
isRequired?: boolean;
|
|
1077
1312
|
onCheckedChange?: (isChecked: boolean) => void;
|
|
1078
|
-
}
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
declare const Switch: react.ForwardRefExoticComponent<SwitchProps & react.RefAttributes<HTMLButtonElement>>;
|
|
1313
|
+
};
|
|
1314
|
+
type SwitchProps = {} & Omit<Switch$1.SwitchProps, 'asChild' | keyof SwitchOptions> & SwitchOptions;
|
|
1315
|
+
declare const Switch: react.ForwardRefExoticComponent<Omit<Switch$1.SwitchProps, "asChild" | keyof SwitchOptions> & SwitchOptions & react.RefAttributes<HTMLButtonElement>>;
|
|
1082
1316
|
|
|
1083
|
-
|
|
1317
|
+
type TextareaOptions = {
|
|
1084
1318
|
/**
|
|
1085
1319
|
* The label for the textarea field
|
|
1086
1320
|
*/
|
|
@@ -1098,24 +1332,40 @@ interface TextareaOptions extends TextareaBaseOptions {
|
|
|
1098
1332
|
* If the `isRequired` prop is also `true`, this prop will be ignored.
|
|
1099
1333
|
*/
|
|
1100
1334
|
isOptional?: boolean;
|
|
1101
|
-
}
|
|
1335
|
+
} & TextareaBaseOptions;
|
|
1102
1336
|
type OmittedProps$2 = 'children' | 'readOnly' | 'size';
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1337
|
+
type TextareaProps = {} & Omit<HTMLQdsProps<'textarea'>, OmittedProps$2> & TextareaOptions;
|
|
1338
|
+
declare const Textarea: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref">, OmittedProps$2> & {
|
|
1339
|
+
/**
|
|
1340
|
+
* The label for the textarea field
|
|
1341
|
+
*/
|
|
1342
|
+
label: string;
|
|
1343
|
+
/**
|
|
1344
|
+
* The error message to display if `isInvalid` is `true`
|
|
1345
|
+
*/
|
|
1346
|
+
errorMessage?: string;
|
|
1347
|
+
/**
|
|
1348
|
+
* Text that provides additional guidance to the user
|
|
1349
|
+
*/
|
|
1350
|
+
helperText?: string;
|
|
1351
|
+
/**
|
|
1352
|
+
* If `true`, the input will display an optional indicator.
|
|
1353
|
+
* If the `isRequired` prop is also `true`, this prop will be ignored.
|
|
1354
|
+
*/
|
|
1355
|
+
isOptional?: boolean;
|
|
1356
|
+
} & TextareaBaseOptions & react.RefAttributes<HTMLTextAreaElement>>;
|
|
1106
1357
|
|
|
1107
1358
|
declare const VARIANT_CLASSES: {
|
|
1108
1359
|
readonly neutral: "bg-black text-white";
|
|
1109
1360
|
readonly error: "bg-negative text-white";
|
|
1110
1361
|
};
|
|
1111
1362
|
type ToastVariant = keyof typeof VARIANT_CLASSES;
|
|
1112
|
-
|
|
1363
|
+
type ToastOptions$1 = {
|
|
1113
1364
|
text: string;
|
|
1114
1365
|
variant?: ToastVariant;
|
|
1115
|
-
}
|
|
1366
|
+
};
|
|
1116
1367
|
type OmittedProps$1 = 'children';
|
|
1117
|
-
|
|
1118
|
-
}
|
|
1368
|
+
type ToastProps = {} & Omit<HTMLQdsProps<'div'>, OmittedProps$1> & ToastOptions$1;
|
|
1119
1369
|
/**
|
|
1120
1370
|
* We style a separate div as a child for Radix Toast.Root in order to meet the QDS accessibility requirements & animate it
|
|
1121
1371
|
* Radix uses <ol> and <li> elements for Toast elements in combination with role="status", which is not allowed according to a11y standards
|
|
@@ -1124,14 +1374,14 @@ interface ToastProps extends Omit<HTMLQdsProps<'div'>, OmittedProps$1>, ToastOpt
|
|
|
1124
1374
|
declare function Toast(props: ToastProps & Toast$1.ToastProps): react_jsx_runtime.JSX.Element;
|
|
1125
1375
|
|
|
1126
1376
|
type Id = number | string;
|
|
1127
|
-
|
|
1377
|
+
type ToastOptions = {
|
|
1128
1378
|
/**
|
|
1129
1379
|
* Unique identifier for the toast (can be used for removing it prematurely). If a toast with this
|
|
1130
1380
|
* identifier already exists it will be removed before the new toast is added.
|
|
1131
1381
|
* @default a random unique id will be set and returned
|
|
1132
1382
|
*/
|
|
1133
1383
|
id?: Id;
|
|
1134
|
-
}
|
|
1384
|
+
};
|
|
1135
1385
|
declare const toast: ((text: string, options?: ToastOptions) => Id) & {
|
|
1136
1386
|
error: (text: string, options?: ToastOptions) => Id;
|
|
1137
1387
|
remove: (id: Id) => void;
|
|
@@ -1572,7 +1822,7 @@ declare const theme: {
|
|
|
1572
1822
|
*/
|
|
1573
1823
|
type Theme = typeof theme;
|
|
1574
1824
|
|
|
1575
|
-
|
|
1825
|
+
type UseBreakpointOptions = {
|
|
1576
1826
|
/**
|
|
1577
1827
|
* If `true` the initial value will be `base` instead of the current breakpoint.
|
|
1578
1828
|
* This is to support hydration when using server side rendering.
|
|
@@ -1580,7 +1830,7 @@ interface UseBreakpointOptions {
|
|
|
1580
1830
|
* @default false
|
|
1581
1831
|
*/
|
|
1582
1832
|
ssr?: boolean;
|
|
1583
|
-
}
|
|
1833
|
+
};
|
|
1584
1834
|
/**
|
|
1585
1835
|
* Hook for getting the current breakpoint.
|
|
1586
1836
|
*
|
|
@@ -1613,7 +1863,7 @@ declare function useBreakpointValue<T>(values: UseBreakpointValueProps<T>, optio
|
|
|
1613
1863
|
|
|
1614
1864
|
type FormFieldElement = 'input' | 'select' | 'textarea';
|
|
1615
1865
|
type PropGetter<T extends ElementType = LegitimateAny> = (props?: HTMLQdsProps<T>) => Record<string, unknown>;
|
|
1616
|
-
|
|
1866
|
+
type FormFieldOptions = {
|
|
1617
1867
|
/**
|
|
1618
1868
|
* The label for the form field
|
|
1619
1869
|
*/
|
|
@@ -1638,7 +1888,7 @@ interface FormFieldOptions {
|
|
|
1638
1888
|
* If `true` the form field will be required
|
|
1639
1889
|
*/
|
|
1640
1890
|
isRequired?: boolean;
|
|
1641
|
-
}
|
|
1891
|
+
};
|
|
1642
1892
|
type OmittedProps = 'children' | 'readOnly' | 'size';
|
|
1643
1893
|
type UseFormFieldProps<T extends FormFieldElement> = Omit<HTMLQdsProps<T>, OmittedProps> & FormFieldOptions;
|
|
1644
1894
|
/**
|