@7shifts/sous-chef 4.3.0 → 4.4.0
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/controls/ToolbarSelect/ToolbarSelect.d.ts +1 -1
- package/dist/forms/AsyncSelectField/AsyncSelectField.d.ts +1 -1
- package/dist/forms/CheckboxField/CheckboxField.d.ts +1 -1
- package/dist/forms/CurrencyField/CurrencyField.d.ts +2 -2
- package/dist/forms/DateField/DateField.d.ts +1 -1
- package/dist/forms/DateRangeField/DateRangeField.d.ts +1 -1
- package/dist/forms/MultiSelectField/MultiSelectField.d.ts +1 -1
- package/dist/forms/NumberField/NumberField.d.ts +1 -2
- package/dist/forms/PasswordField/PasswordField.d.ts +1 -1
- package/dist/forms/PercentageField/PercentageField.d.ts +1 -2
- package/dist/forms/PillSelectField/PillSelectField.d.ts +1 -1
- package/dist/forms/RadioGroupField/RadioGroupField.d.ts +1 -1
- package/dist/forms/SelectField/SelectField.d.ts +1 -1
- package/dist/forms/TextAreaField/TextAreaField.d.ts +1 -0
- package/dist/forms/TextField/TextField.d.ts +1 -0
- package/dist/forms/TimeField/TimeField.d.ts +2 -2
- package/dist/forms/TimeRangeField/TimeRangeField.d.ts +1 -0
- package/dist/forms/WeekField/WeekField.d.ts +1 -1
- package/dist/hooks/useScrollDetector.d.ts +1 -1
- package/dist/index.css +87 -3
- package/dist/index.css.map +1 -1
- package/dist/index.js +136 -82
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +141 -88
- package/dist/index.modern.js.map +1 -1
- package/dist/navigation/PrimaryNav/PrimaryNav.d.ts +3 -1
- package/dist/navigation/PrimaryNav/PrimaryNavContext.d.ts +3 -1
- package/dist/navigation/PrimaryNavItem/PrimaryNavItem.d.ts +3 -2
- package/dist/navigation/PrimaryNavSubItem/PrimaryNavSubItem.d.ts +3 -2
- package/package.json +2 -1
|
@@ -8,6 +8,8 @@ type Props = {
|
|
|
8
8
|
shortLogo?: React.ReactNode;
|
|
9
9
|
/** This is the logo displayed when the navigation is expanded. By default it uses the 7shifts logo */
|
|
10
10
|
longLogo?: React.ReactNode;
|
|
11
|
+
/** Accessible label announced for the nav landmark. Defaults to "Main". */
|
|
12
|
+
ariaLabel?: string;
|
|
11
13
|
};
|
|
12
|
-
declare const PrimaryNav: ({ children, isExpanded, onToggleExpand, footer, shortLogo, longLogo }: Props) => React.JSX.Element;
|
|
14
|
+
declare const PrimaryNav: ({ children, isExpanded, onToggleExpand, footer, shortLogo, longLogo, ariaLabel }: Props) => React.JSX.Element;
|
|
13
15
|
export default PrimaryNav;
|
|
@@ -4,8 +4,10 @@ export type PrimaryNavContextType = {
|
|
|
4
4
|
setIsNavExpanded: (isExpanded: boolean) => void;
|
|
5
5
|
isHoveringNav: boolean;
|
|
6
6
|
setIsHoveringNav: (isHovering: boolean) => void;
|
|
7
|
+
isFocusWithin: boolean;
|
|
8
|
+
setIsFocusWithin: (isFocused: boolean) => void;
|
|
7
9
|
isOpen: boolean;
|
|
8
|
-
contentRef: React.RefObject<
|
|
10
|
+
contentRef: React.RefObject<HTMLElement>;
|
|
9
11
|
};
|
|
10
12
|
export declare const usePrimaryNavContext: () => PrimaryNavContextType;
|
|
11
13
|
type Props = {
|
|
@@ -6,7 +6,8 @@ type Props = {
|
|
|
6
6
|
isActive?: boolean;
|
|
7
7
|
label: string;
|
|
8
8
|
badge?: string | number;
|
|
9
|
-
onClick
|
|
9
|
+
onClick?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
10
|
+
href?: string;
|
|
10
11
|
} & DataProps;
|
|
11
|
-
declare const PrimaryNavItem: ({ children, icon, isActive, label, badge, onClick, ...rest }: Props) => React.JSX.Element;
|
|
12
|
+
declare const PrimaryNavItem: ({ children, icon, isActive, label, badge, onClick, href, ...rest }: Props) => React.JSX.Element;
|
|
12
13
|
export default PrimaryNavItem;
|
|
@@ -4,8 +4,9 @@ type Props = {
|
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
isActive?: boolean;
|
|
6
6
|
badge?: string | number;
|
|
7
|
-
onClick
|
|
7
|
+
onClick?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
8
|
+
href?: string;
|
|
8
9
|
isPaywalled?: boolean;
|
|
9
10
|
} & DataProps;
|
|
10
|
-
declare const PrimaryNavSubItem: ({ children, isActive, badge, onClick, isPaywalled, ...rest }: Props) => React.JSX.Element;
|
|
11
|
+
declare const PrimaryNavSubItem: ({ children, isActive, badge, onClick, href, isPaywalled, ...rest }: Props) => React.JSX.Element;
|
|
11
12
|
export default PrimaryNavSubItem;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@7shifts/sous-chef",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"description": "7shifts component library",
|
|
5
5
|
"author": "7shifts",
|
|
6
6
|
"license": "MIT",
|
|
@@ -95,6 +95,7 @@
|
|
|
95
95
|
"prompt": "^1.3.0",
|
|
96
96
|
"react": "^18.2.0",
|
|
97
97
|
"react-dom": "^18.2.0",
|
|
98
|
+
"remark-gfm": "^4.0.1",
|
|
98
99
|
"sass": "^1.48.0",
|
|
99
100
|
"source-map-explorer": "^2.5.3",
|
|
100
101
|
"storybook": "10.3.5",
|