@teamturing/react-kit 2.28.1 → 2.29.1
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/core/Drawer/index.d.ts +3 -0
- package/dist/core/GradientText/index.d.ts +1 -1
- package/dist/index.js +93 -29
- package/dist/theme/index.d.ts +4 -0
- package/esm/core/Drawer/index.js +84 -25
- package/esm/core/OverlayPopper/index.js +3 -1
- package/esm/packages/token-studio/esm/foundation/gradient/direction/index.js +2 -1
- package/esm/packages/token-studio/esm/token/color/index.js +2 -1
- package/esm/packages/token-studio/esm/token/gradient/index.js +4 -1
- package/package.json +3 -3
|
@@ -8,11 +8,13 @@ import { UnstyledDrawerBodyProps } from './_UnstyledDrawerBody';
|
|
|
8
8
|
import { UnstyledDrawerFooterProps } from './_UnstyledDrawerFooter';
|
|
9
9
|
import { UnstyledDrawerHeaderProps } from './_UnstyledDrawerHeader';
|
|
10
10
|
type DrawerSizeType = 'full' | 'l' | 'm' | 's';
|
|
11
|
+
type DrawerDirectionType = 'right' | 'bottom';
|
|
11
12
|
type Props = {
|
|
12
13
|
isOpen?: boolean;
|
|
13
14
|
onDismiss?: () => void;
|
|
14
15
|
isOutsideClickDismissable?: boolean;
|
|
15
16
|
size?: DrawerSizeType;
|
|
17
|
+
direction?: DrawerDirectionType;
|
|
16
18
|
initialFocusRef?: RefObject<HTMLElement>;
|
|
17
19
|
} & SxProp;
|
|
18
20
|
declare const _default: import("react").ForwardRefExoticComponent<{
|
|
@@ -20,6 +22,7 @@ declare const _default: import("react").ForwardRefExoticComponent<{
|
|
|
20
22
|
onDismiss?: (() => void) | undefined;
|
|
21
23
|
isOutsideClickDismissable?: boolean | undefined;
|
|
22
24
|
size?: DrawerSizeType | undefined;
|
|
25
|
+
direction?: DrawerDirectionType | undefined;
|
|
23
26
|
initialFocusRef?: RefObject<HTMLElement> | undefined;
|
|
24
27
|
} & SxProp & {
|
|
25
28
|
children?: import("react").ReactNode;
|
|
@@ -270,7 +270,7 @@ declare const GradientText: import("styled-components").IStyledComponent<"web",
|
|
|
270
270
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLSpanElement> | undefined;
|
|
271
271
|
} & {
|
|
272
272
|
typography?: import("styled-system").ResponsiveValue<"m" | "s" | "xxs" | "xs" | "l" | "xl" | "xxl" | "display1" | "display2" | "display3" | "display4" | "xxl/regular" | "xxl/bold" | "xl/regular" | "xl/bold" | "l/regular" | "l/bold" | "m/regular" | "m/bold" | "s/regular" | "s/bold" | "xs/regular" | "xs/bold" | "xxs/regular" | "xxs/bold"> | undefined;
|
|
273
|
-
} & import("../..").SxProp & import("../../utils/styled-system").WordBreakProps & import("../../utils/styled-system").WhiteSpaceProps & import("../../utils/styled-system").TextDecorationProps & import("styled-system").FontSizeProps<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>, "m" | "s" | "xxs" | "xs" | "l" | "xl" | "xxl" | "display1" | "display2" | "display3" | "display4"> & import("styled-system").FontWeightProps<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>, "medium" | "bold" | "regular"> & import("styled-system").LineHeightProps<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>, 1 | 2> & import("styled-system").TextAlignProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").ColorProps<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>, "link" | "border/neutral" | "icon/inverse" | "bg/disabled" | "border/disabled" | "bg/primary" | "icon/disabled" | "border/focused" | "border/danger" | "scale/violet/0" | "scale/violet/1" | "scale/violet/2" | "scale/violet/3" | "scale/violet/4" | "scale/violet/5" | "scale/violet/6" | "scale/violet/7" | "scale/violet/8" | "scale/violet/9" | "scale/gray/0" | "scale/gray/1" | "scale/gray/2" | "scale/gray/3" | "scale/gray/4" | "scale/gray/5" | "scale/gray/6" | "scale/gray/7" | "scale/gray/8" | "scale/gray/9" | "scale/blue/0" | "scale/blue/1" | "scale/blue/2" | "scale/blue/3" | "scale/blue/4" | "scale/blue/5" | "scale/blue/6" | "scale/blue/7" | "scale/blue/8" | "scale/blue/9" | "scale/green/0" | "scale/green/1" | "scale/green/2" | "scale/green/3" | "scale/green/4" | "scale/green/5" | "scale/green/6" | "scale/green/7" | "scale/green/8" | "scale/green/9" | "scale/pink/0" | "scale/pink/1" | "scale/pink/2" | "scale/pink/3" | "scale/pink/4" | "scale/pink/5" | "scale/pink/6" | "scale/pink/7" | "scale/pink/8" | "scale/pink/9" | "scale/skyblue/0" | "scale/skyblue/1" | "scale/skyblue/2" | "scale/skyblue/3" | "scale/skyblue/4" | "scale/skyblue/5" | "scale/skyblue/6" | "scale/skyblue/7" | "scale/skyblue/8" | "scale/skyblue/9" | "scale/red/0" | "scale/red/1" | "scale/red/2" | "scale/red/3" | "scale/red/4" | "scale/red/5" | "scale/red/6" | "scale/red/7" | "scale/red/8" | "scale/red/9" | "scale/yellow/0" | "scale/yellow/1" | "scale/yellow/2" | "scale/yellow/3" | "scale/yellow/4" | "scale/yellow/5" | "scale/yellow/6" | "scale/yellow/7" | "scale/yellow/8" | "scale/yellow/9" | "dim" | "link/hovered" | "link/pressed" | "link/neutral" | "link/neutral/hovered" | "link/neutral/pressed" | "link/neutral/bold" | "link/neutral/bold/hovered" | "link/neutral/bold/pressed" | "link/disabled" | "icon/neutral" | "icon/neutral/bold" | "icon/neutral/bolder" | "icon/accent/gray" | "icon/accent/blue/subtle" | "icon/accent/blue" | "icon/accent/blue/bold" | "icon/accent/green" | "icon/accent/yellow" | "icon/accent/red" | "icon/disabled/subtler" | "icon/selected/violet" | "icon/selected" | "icon/primary/subtle" | "icon/primary" | "icon/primary/bold" | "icon/success" | "icon/warning" | "icon/danger" | "border/neutral/subtle" | "border/neutral/bolder" | "border/input" | "border/inverse" | "border/selected" | "border/primary" | "border/hovered" | "border/success" | "bg/secondary" | "bg/secondary/hovered" | "bg/secondary/pressed" | "bg/primary/hovered" | "bg/primary/pressed" | "bg/neutral/subtlest" | "bg/neutral/subtlest/hovered" | "bg/neutral/subtlest/pressed" | "bg/neutral/subtler" | "bg/neutral/subtler/hovered" | "bg/neutral/subtler/pressed" | "bg/neutral/subtle" | "bg/neutral/subtle/hovered" | "bg/neutral/subtle/pressed" | "bg/neutral" | "bg/neutral/hovered" | "bg/neutral/pressed" | "bg/neutral/bold" | "bg/neutral/bold/hovered" | "bg/neutral/bold/pressed" | "bg/neutral/bolder" | "bg/neutral/bolder/hovered" | "bg/neutral/bolder/pressed" | "bg/disabled/subtlest" | "bg/input" | "bg/accent/blue/subtlest" | "bg/accent/green/subtlest" | "bg/accent/yellow/subtlest" | "bg/accent/red/subtlest" | "bg/accent/red/subtle" | "bg/accent/red" | "bg/accent/gray/subtlest" | "bg/selected/violet" | "bg/selected" | "bg/selected/subtle" | "bg/inverse" | "bg/inverse/subtlest" | "bg/success" | "bg/success/bold" | "bg/warning" | "bg/warning/bold" | "bg/danger" | "bg/danger/bold" | "bg/danger/bold/hovered" | "bg/danger/bold/pressed" | "text/primary" | "text/accent/blue" | "text/accent/green" | "text/accent/yellow" | "text/accent/red" | "text/neutral/subtlest" | "text/neutral/subtler" | "text/neutral/subtle" | "text/neutral" | "text/inverse" | "text/inverse/subtle" | "text/inverse/subtler" | "text/disabled" | "text/success" | "text/warning" | "text/danger" | "text/selected">, "ref"> & {
|
|
273
|
+
} & import("../..").SxProp & import("../../utils/styled-system").WordBreakProps & import("../../utils/styled-system").WhiteSpaceProps & import("../../utils/styled-system").TextDecorationProps & import("styled-system").FontSizeProps<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>, "m" | "s" | "xxs" | "xs" | "l" | "xl" | "xxl" | "display1" | "display2" | "display3" | "display4"> & import("styled-system").FontWeightProps<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>, "medium" | "bold" | "regular"> & import("styled-system").LineHeightProps<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>, 1 | 2> & import("styled-system").TextAlignProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").ColorProps<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>, "link" | "border/neutral" | "icon/inverse" | "bg/disabled" | "border/disabled" | "bg/primary" | "icon/disabled" | "border/focused" | "border/danger" | "scale/violet/0" | "scale/violet/1" | "scale/violet/2" | "scale/violet/3" | "scale/violet/4" | "scale/violet/5" | "scale/violet/6" | "scale/violet/7" | "scale/violet/8" | "scale/violet/9" | "scale/gray/0" | "scale/gray/1" | "scale/gray/2" | "scale/gray/3" | "scale/gray/4" | "scale/gray/5" | "scale/gray/6" | "scale/gray/7" | "scale/gray/8" | "scale/gray/9" | "scale/blue/0" | "scale/blue/1" | "scale/blue/2" | "scale/blue/3" | "scale/blue/4" | "scale/blue/5" | "scale/blue/6" | "scale/blue/7" | "scale/blue/8" | "scale/blue/9" | "scale/green/0" | "scale/green/1" | "scale/green/2" | "scale/green/3" | "scale/green/4" | "scale/green/5" | "scale/green/6" | "scale/green/7" | "scale/green/8" | "scale/green/9" | "scale/pink/0" | "scale/pink/1" | "scale/pink/2" | "scale/pink/3" | "scale/pink/4" | "scale/pink/5" | "scale/pink/6" | "scale/pink/7" | "scale/pink/8" | "scale/pink/9" | "scale/skyblue/0" | "scale/skyblue/1" | "scale/skyblue/2" | "scale/skyblue/3" | "scale/skyblue/4" | "scale/skyblue/5" | "scale/skyblue/6" | "scale/skyblue/7" | "scale/skyblue/8" | "scale/skyblue/9" | "scale/red/0" | "scale/red/1" | "scale/red/2" | "scale/red/3" | "scale/red/4" | "scale/red/5" | "scale/red/6" | "scale/red/7" | "scale/red/8" | "scale/red/9" | "scale/yellow/0" | "scale/yellow/1" | "scale/yellow/2" | "scale/yellow/3" | "scale/yellow/4" | "scale/yellow/5" | "scale/yellow/6" | "scale/yellow/7" | "scale/yellow/8" | "scale/yellow/9" | "dim" | "link/hovered" | "link/pressed" | "link/neutral" | "link/neutral/hovered" | "link/neutral/pressed" | "link/neutral/bold" | "link/neutral/bold/hovered" | "link/neutral/bold/pressed" | "link/disabled" | "icon/neutral" | "icon/neutral/bold" | "icon/neutral/bolder" | "icon/accent/gray" | "icon/accent/blue/subtle" | "icon/accent/blue" | "icon/accent/blue/bold" | "icon/accent/green" | "icon/accent/yellow" | "icon/accent/red" | "icon/disabled/subtler" | "icon/selected/violet" | "icon/selected" | "icon/primary/subtle" | "icon/primary" | "icon/primary/bold" | "icon/success" | "icon/warning" | "icon/danger" | "border/neutral/subtle" | "border/neutral/bolder" | "border/input" | "border/inverse" | "border/selected" | "border/primary" | "border/hovered" | "border/success" | "bg/secondary" | "bg/secondary/hovered" | "bg/secondary/pressed" | "bg/primary/hovered" | "bg/primary/pressed" | "bg/neutral/subtlest" | "bg/neutral/subtlest/hovered" | "bg/neutral/subtlest/pressed" | "bg/neutral/subtler" | "bg/neutral/subtler/hovered" | "bg/neutral/subtler/pressed" | "bg/neutral/subtle" | "bg/neutral/subtle/hovered" | "bg/neutral/subtle/pressed" | "bg/neutral" | "bg/neutral/hovered" | "bg/neutral/pressed" | "bg/neutral/bold" | "bg/neutral/bold/hovered" | "bg/neutral/bold/pressed" | "bg/neutral/bolder" | "bg/neutral/bolder/hovered" | "bg/neutral/bolder/pressed" | "bg/disabled/subtlest" | "bg/input" | "bg/accent/blue/subtlest" | "bg/accent/green/subtlest" | "bg/accent/yellow/subtlest" | "bg/accent/red/subtlest" | "bg/accent/red/subtle" | "bg/accent/red" | "bg/accent/gray/subtlest" | "bg/selected/violet" | "bg/selected" | "bg/selected/subtle" | "bg/inverse" | "bg/inverse/subtlest" | "bg/success" | "bg/success/bold" | "bg/warning" | "bg/warning/bold" | "bg/danger" | "bg/danger/bold" | "bg/danger/bold/hovered" | "bg/danger/bold/pressed" | "text/primary" | "text/accent/blue" | "text/accent/green" | "text/accent/yellow" | "text/accent/red" | "text/neutral/subtlest" | "text/neutral/subtler" | "text/neutral/subtle" | "text/neutral" | "text/inverse" | "text/inverse/subtle" | "text/inverse/subtler" | "text/disabled" | "text/success" | "text/warning" | "text/danger" | "text/selected" | "text/weak">, "ref"> & {
|
|
274
274
|
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
275
275
|
}, Props>>;
|
|
276
276
|
export default GradientText;
|
package/dist/index.js
CHANGED
|
@@ -19081,6 +19081,7 @@ const Drawer = ({
|
|
|
19081
19081
|
onDismiss,
|
|
19082
19082
|
isOutsideClickDismissable = true,
|
|
19083
19083
|
size = 'm',
|
|
19084
|
+
direction = 'right',
|
|
19084
19085
|
initialFocusRef,
|
|
19085
19086
|
sx
|
|
19086
19087
|
}, ref) => {
|
|
@@ -19143,15 +19144,27 @@ const Drawer = ({
|
|
|
19143
19144
|
ref: blanketRef
|
|
19144
19145
|
})
|
|
19145
19146
|
}), /*#__PURE__*/jsxRuntimeExports.jsx(MotionView, {
|
|
19146
|
-
|
|
19147
|
-
|
|
19148
|
-
|
|
19149
|
-
|
|
19150
|
-
|
|
19151
|
-
|
|
19152
|
-
|
|
19153
|
-
|
|
19154
|
-
|
|
19147
|
+
...(direction === 'right' ? {
|
|
19148
|
+
initial: {
|
|
19149
|
+
x: '100%'
|
|
19150
|
+
},
|
|
19151
|
+
animate: {
|
|
19152
|
+
x: 0
|
|
19153
|
+
},
|
|
19154
|
+
exit: {
|
|
19155
|
+
x: '100%'
|
|
19156
|
+
}
|
|
19157
|
+
} : direction === 'bottom' ? {
|
|
19158
|
+
initial: {
|
|
19159
|
+
y: '100%'
|
|
19160
|
+
},
|
|
19161
|
+
animate: {
|
|
19162
|
+
y: 0
|
|
19163
|
+
},
|
|
19164
|
+
exit: {
|
|
19165
|
+
y: '100%'
|
|
19166
|
+
}
|
|
19167
|
+
} : {}),
|
|
19155
19168
|
transition: {
|
|
19156
19169
|
duration: 0.25,
|
|
19157
19170
|
ease: easeInOut
|
|
@@ -19159,29 +19172,27 @@ const Drawer = ({
|
|
|
19159
19172
|
sx: {
|
|
19160
19173
|
position: 'fixed',
|
|
19161
19174
|
display: 'flex',
|
|
19162
|
-
top: 0,
|
|
19163
|
-
right: 0,
|
|
19164
|
-
bottom: 0,
|
|
19165
19175
|
zIndex: 9999,
|
|
19166
|
-
|
|
19176
|
+
...(direction === 'right' ? {
|
|
19177
|
+
top: 0,
|
|
19178
|
+
right: 0,
|
|
19179
|
+
bottom: 0,
|
|
19180
|
+
width: ['100%', '100%', 'fit-content']
|
|
19181
|
+
} : direction === 'bottom' ? {
|
|
19182
|
+
left: 0,
|
|
19183
|
+
right: 0,
|
|
19184
|
+
bottom: 0,
|
|
19185
|
+
width: '100%'
|
|
19186
|
+
} : {})
|
|
19167
19187
|
},
|
|
19168
19188
|
children: /*#__PURE__*/jsxRuntimeExports.jsxs(BaseDrawer, {
|
|
19169
19189
|
ref: drawerRef,
|
|
19170
19190
|
"aria-modal": 'true',
|
|
19171
19191
|
role: 'dialog',
|
|
19172
19192
|
tabIndex: -1,
|
|
19173
|
-
|
|
19174
|
-
|
|
19175
|
-
|
|
19176
|
-
} : size === 'm' ? {
|
|
19177
|
-
width: ['100%', '100%', 640]
|
|
19178
|
-
} : size === 'l' ? {
|
|
19179
|
-
width: ['100%', '100%', 860]
|
|
19180
|
-
} : size === 'full' ? {
|
|
19181
|
-
width: ['100%', '100%', 'calc(100vw - 80px)']
|
|
19182
|
-
} : {}),
|
|
19183
|
-
...sx
|
|
19184
|
-
},
|
|
19193
|
+
size: size,
|
|
19194
|
+
direction: direction,
|
|
19195
|
+
sx: sx,
|
|
19185
19196
|
onKeyDown: handleKeyDown,
|
|
19186
19197
|
children: [/*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
19187
19198
|
sx: {
|
|
@@ -19231,6 +19242,52 @@ const BaseDrawer = styled__default.default.div(({
|
|
|
19231
19242
|
margin: 'auto',
|
|
19232
19243
|
height: '100%',
|
|
19233
19244
|
marginRight: 0
|
|
19245
|
+
}), ({
|
|
19246
|
+
direction
|
|
19247
|
+
}) => direction === 'right' ? variant({
|
|
19248
|
+
prop: 'size',
|
|
19249
|
+
variants: {
|
|
19250
|
+
s: {
|
|
19251
|
+
width: ['calc(100% - 32px)', 400, 400]
|
|
19252
|
+
},
|
|
19253
|
+
m: {
|
|
19254
|
+
width: ['100%', '100%', 640]
|
|
19255
|
+
},
|
|
19256
|
+
l: {
|
|
19257
|
+
width: ['100%', '100%', 860]
|
|
19258
|
+
},
|
|
19259
|
+
full: {
|
|
19260
|
+
width: ['100%', '100%', 'calc(100vw - 80px)']
|
|
19261
|
+
}
|
|
19262
|
+
}
|
|
19263
|
+
}) : variant({
|
|
19264
|
+
prop: 'size',
|
|
19265
|
+
variants: {
|
|
19266
|
+
s: {
|
|
19267
|
+
height: '40dvh',
|
|
19268
|
+
maxHeight: '40dvh'
|
|
19269
|
+
},
|
|
19270
|
+
m: {
|
|
19271
|
+
height: '60dvh',
|
|
19272
|
+
maxHeight: '60dvh'
|
|
19273
|
+
},
|
|
19274
|
+
l: {
|
|
19275
|
+
height: '80dvh',
|
|
19276
|
+
maxHeight: '80dvh'
|
|
19277
|
+
},
|
|
19278
|
+
full: {
|
|
19279
|
+
height: 'calc(100dvh - 80px)',
|
|
19280
|
+
maxHeight: 'calc(100dvh - 80px)'
|
|
19281
|
+
}
|
|
19282
|
+
}
|
|
19283
|
+
}), variant({
|
|
19284
|
+
prop: 'direction',
|
|
19285
|
+
variants: {
|
|
19286
|
+
right: {},
|
|
19287
|
+
bottom: {
|
|
19288
|
+
width: '100% !important'
|
|
19289
|
+
}
|
|
19290
|
+
}
|
|
19234
19291
|
}), sx);
|
|
19235
19292
|
var index$7 = Object.assign( /*#__PURE__*/React.forwardRef(Drawer), {
|
|
19236
19293
|
UnstyledHeader: UnstyledDrawerHeader,
|
|
@@ -34685,7 +34742,9 @@ const OverlayPopper = ({
|
|
|
34685
34742
|
} = useFloating({
|
|
34686
34743
|
placement,
|
|
34687
34744
|
whileElementsMounted: autoUpdate,
|
|
34688
|
-
middleware: [offset(theme.space[1]), flip(), shift(
|
|
34745
|
+
middleware: [offset(theme.space[1]), flip(), shift({
|
|
34746
|
+
crossAxis: true
|
|
34747
|
+
})],
|
|
34689
34748
|
strategy: 'fixed'
|
|
34690
34749
|
});
|
|
34691
34750
|
const [isOpen, toggleOverlay, openOverlay, closeOverlay] = useToggleState({
|
|
@@ -38463,7 +38522,8 @@ const textColor = {
|
|
|
38463
38522
|
'text/success': palette.green500,
|
|
38464
38523
|
'text/warning': palette.yellow500,
|
|
38465
38524
|
'text/danger': palette.red500,
|
|
38466
|
-
'text/selected': palette.gray900
|
|
38525
|
+
'text/selected': palette.gray900,
|
|
38526
|
+
'text/weak': palette.gray300
|
|
38467
38527
|
};
|
|
38468
38528
|
const bgColor = {
|
|
38469
38529
|
'bg/secondary': palette.violet50,
|
|
@@ -38681,7 +38741,8 @@ const direction = {
|
|
|
38681
38741
|
directionToRight: 'to right',
|
|
38682
38742
|
directionToLeft: 'to left',
|
|
38683
38743
|
directionToRightBottom: 'to right bottom',
|
|
38684
|
-
directionToTop: 'to top'
|
|
38744
|
+
directionToTop: 'to top',
|
|
38745
|
+
directionToBottom: 'to bottom'
|
|
38685
38746
|
};
|
|
38686
38747
|
|
|
38687
38748
|
const generateGradientTokenValue = (direction$1, colorStopList$1) => `${direction[direction$1]}, ${colorStopList[colorStopList$1]}`;
|
|
@@ -38699,12 +38760,15 @@ const overlayGradient = {
|
|
|
38699
38760
|
'overlay/subtlest/toright': generateGradientTokenValue('directionToRight', 'colorStopListWhite'),
|
|
38700
38761
|
'overlay/subtlest/toleft': generateGradientTokenValue('directionToLeft', 'colorStopListWhite'),
|
|
38701
38762
|
'overlay/subtlest/totop': generateGradientTokenValue('directionToTop', 'colorStopListWhite'),
|
|
38763
|
+
'overlay/subtlest/tobottom': generateGradientTokenValue('directionToBottom', 'colorStopListWhite'),
|
|
38702
38764
|
'overlay/floating/toright': generateGradientTokenValue('directionToRight', 'colorStopListWhite'),
|
|
38703
38765
|
'overlay/floating/toleft': generateGradientTokenValue('directionToLeft', 'colorStopListWhite'),
|
|
38704
38766
|
'overlay/floating/totop': generateGradientTokenValue('directionToTop', 'colorStopListWhite'),
|
|
38767
|
+
'overlay/floating/tobottom': generateGradientTokenValue('directionToBottom', 'colorStopListWhite'),
|
|
38705
38768
|
'overlay/bold/toright': generateGradientTokenValue('directionToRight', 'colorStopListBlack'),
|
|
38706
38769
|
'overlay/bold/toleft': generateGradientTokenValue('directionToLeft', 'colorStopListBlack'),
|
|
38707
|
-
'overlay/bold/totop': generateGradientTokenValue('directionToTop', 'colorStopListBlack')
|
|
38770
|
+
'overlay/bold/totop': generateGradientTokenValue('directionToTop', 'colorStopListBlack'),
|
|
38771
|
+
'overlay/bold/tobottom': generateGradientTokenValue('directionToBottom', 'colorStopListBlack')
|
|
38708
38772
|
};
|
|
38709
38773
|
const gradient = {
|
|
38710
38774
|
...textGradient,
|
package/dist/theme/index.d.ts
CHANGED
|
@@ -275,17 +275,21 @@ declare const theme: {
|
|
|
275
275
|
'text/warning': "#FFC107";
|
|
276
276
|
'text/danger': "#F22735";
|
|
277
277
|
'text/selected': "#33373B";
|
|
278
|
+
'text/weak': "#D1D5DB";
|
|
278
279
|
};
|
|
279
280
|
gradients: {
|
|
280
281
|
readonly 'overlay/subtlest/toright': string;
|
|
281
282
|
readonly 'overlay/subtlest/toleft': string;
|
|
282
283
|
readonly 'overlay/subtlest/totop': string;
|
|
284
|
+
readonly 'overlay/subtlest/tobottom': string;
|
|
283
285
|
readonly 'overlay/floating/toright': string;
|
|
284
286
|
readonly 'overlay/floating/toleft': string;
|
|
285
287
|
readonly 'overlay/floating/totop': string;
|
|
288
|
+
readonly 'overlay/floating/tobottom': string;
|
|
286
289
|
readonly 'overlay/bold/toright': string;
|
|
287
290
|
readonly 'overlay/bold/toleft': string;
|
|
288
291
|
readonly 'overlay/bold/totop': string;
|
|
292
|
+
readonly 'overlay/bold/tobottom': string;
|
|
289
293
|
readonly 'border/accent/violet': string;
|
|
290
294
|
readonly 'bg/accent/violet': string;
|
|
291
295
|
readonly 'bg/accent/neutral': string;
|
package/esm/core/Drawer/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { forwardRef, useCallback, useRef, useImperativeHandle, useEffect } from 'react';
|
|
2
2
|
import SvgClose from '../../packages/icons/esm/Close.js';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
|
+
import '../../node_modules/styled-system/dist/index.esm.js';
|
|
4
5
|
import useFocusTrap from '../../hook/useFocusTrap.js';
|
|
5
6
|
import { sx } from '../../utils/styled-system/index.js';
|
|
6
7
|
import IconButton from '../IconButton/index.js';
|
|
@@ -14,6 +15,7 @@ import UnstyledDrawerBody from './_UnstyledDrawerBody.js';
|
|
|
14
15
|
import UnstyledDrawerFooter from './_UnstyledDrawerFooter.js';
|
|
15
16
|
import UnstyledDrawerHeader from './_UnstyledDrawerHeader.js';
|
|
16
17
|
import { j as jsxRuntimeExports } from '../../node_modules/react/jsx-runtime.js';
|
|
18
|
+
import { variant } from '../../node_modules/@styled-system/variant/dist/index.esm.js';
|
|
17
19
|
import { AnimatePresence } from '../../node_modules/framer-motion/dist/es/components/AnimatePresence/index.js';
|
|
18
20
|
import { easeInOut } from '../../node_modules/framer-motion/dist/es/easing/ease.js';
|
|
19
21
|
|
|
@@ -23,6 +25,7 @@ const Drawer = ({
|
|
|
23
25
|
onDismiss,
|
|
24
26
|
isOutsideClickDismissable = true,
|
|
25
27
|
size = 'm',
|
|
28
|
+
direction = 'right',
|
|
26
29
|
initialFocusRef,
|
|
27
30
|
sx
|
|
28
31
|
}, ref) => {
|
|
@@ -85,15 +88,27 @@ const Drawer = ({
|
|
|
85
88
|
ref: blanketRef
|
|
86
89
|
})
|
|
87
90
|
}), /*#__PURE__*/jsxRuntimeExports.jsx(MotionView, {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
91
|
+
...(direction === 'right' ? {
|
|
92
|
+
initial: {
|
|
93
|
+
x: '100%'
|
|
94
|
+
},
|
|
95
|
+
animate: {
|
|
96
|
+
x: 0
|
|
97
|
+
},
|
|
98
|
+
exit: {
|
|
99
|
+
x: '100%'
|
|
100
|
+
}
|
|
101
|
+
} : direction === 'bottom' ? {
|
|
102
|
+
initial: {
|
|
103
|
+
y: '100%'
|
|
104
|
+
},
|
|
105
|
+
animate: {
|
|
106
|
+
y: 0
|
|
107
|
+
},
|
|
108
|
+
exit: {
|
|
109
|
+
y: '100%'
|
|
110
|
+
}
|
|
111
|
+
} : {}),
|
|
97
112
|
transition: {
|
|
98
113
|
duration: 0.25,
|
|
99
114
|
ease: easeInOut
|
|
@@ -101,29 +116,27 @@ const Drawer = ({
|
|
|
101
116
|
sx: {
|
|
102
117
|
position: 'fixed',
|
|
103
118
|
display: 'flex',
|
|
104
|
-
top: 0,
|
|
105
|
-
right: 0,
|
|
106
|
-
bottom: 0,
|
|
107
119
|
zIndex: 9999,
|
|
108
|
-
|
|
120
|
+
...(direction === 'right' ? {
|
|
121
|
+
top: 0,
|
|
122
|
+
right: 0,
|
|
123
|
+
bottom: 0,
|
|
124
|
+
width: ['100%', '100%', 'fit-content']
|
|
125
|
+
} : direction === 'bottom' ? {
|
|
126
|
+
left: 0,
|
|
127
|
+
right: 0,
|
|
128
|
+
bottom: 0,
|
|
129
|
+
width: '100%'
|
|
130
|
+
} : {})
|
|
109
131
|
},
|
|
110
132
|
children: /*#__PURE__*/jsxRuntimeExports.jsxs(BaseDrawer, {
|
|
111
133
|
ref: drawerRef,
|
|
112
134
|
"aria-modal": 'true',
|
|
113
135
|
role: 'dialog',
|
|
114
136
|
tabIndex: -1,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
} : size === 'm' ? {
|
|
119
|
-
width: ['100%', '100%', 640]
|
|
120
|
-
} : size === 'l' ? {
|
|
121
|
-
width: ['100%', '100%', 860]
|
|
122
|
-
} : size === 'full' ? {
|
|
123
|
-
width: ['100%', '100%', 'calc(100vw - 80px)']
|
|
124
|
-
} : {}),
|
|
125
|
-
...sx
|
|
126
|
-
},
|
|
137
|
+
size: size,
|
|
138
|
+
direction: direction,
|
|
139
|
+
sx: sx,
|
|
127
140
|
onKeyDown: handleKeyDown,
|
|
128
141
|
children: [/*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
129
142
|
sx: {
|
|
@@ -173,6 +186,52 @@ const BaseDrawer = styled.div(({
|
|
|
173
186
|
margin: 'auto',
|
|
174
187
|
height: '100%',
|
|
175
188
|
marginRight: 0
|
|
189
|
+
}), ({
|
|
190
|
+
direction
|
|
191
|
+
}) => direction === 'right' ? variant({
|
|
192
|
+
prop: 'size',
|
|
193
|
+
variants: {
|
|
194
|
+
s: {
|
|
195
|
+
width: ['calc(100% - 32px)', 400, 400]
|
|
196
|
+
},
|
|
197
|
+
m: {
|
|
198
|
+
width: ['100%', '100%', 640]
|
|
199
|
+
},
|
|
200
|
+
l: {
|
|
201
|
+
width: ['100%', '100%', 860]
|
|
202
|
+
},
|
|
203
|
+
full: {
|
|
204
|
+
width: ['100%', '100%', 'calc(100vw - 80px)']
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}) : variant({
|
|
208
|
+
prop: 'size',
|
|
209
|
+
variants: {
|
|
210
|
+
s: {
|
|
211
|
+
height: '40dvh',
|
|
212
|
+
maxHeight: '40dvh'
|
|
213
|
+
},
|
|
214
|
+
m: {
|
|
215
|
+
height: '60dvh',
|
|
216
|
+
maxHeight: '60dvh'
|
|
217
|
+
},
|
|
218
|
+
l: {
|
|
219
|
+
height: '80dvh',
|
|
220
|
+
maxHeight: '80dvh'
|
|
221
|
+
},
|
|
222
|
+
full: {
|
|
223
|
+
height: 'calc(100dvh - 80px)',
|
|
224
|
+
maxHeight: 'calc(100dvh - 80px)'
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}), variant({
|
|
228
|
+
prop: 'direction',
|
|
229
|
+
variants: {
|
|
230
|
+
right: {},
|
|
231
|
+
bottom: {
|
|
232
|
+
width: '100% !important'
|
|
233
|
+
}
|
|
234
|
+
}
|
|
176
235
|
}), sx);
|
|
177
236
|
var index = Object.assign( /*#__PURE__*/forwardRef(Drawer), {
|
|
178
237
|
UnstyledHeader: UnstyledDrawerHeader,
|
|
@@ -29,7 +29,9 @@ const OverlayPopper = ({
|
|
|
29
29
|
} = useFloating({
|
|
30
30
|
placement,
|
|
31
31
|
whileElementsMounted: autoUpdate,
|
|
32
|
-
middleware: [offset(theme.space[1]), flip(), shift(
|
|
32
|
+
middleware: [offset(theme.space[1]), flip(), shift({
|
|
33
|
+
crossAxis: true
|
|
34
|
+
})],
|
|
33
35
|
strategy: 'fixed'
|
|
34
36
|
});
|
|
35
37
|
const [isOpen, toggleOverlay, openOverlay, closeOverlay] = useToggleState({
|
|
@@ -17,7 +17,8 @@ const textColor = {
|
|
|
17
17
|
'text/success': palette.green500,
|
|
18
18
|
'text/warning': palette.yellow500,
|
|
19
19
|
'text/danger': palette.red500,
|
|
20
|
-
'text/selected': palette.gray900
|
|
20
|
+
'text/selected': palette.gray900,
|
|
21
|
+
'text/weak': palette.gray300
|
|
21
22
|
};
|
|
22
23
|
const bgColor = {
|
|
23
24
|
'bg/secondary': palette.violet50,
|
|
@@ -16,12 +16,15 @@ const overlayGradient = {
|
|
|
16
16
|
'overlay/subtlest/toright': generateGradientTokenValue('directionToRight', 'colorStopListWhite'),
|
|
17
17
|
'overlay/subtlest/toleft': generateGradientTokenValue('directionToLeft', 'colorStopListWhite'),
|
|
18
18
|
'overlay/subtlest/totop': generateGradientTokenValue('directionToTop', 'colorStopListWhite'),
|
|
19
|
+
'overlay/subtlest/tobottom': generateGradientTokenValue('directionToBottom', 'colorStopListWhite'),
|
|
19
20
|
'overlay/floating/toright': generateGradientTokenValue('directionToRight', 'colorStopListWhite'),
|
|
20
21
|
'overlay/floating/toleft': generateGradientTokenValue('directionToLeft', 'colorStopListWhite'),
|
|
21
22
|
'overlay/floating/totop': generateGradientTokenValue('directionToTop', 'colorStopListWhite'),
|
|
23
|
+
'overlay/floating/tobottom': generateGradientTokenValue('directionToBottom', 'colorStopListWhite'),
|
|
22
24
|
'overlay/bold/toright': generateGradientTokenValue('directionToRight', 'colorStopListBlack'),
|
|
23
25
|
'overlay/bold/toleft': generateGradientTokenValue('directionToLeft', 'colorStopListBlack'),
|
|
24
|
-
'overlay/bold/totop': generateGradientTokenValue('directionToTop', 'colorStopListBlack')
|
|
26
|
+
'overlay/bold/totop': generateGradientTokenValue('directionToTop', 'colorStopListBlack'),
|
|
27
|
+
'overlay/bold/tobottom': generateGradientTokenValue('directionToBottom', 'colorStopListBlack')
|
|
25
28
|
};
|
|
26
29
|
const gradient = {
|
|
27
30
|
...textGradient,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teamturing/react-kit",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.29.1",
|
|
4
4
|
"description": "React components, hooks for create teamturing web application",
|
|
5
5
|
"author": "Sungchang Park <psch300@gmail.com> (https://github.com/psch300)",
|
|
6
6
|
"homepage": "https://github.com/weareteamturing/bombe#readme",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@floating-ui/react-dom": "^2.0.2",
|
|
57
57
|
"@primer/behaviors": "^1.3.6",
|
|
58
58
|
"@teamturing/icons": "^1.41.0",
|
|
59
|
-
"@teamturing/token-studio": "^1.
|
|
59
|
+
"@teamturing/token-studio": "^1.7.0",
|
|
60
60
|
"@teamturing/utils": "^1.3.0",
|
|
61
61
|
"framer-motion": "^10.16.4",
|
|
62
62
|
"lodash.debounce": "^4.0.8",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"react-textarea-autosize": "^8.5.3",
|
|
67
67
|
"styled-system": "^5.1.5"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "22854552108cb3fe3d9d2ab9e829301fe85e6df9"
|
|
70
70
|
}
|