@protonradio/proton-ui 0.2.0 → 0.2.1-beta1

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.
@@ -1,13 +1,13 @@
1
1
  import { AriaDialogProps } from 'react-aria';
2
- import type { AriaPopoverProps } from 'react-aria';
2
+ import { AriaPopoverProps } from 'react-aria';
3
3
  import { AriaSelectProps } from 'react-aria';
4
4
  import { AriaTableProps } from 'react-aria';
5
5
  import { ColumnProps } from '@react-stately/table';
6
+ import { default as default_2 } from 'react';
6
7
  import { JSX as JSX_2 } from 'react/jsx-runtime';
7
8
  import { OverlayTriggerProps } from 'react-stately';
8
9
  import { OverlayTriggerState } from 'react-stately';
9
10
  import { PressEvent } from 'react-aria';
10
- import { default as React_2 } from 'react';
11
11
  import { ReactNode } from 'react';
12
12
  import { Row } from '@react-stately/table';
13
13
  import { Section } from '@react-stately/table';
@@ -17,13 +17,11 @@ import { TableStateProps } from 'react-stately';
17
17
  import { TooltipProps as TooltipProps_2 } from 'react-aria-components';
18
18
  import { TooltipTriggerComponentProps } from 'react-aria-components';
19
19
 
20
- export declare function Button(props: ButtonProps): JSX_2.Element;
20
+ export declare type BadgeVariant = "success" | "warning" | "danger" | "primary" | "secondary" | "dark" | "transparent";
21
21
 
22
- export declare namespace Button {
23
- var defaultProps: {
24
- variant: string;
25
- };
26
- }
22
+ export declare type BannerVariant = "gray" | "success" | "warning" | "danger";
23
+
24
+ export declare function Button({ variant, ...props }: ButtonProps): JSX_2.Element;
27
25
 
28
26
  export declare function ButtonGroup(props: ButtonGroupProps): JSX_2.Element;
29
27
 
@@ -86,9 +84,9 @@ declare interface ButtonProps {
86
84
  children?: React.ReactNode;
87
85
  }
88
86
 
89
- export declare const Cell: <T>(props: ProtonColumnProps<T>) => JSX_2.Element;
87
+ export declare const Cell: <T>(props: ProtonColumnProps<T>) => JSX.Element;
90
88
 
91
- export declare const Column: <T>(props: ProtonColumnProps<T>) => JSX_2.Element;
89
+ export declare const Column: <T>(props: ProtonColumnProps<T>) => JSX.Element;
92
90
 
93
91
  /**
94
92
  * Intended use in overlay containers such as modals or popovers.
@@ -136,7 +134,7 @@ declare interface PopoverProps extends Omit<AriaPopoverProps, "popoverRef"> {
136
134
  /**
137
135
  * Content to display within the popover.
138
136
  */
139
- children: React_2.ReactNode;
137
+ children: default_2.ReactNode;
140
138
  /**
141
139
  * The `isOpen` state of the popover and the methods to toggle it.
142
140
  */
@@ -144,13 +142,51 @@ declare interface PopoverProps extends Omit<AriaPopoverProps, "popoverRef"> {
144
142
  /**
145
143
  * Can optionally forward the ref to the popover.
146
144
  */
147
- popoverRef?: React_2.RefObject<HTMLDivElement>;
145
+ popoverRef?: default_2.RefObject<HTMLDivElement>;
148
146
  /**
149
147
  * Whether to show an arrow on the popover.
150
148
  */
151
149
  arrow?: boolean;
152
150
  }
153
151
 
152
+ export declare const PROTON_COLORS: {
153
+ BRAND: {
154
+ PRIMARY: string;
155
+ PRIMARY_LIGHT: string;
156
+ SECONDARY: string;
157
+ };
158
+ GRAYSCALE: {
159
+ GRAY_SUPER_DARK: string;
160
+ GRAY_DARK: string;
161
+ GRAY_MEDIUM: string;
162
+ GRAY_MEDIUM_LIGHT: string;
163
+ GRAY_LIGHT: string;
164
+ GRAY_LIGHTEST: string;
165
+ GRAY_SUPER_LIGHT: string;
166
+ WHITE: string;
167
+ BORDER: string;
168
+ };
169
+ DANGER: {
170
+ SUPER_DARK: string;
171
+ DARK: string;
172
+ MEDIUM: string;
173
+ LIGHT: string;
174
+ SUPER_LIGHT: string;
175
+ };
176
+ WARNING: {
177
+ DARK: string;
178
+ MEDIUM: string;
179
+ LIGHT: string;
180
+ SUPER_LIGHT: string;
181
+ };
182
+ SUCCESS: {
183
+ DARK: string;
184
+ MEDIUM: string;
185
+ LIGHT: string;
186
+ SUPER_LIGHT: string;
187
+ };
188
+ };
189
+
154
190
  export declare interface ProtonColumnProps<T> extends ColumnProps<T> {
155
191
  align?: "left" | "center" | "right";
156
192
  }
@@ -175,13 +211,6 @@ declare interface SelectProps<T> extends AriaSelectProps<T> {
175
211
 
176
212
  export declare function Switch(props: SwitchProps): JSX_2.Element;
177
213
 
178
- export declare namespace Switch {
179
- var defaultProps: {
180
- defaultOn: boolean;
181
- isDisabled: boolean;
182
- };
183
- }
184
-
185
214
  declare interface SwitchProps {
186
215
  /**
187
216
  * Whether the Switch is in the 'on' state (uncontrolled).
@@ -233,7 +262,7 @@ declare interface ThemeContextType {
233
262
  themedRGBArray: RGBArray;
234
263
  }
235
264
 
236
- export declare const ThemeProvider: React_2.FC<ThemeProviderProps>;
265
+ export declare const ThemeProvider: default_2.FC<ThemeProviderProps>;
237
266
 
238
267
  declare interface ThemeProviderProps {
239
268
  theme: Theme;
@@ -247,9 +276,9 @@ export declare const THEMES: {
247
276
  };
248
277
 
249
278
  export declare interface ThemeVariables {
250
- "--proton-control-background": string;
251
- "--proton-text-color": string;
252
- "--proton-control-border": string;
279
+ "--proton-control__background-color": string;
280
+ "--proton-control__text-color": string;
281
+ "--proton-control__border-color": string;
253
282
  }
254
283
 
255
284
  export declare function Tooltip({ children, arrow, ...props }: TooltipProps): JSX_2.Element;
@@ -282,10 +311,16 @@ declare interface TooltipTriggerProps extends TooltipProps, TooltipTriggerCompon
282
311
  export declare function usePopoverTrigger(props?: OverlayTriggerProps): {
283
312
  buttonProps: any;
284
313
  overlayProps: any;
285
- buttonRef: React_2.MutableRefObject<HTMLButtonElement>;
314
+ buttonRef: default_2.MutableRefObject<HTMLButtonElement>;
286
315
  state: any;
287
316
  };
288
317
 
289
318
  export declare const useTheme: () => ThemeContextType;
290
319
 
291
320
  export { }
321
+
322
+
323
+ declare namespace ButtonGroup {
324
+ var Option: (props: ButtonGroupOptionProps) => import("react/jsx-runtime").JSX.Element;
325
+ }
326
+