@nation-a/ui 0.11.1 → 0.11.2
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.cjs +8938 -3722
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8960 -3744
- package/dist/index.js.map +1 -1
- package/dist/styled-system/styles.css +85 -17
- package/dist/types/components/BottomSheet2/BottomSheet.stories.d.ts +11 -0
- package/dist/types/components/BottomSheet2/bottomsheet.recipe.d.ts +11 -0
- package/dist/types/components/BottomSheet2/index.d.ts +38 -0
- package/dist/types/components/index.d.ts +1 -1
- package/package.json +3 -1
|
@@ -1079,6 +1079,67 @@ html:not(#\#),body:not(#\#) {
|
|
|
1079
1079
|
background: #bebebe;
|
|
1080
1080
|
}
|
|
1081
1081
|
|
|
1082
|
+
.p_0:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1083
|
+
padding: var(--spacing-0);
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
.p_5:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1087
|
+
padding: var(--spacing-5);
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
.bd_5px_solid_red:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1091
|
+
border: 5px solid red;
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
.gap_15:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1095
|
+
gap: 15px;
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
.bd_1px_solid_red:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1099
|
+
border: 1px solid red;
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
.c_white:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1103
|
+
color: white;
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
.bx-sh_md:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1107
|
+
box-shadow: md;
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
.bg_surface\.layer_1:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1111
|
+
background: var(--colors-surface-layer_1);
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
.p_4:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1115
|
+
padding: var(--spacing-4);
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
.bd-b_none:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1119
|
+
border-bottom: var(--borders-none);
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
.z_0:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1123
|
+
z-index: 0;
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
.bx-sh_overlay:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1127
|
+
box-shadow: var(--shadows-overlay);
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
.op_0\.5:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1131
|
+
opacity: 0.5;
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
.m_15px_auto:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1135
|
+
margin: 15px auto;
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
.us_none:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1139
|
+
-webkit-user-select: none;
|
|
1140
|
+
user-select: none;
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1082
1143
|
.ap_none:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1083
1144
|
appearance: none;
|
|
1084
1145
|
-webkit-appearance: none;
|
|
@@ -1108,11 +1169,6 @@ html:not(#\#),body:not(#\#) {
|
|
|
1108
1169
|
position: relative;
|
|
1109
1170
|
}
|
|
1110
1171
|
|
|
1111
|
-
.us_none:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1112
|
-
-webkit-user-select: none;
|
|
1113
|
-
user-select: none;
|
|
1114
|
-
}
|
|
1115
|
-
|
|
1116
1172
|
.va_middle:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1117
1173
|
vertical-align: middle;
|
|
1118
1174
|
}
|
|
@@ -1310,10 +1366,6 @@ html:not(#\#),body:not(#\#) {
|
|
|
1310
1366
|
overflow: auto;
|
|
1311
1367
|
}
|
|
1312
1368
|
|
|
1313
|
-
.p_4:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1314
|
-
padding: var(--spacing-4);
|
|
1315
|
-
}
|
|
1316
|
-
|
|
1317
1369
|
.min-w_xs:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1318
1370
|
min-width: var(--sizes-xs);
|
|
1319
1371
|
}
|
|
@@ -1410,10 +1462,6 @@ html:not(#\#),body:not(#\#) {
|
|
|
1410
1462
|
color: var(--colors-content-neutral-subtlest);
|
|
1411
1463
|
}
|
|
1412
1464
|
|
|
1413
|
-
.bg_surface\.layer_1:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1414
|
-
background: var(--colors-surface-layer_1);
|
|
1415
|
-
}
|
|
1416
|
-
|
|
1417
1465
|
.z_10:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1418
1466
|
z-index: 10;
|
|
1419
1467
|
}
|
|
@@ -1612,10 +1660,6 @@ html:not(#\#),body:not(#\#) {
|
|
|
1612
1660
|
color: var(--colors-content-neutral-inverse-bold);
|
|
1613
1661
|
}
|
|
1614
1662
|
|
|
1615
|
-
.bx-sh_overlay:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1616
|
-
box-shadow: var(--shadows-overlay);
|
|
1617
|
-
}
|
|
1618
|
-
|
|
1619
1663
|
.anim_fadeIn_0\.25s_ease-out:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1620
1664
|
animation: fadeIn 0.25s ease-out;
|
|
1621
1665
|
}
|
|
@@ -1976,6 +2020,26 @@ html:not(#\#),body:not(#\#) {
|
|
|
1976
2020
|
overflow-y: auto;
|
|
1977
2021
|
}
|
|
1978
2022
|
|
|
2023
|
+
.bg-c_skyblue:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2024
|
+
background-color: skyblue;
|
|
2025
|
+
}
|
|
2026
|
+
|
|
2027
|
+
.bdr-tl_20:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2028
|
+
border-top-left-radius: 20px;
|
|
2029
|
+
}
|
|
2030
|
+
|
|
2031
|
+
.bdr-tr_20:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2032
|
+
border-top-right-radius: 20px;
|
|
2033
|
+
}
|
|
2034
|
+
|
|
2035
|
+
.fw_bold:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2036
|
+
font-weight: var(--font-weights-bold);
|
|
2037
|
+
}
|
|
2038
|
+
|
|
2039
|
+
.bg-c_shadow\.overlay:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2040
|
+
background-color: var(--colors-shadow-overlay);
|
|
2041
|
+
}
|
|
2042
|
+
|
|
1979
2043
|
.fw_semibold:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1980
2044
|
font-weight: var(--font-weights-semibold);
|
|
1981
2045
|
}
|
|
@@ -2219,6 +2283,10 @@ html:not(#\#),body:not(#\#) {
|
|
|
2219
2283
|
gap: var(--spacing-10);
|
|
2220
2284
|
}
|
|
2221
2285
|
|
|
2286
|
+
.\[\&_\[data-rsbs-backdrop\]\]\:bg_rgba\(0\,_0\,_0\,_0\.6\):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) [data-rsbs-backdrop] {
|
|
2287
|
+
background: rgba(0, 0, 0, 0.6);
|
|
2288
|
+
}
|
|
2289
|
+
|
|
2222
2290
|
.hidden\:d_none:is([hidden]):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2223
2291
|
display: none;
|
|
2224
2292
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { default as BottomSheet, BottomSheetProps } from '.';
|
|
3
|
+
declare const meta: Meta<typeof BottomSheet>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<BottomSheetProps>;
|
|
6
|
+
export declare const Basic: Story;
|
|
7
|
+
export declare const WithoutHandle: Story;
|
|
8
|
+
export declare const CustomRounded: Story;
|
|
9
|
+
export declare const WithoutDefaultPadding: Story;
|
|
10
|
+
export declare const CustomDesignWithScroller: Story;
|
|
11
|
+
export declare const DisableBackdropBlocking: Story;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RecipeVariantProps } from '../../../styled-system/css';
|
|
2
|
+
export type BottomSheetVariantProps = RecipeVariantProps<typeof bottomSheetRecipe>;
|
|
3
|
+
export declare const bottomSheetRecipe: import('../../../styled-system/types').SlotRecipeRuntimeFn<"header" | "content" | "container" | "backdrop" | "root", {
|
|
4
|
+
fullHeight: {
|
|
5
|
+
true: {
|
|
6
|
+
container: {
|
|
7
|
+
height: "100%";
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { Sheet } from 'react-modal-sheet';
|
|
3
|
+
import { BottomSheetVariantProps } from './bottomsheet.recipe';
|
|
4
|
+
import { HTMLStyledProps } from '../../../styled-system/jsx';
|
|
5
|
+
export type BottomSheetProps = Omit<ComponentProps<typeof Sheet>, 'children'> & BottomSheetVariantProps & {
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
snapPercent?: {
|
|
8
|
+
min: number;
|
|
9
|
+
max: number;
|
|
10
|
+
};
|
|
11
|
+
fullHeight?: boolean;
|
|
12
|
+
rounded?: number;
|
|
13
|
+
disableDrag?: boolean;
|
|
14
|
+
onClose?: () => void;
|
|
15
|
+
};
|
|
16
|
+
interface BottomSheetComponent extends React.ForwardRefExoticComponent<BottomSheetProps & React.RefAttributes<HTMLDivElement>> {
|
|
17
|
+
Header: typeof Header;
|
|
18
|
+
Content: typeof Content;
|
|
19
|
+
Backdrop: typeof Backdrop;
|
|
20
|
+
Handle: typeof Handle;
|
|
21
|
+
Scroller: typeof Sheet.Scroller;
|
|
22
|
+
}
|
|
23
|
+
declare const BottomSheet: BottomSheetComponent;
|
|
24
|
+
declare const Header: import('react').ForwardRefExoticComponent<{
|
|
25
|
+
fullHeight?: boolean | undefined;
|
|
26
|
+
} & {
|
|
27
|
+
children: ReactNode;
|
|
28
|
+
className?: string;
|
|
29
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
30
|
+
type ContentProps = ComponentProps<typeof Sheet.Content> & HTMLStyledProps<'div'>;
|
|
31
|
+
declare const Content: import('react').ForwardRefExoticComponent<Omit<ContentProps, "ref"> & import('react').RefAttributes<HTMLStyledProps<"div">>>;
|
|
32
|
+
type BackdropProps = ComponentProps<typeof Sheet.Backdrop> & {
|
|
33
|
+
opacity?: number;
|
|
34
|
+
disableCloseOnTap?: boolean;
|
|
35
|
+
};
|
|
36
|
+
declare const Backdrop: import('react').ForwardRefExoticComponent<Omit<BackdropProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
37
|
+
declare const Handle: () => import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
export default BottomSheet;
|
|
@@ -3,7 +3,7 @@ export { default as Text, type TextProps } from './Text';
|
|
|
3
3
|
export { default as Dialog, type DialogProps } from './Dialog';
|
|
4
4
|
export { default as Spinner, type SpinnerProps } from './Spinner';
|
|
5
5
|
export { default as IconButton, type IconButtonProps } from './IconButton';
|
|
6
|
-
export { default as BottomSheet, type BottomSheetProps } from './
|
|
6
|
+
export { default as BottomSheet, type BottomSheetProps } from './BottomSheet2';
|
|
7
7
|
export { default as Navigation, type NavigationProps, type NavigationTriggerProps } from './Navigation';
|
|
8
8
|
export { default as Tag, type TagProps } from './Tag';
|
|
9
9
|
export { Portal, type PortalProps } from '@ark-ui/react';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nation-a/ui",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -14,8 +14,10 @@
|
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@ark-ui/react": "^5.1.0",
|
|
16
16
|
"@react-spring/web": "^9.7.5",
|
|
17
|
+
"motion": "^12.6.3",
|
|
17
18
|
"react": "^18.3.1",
|
|
18
19
|
"react-dom": "^18.3.1",
|
|
20
|
+
"react-modal-sheet": "^4.0.1",
|
|
19
21
|
"@nation-a/icons": "0.2.0",
|
|
20
22
|
"@nation-a/tokens": "0.2.1"
|
|
21
23
|
},
|