property-practice-ui 0.3.1 → 0.4.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/CHANGELOG.md +12 -0
- package/dist/Button-DSs1nCzw.d.cts +22 -0
- package/dist/Button-DSs1nCzw.d.ts +22 -0
- package/dist/{FileButton-zPIyC3gQ.d.ts → FileButton-C5ihIfp2.d.ts} +1 -1
- package/dist/{FileButton-C_ITD9MA.d.cts → FileButton-zG8s-td_.d.cts} +1 -1
- package/dist/{Textarea-COarrHSa.d.ts → Textarea-BALpKeZd.d.ts} +1 -1
- package/dist/{Textarea-DP0HgLAn.d.cts → Textarea-BSdiNkgw.d.cts} +1 -1
- package/dist/atoms.d.cts +4 -3
- package/dist/atoms.d.ts +4 -3
- package/dist/colors-CSsV0X7j.d.cts +8 -0
- package/dist/colors-CSsV0X7j.d.ts +8 -0
- package/dist/index.cjs +249 -788
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -124
- package/dist/index.d.ts +6 -124
- package/dist/index.js +251 -781
- package/dist/index.js.map +1 -1
- package/dist/molecules.d.cts +5 -3
- package/dist/molecules.d.ts +5 -3
- package/dist/organisms.cjs +2859 -0
- package/dist/organisms.cjs.map +1 -0
- package/dist/organisms.d.cts +127 -0
- package/dist/organisms.d.ts +127 -0
- package/dist/organisms.js +2845 -0
- package/dist/organisms.js.map +1 -0
- package/dist/{toast-CvZfLJrO.d.cts → tableListItem-irbfqxnQ.d.cts} +1 -3
- package/dist/{toast-CvZfLJrO.d.ts → tableListItem-irbfqxnQ.d.ts} +1 -3
- package/dist/toast-JPCqJveR.d.cts +3 -0
- package/dist/toast-JPCqJveR.d.ts +3 -0
- package/dist/types-CkS-Mlp9.d.cts +19 -0
- package/dist/types-CkS-Mlp9.d.ts +19 -0
- package/dist/types.d.cts +2 -1
- package/dist/types.d.ts +2 -1
- package/package.json +5 -5
- package/src/index.ts +0 -1
- package/src/molecules/ContentCard/ContentCard.tsx +1 -1
- package/src/molecules/SideNav/SideNav.tsx +1 -1
- package/src/organisms/FeatureCarousel/FeatureCarousel.tsx +3 -1
- package/src/organisms/Header/Header.tsx +27 -2
- package/tsup.config.ts +1 -0
- package/dist/Button-BT32YGe5.d.cts +0 -46
- package/dist/Button-BT32YGe5.d.ts +0 -46
|
@@ -231,7 +231,7 @@ export const SideNav = ({
|
|
|
231
231
|
const isActive = activeItem === item.href;
|
|
232
232
|
return (
|
|
233
233
|
<NavItem key={item.href}>
|
|
234
|
-
<NavLink href={item.href} $isActive={isActive}>
|
|
234
|
+
<NavLink href={item.href} $isActive={isActive} onClick={onClose}>
|
|
235
235
|
{isActive ? <ActiveTriangle triangleColor={triangleColor} /> : <InactiveSpacer />}
|
|
236
236
|
<TextButton
|
|
237
237
|
asChild
|
|
@@ -17,12 +17,13 @@ const CarouselContainer = styled.div`
|
|
|
17
17
|
|
|
18
18
|
const CardsWrapper = styled.div`
|
|
19
19
|
display: flex;
|
|
20
|
+
align-items: stretch;
|
|
20
21
|
gap: 1.5rem;
|
|
21
22
|
padding: 1rem 0;
|
|
22
23
|
|
|
23
24
|
/* Desktop: controlled by JS */
|
|
24
25
|
@media (min-width: 768px) {
|
|
25
|
-
overflow
|
|
26
|
+
overflow: hidden;
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
/* Mobile: native scroll with snap */
|
|
@@ -40,6 +41,7 @@ const CardsWrapper = styled.div`
|
|
|
40
41
|
|
|
41
42
|
const CardContainer = styled.div<{ $translateX: number }>`
|
|
42
43
|
display: flex;
|
|
44
|
+
align-items: stretch;
|
|
43
45
|
gap: 1.5rem;
|
|
44
46
|
|
|
45
47
|
/* Desktop: transform animation */
|
|
@@ -1,16 +1,22 @@
|
|
|
1
|
+
import { useEffect, useRef, useState } from 'react';
|
|
1
2
|
import styled from 'styled-components';
|
|
2
3
|
import { ExtendedButton, TextButton } from '../../atoms';
|
|
3
4
|
import { colors } from '../../tokens/colors';
|
|
4
5
|
|
|
5
6
|
type BorderColor = keyof typeof colors.border;
|
|
6
7
|
|
|
7
|
-
const HeaderContainer = styled.header
|
|
8
|
+
const HeaderContainer = styled.header<{ $isVisible: boolean }>`
|
|
8
9
|
display: flex;
|
|
9
10
|
justify-content: space-between;
|
|
10
11
|
align-items: center;
|
|
11
12
|
background-color: #ffffff;
|
|
12
13
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
13
14
|
padding: 0 1rem;
|
|
15
|
+
position: sticky;
|
|
16
|
+
top: 0;
|
|
17
|
+
z-index: 100;
|
|
18
|
+
transform: translateY(${props => props.$isVisible ? '0' : '-100%'});
|
|
19
|
+
transition: transform 0.3s ease-in-out;
|
|
14
20
|
`;
|
|
15
21
|
|
|
16
22
|
const LogoWrapper = styled.div`
|
|
@@ -111,8 +117,27 @@ export const Header = ({
|
|
|
111
117
|
secondaryBgVariant = 'transparent',
|
|
112
118
|
secondaryTextVariant = 'brand',
|
|
113
119
|
}: HeaderProps) => {
|
|
120
|
+
const [isVisible, setIsVisible] = useState(true);
|
|
121
|
+
const lastScrollY = useRef(0);
|
|
122
|
+
|
|
123
|
+
useEffect(() => {
|
|
124
|
+
const handleScroll = () => {
|
|
125
|
+
const currentScrollY = window.scrollY;
|
|
126
|
+
|
|
127
|
+
if (currentScrollY < lastScrollY.current) {
|
|
128
|
+
setIsVisible(true);
|
|
129
|
+
} else {
|
|
130
|
+
setIsVisible(false);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
lastScrollY.current = currentScrollY;
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
window.addEventListener('scroll', handleScroll, { passive: true });
|
|
137
|
+
return () => window.removeEventListener('scroll', handleScroll);
|
|
138
|
+
}, []);
|
|
114
139
|
return (
|
|
115
|
-
<HeaderContainer>
|
|
140
|
+
<HeaderContainer $isVisible={isVisible}>
|
|
116
141
|
<LogoWrapper>
|
|
117
142
|
<img src={logo} alt="Logo" />
|
|
118
143
|
</LogoWrapper>
|
package/tsup.config.ts
CHANGED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { ChangeHandler } from 'react-hook-form';
|
|
2
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import { ReactElement } from 'react';
|
|
4
|
-
|
|
5
|
-
declare const InputTypes: readonly ["number", "text", "email", "date"];
|
|
6
|
-
type InputType = (typeof InputTypes)[number];
|
|
7
|
-
interface BaseInputProps {
|
|
8
|
-
name: string;
|
|
9
|
-
label?: string;
|
|
10
|
-
type?: InputType;
|
|
11
|
-
placeholder?: string;
|
|
12
|
-
onBlur?: ChangeHandler;
|
|
13
|
-
onFocus?: () => void;
|
|
14
|
-
}
|
|
15
|
-
type Option<T> = {
|
|
16
|
-
label: string;
|
|
17
|
-
value: T;
|
|
18
|
-
disabled?: boolean;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
declare const variants$1: readonly ["primary", "secondary", "tertiary", "subtle", "blue", "brand", "light", "active", "hover", "error", "focus", "success"];
|
|
22
|
-
declare const tokens: readonly ["background", "border", "text", "button"];
|
|
23
|
-
type Token = (typeof tokens)[number];
|
|
24
|
-
type Variant$1 = (typeof variants$1)[number];
|
|
25
|
-
type TokenVariant = Record<Variant$1, string>;
|
|
26
|
-
declare const colors: Record<Token, Partial<TokenVariant>>;
|
|
27
|
-
|
|
28
|
-
declare const ButtonTypes: readonly ["submit", "reset", "button"];
|
|
29
|
-
type ButtonType = (typeof ButtonTypes)[number];
|
|
30
|
-
declare const variants: readonly ["dark", "light"];
|
|
31
|
-
type Variant = (typeof variants)[number];
|
|
32
|
-
interface ButtonProps {
|
|
33
|
-
onClick?: () => void;
|
|
34
|
-
text?: string;
|
|
35
|
-
type?: ButtonType;
|
|
36
|
-
disabled?: boolean;
|
|
37
|
-
icon?: ReactElement;
|
|
38
|
-
variant?: Variant;
|
|
39
|
-
isLoading?: boolean;
|
|
40
|
-
}
|
|
41
|
-
declare const Button: {
|
|
42
|
-
({ onClick, text, type, disabled, icon, variant, isLoading, }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
43
|
-
types: readonly ["submit", "reset", "button"];
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export { type BaseInputProps as B, type Option as O, Button as a, colors as c };
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { ChangeHandler } from 'react-hook-form';
|
|
2
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import { ReactElement } from 'react';
|
|
4
|
-
|
|
5
|
-
declare const InputTypes: readonly ["number", "text", "email", "date"];
|
|
6
|
-
type InputType = (typeof InputTypes)[number];
|
|
7
|
-
interface BaseInputProps {
|
|
8
|
-
name: string;
|
|
9
|
-
label?: string;
|
|
10
|
-
type?: InputType;
|
|
11
|
-
placeholder?: string;
|
|
12
|
-
onBlur?: ChangeHandler;
|
|
13
|
-
onFocus?: () => void;
|
|
14
|
-
}
|
|
15
|
-
type Option<T> = {
|
|
16
|
-
label: string;
|
|
17
|
-
value: T;
|
|
18
|
-
disabled?: boolean;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
declare const variants$1: readonly ["primary", "secondary", "tertiary", "subtle", "blue", "brand", "light", "active", "hover", "error", "focus", "success"];
|
|
22
|
-
declare const tokens: readonly ["background", "border", "text", "button"];
|
|
23
|
-
type Token = (typeof tokens)[number];
|
|
24
|
-
type Variant$1 = (typeof variants$1)[number];
|
|
25
|
-
type TokenVariant = Record<Variant$1, string>;
|
|
26
|
-
declare const colors: Record<Token, Partial<TokenVariant>>;
|
|
27
|
-
|
|
28
|
-
declare const ButtonTypes: readonly ["submit", "reset", "button"];
|
|
29
|
-
type ButtonType = (typeof ButtonTypes)[number];
|
|
30
|
-
declare const variants: readonly ["dark", "light"];
|
|
31
|
-
type Variant = (typeof variants)[number];
|
|
32
|
-
interface ButtonProps {
|
|
33
|
-
onClick?: () => void;
|
|
34
|
-
text?: string;
|
|
35
|
-
type?: ButtonType;
|
|
36
|
-
disabled?: boolean;
|
|
37
|
-
icon?: ReactElement;
|
|
38
|
-
variant?: Variant;
|
|
39
|
-
isLoading?: boolean;
|
|
40
|
-
}
|
|
41
|
-
declare const Button: {
|
|
42
|
-
({ onClick, text, type, disabled, icon, variant, isLoading, }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
43
|
-
types: readonly ["submit", "reset", "button"];
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export { type BaseInputProps as B, type Option as O, Button as a, colors as c };
|