@qasa/qds-ui 0.32.0 → 0.33.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/dist/index.d.ts +78 -164
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/safelist.txt +125 -1
- package/package.json +11 -19
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ import * as _emotion_react from '@emotion/react';
|
|
|
3
3
|
import { EmotionCache, CSSObject } from '@emotion/react';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import { ElementType, ComponentPropsWithoutRef, ReactNode, SVGAttributes, ReactElement, useLayoutEffect } from 'react';
|
|
6
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
7
|
+
import { VariantProps as VariantProps$1 } from 'class-variance-authority';
|
|
6
8
|
import { Checkbox as Checkbox$1, DropdownMenu as DropdownMenu$1, RadioGroup as RadioGroup$1, Switch as Switch$1, Toast as Toast$1 } from 'radix-ui';
|
|
7
9
|
import * as _emotion_styled from '@emotion/styled';
|
|
8
10
|
import { LucideIcon } from 'lucide-react';
|
|
@@ -1060,169 +1062,18 @@ declare const UserIcon: react.ForwardRefExoticComponent<IconProps & react.RefAtt
|
|
|
1060
1062
|
declare const XCircleIcon: react.ForwardRefExoticComponent<IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
1061
1063
|
declare const XIcon: react.ForwardRefExoticComponent<IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
1062
1064
|
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
/**
|
|
1070
|
-
* Create a style object. Useful for creating styles that depend on the theme.
|
|
1071
|
-
*/
|
|
1072
|
-
declare function createStyle<T extends CSSObject>(styles: StyleInterpolation<T>): (theme: Theme) => T;
|
|
1073
|
-
type VariantProps<T extends ReturnType<typeof createStyle | typeof createStyleVariants>> = keyof ReturnType<T>;
|
|
1074
|
-
/**
|
|
1075
|
-
* Converts css `px` unit to `rem`.
|
|
1076
|
-
* Assumes the root font size is 16px.
|
|
1077
|
-
*/
|
|
1078
|
-
declare const pxToRem: (px: number) => string;
|
|
1079
|
-
|
|
1080
|
-
declare const getFormFieldBaseStyles: (theme: Theme) => {
|
|
1081
|
-
'&::placeholder': {
|
|
1082
|
-
color: string;
|
|
1083
|
-
};
|
|
1084
|
-
'&:hover': {
|
|
1085
|
-
borderColor: string;
|
|
1086
|
-
};
|
|
1087
|
-
'&:focus': {
|
|
1088
|
-
outline: number;
|
|
1089
|
-
borderColor: string;
|
|
1090
|
-
boxShadow: `0 0 0 1px ${string}`;
|
|
1091
|
-
};
|
|
1092
|
-
'&[aria-invalid="true"]': {
|
|
1093
|
-
borderColor: string;
|
|
1094
|
-
'&:focus': {
|
|
1095
|
-
boxShadow: `0 0 0 1px ${string}`;
|
|
1096
|
-
};
|
|
1097
|
-
};
|
|
1098
|
-
'&[disabled], &:disabled, &[data-disabled]': {
|
|
1099
|
-
opacity: number;
|
|
1100
|
-
borderColor: string;
|
|
1101
|
-
};
|
|
1102
|
-
transitionProperty: "opacity, border-color, box-shadow";
|
|
1103
|
-
transitionDuration: "120ms";
|
|
1104
|
-
transitionTimingFunction: "ease";
|
|
1105
|
-
fontFamily: string;
|
|
1106
|
-
fontWeight: string;
|
|
1107
|
-
fontSize: string;
|
|
1108
|
-
lineHeight: string;
|
|
1109
|
-
letterSpacing: string;
|
|
1110
|
-
width: string;
|
|
1111
|
-
minWidth: number;
|
|
1112
|
-
appearance: "none";
|
|
1113
|
-
paddingLeft: string;
|
|
1114
|
-
paddingRight: string;
|
|
1115
|
-
border: string;
|
|
1116
|
-
borderRadius: string;
|
|
1117
|
-
backgroundColor: string;
|
|
1118
|
-
color: string;
|
|
1119
|
-
WebkitTouchCallout: "none";
|
|
1120
|
-
WebkitTapHighlightColor: "transparent";
|
|
1121
|
-
'&::-webkit-date-and-time-value': {
|
|
1122
|
-
textAlign: "left";
|
|
1123
|
-
};
|
|
1124
|
-
alignItems: "center";
|
|
1065
|
+
declare const SIZE_CLASSES: {
|
|
1066
|
+
xs: string;
|
|
1067
|
+
sm: string;
|
|
1068
|
+
md: string;
|
|
1069
|
+
lg: string;
|
|
1070
|
+
xl: string;
|
|
1125
1071
|
};
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
fontSize: string;
|
|
1132
|
-
lineHeight: string;
|
|
1133
|
-
letterSpacing: string;
|
|
1134
|
-
height: string;
|
|
1135
|
-
paddingLeft: string;
|
|
1136
|
-
paddingRight: string;
|
|
1137
|
-
};
|
|
1138
|
-
sm: {
|
|
1139
|
-
fontFamily: string;
|
|
1140
|
-
fontWeight: string;
|
|
1141
|
-
fontSize: string;
|
|
1142
|
-
lineHeight: string;
|
|
1143
|
-
letterSpacing: string;
|
|
1144
|
-
height: string;
|
|
1145
|
-
paddingLeft: string;
|
|
1146
|
-
paddingRight: string;
|
|
1147
|
-
};
|
|
1148
|
-
md: {
|
|
1149
|
-
fontFamily: string;
|
|
1150
|
-
fontWeight: string;
|
|
1151
|
-
fontSize: string;
|
|
1152
|
-
lineHeight: string;
|
|
1153
|
-
letterSpacing: string;
|
|
1154
|
-
height: string;
|
|
1155
|
-
paddingLeft: string;
|
|
1156
|
-
paddingRight: string;
|
|
1157
|
-
};
|
|
1158
|
-
lg: {
|
|
1159
|
-
fontFamily: string;
|
|
1160
|
-
fontWeight: string;
|
|
1161
|
-
fontSize: string;
|
|
1162
|
-
lineHeight: string;
|
|
1163
|
-
letterSpacing: string;
|
|
1164
|
-
height: string;
|
|
1165
|
-
paddingLeft: string;
|
|
1166
|
-
paddingRight: string;
|
|
1167
|
-
};
|
|
1168
|
-
xl: {
|
|
1169
|
-
fontFamily: string;
|
|
1170
|
-
fontWeight: string;
|
|
1171
|
-
fontSize: string;
|
|
1172
|
-
lineHeight: string;
|
|
1173
|
-
letterSpacing: string;
|
|
1174
|
-
height: string;
|
|
1175
|
-
paddingLeft: string;
|
|
1176
|
-
paddingRight: string;
|
|
1177
|
-
};
|
|
1178
|
-
};
|
|
1179
|
-
type ButtonSize = VariantProps<typeof getSizeStyles$4>;
|
|
1180
|
-
declare const getVariantStyles$2: (theme: Theme) => {
|
|
1181
|
-
primary: {
|
|
1182
|
-
background: string;
|
|
1183
|
-
color: string;
|
|
1184
|
-
":not([disabled])": {
|
|
1185
|
-
'@media(hover: hover)': {
|
|
1186
|
-
':hover': {
|
|
1187
|
-
background: string;
|
|
1188
|
-
};
|
|
1189
|
-
};
|
|
1190
|
-
':active': {
|
|
1191
|
-
background: string;
|
|
1192
|
-
};
|
|
1193
|
-
};
|
|
1194
|
-
};
|
|
1195
|
-
secondary: {
|
|
1196
|
-
background: string;
|
|
1197
|
-
color: string;
|
|
1198
|
-
":not([disabled])": {
|
|
1199
|
-
'@media(hover: hover)': {
|
|
1200
|
-
':hover': {
|
|
1201
|
-
background: string;
|
|
1202
|
-
};
|
|
1203
|
-
};
|
|
1204
|
-
':active': {
|
|
1205
|
-
background: string;
|
|
1206
|
-
};
|
|
1207
|
-
};
|
|
1208
|
-
};
|
|
1209
|
-
tertiary: {
|
|
1210
|
-
background: string;
|
|
1211
|
-
color: string;
|
|
1212
|
-
":not([disabled])": {
|
|
1213
|
-
'@media(hover: hover)': {
|
|
1214
|
-
':hover': {
|
|
1215
|
-
background: string;
|
|
1216
|
-
};
|
|
1217
|
-
};
|
|
1218
|
-
':active': {
|
|
1219
|
-
background: string;
|
|
1220
|
-
};
|
|
1221
|
-
};
|
|
1222
|
-
};
|
|
1223
|
-
};
|
|
1224
|
-
type ButtonVariant = VariantProps<typeof getVariantStyles$2>;
|
|
1225
|
-
|
|
1072
|
+
declare const buttonVariants: (props?: ({
|
|
1073
|
+
variant?: "primary" | "secondary" | "tertiary" | null | undefined;
|
|
1074
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1075
|
+
type ButtonSize = keyof typeof SIZE_CLASSES;
|
|
1076
|
+
type ButtonVariant = NonNullable<VariantProps$1<typeof buttonVariants>['variant']>;
|
|
1226
1077
|
interface ButtonOptions {
|
|
1227
1078
|
/**
|
|
1228
1079
|
* Sets the size of the button
|
|
@@ -1263,7 +1114,6 @@ interface ButtonOptions {
|
|
|
1263
1114
|
*/
|
|
1264
1115
|
type?: 'button' | 'submit' | 'reset';
|
|
1265
1116
|
}
|
|
1266
|
-
|
|
1267
1117
|
type PolymorphicButton = ForwardRefComponent<'button', ButtonOptions>;
|
|
1268
1118
|
type ButtonProps = PropsOf<PolymorphicButton>;
|
|
1269
1119
|
declare const Button: PolymorphicButton;
|
|
@@ -1390,7 +1240,7 @@ interface DividerOptions {
|
|
|
1390
1240
|
}
|
|
1391
1241
|
interface DividerProps extends HTMLQdsProps<'span'>, DividerOptions {
|
|
1392
1242
|
}
|
|
1393
|
-
declare const Divider: react.ForwardRefExoticComponent<DividerProps & react.RefAttributes<
|
|
1243
|
+
declare const Divider: react.ForwardRefExoticComponent<DividerProps & react.RefAttributes<HTMLSpanElement>>;
|
|
1394
1244
|
|
|
1395
1245
|
type PrimitiveContentProps = DropdownMenu$1.DropdownMenuContentProps;
|
|
1396
1246
|
interface DropdownMenuContentOptions {
|
|
@@ -1552,6 +1402,70 @@ declare const HintBox: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLPr
|
|
|
1552
1402
|
}, react.DetailedHTMLProps<react.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
|
|
1553
1403
|
};
|
|
1554
1404
|
|
|
1405
|
+
type NamedStyles = Record<string, CSSObject>;
|
|
1406
|
+
type StyleInterpolation<T> = (theme: Theme) => T;
|
|
1407
|
+
/**
|
|
1408
|
+
* Creates a collection of named style rules.
|
|
1409
|
+
*/
|
|
1410
|
+
declare function createStyleVariants<T extends NamedStyles>(styles: StyleInterpolation<T>): (theme: Theme) => T;
|
|
1411
|
+
/**
|
|
1412
|
+
* Create a style object. Useful for creating styles that depend on the theme.
|
|
1413
|
+
*/
|
|
1414
|
+
declare function createStyle<T extends CSSObject>(styles: StyleInterpolation<T>): (theme: Theme) => T;
|
|
1415
|
+
type VariantProps<T extends ReturnType<typeof createStyle | typeof createStyleVariants>> = keyof ReturnType<T>;
|
|
1416
|
+
/**
|
|
1417
|
+
* Converts css `px` unit to `rem`.
|
|
1418
|
+
* Assumes the root font size is 16px.
|
|
1419
|
+
*/
|
|
1420
|
+
declare const pxToRem: (px: number) => string;
|
|
1421
|
+
|
|
1422
|
+
declare const getFormFieldBaseStyles: (theme: Theme) => {
|
|
1423
|
+
'&::placeholder': {
|
|
1424
|
+
color: string;
|
|
1425
|
+
};
|
|
1426
|
+
'&:hover': {
|
|
1427
|
+
borderColor: string;
|
|
1428
|
+
};
|
|
1429
|
+
'&:focus': {
|
|
1430
|
+
outline: number;
|
|
1431
|
+
borderColor: string;
|
|
1432
|
+
boxShadow: `0 0 0 1px ${string}`;
|
|
1433
|
+
};
|
|
1434
|
+
'&[aria-invalid="true"]': {
|
|
1435
|
+
borderColor: string;
|
|
1436
|
+
'&:focus': {
|
|
1437
|
+
boxShadow: `0 0 0 1px ${string}`;
|
|
1438
|
+
};
|
|
1439
|
+
};
|
|
1440
|
+
'&[disabled], &:disabled, &[data-disabled]': {
|
|
1441
|
+
opacity: number;
|
|
1442
|
+
borderColor: string;
|
|
1443
|
+
};
|
|
1444
|
+
transitionProperty: "opacity, border-color, box-shadow";
|
|
1445
|
+
transitionDuration: "120ms";
|
|
1446
|
+
transitionTimingFunction: "ease";
|
|
1447
|
+
fontFamily: string;
|
|
1448
|
+
fontWeight: string;
|
|
1449
|
+
fontSize: string;
|
|
1450
|
+
lineHeight: string;
|
|
1451
|
+
letterSpacing: string;
|
|
1452
|
+
width: string;
|
|
1453
|
+
minWidth: number;
|
|
1454
|
+
appearance: "none";
|
|
1455
|
+
paddingLeft: string;
|
|
1456
|
+
paddingRight: string;
|
|
1457
|
+
border: string;
|
|
1458
|
+
borderRadius: string;
|
|
1459
|
+
backgroundColor: string;
|
|
1460
|
+
color: string;
|
|
1461
|
+
WebkitTouchCallout: "none";
|
|
1462
|
+
WebkitTapHighlightColor: "transparent";
|
|
1463
|
+
'&::-webkit-date-and-time-value': {
|
|
1464
|
+
textAlign: "left";
|
|
1465
|
+
};
|
|
1466
|
+
alignItems: "center";
|
|
1467
|
+
};
|
|
1468
|
+
|
|
1555
1469
|
declare const getSizeStyles$3: (theme: Theme) => {
|
|
1556
1470
|
xs: {
|
|
1557
1471
|
width: string;
|