@rango-dev/ui 0.28.2-next.4 → 0.28.2-next.6
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.js +6 -6
- package/dist/index.js.map +4 -4
- package/dist/translations/en.d.ts.map +1 -1
- package/dist/translations/es.d.ts.map +1 -1
- package/dist/translations/fr.d.ts.map +1 -1
- package/dist/translations/ja.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Alert/Alert.helpers.d.ts +3 -2
- package/dist/widget/ui/src/components/Alert/Alert.helpers.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Alert/Alert.styles.d.ts +9 -5
- package/dist/widget/ui/src/components/Alert/Alert.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Alert/Alert.types.d.ts +3 -2
- package/dist/widget/ui/src/components/Alert/Alert.types.d.ts.map +1 -1
- package/dist/widget/ui/src/components/BlockchainsChip/BlockchainsChip.styles.d.ts +1 -0
- package/dist/widget/ui/src/components/BlockchainsChip/BlockchainsChip.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/BottomLogo/BottomLogo.styles.d.ts +2 -0
- package/dist/widget/ui/src/components/BottomLogo/BottomLogo.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Button/Button.styles.d.ts +3 -0
- package/dist/widget/ui/src/components/Button/Button.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/ChainToken/ChainToken.styles.d.ts +2 -0
- package/dist/widget/ui/src/components/ChainToken/ChainToken.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Checkbox/Checkbox.styles.d.ts +4 -0
- package/dist/widget/ui/src/components/Checkbox/Checkbox.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Chip/Chip.styles.d.ts +1 -0
- package/dist/widget/ui/src/components/Chip/Chip.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Collapsible/Collapsible.styles.d.ts +1 -0
- package/dist/widget/ui/src/components/Collapsible/Collapsible.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Divider/Divider.styles.d.ts +1 -0
- package/dist/widget/ui/src/components/Divider/Divider.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Drawer/Drawer.styles.d.ts +5 -0
- package/dist/widget/ui/src/components/Drawer/Drawer.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Header/Header.styles.d.ts +2 -0
- package/dist/widget/ui/src/components/Header/Header.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Icon/CloseIcon.d.ts +1 -0
- package/dist/widget/ui/src/components/Icon/CloseIcon.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Icon/common.d.ts +2 -0
- package/dist/widget/ui/src/components/Icon/common.d.ts.map +1 -1
- package/dist/widget/ui/src/components/List/List.styles.d.ts +1 -0
- package/dist/widget/ui/src/components/List/List.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/ListItem/ListItem.styles.d.ts +1 -0
- package/dist/widget/ui/src/components/ListItem/ListItem.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/ListItemButton/ListItemButton.styles.d.ts +1 -0
- package/dist/widget/ui/src/components/ListItemButton/ListItemButton.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/MessageBox/CollapsibleMessageBox.styles.d.ts +1 -0
- package/dist/widget/ui/src/components/MessageBox/CollapsibleMessageBox.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/MessageBox/MessageBox.styles.d.ts +3 -0
- package/dist/widget/ui/src/components/MessageBox/MessageBox.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Modal/Modal.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Modal/Modal.styles.d.ts +6 -0
- package/dist/widget/ui/src/components/Modal/Modal.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/NotFound/NotFound.styles.d.ts +1 -0
- package/dist/widget/ui/src/components/NotFound/NotFound.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Popover/Popover.styles.d.ts +2 -0
- package/dist/widget/ui/src/components/Popover/Popover.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/PriceImpact/PriceImpact.styles.d.ts +2 -0
- package/dist/widget/ui/src/components/PriceImpact/PriceImpact.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/QuoteCost/QuoteCost.styles.d.ts +4 -0
- package/dist/widget/ui/src/components/QuoteCost/QuoteCost.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/QuoteCost/QuoteCost.types.d.ts +2 -1
- package/dist/widget/ui/src/components/QuoteCost/QuoteCost.types.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Radio/Radio.styles.d.ts +2 -0
- package/dist/widget/ui/src/components/Radio/Radio.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/RadioGroup/RadioGroup.styles.d.ts +4 -0
- package/dist/widget/ui/src/components/RadioGroup/RadioGroup.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/RefreshProgressButton/RefreshProgressButton.styles.d.ts +2 -0
- package/dist/widget/ui/src/components/RefreshProgressButton/RefreshProgressButton.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/RoutesOverview/RoutesOverview.d.ts +1 -0
- package/dist/widget/ui/src/components/RoutesOverview/RoutesOverview.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Select/Select.d.ts +4 -0
- package/dist/widget/ui/src/components/Select/Select.d.ts.map +1 -0
- package/dist/widget/ui/src/components/Select/Select.types.d.ts +12 -0
- package/dist/widget/ui/src/components/Select/Select.types.d.ts.map +1 -0
- package/dist/widget/ui/src/components/Select/index.d.ts +2 -0
- package/dist/widget/ui/src/components/Select/index.d.ts.map +1 -0
- package/dist/widget/ui/src/components/Select/select.styles.d.ts +492 -0
- package/dist/widget/ui/src/components/Select/select.styles.d.ts.map +1 -0
- package/dist/widget/ui/src/components/SelectableCategoryList/SelectableCategoryList.styles.d.ts +3 -0
- package/dist/widget/ui/src/components/SelectableCategoryList/SelectableCategoryList.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Skeleton/Skeleton.styles.d.ts +1 -0
- package/dist/widget/ui/src/components/Skeleton/Skeleton.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/StepDetails/StepDetails.styles.d.ts +6 -0
- package/dist/widget/ui/src/components/StepDetails/StepDetails.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/SvgIcon/SvgIcon.style.d.ts +1 -0
- package/dist/widget/ui/src/components/SvgIcon/SvgIcon.style.d.ts.map +1 -1
- package/dist/widget/ui/src/components/SwapDetailsPlaceholder/SwapDetailsPlaceholder.d.ts +1 -0
- package/dist/widget/ui/src/components/SwapDetailsPlaceholder/SwapDetailsPlaceholder.d.ts.map +1 -1
- package/dist/widget/ui/src/components/SwapListItem/SwapListItem.styles.d.ts +6 -0
- package/dist/widget/ui/src/components/SwapListItem/SwapListItem.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/SwapListItem/SwapToken.styles.d.ts +9 -0
- package/dist/widget/ui/src/components/SwapListItem/SwapToken.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Switch/Switch.styles.d.ts +2 -0
- package/dist/widget/ui/src/components/Switch/Switch.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/TextField/TextField.d.ts +1 -1
- package/dist/widget/ui/src/components/TextField/TextField.stories.d.ts +1 -1
- package/dist/widget/ui/src/components/TextField/TextField.styles.d.ts +3 -0
- package/dist/widget/ui/src/components/TextField/TextField.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Toast/Toast.styles.d.ts +6 -0
- package/dist/widget/ui/src/components/Toast/Toast.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/TokenAmount/TokenAmount.styles.d.ts +3 -0
- package/dist/widget/ui/src/components/TokenAmount/TokenAmount.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Tooltip/Tooltip.styles.d.ts +3 -0
- package/dist/widget/ui/src/components/Tooltip/Tooltip.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Typography/NotSelectableTypography.d.ts +1 -0
- package/dist/widget/ui/src/components/Typography/NotSelectableTypography.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Typography/Typography.styles.d.ts +1 -0
- package/dist/widget/ui/src/components/Typography/Typography.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Wallet/Wallet.styles.d.ts +5 -0
- package/dist/widget/ui/src/components/Wallet/Wallet.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/common/FilledCircle.d.ts +1 -0
- package/dist/widget/ui/src/components/common/FilledCircle.d.ts.map +1 -1
- package/dist/widget/ui/src/components/common/Image.d.ts +1 -0
- package/dist/widget/ui/src/components/common/Image.d.ts.map +1 -1
- package/dist/widget/ui/src/components/common/styles.d.ts +1 -0
- package/dist/widget/ui/src/components/common/styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/index.d.ts +1 -0
- package/dist/widget/ui/src/components/index.d.ts.map +1 -1
- package/dist/widget/ui/src/containers/SwapHistory/SwapHistory.d.ts +10 -0
- package/dist/widget/ui/src/containers/SwapHistory/SwapHistory.d.ts.map +1 -1
- package/dist/widget/ui/src/containers/SwapInput/SwapInput.styles.d.ts +12 -1
- package/dist/widget/ui/src/containers/SwapInput/SwapInput.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/containers/SwapInput/TokenSection.styles.d.ts +5 -0
- package/dist/widget/ui/src/containers/SwapInput/TokenSection.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/containers/TokenSelector/TokenSelector.d.ts +1 -0
- package/dist/widget/ui/src/containers/TokenSelector/TokenSelector.d.ts.map +1 -1
- package/dist/widget/ui/src/theme.d.ts +25 -13
- package/dist/widget/ui/src/theme.d.ts.map +1 -1
- package/package.json +3 -2
- package/src/components/Alert/Alert.helpers.ts +13 -2
- package/src/components/Alert/Alert.styles.ts +7 -8
- package/src/components/Alert/Alert.tsx +6 -6
- package/src/components/Alert/Alert.types.ts +3 -2
- package/src/components/Modal/Modal.tsx +2 -0
- package/src/components/QuoteCost/QuoteCost.styles.ts +0 -1
- package/src/components/QuoteCost/QuoteCost.types.ts +1 -1
- package/src/components/Select/Select.tsx +85 -0
- package/src/components/Select/Select.types.ts +10 -0
- package/src/components/Select/index.ts +1 -0
- package/src/components/Select/select.styles.ts +100 -0
- package/src/components/index.ts +1 -0
- package/src/theme.ts +4 -1
|
@@ -426,6 +426,7 @@ export declare const Container: import("@stitches/react/types/styled-component")
|
|
|
426
426
|
18: string;
|
|
427
427
|
20: string;
|
|
428
428
|
24: string;
|
|
429
|
+
26: string;
|
|
429
430
|
28: string;
|
|
430
431
|
30: string;
|
|
431
432
|
32: string;
|
|
@@ -587,6 +588,7 @@ export declare const chainNameStyles: import("@stitches/react/types/styled-compo
|
|
|
587
588
|
18: string;
|
|
588
589
|
20: string;
|
|
589
590
|
24: string;
|
|
591
|
+
26: string;
|
|
590
592
|
28: string;
|
|
591
593
|
30: string;
|
|
592
594
|
32: string;
|
|
@@ -748,6 +750,7 @@ export declare const TokenSectionContainer: import("@stitches/react/types/styled
|
|
|
748
750
|
18: string;
|
|
749
751
|
20: string;
|
|
750
752
|
24: string;
|
|
753
|
+
26: string;
|
|
751
754
|
28: string;
|
|
752
755
|
30: string;
|
|
753
756
|
32: string;
|
|
@@ -909,6 +912,7 @@ export declare const tokenChainStyles: import("@stitches/react/types/styled-comp
|
|
|
909
912
|
18: string;
|
|
910
913
|
20: string;
|
|
911
914
|
24: string;
|
|
915
|
+
26: string;
|
|
912
916
|
28: string;
|
|
913
917
|
30: string;
|
|
914
918
|
32: string;
|
|
@@ -1070,6 +1074,7 @@ export declare const skeletonStyles: import("@stitches/react/types/styled-compon
|
|
|
1070
1074
|
18: string;
|
|
1071
1075
|
20: string;
|
|
1072
1076
|
24: string;
|
|
1077
|
+
26: string;
|
|
1073
1078
|
28: string;
|
|
1074
1079
|
30: string;
|
|
1075
1080
|
32: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenSection.styles.d.ts","sourceRoot":"","sources":["../../../../../../src/containers/SwapInput/TokenSection.styles.ts"],"names":[],"mappings":";;;AAGA,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"TokenSection.styles.d.ts","sourceRoot":"","sources":["../../../../../../src/containers/SwapInput/TokenSection.styles.ts"],"names":[],"mappings":";;;AAGA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DA2BpB,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAAQ,CAAC;AAErC,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAehC,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAQ3B,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAGzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenSelector.d.ts","sourceRoot":"","sources":["../../../../../../src/containers/TokenSelector/TokenSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"TokenSelector.d.ts","sourceRoot":"","sources":["../../../../../../src/containers/TokenSelector/TokenSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAM1B,CAAC;AACH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,eAAe,EAAE,CAAC;IACxB,IAAI,CAAC,EAAE,QAAQ,GAAG,aAAa,CAAC;IAChC,QAAQ,EAAE,eAAe,GAAG,IAAI,CAAC;IACjC,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IAC3C,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,EAAE,aAAa,CAAC;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAUD,wBAAgB,aAAa,CAAC,KAAK,EAAE,SAAS,qBAiC7C"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import type { CSS as StitchesCSS } from '@stitches/react';
|
|
2
3
|
import type { DefaultThemeMap } from '@stitches/react/types/config';
|
|
3
4
|
export declare const theme: {
|
|
4
5
|
colors: {
|
|
@@ -135,6 +136,7 @@ export declare const theme: {
|
|
|
135
136
|
18: string;
|
|
136
137
|
20: string;
|
|
137
138
|
24: string;
|
|
139
|
+
26: string;
|
|
138
140
|
28: string;
|
|
139
141
|
30: string;
|
|
140
142
|
32: string;
|
|
@@ -173,7 +175,7 @@ export declare const darkColors: {
|
|
|
173
175
|
};
|
|
174
176
|
export declare const styled: <Type extends import("react").ComponentType<any> | import("@stitches/react/types/util").Function | keyof JSX.IntrinsicElements, Composers extends (string | import("react").ComponentType<any> | import("@stitches/react/types/util").Function | {
|
|
175
177
|
[name: string]: unknown;
|
|
176
|
-
})[],
|
|
178
|
+
})[], CSS_1 = import("@stitches/react/types/css-util").CSS<{
|
|
177
179
|
xs: string;
|
|
178
180
|
sm: string;
|
|
179
181
|
md: string;
|
|
@@ -313,6 +315,7 @@ export declare const styled: <Type extends import("react").ComponentType<any> |
|
|
|
313
315
|
18: string;
|
|
314
316
|
20: string;
|
|
315
317
|
24: string;
|
|
318
|
+
26: string;
|
|
316
319
|
28: string;
|
|
317
320
|
30: string;
|
|
318
321
|
32: string;
|
|
@@ -328,18 +331,18 @@ export declare const styled: <Type extends import("react").ComponentType<any> |
|
|
|
328
331
|
};
|
|
329
332
|
zIndices: {};
|
|
330
333
|
transitions: {};
|
|
331
|
-
}, DefaultThemeMap, {}>>(type: Type, ...composers: { [K in keyof Composers]: string extends Composers[K] ? Composers[K] : Composers[K] extends string | import("react").ComponentType<any> | import("@stitches/react/types/util").Function ? Composers[K] : import("@stitches/react/types/stitches").RemoveIndex<
|
|
334
|
+
}, DefaultThemeMap, {}>>(type: Type, ...composers: { [K in keyof Composers]: string extends Composers[K] ? Composers[K] : Composers[K] extends string | import("react").ComponentType<any> | import("@stitches/react/types/util").Function ? Composers[K] : import("@stitches/react/types/stitches").RemoveIndex<CSS_1> & {
|
|
332
335
|
variants?: {
|
|
333
336
|
[x: string]: {
|
|
334
|
-
[x: string]:
|
|
335
|
-
[x: number]:
|
|
337
|
+
[x: string]: CSS_1;
|
|
338
|
+
[x: number]: CSS_1;
|
|
336
339
|
};
|
|
337
340
|
} | undefined;
|
|
338
341
|
compoundVariants?: (("variants" extends keyof Composers[K] ? Composers[K][keyof Composers[K] & "variants"] extends infer T ? { [Name in keyof T]?: import("@stitches/react/types/util").String | import("@stitches/react/types/util").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name]> | undefined; } : never : import("@stitches/react/types/util").WideObject) & {
|
|
339
|
-
css:
|
|
342
|
+
css: CSS_1;
|
|
340
343
|
})[] | undefined;
|
|
341
344
|
defaultVariants?: ("variants" extends keyof Composers[K] ? Composers[K][keyof Composers[K] & "variants"] extends infer T_1 ? { [Name_1 in keyof T_1]?: import("@stitches/react/types/util").String | import("@stitches/react/types/util").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name_1]> | undefined; } : never : import("@stitches/react/types/util").WideObject) | undefined;
|
|
342
|
-
} &
|
|
345
|
+
} & CSS_1 & (Composers[K] extends infer T_2 ? { [K2 in keyof T_2]: K2 extends "compoundVariants" | "defaultVariants" | "variants" ? unknown : K2 extends keyof CSS_1 ? CSS_1[K2] : unknown; } : never); }) => import("@stitches/react/types/styled-component").StyledComponent<Type, import("@stitches/react/types/styled-component").StyledComponentProps<Composers>, {
|
|
343
346
|
xs: string;
|
|
344
347
|
sm: string;
|
|
345
348
|
md: string;
|
|
@@ -484,6 +487,7 @@ export declare const styled: <Type extends import("react").ComponentType<any> |
|
|
|
484
487
|
18: string;
|
|
485
488
|
20: string;
|
|
486
489
|
24: string;
|
|
490
|
+
26: string;
|
|
487
491
|
28: string;
|
|
488
492
|
30: string;
|
|
489
493
|
32: string;
|
|
@@ -501,7 +505,7 @@ export declare const styled: <Type extends import("react").ComponentType<any> |
|
|
|
501
505
|
transitions: {};
|
|
502
506
|
}, DefaultThemeMap, {}>>, css: <Composers extends (string | import("react").JSXElementConstructor<any> | import("react").ExoticComponent<any> | import("@stitches/react/types/util").Function | {
|
|
503
507
|
[name: string]: unknown;
|
|
504
|
-
})[],
|
|
508
|
+
})[], CSS_1 = import("@stitches/react/types/css-util").CSS<{
|
|
505
509
|
xs: string;
|
|
506
510
|
sm: string;
|
|
507
511
|
md: string;
|
|
@@ -641,6 +645,7 @@ export declare const styled: <Type extends import("react").ComponentType<any> |
|
|
|
641
645
|
18: string;
|
|
642
646
|
20: string;
|
|
643
647
|
24: string;
|
|
648
|
+
26: string;
|
|
644
649
|
28: string;
|
|
645
650
|
30: string;
|
|
646
651
|
32: string;
|
|
@@ -656,23 +661,23 @@ export declare const styled: <Type extends import("react").ComponentType<any> |
|
|
|
656
661
|
};
|
|
657
662
|
zIndices: {};
|
|
658
663
|
transitions: {};
|
|
659
|
-
}, DefaultThemeMap, {}>>(...composers: { [K in keyof Composers]: string extends Composers[K] ? Composers[K] : Composers[K] extends string | import("react").JSXElementConstructor<any> | import("react").ExoticComponent<any> | import("@stitches/react/types/util").Function ? Composers[K] : import("@stitches/react/types/stitches").RemoveIndex<
|
|
664
|
+
}, DefaultThemeMap, {}>>(...composers: { [K in keyof Composers]: string extends Composers[K] ? Composers[K] : Composers[K] extends string | import("react").JSXElementConstructor<any> | import("react").ExoticComponent<any> | import("@stitches/react/types/util").Function ? Composers[K] : import("@stitches/react/types/stitches").RemoveIndex<CSS_1> & {
|
|
660
665
|
variants?: {
|
|
661
666
|
[x: string]: {
|
|
662
|
-
[x: string]:
|
|
663
|
-
[x: number]:
|
|
667
|
+
[x: string]: CSS_1;
|
|
668
|
+
[x: number]: CSS_1;
|
|
664
669
|
};
|
|
665
670
|
} | undefined;
|
|
666
671
|
compoundVariants?: (("variants" extends keyof Composers[K] ? Composers[K][keyof Composers[K] & "variants"] extends infer T ? { [Name in keyof T]?: import("@stitches/react/types/util").String | import("@stitches/react/types/util").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name]> | undefined; } : never : import("@stitches/react/types/util").WideObject) & {
|
|
667
|
-
css:
|
|
672
|
+
css: CSS_1;
|
|
668
673
|
})[] | undefined;
|
|
669
674
|
defaultVariants?: ("variants" extends keyof Composers[K] ? Composers[K][keyof Composers[K] & "variants"] extends infer T_1 ? { [Name_1 in keyof T_1]?: import("@stitches/react/types/util").String | import("@stitches/react/types/util").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name_1]> | undefined; } : never : import("@stitches/react/types/util").WideObject) | undefined;
|
|
670
|
-
} &
|
|
675
|
+
} & CSS_1 & (Composers[K] extends infer T_2 ? { [K2 in keyof T_2]: K2 extends "compoundVariants" | "defaultVariants" | "variants" ? unknown : K2 extends keyof CSS_1 ? CSS_1[K2] : unknown; } : never); }) => import("@stitches/react/types/styled-component").CssComponent<import("@stitches/react/types/styled-component").StyledComponentType<Composers>, import("@stitches/react/types/styled-component").StyledComponentProps<Composers>, {
|
|
671
676
|
xs: string;
|
|
672
677
|
sm: string;
|
|
673
678
|
md: string;
|
|
674
679
|
lg: string;
|
|
675
|
-
},
|
|
680
|
+
}, CSS_1>, createTheme: <Argument0 extends string | ({
|
|
676
681
|
colors?: {
|
|
677
682
|
primary?: string | number | boolean | undefined;
|
|
678
683
|
primary500?: string | number | boolean | undefined;
|
|
@@ -807,6 +812,7 @@ export declare const styled: <Type extends import("react").ComponentType<any> |
|
|
|
807
812
|
18?: string | number | boolean | undefined;
|
|
808
813
|
20?: string | number | boolean | undefined;
|
|
809
814
|
24?: string | number | boolean | undefined;
|
|
815
|
+
26?: string | number | boolean | undefined;
|
|
810
816
|
28?: string | number | boolean | undefined;
|
|
811
817
|
30?: string | number | boolean | undefined;
|
|
812
818
|
32?: string | number | boolean | undefined;
|
|
@@ -962,6 +968,7 @@ export declare const styled: <Type extends import("react").ComponentType<any> |
|
|
|
962
968
|
18?: string | number | boolean | undefined;
|
|
963
969
|
20?: string | number | boolean | undefined;
|
|
964
970
|
24?: string | number | boolean | undefined;
|
|
971
|
+
26?: string | number | boolean | undefined;
|
|
965
972
|
28?: string | number | boolean | undefined;
|
|
966
973
|
30?: string | number | boolean | undefined;
|
|
967
974
|
32?: string | number | boolean | undefined;
|
|
@@ -1126,6 +1133,7 @@ export declare const styled: <Type extends import("react").ComponentType<any> |
|
|
|
1126
1133
|
18: string;
|
|
1127
1134
|
20: string;
|
|
1128
1135
|
24: string;
|
|
1136
|
+
26: string;
|
|
1129
1137
|
28: string;
|
|
1130
1138
|
30: string;
|
|
1131
1139
|
32: string;
|
|
@@ -1291,6 +1299,7 @@ export declare const styled: <Type extends import("react").ComponentType<any> |
|
|
|
1291
1299
|
18: string;
|
|
1292
1300
|
20: string;
|
|
1293
1301
|
24: string;
|
|
1302
|
+
26: string;
|
|
1294
1303
|
28: string;
|
|
1295
1304
|
30: string;
|
|
1296
1305
|
32: string;
|
|
@@ -1447,6 +1456,7 @@ export declare const styled: <Type extends import("react").ComponentType<any> |
|
|
|
1447
1456
|
18: string;
|
|
1448
1457
|
20: string;
|
|
1449
1458
|
24: string;
|
|
1459
|
+
26: string;
|
|
1450
1460
|
28: string;
|
|
1451
1461
|
30: string;
|
|
1452
1462
|
32: string;
|
|
@@ -1605,6 +1615,7 @@ export declare const styled: <Type extends import("react").ComponentType<any> |
|
|
|
1605
1615
|
18: string;
|
|
1606
1616
|
20: string;
|
|
1607
1617
|
24: string;
|
|
1618
|
+
26: string;
|
|
1608
1619
|
28: string;
|
|
1609
1620
|
30: string;
|
|
1610
1621
|
32: string;
|
|
@@ -1624,6 +1635,7 @@ export declare const styled: <Type extends import("react").ComponentType<any> |
|
|
|
1624
1635
|
themeMap: DefaultThemeMap;
|
|
1625
1636
|
utils: {};
|
|
1626
1637
|
};
|
|
1638
|
+
export type CSS = StitchesCSS<typeof config>;
|
|
1627
1639
|
export declare const lightTheme: string & {
|
|
1628
1640
|
className: string;
|
|
1629
1641
|
selector: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/theme.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/theme.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rango-dev/ui",
|
|
3
|
-
"version": "0.28.2-next.
|
|
3
|
+
"version": "0.28.2-next.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
"@radix-ui/react-collapsible": "^1.0.3",
|
|
61
61
|
"@radix-ui/react-popover": "^1.0.6",
|
|
62
62
|
"@radix-ui/react-radio-group": "^1.1.1",
|
|
63
|
+
"@radix-ui/react-select": "^2.0.0",
|
|
63
64
|
"@radix-ui/react-switch": "^1.0.1",
|
|
64
65
|
"@radix-ui/react-tooltip": "^1.0.2",
|
|
65
66
|
"@rango-dev/wallets-shared": "^0.27.1-next.1",
|
|
@@ -72,4 +73,4 @@
|
|
|
72
73
|
"publishConfig": {
|
|
73
74
|
"access": "public"
|
|
74
75
|
}
|
|
75
|
-
}
|
|
76
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Type } from './Alert.types';
|
|
1
|
+
import type { PropTypes, Type } from './Alert.types';
|
|
2
2
|
|
|
3
|
-
export const getColor = (type: Type, variant: '
|
|
3
|
+
export const getColor = (type: Type, variant: PropTypes['variant']) => {
|
|
4
4
|
if (variant === 'regular') {
|
|
5
5
|
return undefined;
|
|
6
6
|
}
|
|
@@ -15,3 +15,14 @@ export const getColor = (type: Type, variant: 'alarm' | 'regular') => {
|
|
|
15
15
|
return undefined;
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
|
+
|
|
19
|
+
export const mapVariantToSize = (variant: PropTypes['variant']) => {
|
|
20
|
+
switch (variant) {
|
|
21
|
+
case 'alarm':
|
|
22
|
+
return 'small';
|
|
23
|
+
case 'regular':
|
|
24
|
+
return 'xsmall';
|
|
25
|
+
default:
|
|
26
|
+
return 'xsmall';
|
|
27
|
+
}
|
|
28
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { darkTheme, styled } from '../../theme';
|
|
2
2
|
|
|
3
3
|
export const Container = styled('div', {
|
|
4
4
|
display: 'flex',
|
|
@@ -34,7 +34,6 @@ export const Container = styled('div', {
|
|
|
34
34
|
},
|
|
35
35
|
alarm: {
|
|
36
36
|
padding: '$5 $10',
|
|
37
|
-
alignItems: 'center',
|
|
38
37
|
'.title_typography': {
|
|
39
38
|
fontWeight: '$medium',
|
|
40
39
|
},
|
|
@@ -106,6 +105,12 @@ export const Main = styled('div', {
|
|
|
106
105
|
},
|
|
107
106
|
});
|
|
108
107
|
|
|
108
|
+
export const TitleContainer = styled('div', {
|
|
109
|
+
display: 'flex',
|
|
110
|
+
alignItems: 'center',
|
|
111
|
+
flex: '1 0 0',
|
|
112
|
+
});
|
|
113
|
+
|
|
109
114
|
export const IconHighlight = styled('div', {
|
|
110
115
|
borderRadius: '$lg',
|
|
111
116
|
width: '$20',
|
|
@@ -160,9 +165,3 @@ export const IconHighlight = styled('div', {
|
|
|
160
165
|
},
|
|
161
166
|
},
|
|
162
167
|
});
|
|
163
|
-
|
|
164
|
-
export const titleStyles = css({
|
|
165
|
-
display: 'flex',
|
|
166
|
-
alignItems: 'center',
|
|
167
|
-
flex: '1 0 0',
|
|
168
|
-
});
|
|
@@ -6,8 +6,8 @@ import React from 'react';
|
|
|
6
6
|
import { Divider } from '../Divider';
|
|
7
7
|
import { Typography } from '../Typography';
|
|
8
8
|
|
|
9
|
-
import { getColor } from './Alert.helpers';
|
|
10
|
-
import { Container, IconHighlight, Main,
|
|
9
|
+
import { getColor, mapVariantToSize } from './Alert.helpers';
|
|
10
|
+
import { Container, IconHighlight, Main, TitleContainer } from './Alert.styles';
|
|
11
11
|
import AlertIcon from './AlertIcon';
|
|
12
12
|
|
|
13
13
|
export function Alert(props: PropsWithChildren<PropTypes>) {
|
|
@@ -25,11 +25,11 @@ export function Alert(props: PropsWithChildren<PropTypes>) {
|
|
|
25
25
|
return (
|
|
26
26
|
<Container
|
|
27
27
|
className="_alert"
|
|
28
|
-
|
|
28
|
+
css={containerStyles}
|
|
29
29
|
type={type}
|
|
30
30
|
variant={variant}>
|
|
31
31
|
<Main variant={variant}>
|
|
32
|
-
<
|
|
32
|
+
<TitleContainer>
|
|
33
33
|
<IconHighlight type={type}>
|
|
34
34
|
<AlertIcon type={type} />
|
|
35
35
|
</IconHighlight>
|
|
@@ -40,11 +40,11 @@ export function Alert(props: PropsWithChildren<PropTypes>) {
|
|
|
40
40
|
align={titleAlign}
|
|
41
41
|
variant="body"
|
|
42
42
|
className="title_typography"
|
|
43
|
-
size={variant
|
|
43
|
+
size={mapVariantToSize(variant)}>
|
|
44
44
|
{title}
|
|
45
45
|
</Typography>
|
|
46
46
|
)}
|
|
47
|
-
</
|
|
47
|
+
</TitleContainer>
|
|
48
48
|
{action ? <div>{action}</div> : null}
|
|
49
49
|
</Main>
|
|
50
50
|
{footer ? (
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { BaseAlign } from '../Typography/Typography.types';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import type { CSS } from 'src/theme';
|
|
3
4
|
|
|
4
5
|
export type Type = 'success' | 'warning' | 'error' | 'info' | 'loading';
|
|
5
6
|
|
|
@@ -9,6 +10,6 @@ export interface PropTypes {
|
|
|
9
10
|
footer?: ReactNode;
|
|
10
11
|
action?: ReactNode;
|
|
11
12
|
variant?: 'alarm' | 'regular';
|
|
12
|
-
containerStyles?:
|
|
13
|
+
containerStyles?: CSS;
|
|
13
14
|
titleAlign?: BaseAlign;
|
|
14
15
|
}
|
|
@@ -46,6 +46,8 @@ export function Modal(props: PropsWithChildren<PropTypes>) {
|
|
|
46
46
|
const timeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);
|
|
47
47
|
|
|
48
48
|
const handleBackDropClick = (event: React.MouseEvent<HTMLDivElement>) => {
|
|
49
|
+
event.stopPropagation();
|
|
50
|
+
|
|
49
51
|
if (event.target === event.currentTarget && dismissible) {
|
|
50
52
|
onClose();
|
|
51
53
|
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { PropTypes } from './Select.types';
|
|
2
|
+
|
|
3
|
+
import * as Select from '@radix-ui/react-select';
|
|
4
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
5
|
+
|
|
6
|
+
import { ChevronDownIcon, ChevronUpIcon } from '../../icons';
|
|
7
|
+
import { Typography } from '../Typography';
|
|
8
|
+
|
|
9
|
+
import { SelectContent, SelectItem, SelectTrigger } from './select.styles';
|
|
10
|
+
|
|
11
|
+
export function SelectComponent(props: PropTypes) {
|
|
12
|
+
const [open, setOpen] = useState(false);
|
|
13
|
+
const selectRef = useRef<HTMLDivElement>(null);
|
|
14
|
+
const { options, value, container, handleItemClick } = props;
|
|
15
|
+
const handleToggle = () => {
|
|
16
|
+
setOpen((prev) => !prev);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const handleClickOutside = (e: MouseEvent) => {
|
|
20
|
+
if (selectRef.current && !selectRef.current.contains(e.target as Node)) {
|
|
21
|
+
setOpen(false);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
document.addEventListener('click', handleClickOutside);
|
|
27
|
+
return () => {
|
|
28
|
+
document.removeEventListener('click', handleClickOutside);
|
|
29
|
+
};
|
|
30
|
+
}, []);
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<div ref={selectRef}>
|
|
34
|
+
<Select.Root value={value.value} open={open}>
|
|
35
|
+
<SelectTrigger
|
|
36
|
+
onKeyDown={(event) => event.key === 'Enter' && handleToggle()}
|
|
37
|
+
onClick={handleToggle}
|
|
38
|
+
open={open}
|
|
39
|
+
aria-label={value.label}>
|
|
40
|
+
<Select.Value>
|
|
41
|
+
<Typography variant="body" size="small">
|
|
42
|
+
{value.label}
|
|
43
|
+
</Typography>
|
|
44
|
+
</Select.Value>
|
|
45
|
+
|
|
46
|
+
<Select.Icon className="SelectIcon">
|
|
47
|
+
<ChevronDownIcon size={12} />
|
|
48
|
+
</Select.Icon>
|
|
49
|
+
</SelectTrigger>
|
|
50
|
+
<Select.Portal container={container}>
|
|
51
|
+
<SelectContent>
|
|
52
|
+
<Select.ScrollUpButton className="SelectScrollButton">
|
|
53
|
+
<ChevronUpIcon />
|
|
54
|
+
</Select.ScrollUpButton>
|
|
55
|
+
<Select.Viewport className="SelectViewport">
|
|
56
|
+
<Select.Group>
|
|
57
|
+
{options.map(
|
|
58
|
+
(option) =>
|
|
59
|
+
option.value !== value?.value && (
|
|
60
|
+
<SelectItem
|
|
61
|
+
onClick={() => {
|
|
62
|
+
handleItemClick && handleItemClick(option);
|
|
63
|
+
handleToggle();
|
|
64
|
+
}}
|
|
65
|
+
key={option.value}
|
|
66
|
+
value={option.value}>
|
|
67
|
+
<Select.ItemText>
|
|
68
|
+
<Typography variant="body" size="small">
|
|
69
|
+
{option.label}
|
|
70
|
+
</Typography>
|
|
71
|
+
</Select.ItemText>
|
|
72
|
+
</SelectItem>
|
|
73
|
+
)
|
|
74
|
+
)}
|
|
75
|
+
</Select.Group>
|
|
76
|
+
</Select.Viewport>
|
|
77
|
+
<Select.ScrollDownButton className="SelectScrollButton">
|
|
78
|
+
<ChevronDownIcon />
|
|
79
|
+
</Select.ScrollDownButton>
|
|
80
|
+
</SelectContent>
|
|
81
|
+
</Select.Portal>
|
|
82
|
+
</Select.Root>
|
|
83
|
+
</div>
|
|
84
|
+
);
|
|
85
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SelectComponent as Select } from './Select';
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import * as Select from '@radix-ui/react-select';
|
|
2
|
+
|
|
3
|
+
import { darkTheme, styled } from '../../theme';
|
|
4
|
+
|
|
5
|
+
export const EXPANDABLE_QUOTE_TRANSITION_DURATION = 300;
|
|
6
|
+
|
|
7
|
+
export const SelectTrigger = styled(Select.Trigger, {
|
|
8
|
+
display: 'flex',
|
|
9
|
+
justifyContent: 'space-between',
|
|
10
|
+
alignItems: 'center',
|
|
11
|
+
cursor: 'pointer',
|
|
12
|
+
backgroundColor: '$secondary',
|
|
13
|
+
padding: '$5 $10',
|
|
14
|
+
border: 0,
|
|
15
|
+
whiteSpace: 'nowrap',
|
|
16
|
+
|
|
17
|
+
'& svg': {
|
|
18
|
+
transition: `all ${EXPANDABLE_QUOTE_TRANSITION_DURATION}ms ease`,
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
variants: {
|
|
22
|
+
open: {
|
|
23
|
+
true: {
|
|
24
|
+
borderTopLeftRadius: '$sm',
|
|
25
|
+
borderTopRightRadius: '$sm',
|
|
26
|
+
'& ._typography, & svg': {
|
|
27
|
+
color: '$secondary',
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
'& svg': {
|
|
31
|
+
transform: 'rotate(180deg)',
|
|
32
|
+
},
|
|
33
|
+
backgroundColor: '$neutral100',
|
|
34
|
+
[`.${darkTheme} &`]: {
|
|
35
|
+
backgroundColor: '$neutral300',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
false: {
|
|
39
|
+
borderRadius: '$md',
|
|
40
|
+
'& ._typography, & svg': {
|
|
41
|
+
color: '$background',
|
|
42
|
+
[`.${darkTheme} &`]: {
|
|
43
|
+
color: '$foreground',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
'& svg': {
|
|
47
|
+
transform: 'rotate(0)',
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
width: '100%',
|
|
53
|
+
'& ._typography': {
|
|
54
|
+
whiteSpace: 'nowrap',
|
|
55
|
+
overflow: 'hidden',
|
|
56
|
+
textOverflow: 'ellipsis',
|
|
57
|
+
width: '52px',
|
|
58
|
+
'@xs': {
|
|
59
|
+
width: 'auto',
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
export const SelectContent = styled(Select.Content, {
|
|
65
|
+
padding: '$5 $10',
|
|
66
|
+
width: '100%',
|
|
67
|
+
position: 'absolute',
|
|
68
|
+
top: '38px',
|
|
69
|
+
maxHeight: '146px',
|
|
70
|
+
overflowY: 'auto',
|
|
71
|
+
borderBottomLeftRadius: '$sm',
|
|
72
|
+
borderBottomRightRadius: '$sm',
|
|
73
|
+
boxShadow: '-5px 5px 10px 0px rgba(86, 86, 86, 0.10)',
|
|
74
|
+
backgroundColor: '$neutral100',
|
|
75
|
+
[`.${darkTheme} &`]: {
|
|
76
|
+
backgroundColor: '$neutral300',
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
export const SelectItem = styled(Select.Item, {
|
|
81
|
+
padding: '$10 0',
|
|
82
|
+
borderTop: '1px solid',
|
|
83
|
+
borderColor: '$neutral300',
|
|
84
|
+
[`.${darkTheme} &`]: {
|
|
85
|
+
borderColor: '$neutral400',
|
|
86
|
+
},
|
|
87
|
+
listStyleType: 'none',
|
|
88
|
+
cursor: 'pointer',
|
|
89
|
+
'&:hover': {
|
|
90
|
+
'& ._typography': {
|
|
91
|
+
color: '$colors$secondary',
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
'&:focus': {
|
|
95
|
+
outline: 'none',
|
|
96
|
+
'& ._typography': {
|
|
97
|
+
color: '$colors$secondary',
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
});
|
package/src/components/index.ts
CHANGED
package/src/theme.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// TSDX + stiches doesn't work with import statement and has a bug.
|
|
2
2
|
|
|
3
|
-
import type { PropertyValue } from '@stitches/react';
|
|
3
|
+
import type { PropertyValue, CSS as StitchesCSS } from '@stitches/react';
|
|
4
4
|
import type { DefaultThemeMap } from '@stitches/react/types/config';
|
|
5
5
|
|
|
6
6
|
import { createStitches } from '@stitches/react';
|
|
@@ -153,6 +153,7 @@ export const theme = {
|
|
|
153
153
|
18: '18px',
|
|
154
154
|
20: '20px',
|
|
155
155
|
24: '24px',
|
|
156
|
+
26: '26px',
|
|
156
157
|
28: '28px',
|
|
157
158
|
30: '30px',
|
|
158
159
|
32: '32px',
|
|
@@ -217,6 +218,8 @@ export const { styled, css, createTheme, keyframes, globalCss, config } =
|
|
|
217
218
|
utils,
|
|
218
219
|
});
|
|
219
220
|
|
|
221
|
+
export type CSS = StitchesCSS<typeof config>;
|
|
222
|
+
|
|
220
223
|
export const lightTheme = createTheme('light-theme-ui', {});
|
|
221
224
|
|
|
222
225
|
export const darkTheme = createTheme('dark-theme-ui', {
|