@qasa/qds-ui 0.33.0 → 0.34.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 +107 -195
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/preset.css +22 -0
- package/package.json +2 -3
- package/dist/safelist.txt +0 -127
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as _emotion_react from '@emotion/react';
|
|
3
2
|
import { EmotionCache, CSSObject } from '@emotion/react';
|
|
4
3
|
import * as react from 'react';
|
|
5
4
|
import { ElementType, ComponentPropsWithoutRef, ReactNode, SVGAttributes, ReactElement, useLayoutEffect } from 'react';
|
|
6
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
7
6
|
import { VariantProps as VariantProps$1 } from 'class-variance-authority';
|
|
8
7
|
import { Checkbox as Checkbox$1, DropdownMenu as DropdownMenu$1, RadioGroup as RadioGroup$1, Switch as Switch$1, Toast as Toast$1 } from 'radix-ui';
|
|
9
|
-
import * as _emotion_styled from '@emotion/styled';
|
|
10
8
|
import { LucideIcon } from 'lucide-react';
|
|
11
9
|
|
|
12
10
|
/**
|
|
@@ -881,15 +879,15 @@ type BreakpointsConfig$1<T> = PartialRecord<keyof Theme['breakpoints'], T> & {
|
|
|
881
879
|
};
|
|
882
880
|
type ResponsiveProp<T> = T | BreakpointsConfig$1<T>;
|
|
883
881
|
|
|
884
|
-
declare const
|
|
885
|
-
xs:
|
|
886
|
-
sm:
|
|
887
|
-
md:
|
|
888
|
-
lg:
|
|
889
|
-
xl:
|
|
890
|
-
'2xl':
|
|
882
|
+
declare const SIZE_CLASSES$4: {
|
|
883
|
+
xs: string;
|
|
884
|
+
sm: string;
|
|
885
|
+
md: string;
|
|
886
|
+
lg: string;
|
|
887
|
+
xl: string;
|
|
888
|
+
'2xl': string;
|
|
891
889
|
};
|
|
892
|
-
type AvatarSize = keyof typeof
|
|
890
|
+
type AvatarSize = keyof typeof SIZE_CLASSES$4;
|
|
893
891
|
interface AvatarOptions {
|
|
894
892
|
/**
|
|
895
893
|
* Source url of the image to display. If not passed
|
|
@@ -1062,7 +1060,7 @@ declare const UserIcon: react.ForwardRefExoticComponent<IconProps & react.RefAtt
|
|
|
1062
1060
|
declare const XCircleIcon: react.ForwardRefExoticComponent<IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
1063
1061
|
declare const XIcon: react.ForwardRefExoticComponent<IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
1064
1062
|
|
|
1065
|
-
declare const SIZE_CLASSES: {
|
|
1063
|
+
declare const SIZE_CLASSES$3: {
|
|
1066
1064
|
xs: string;
|
|
1067
1065
|
sm: string;
|
|
1068
1066
|
md: string;
|
|
@@ -1070,9 +1068,9 @@ declare const SIZE_CLASSES: {
|
|
|
1070
1068
|
xl: string;
|
|
1071
1069
|
};
|
|
1072
1070
|
declare const buttonVariants: (props?: ({
|
|
1073
|
-
variant?: "primary" | "secondary" | "tertiary" | null | undefined;
|
|
1071
|
+
variant?: "primary" | "secondary" | "tertiary" | "danger" | null | undefined;
|
|
1074
1072
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1075
|
-
type ButtonSize = keyof typeof SIZE_CLASSES;
|
|
1073
|
+
type ButtonSize = keyof typeof SIZE_CLASSES$3;
|
|
1076
1074
|
type ButtonVariant = NonNullable<VariantProps$1<typeof buttonVariants>['variant']>;
|
|
1077
1075
|
interface ButtonOptions {
|
|
1078
1076
|
/**
|
|
@@ -1393,172 +1391,26 @@ type HeadingProps = PropsOf<HeadingComponent>;
|
|
|
1393
1391
|
*/
|
|
1394
1392
|
declare const Heading: HeadingComponent;
|
|
1395
1393
|
|
|
1396
|
-
type HintBoxTitleProps = HTMLQdsProps<'
|
|
1394
|
+
type HintBoxTitleProps = HTMLQdsProps<'p'>;
|
|
1397
1395
|
type HintBoxProps = HTMLQdsProps<'aside'>;
|
|
1398
1396
|
declare const HintBox: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & react.RefAttributes<HTMLElement>> & {
|
|
1399
|
-
Title:
|
|
1400
|
-
theme?: _emotion_react.Theme;
|
|
1401
|
-
as?: React.ElementType;
|
|
1402
|
-
}, react.DetailedHTMLProps<react.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
|
|
1397
|
+
Title: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & react.RefAttributes<HTMLParagraphElement>>;
|
|
1403
1398
|
};
|
|
1404
1399
|
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
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
|
-
|
|
1469
|
-
declare const getSizeStyles$3: (theme: Theme) => {
|
|
1470
|
-
xs: {
|
|
1471
|
-
width: string;
|
|
1472
|
-
height: string;
|
|
1473
|
-
};
|
|
1474
|
-
sm: {
|
|
1475
|
-
width: string;
|
|
1476
|
-
height: string;
|
|
1477
|
-
};
|
|
1478
|
-
md: {
|
|
1479
|
-
width: string;
|
|
1480
|
-
height: string;
|
|
1481
|
-
};
|
|
1482
|
-
};
|
|
1483
|
-
declare const getVariantStyles$1: (theme: Theme) => {
|
|
1484
|
-
primary: {
|
|
1485
|
-
background: string;
|
|
1486
|
-
color: string;
|
|
1487
|
-
":not([disabled])": {
|
|
1488
|
-
'@media(hover: hover)': {
|
|
1489
|
-
':hover': {
|
|
1490
|
-
background: string;
|
|
1491
|
-
};
|
|
1492
|
-
};
|
|
1493
|
-
':active': {
|
|
1494
|
-
background: string;
|
|
1495
|
-
};
|
|
1496
|
-
};
|
|
1497
|
-
};
|
|
1498
|
-
secondary: {
|
|
1499
|
-
background: string;
|
|
1500
|
-
color: string;
|
|
1501
|
-
":not([disabled])": {
|
|
1502
|
-
'@media(hover: hover)': {
|
|
1503
|
-
':hover': {
|
|
1504
|
-
background: string;
|
|
1505
|
-
};
|
|
1506
|
-
};
|
|
1507
|
-
':active': {
|
|
1508
|
-
background: string;
|
|
1509
|
-
};
|
|
1510
|
-
};
|
|
1511
|
-
};
|
|
1512
|
-
tertiary: {
|
|
1513
|
-
background: string;
|
|
1514
|
-
color: string;
|
|
1515
|
-
":not([disabled])": {
|
|
1516
|
-
'@media(hover: hover)': {
|
|
1517
|
-
':hover': {
|
|
1518
|
-
background: string;
|
|
1519
|
-
};
|
|
1520
|
-
};
|
|
1521
|
-
':active': {
|
|
1522
|
-
background: string;
|
|
1523
|
-
};
|
|
1524
|
-
};
|
|
1525
|
-
};
|
|
1526
|
-
ghost: {
|
|
1527
|
-
color: string;
|
|
1528
|
-
":not([disabled])": {
|
|
1529
|
-
'@media(hover: hover)': {
|
|
1530
|
-
':hover': {
|
|
1531
|
-
background: string;
|
|
1532
|
-
};
|
|
1533
|
-
};
|
|
1534
|
-
':active': {
|
|
1535
|
-
background: string;
|
|
1536
|
-
};
|
|
1537
|
-
};
|
|
1538
|
-
};
|
|
1539
|
-
white: {
|
|
1540
|
-
background: string;
|
|
1541
|
-
color: string;
|
|
1542
|
-
":not([disabled])": {
|
|
1543
|
-
'@media(hover: hover)': {
|
|
1544
|
-
':hover': {
|
|
1545
|
-
background: string;
|
|
1546
|
-
};
|
|
1547
|
-
};
|
|
1548
|
-
':active': {
|
|
1549
|
-
background: string;
|
|
1550
|
-
};
|
|
1551
|
-
};
|
|
1552
|
-
};
|
|
1400
|
+
declare const SIZE_CLASSES$2: {
|
|
1401
|
+
xs: string;
|
|
1402
|
+
sm: string;
|
|
1403
|
+
md: string;
|
|
1553
1404
|
};
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1405
|
+
declare const iconButtonVariants: (props?: ({
|
|
1406
|
+
variant?: "white" | "primary" | "secondary" | "tertiary" | "danger" | "ghost" | null | undefined;
|
|
1407
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1408
|
+
type IconButtonSize = keyof typeof SIZE_CLASSES$2;
|
|
1409
|
+
type IconButtonVariant = NonNullable<VariantProps$1<typeof iconButtonVariants>['variant']>;
|
|
1557
1410
|
interface IconButtonOptions {
|
|
1558
1411
|
icon: ElementType<IconProps>;
|
|
1559
1412
|
/**
|
|
1560
1413
|
* A visually hidden label read by screen readers.
|
|
1561
|
-
*
|
|
1562
1414
|
*/
|
|
1563
1415
|
label: string;
|
|
1564
1416
|
/**
|
|
@@ -1626,24 +1478,24 @@ interface TextFieldProps extends Omit<HTMLQdsProps<'input'>, OmittedProps$7>, Te
|
|
|
1626
1478
|
}
|
|
1627
1479
|
declare const TextField: react.ForwardRefExoticComponent<TextFieldProps & react.RefAttributes<HTMLInputElement>>;
|
|
1628
1480
|
|
|
1629
|
-
declare const
|
|
1630
|
-
sm:
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1481
|
+
declare const SIZE_CLASSES$1: {
|
|
1482
|
+
sm: string;
|
|
1483
|
+
md: string;
|
|
1484
|
+
};
|
|
1485
|
+
declare const COLOR_CLASSES: {
|
|
1486
|
+
readonly strong: "text-strong";
|
|
1487
|
+
readonly default: "text-default";
|
|
1488
|
+
readonly subtle: "text-subtle";
|
|
1489
|
+
readonly disabled: "text-disabled";
|
|
1490
|
+
readonly negative: "text-negative";
|
|
1491
|
+
readonly warning: "text-warning";
|
|
1492
|
+
readonly positive: "text-positive";
|
|
1493
|
+
readonly onBrandPrimary: "text-onBrandPrimary";
|
|
1494
|
+
readonly onBrandSecondary: "text-onBrandSecondary";
|
|
1495
|
+
readonly onBrandTertiary: "text-onBrandTertiary";
|
|
1644
1496
|
};
|
|
1645
|
-
type LabelSize =
|
|
1646
|
-
type LabelColor = keyof
|
|
1497
|
+
type LabelSize = keyof typeof SIZE_CLASSES$1;
|
|
1498
|
+
type LabelColor = keyof typeof COLOR_CLASSES;
|
|
1647
1499
|
interface LabelOptions {
|
|
1648
1500
|
/**
|
|
1649
1501
|
* Size of the label
|
|
@@ -1673,15 +1525,11 @@ type LinkComponent = ForwardRefComponent<'a', LinkOptions>;
|
|
|
1673
1525
|
type LinkProps = PropsOf<LinkComponent>;
|
|
1674
1526
|
declare const Link: LinkComponent;
|
|
1675
1527
|
|
|
1676
|
-
declare const
|
|
1677
|
-
sm:
|
|
1678
|
-
|
|
1679
|
-
};
|
|
1680
|
-
md: {
|
|
1681
|
-
fontSize: string;
|
|
1682
|
-
};
|
|
1528
|
+
declare const SIZE_CLASSES: {
|
|
1529
|
+
sm: string;
|
|
1530
|
+
md: string;
|
|
1683
1531
|
};
|
|
1684
|
-
type LoadingDotsSize =
|
|
1532
|
+
type LoadingDotsSize = keyof typeof SIZE_CLASSES;
|
|
1685
1533
|
interface LoadingDotsOptions {
|
|
1686
1534
|
size?: ResponsiveProp<LoadingDotsSize>;
|
|
1687
1535
|
}
|
|
@@ -1689,6 +1537,70 @@ interface LoadingDotsProps extends HTMLQdsProps<'span'>, LoadingDotsOptions {
|
|
|
1689
1537
|
}
|
|
1690
1538
|
declare const LoadingDots: react.ForwardRefExoticComponent<LoadingDotsProps & react.RefAttributes<HTMLSpanElement>>;
|
|
1691
1539
|
|
|
1540
|
+
type NamedStyles = Record<string, CSSObject>;
|
|
1541
|
+
type StyleInterpolation<T> = (theme: Theme) => T;
|
|
1542
|
+
/**
|
|
1543
|
+
* Creates a collection of named style rules.
|
|
1544
|
+
*/
|
|
1545
|
+
declare function createStyleVariants<T extends NamedStyles>(styles: StyleInterpolation<T>): (theme: Theme) => T;
|
|
1546
|
+
/**
|
|
1547
|
+
* Create a style object. Useful for creating styles that depend on the theme.
|
|
1548
|
+
*/
|
|
1549
|
+
declare function createStyle<T extends CSSObject>(styles: StyleInterpolation<T>): (theme: Theme) => T;
|
|
1550
|
+
type VariantProps<T extends ReturnType<typeof createStyle | typeof createStyleVariants>> = keyof ReturnType<T>;
|
|
1551
|
+
/**
|
|
1552
|
+
* Converts css `px` unit to `rem`.
|
|
1553
|
+
* Assumes the root font size is 16px.
|
|
1554
|
+
*/
|
|
1555
|
+
declare const pxToRem: (px: number) => string;
|
|
1556
|
+
|
|
1557
|
+
declare const getFormFieldBaseStyles: (theme: Theme) => {
|
|
1558
|
+
'&::placeholder': {
|
|
1559
|
+
color: string;
|
|
1560
|
+
};
|
|
1561
|
+
'&:hover': {
|
|
1562
|
+
borderColor: string;
|
|
1563
|
+
};
|
|
1564
|
+
'&:focus': {
|
|
1565
|
+
outline: number;
|
|
1566
|
+
borderColor: string;
|
|
1567
|
+
boxShadow: `0 0 0 1px ${string}`;
|
|
1568
|
+
};
|
|
1569
|
+
'&[aria-invalid="true"]': {
|
|
1570
|
+
borderColor: string;
|
|
1571
|
+
'&:focus': {
|
|
1572
|
+
boxShadow: `0 0 0 1px ${string}`;
|
|
1573
|
+
};
|
|
1574
|
+
};
|
|
1575
|
+
'&[disabled], &:disabled, &[data-disabled]': {
|
|
1576
|
+
opacity: number;
|
|
1577
|
+
borderColor: string;
|
|
1578
|
+
};
|
|
1579
|
+
transitionProperty: "opacity, border-color, box-shadow";
|
|
1580
|
+
transitionDuration: "120ms";
|
|
1581
|
+
transitionTimingFunction: "ease";
|
|
1582
|
+
fontFamily: string;
|
|
1583
|
+
fontWeight: string;
|
|
1584
|
+
fontSize: string;
|
|
1585
|
+
lineHeight: string;
|
|
1586
|
+
letterSpacing: string;
|
|
1587
|
+
width: string;
|
|
1588
|
+
minWidth: number;
|
|
1589
|
+
appearance: "none";
|
|
1590
|
+
paddingLeft: string;
|
|
1591
|
+
paddingRight: string;
|
|
1592
|
+
border: string;
|
|
1593
|
+
borderRadius: string;
|
|
1594
|
+
backgroundColor: string;
|
|
1595
|
+
color: string;
|
|
1596
|
+
WebkitTouchCallout: "none";
|
|
1597
|
+
WebkitTapHighlightColor: "transparent";
|
|
1598
|
+
'&::-webkit-date-and-time-value': {
|
|
1599
|
+
textAlign: "left";
|
|
1600
|
+
};
|
|
1601
|
+
alignItems: "center";
|
|
1602
|
+
};
|
|
1603
|
+
|
|
1692
1604
|
declare const getSizeStyles: (theme: Theme) => {
|
|
1693
1605
|
xs: {
|
|
1694
1606
|
fontFamily: string;
|