@nextui-org/react 1.0.0-beta.7 → 1.0.0-beta.8
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/cjs/avatar/avatar.js +1 -1
- package/cjs/avatar/avatar.styles.js +1 -1
- package/cjs/button/button-icon.js +1 -1
- package/cjs/button/button.js +1 -1
- package/cjs/button/button.styles.js +1 -1
- package/cjs/card/card.js +1 -1
- package/cjs/card/card.styles.js +1 -1
- package/cjs/card/index.js +1 -1
- package/cjs/card/use-card.js +1 -0
- package/cjs/checkbox/checkbox-group.js +1 -1
- package/cjs/checkbox/checkbox.styles.js +1 -1
- package/cjs/checkbox/use-checkbox-group.js +1 -1
- package/cjs/collapse/collapse.styles.js +1 -1
- package/cjs/css-baseline/css-baseline.js +1 -1
- package/cjs/dropdown/base/dropdown-item-base.js +1 -0
- package/cjs/dropdown/dropdown-button.js +1 -0
- package/cjs/dropdown/dropdown-context.js +1 -0
- package/cjs/dropdown/dropdown-icon.js +1 -0
- package/cjs/dropdown/dropdown-item.js +1 -0
- package/cjs/dropdown/dropdown-menu.js +1 -0
- package/cjs/dropdown/dropdown-section.js +1 -0
- package/cjs/dropdown/dropdown-trigger.js +1 -0
- package/cjs/dropdown/dropdown-types.js +1 -0
- package/cjs/dropdown/dropdown.js +1 -0
- package/cjs/dropdown/dropdown.styles.js +1 -0
- package/cjs/dropdown/index.js +1 -0
- package/cjs/dropdown/use-dropdown.js +1 -0
- package/cjs/image/image.js +1 -1
- package/cjs/image/image.styles.js +1 -1
- package/cjs/index.js +1 -1
- package/cjs/input/input.styles.js +1 -1
- package/cjs/modal/modal.styles.js +1 -1
- package/cjs/pagination/pagination.styles.js +1 -1
- package/cjs/popover/popover-content.js +1 -1
- package/cjs/popover/popover-trigger.js +1 -1
- package/cjs/popover/popover.js +1 -1
- package/cjs/popover/popover.styles.js +1 -1
- package/cjs/popover/use-popover.js +1 -1
- package/cjs/popover/utils.js +1 -1
- package/cjs/radio/index.js +1 -1
- package/cjs/radio/radio-context.js +1 -1
- package/cjs/radio/radio-group.js +1 -1
- package/cjs/radio/radio.js +1 -1
- package/cjs/radio/radio.styles.js +1 -1
- package/cjs/radio/use-radio-group.js +1 -0
- package/cjs/radio/use-radio.js +1 -0
- package/cjs/snippet/snippet.styles.js +1 -1
- package/cjs/switch/switch.styles.js +1 -1
- package/cjs/table/table.styles.js +1 -1
- package/cjs/theme/colors/gray.js +1 -1
- package/cjs/theme/common.js +1 -1
- package/cjs/theme/dark-theme.js +1 -1
- package/cjs/theme/light-theme.js +1 -1
- package/cjs/theme/shared-css.js +1 -0
- package/cjs/theme/stitches.config.js +1 -1
- package/cjs/tooltip/tooltip.styles.js +1 -1
- package/cjs/user/index.js +1 -1
- package/cjs/user/user-link.js +1 -1
- package/cjs/user/user.js +1 -1
- package/cjs/user/user.styles.js +1 -1
- package/cjs/utils/checkmark.js +1 -0
- package/cjs/utils/color.js +1 -1
- package/cjs/utils/dom.js +1 -1
- package/cjs/utils/icons.js +1 -1
- package/cjs/utils/prop-types.js +1 -1
- package/dropdown/package.json +6 -0
- package/esm/avatar/avatar.js +1 -1
- package/esm/avatar/avatar.styles.js +1 -1
- package/esm/button/button-icon.js +1 -1
- package/esm/button/button.js +1 -1
- package/esm/button/button.styles.js +1 -1
- package/esm/card/card.js +1 -1
- package/esm/card/card.styles.js +1 -1
- package/esm/card/index.js +1 -1
- package/esm/card/use-card.js +1 -0
- package/esm/checkbox/checkbox-group.js +1 -1
- package/esm/checkbox/checkbox.styles.js +1 -1
- package/esm/checkbox/use-checkbox-group.js +1 -1
- package/esm/collapse/collapse.styles.js +1 -1
- package/esm/css-baseline/css-baseline.js +1 -1
- package/esm/dropdown/base/dropdown-item-base.js +1 -0
- package/esm/dropdown/dropdown-button.js +1 -0
- package/esm/dropdown/dropdown-context.js +1 -0
- package/esm/dropdown/dropdown-icon.js +1 -0
- package/esm/dropdown/dropdown-item.js +1 -0
- package/esm/dropdown/dropdown-menu.js +1 -0
- package/esm/dropdown/dropdown-section.js +1 -0
- package/esm/dropdown/dropdown-trigger.js +1 -0
- package/esm/dropdown/dropdown-types.js +1 -0
- package/esm/dropdown/dropdown.js +1 -0
- package/esm/dropdown/dropdown.styles.js +1 -0
- package/esm/dropdown/index.js +1 -0
- package/esm/dropdown/use-dropdown.js +1 -0
- package/esm/image/image.js +1 -1
- package/esm/image/image.styles.js +1 -1
- package/esm/index.js +1 -1
- package/esm/input/input.styles.js +1 -1
- package/esm/modal/modal.styles.js +1 -1
- package/esm/pagination/pagination.styles.js +1 -1
- package/esm/popover/popover-content.js +1 -1
- package/esm/popover/popover-trigger.js +1 -1
- package/esm/popover/popover.js +1 -1
- package/esm/popover/popover.styles.js +1 -1
- package/esm/popover/use-popover.js +1 -1
- package/esm/popover/utils.js +1 -1
- package/esm/radio/index.js +1 -1
- package/esm/radio/radio-context.js +1 -1
- package/esm/radio/radio-group.js +1 -1
- package/esm/radio/radio.js +1 -1
- package/esm/radio/radio.styles.js +1 -1
- package/esm/radio/use-radio-group.js +1 -0
- package/esm/radio/use-radio.js +1 -0
- package/esm/snippet/snippet.styles.js +1 -1
- package/esm/switch/switch.styles.js +1 -1
- package/esm/table/table.styles.js +1 -1
- package/esm/theme/colors/gray.js +1 -1
- package/esm/theme/common.js +1 -1
- package/esm/theme/dark-theme.js +1 -1
- package/esm/theme/light-theme.js +1 -1
- package/esm/theme/shared-css.js +1 -0
- package/esm/theme/stitches.config.js +1 -1
- package/esm/tooltip/tooltip.styles.js +1 -1
- package/esm/user/index.js +1 -1
- package/esm/user/user-link.js +1 -1
- package/esm/user/user.js +1 -1
- package/esm/user/user.styles.js +1 -1
- package/esm/utils/checkmark.js +1 -0
- package/esm/utils/color.js +1 -1
- package/esm/utils/dom.js +1 -1
- package/esm/utils/icons.js +1 -1
- package/esm/utils/prop-types.js +1 -1
- package/package.json +6 -1
- package/types/avatar/avatar-group.styles.d.ts +150 -6
- package/types/avatar/avatar.d.ts +2372 -11
- package/types/avatar/avatar.styles.d.ts +2447 -14
- package/types/backdrop/backdrop.styles.d.ts +225 -9
- package/types/button/button-group.styles.d.ts +75 -3
- package/types/button/button-icon.d.ts +79 -5
- package/types/button/button.d.ts +5 -3
- package/types/button/button.styles.d.ts +1249 -7
- package/types/card/card.d.ts +8 -9
- package/types/card/card.styles.d.ts +2621 -24
- package/types/card/use-card.d.ts +301 -0
- package/types/checkbox/checkbox.styles.d.ts +751 -31
- package/types/checkbox/use-checkbox-group.d.ts +3 -2
- package/types/code/code.styles.d.ts +150 -6
- package/types/col/col.styles.d.ts +75 -3
- package/types/collapse/collapse.styles.d.ts +450 -18
- package/types/container/container.styles.d.ts +75 -3
- package/types/divider/divider.styles.d.ts +150 -6
- package/types/dropdown/base/dropdown-item-base.d.ts +19 -0
- package/types/dropdown/dropdown-button.d.ts +3689 -0
- package/types/dropdown/dropdown-context.d.ts +728 -0
- package/types/dropdown/dropdown-icon.d.ts +9 -0
- package/types/dropdown/dropdown-item.d.ts +31 -0
- package/types/dropdown/dropdown-menu.d.ts +30 -0
- package/types/dropdown/dropdown-section.d.ts +29 -0
- package/types/dropdown/dropdown-trigger.d.ts +11 -0
- package/types/dropdown/dropdown-types.d.ts +24 -0
- package/types/dropdown/dropdown.d.ts +24 -0
- package/types/dropdown/dropdown.styles.d.ts +11869 -0
- package/types/dropdown/index.d.ts +9 -0
- package/types/dropdown/use-dropdown.d.ts +389 -0
- package/types/grid/grid.styles.d.ts +150 -6
- package/types/image/image.d.ts +5 -18
- package/types/image/image.styles.d.ts +225 -9
- package/types/index.d.ts +4 -1
- package/types/input/input-password.d.ts +1 -1
- package/types/input/input-props.d.ts +2 -2
- package/types/input/input.styles.d.ts +825 -33
- package/types/link/link.styles.d.ts +150 -6
- package/types/loading/loading.styles.d.ts +450 -18
- package/types/modal/modal.styles.d.ts +450 -18
- package/types/pagination/pagination.styles.d.ts +450 -18
- package/types/popover/popover-content.d.ts +1147 -2
- package/types/popover/popover-context.d.ts +120 -0
- package/types/popover/popover.d.ts +4 -4
- package/types/popover/popover.styles.d.ts +1279 -7
- package/types/popover/use-popover.d.ts +83 -4
- package/types/popover/utils.d.ts +3 -1
- package/types/progress/progress.d.ts +1 -1
- package/types/progress/progress.styles.d.ts +150 -6
- package/types/radio/index.d.ts +2 -2
- package/types/radio/radio-context.d.ts +22 -13
- package/types/radio/radio-group.d.ts +9 -78
- package/types/radio/radio.d.ts +10 -66
- package/types/radio/radio.styles.d.ts +2574 -35
- package/types/radio/use-radio-group.d.ts +26 -0
- package/types/radio/use-radio.d.ts +31 -0
- package/types/row/row.styles.d.ts +75 -3
- package/types/snippet/snippet.styles.d.ts +300 -12
- package/types/spacer/spacer.styles.d.ts +75 -3
- package/types/switch/switch.d.ts +1 -1
- package/types/switch/switch.styles.d.ts +300 -12
- package/types/table/table-column-header.d.ts +75 -3
- package/types/table/table-sort-icon.d.ts +75 -3
- package/types/table/table.styles.d.ts +1278 -52
- package/types/text/text.styles.d.ts +75 -3
- package/types/textarea/textarea.d.ts +1 -1
- package/types/theme/common.d.ts +127 -6
- package/types/theme/dark-theme.d.ts +11 -0
- package/types/theme/light-theme.d.ts +7 -0
- package/types/theme/shared-css.d.ts +5237 -0
- package/types/theme/stitches.config.d.ts +643 -2964
- package/types/theme/types.d.ts +3 -0
- package/types/tooltip/tooltip.d.ts +1 -1
- package/types/tooltip/tooltip.styles.d.ts +300 -12
- package/types/user/index.d.ts +1 -1
- package/types/user/user-link.d.ts +4 -11
- package/types/user/user.styles.d.ts +298 -983
- package/types/utils/checkmark.d.ts +19 -0
- package/types/utils/color.d.ts +1 -0
- package/types/utils/dom.d.ts +5 -2
- package/types/utils/drip.d.ts +76 -4
- package/types/utils/prop-types.d.ts +4 -0
- package/umd/nextui.js +6269 -3172
- package/umd/nextui.min.js +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { HTMLAttributes } from 'react';
|
|
2
|
+
import type { CSS } from '../theme/stitches.config';
|
|
3
|
+
interface Props {
|
|
4
|
+
css?: CSS;
|
|
5
|
+
width?: number;
|
|
6
|
+
height?: number;
|
|
7
|
+
size?: number;
|
|
8
|
+
strokeWidth?: number;
|
|
9
|
+
fill?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
declare type NativeAttrs = Omit<HTMLAttributes<HTMLElement>, keyof Props>;
|
|
13
|
+
export declare type CheckmarkProps = Props & NativeAttrs;
|
|
14
|
+
export declare const stroke: {
|
|
15
|
+
(): string;
|
|
16
|
+
name: string;
|
|
17
|
+
};
|
|
18
|
+
declare const Checkmark: React.FC<CheckmarkProps>;
|
|
19
|
+
export default Checkmark;
|
package/types/utils/color.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export declare const isHex: (str: string) => boolean;
|
|
|
15
15
|
*/
|
|
16
16
|
export declare const hexToRGBA: (hex: string, alpha?: number) => string;
|
|
17
17
|
export declare const isNormalColor: (color: string) => boolean;
|
|
18
|
+
export declare const isSimpleColor: (color: string) => boolean;
|
|
18
19
|
/**
|
|
19
20
|
* Function that checks color name support in the current browser
|
|
20
21
|
* @param strColor
|
package/types/utils/dom.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DOMRefValue, FocusableRef, FocusableRefValue } from '@react-types/shared';
|
|
2
|
-
import { Ref, RefObject } from 'react';
|
|
2
|
+
import { Ref, RefObject, MutableRefObject } from 'react';
|
|
3
3
|
export declare function canUseDOM(): boolean;
|
|
4
4
|
export declare const isBrowser: boolean;
|
|
5
5
|
declare function getUserAgentBrowser(navigator: Navigator): "Chrome for iOS" | "Edge" | "Silk" | "Chrome" | "Firefox" | "AOSP" | "IE" | "Safari" | "WebKit" | null;
|
|
@@ -15,5 +15,8 @@ export declare function createDOMRef<T extends HTMLElement = HTMLElement>(ref: R
|
|
|
15
15
|
export declare function createFocusableRef<T extends HTMLElement = HTMLElement>(domRef: RefObject<T>, focusableRef?: RefObject<HTMLElement>): FocusableRefValue<T>;
|
|
16
16
|
export declare function useDOMRef<T extends HTMLElement = HTMLElement>(ref: RefObject<T | null> | Ref<T | null>): RefObject<T>;
|
|
17
17
|
export declare function useFocusableRef<T extends HTMLElement = HTMLElement>(ref: FocusableRef<T>, focusableRef?: RefObject<HTMLElement>): RefObject<T>;
|
|
18
|
-
export
|
|
18
|
+
export interface ContextValue<T> {
|
|
19
|
+
ref?: MutableRefObject<T>;
|
|
20
|
+
}
|
|
21
|
+
export declare function useSyncRef<T>(context: ContextValue<T | null>, ref: RefObject<T>): void;
|
|
19
22
|
export {};
|
package/types/utils/drip.d.ts
CHANGED
|
@@ -54,6 +54,13 @@ export declare const StyledDrip: import("@stitches/react/types/styled-component"
|
|
|
54
54
|
lg: string;
|
|
55
55
|
xl: string;
|
|
56
56
|
};
|
|
57
|
+
dropShadows: {
|
|
58
|
+
xs: string;
|
|
59
|
+
sm: string;
|
|
60
|
+
md: string;
|
|
61
|
+
lg: string;
|
|
62
|
+
xl: string;
|
|
63
|
+
};
|
|
57
64
|
colors: {
|
|
58
65
|
text: string;
|
|
59
66
|
link: string;
|
|
@@ -195,6 +202,16 @@ export declare const StyledDrip: import("@stitches/react/types/styled-component"
|
|
|
195
202
|
errorSolidHover: string;
|
|
196
203
|
errorSolidContrast: string;
|
|
197
204
|
errorShadow: string;
|
|
205
|
+
neutralLight: string;
|
|
206
|
+
neutralLightHover: string;
|
|
207
|
+
neutralLightActive: string;
|
|
208
|
+
neutralLightContrast: string;
|
|
209
|
+
neutral: string;
|
|
210
|
+
neutralBorder: string;
|
|
211
|
+
neutralBorderHover: string;
|
|
212
|
+
neutralSolidHover: string;
|
|
213
|
+
neutralSolidContrast: string;
|
|
214
|
+
neutralShadow: string;
|
|
198
215
|
gradient: string;
|
|
199
216
|
accents0: string;
|
|
200
217
|
accents1: string;
|
|
@@ -213,13 +230,20 @@ export declare const StyledDrip: import("@stitches/react/types/styled-component"
|
|
|
213
230
|
mono: string;
|
|
214
231
|
};
|
|
215
232
|
fontSizes: {
|
|
216
|
-
tiny: string;
|
|
217
233
|
xs: string;
|
|
218
|
-
base: string;
|
|
219
234
|
sm: string;
|
|
235
|
+
base: string;
|
|
220
236
|
md: string;
|
|
221
237
|
lg: string;
|
|
222
238
|
xl: string;
|
|
239
|
+
xl2: string;
|
|
240
|
+
xl3: string;
|
|
241
|
+
xl4: string;
|
|
242
|
+
xl5: string;
|
|
243
|
+
xl6: string;
|
|
244
|
+
xl7: string;
|
|
245
|
+
xl8: string;
|
|
246
|
+
xl9: string;
|
|
223
247
|
};
|
|
224
248
|
fontWeights: {
|
|
225
249
|
hairline: number;
|
|
@@ -235,9 +259,18 @@ export declare const StyledDrip: import("@stitches/react/types/styled-component"
|
|
|
235
259
|
lineHeights: {
|
|
236
260
|
xs: number;
|
|
237
261
|
sm: number;
|
|
262
|
+
base: number;
|
|
238
263
|
md: number;
|
|
239
264
|
lg: number;
|
|
240
265
|
xl: number;
|
|
266
|
+
xl2: number;
|
|
267
|
+
xl3: number;
|
|
268
|
+
xl4: number;
|
|
269
|
+
xl5: number;
|
|
270
|
+
xl6: number;
|
|
271
|
+
xl7: number;
|
|
272
|
+
xl8: number;
|
|
273
|
+
xl9: number;
|
|
241
274
|
};
|
|
242
275
|
letterSpacings: {
|
|
243
276
|
tighter: string;
|
|
@@ -322,6 +355,7 @@ export declare const StyledDrip: import("@stitches/react/types/styled-component"
|
|
|
322
355
|
avatar: string;
|
|
323
356
|
link: string;
|
|
324
357
|
card: string;
|
|
358
|
+
dropdownItem: string;
|
|
325
359
|
};
|
|
326
360
|
breakpoints: {
|
|
327
361
|
xs: string;
|
|
@@ -697,7 +731,9 @@ export declare const StyledDrip: import("@stitches/react/types/styled-component"
|
|
|
697
731
|
readonly [$$PropertyValue]: "backgroundColor";
|
|
698
732
|
}) => {
|
|
699
733
|
bf: string;
|
|
700
|
-
bg:
|
|
734
|
+
bg: {
|
|
735
|
+
readonly [$$PropertyValue]: "backgroundColor";
|
|
736
|
+
};
|
|
701
737
|
};
|
|
702
738
|
bgColor: (value: {
|
|
703
739
|
readonly [$$PropertyValue]: "backgroundColor";
|
|
@@ -775,6 +811,32 @@ export declare const StyledDrip: import("@stitches/react/types/styled-component"
|
|
|
775
811
|
readonly [$$PropertyValue]: "boxShadow";
|
|
776
812
|
};
|
|
777
813
|
};
|
|
814
|
+
ds: (value: {
|
|
815
|
+
readonly [$$PropertyValue]: "boxShadow";
|
|
816
|
+
}) => {
|
|
817
|
+
dropShadow: {
|
|
818
|
+
readonly [$$PropertyValue]: "boxShadow";
|
|
819
|
+
};
|
|
820
|
+
};
|
|
821
|
+
shadow: (value: {
|
|
822
|
+
readonly [$$PropertyValue]: "boxShadow";
|
|
823
|
+
}) => {
|
|
824
|
+
boxShadow: {
|
|
825
|
+
readonly [$$PropertyValue]: "boxShadow";
|
|
826
|
+
};
|
|
827
|
+
};
|
|
828
|
+
dshadow: (value: {
|
|
829
|
+
readonly [$$PropertyValue]: "boxShadow";
|
|
830
|
+
}) => {
|
|
831
|
+
dropShadow: {
|
|
832
|
+
readonly [$$PropertyValue]: "boxShadow";
|
|
833
|
+
};
|
|
834
|
+
};
|
|
835
|
+
dropShadow: (value: {
|
|
836
|
+
readonly [$$PropertyValue]: "boxShadow";
|
|
837
|
+
}) => {
|
|
838
|
+
filter: string;
|
|
839
|
+
};
|
|
778
840
|
normalShadow: (value: {
|
|
779
841
|
readonly [$$PropertyValue]: "backgroundColor";
|
|
780
842
|
}) => {
|
|
@@ -978,6 +1040,16 @@ export declare const StyledDrip: import("@stitches/react/types/styled-component"
|
|
|
978
1040
|
readonly [$$PropertyValue]: "textDecorationLine";
|
|
979
1041
|
};
|
|
980
1042
|
};
|
|
1043
|
+
truncateText: (value: {
|
|
1044
|
+
readonly [$$PropertyValue]: "width";
|
|
1045
|
+
}) => {
|
|
1046
|
+
maxWidth: {
|
|
1047
|
+
readonly [$$PropertyValue]: "width";
|
|
1048
|
+
};
|
|
1049
|
+
whiteSpace: string;
|
|
1050
|
+
overflow: string;
|
|
1051
|
+
textOverflow: string;
|
|
1052
|
+
};
|
|
981
1053
|
textGradient: (value: {
|
|
982
1054
|
readonly [$$PropertyValue]: "backgroundImage";
|
|
983
1055
|
}) => {
|
|
@@ -1017,5 +1089,5 @@ declare const _default: React.ComponentType<Partial<{
|
|
|
1017
1089
|
hover: string;
|
|
1018
1090
|
dark: string;
|
|
1019
1091
|
light: string;
|
|
1020
|
-
}>, "visible" | "
|
|
1092
|
+
}>, "visible" | "className" | "x" | "y">>;
|
|
1021
1093
|
export default _default;
|
|
@@ -28,6 +28,8 @@ export declare const excludedInputPropsForTextarea: ["clearable", "as", "rounded
|
|
|
28
28
|
export declare const excludedTableProps: ["items", "disabledKeys", "allowDuplicateSelectionEvents", "disallowEmptySelection", "defaultSelectedKeys", "sortDescriptor", "onSortChange"];
|
|
29
29
|
declare const selectionBehavior: ["toggle", "replace"];
|
|
30
30
|
declare const selectionMode: ["none", "single", "multiple"];
|
|
31
|
+
declare const dropdownVariants: ["flat", "light", "solid", "shadow"];
|
|
32
|
+
declare const cardVariants: ["flat", "bordered", "shadow"];
|
|
31
33
|
export declare type Display = typeof display[number];
|
|
32
34
|
export declare type Justify = typeof justify[number];
|
|
33
35
|
export declare type AlignItems = typeof alignItems[number];
|
|
@@ -53,6 +55,8 @@ export declare type DividerAlign = typeof dividerAlign[number];
|
|
|
53
55
|
export declare type ContentPosition = typeof contentPosition[number];
|
|
54
56
|
export declare type BreakpointsValue = number | boolean;
|
|
55
57
|
export declare type ExcludedInputProps = typeof excludedInputPropsForTextarea[number];
|
|
58
|
+
export declare type DropdownVariants = typeof dropdownVariants[number];
|
|
59
|
+
export declare type CardVariants = typeof cardVariants[number];
|
|
56
60
|
export interface AsProp<As extends ElementType = ElementType> {
|
|
57
61
|
as?: As;
|
|
58
62
|
}
|