@northlight/ui 2.36.11 → 2.37.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/es/northlight.d.ts +3 -2
- package/dist/es/northlight.js +38 -1
- package/dist/es/northlight.js.map +1 -1
- package/dist/umd/northlight.cjs +38 -1
- package/dist/umd/northlight.cjs.map +1 -1
- package/dist/umd/northlight.min.cjs +3 -3
- package/dist/umd/northlight.min.cjs.map +1 -1
- package/package.json +3 -3
package/dist/es/northlight.d.ts
CHANGED
|
@@ -542,7 +542,7 @@ interface BlinkerProps {
|
|
|
542
542
|
*/
|
|
543
543
|
declare const Blinker: ({ color, size, isBlinking, ...rest }: BlinkerProps) => JSX.Element;
|
|
544
544
|
|
|
545
|
-
type ButtonVariants = 'default' | 'danger' | 'success' | 'brand' | 'brandSubdued' | 'link' | 'ghost' | 'ai' | 'outline' | 'solid';
|
|
545
|
+
type ButtonVariants = 'default' | 'danger' | 'success' | 'brand' | 'brandSubdued' | 'link' | 'ghost' | 'ai' | 'outline' | 'solid' | 'accent' | 'sidebar';
|
|
546
546
|
type ButtonProps = Omit<ButtonProps$1, 'as' | 'size'> & {
|
|
547
547
|
variant?: ButtonVariants;
|
|
548
548
|
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
@@ -590,7 +590,7 @@ type ButtonProps = Omit<ButtonProps$1, 'as' | 'size'> & {
|
|
|
590
590
|
* @example (Example)
|
|
591
591
|
* (?
|
|
592
592
|
* +
|
|
593
|
-
* const variants = ['link', 'success', 'default', 'danger', 'brand',
|
|
593
|
+
* const variants = ['link', 'success', 'default', 'danger', 'brand', 'accent',
|
|
594
594
|
* 'ghost', 'ai', 'outline', 'brandSubdued', 'solid']
|
|
595
595
|
*
|
|
596
596
|
* const ExampleButton = () => {
|
|
@@ -1005,6 +1005,7 @@ interface DateRangePickerProps extends Omit<AriaDateRangePickerProps<DateValue>,
|
|
|
1005
1005
|
fiscalStartDay?: number;
|
|
1006
1006
|
renderInPortal?: boolean;
|
|
1007
1007
|
buttonLabel?: string;
|
|
1008
|
+
setIsOpen?: (isOpen: boolean) => void;
|
|
1008
1009
|
}
|
|
1009
1010
|
interface DatePickerFieldProps extends Omit<InputProps, 'onChange'>, InputFieldProps {
|
|
1010
1011
|
name: string;
|
package/dist/es/northlight.js
CHANGED
|
@@ -878,6 +878,38 @@ const Button$1 = {
|
|
|
878
878
|
bg: color.bg.ai.hover,
|
|
879
879
|
color: color.text.inverted
|
|
880
880
|
}
|
|
881
|
+
}),
|
|
882
|
+
accent: ({ theme: { colors: color } }) => ({
|
|
883
|
+
color: color.text.button.accent,
|
|
884
|
+
bgColor: color.background.button.ghost,
|
|
885
|
+
_hover: {
|
|
886
|
+
bg: color.background.button["ghost-active"],
|
|
887
|
+
color: color.text.button.accent,
|
|
888
|
+
_disabled: {
|
|
889
|
+
bgColor: color.background.button.ghost,
|
|
890
|
+
color: color.text.button.accent
|
|
891
|
+
}
|
|
892
|
+
},
|
|
893
|
+
_active: {
|
|
894
|
+
bg: color.background.button["ghost-active"],
|
|
895
|
+
color: color.text.button.accent
|
|
896
|
+
}
|
|
897
|
+
}),
|
|
898
|
+
sidebar: ({ theme: { colors: color } }) => ({
|
|
899
|
+
color: color.text.button.sidebar,
|
|
900
|
+
bgColor: color.background.button.sidebar,
|
|
901
|
+
_hover: {
|
|
902
|
+
bg: color.background.button["sidebar-hover"],
|
|
903
|
+
color: color.text.button.sidebar,
|
|
904
|
+
_disabled: {
|
|
905
|
+
bgColor: color.background.button.ghost,
|
|
906
|
+
color: color.text.button.sidebar
|
|
907
|
+
}
|
|
908
|
+
},
|
|
909
|
+
_active: {
|
|
910
|
+
bg: color.background.button["sidebar-active"],
|
|
911
|
+
color: color.text.button["sidebar-active"]
|
|
912
|
+
}
|
|
881
913
|
})
|
|
882
914
|
},
|
|
883
915
|
defaultProps: {
|
|
@@ -7859,7 +7891,9 @@ const DateRangePicker = (props) => {
|
|
|
7859
7891
|
renderInPortal = false,
|
|
7860
7892
|
firstDayOfWeek,
|
|
7861
7893
|
onSave,
|
|
7862
|
-
buttonLabel = "Save"
|
|
7894
|
+
buttonLabel = "Save",
|
|
7895
|
+
setIsOpen = () => {
|
|
7896
|
+
}
|
|
7863
7897
|
} = props;
|
|
7864
7898
|
const ref = useRef();
|
|
7865
7899
|
const { group } = useMultiStyleConfig("DatePicker");
|
|
@@ -7878,6 +7912,9 @@ const DateRangePicker = (props) => {
|
|
|
7878
7912
|
shouldCloseOnSelect: false,
|
|
7879
7913
|
hideTimeZone: true
|
|
7880
7914
|
}));
|
|
7915
|
+
useEffect(() => {
|
|
7916
|
+
setIsOpen(state.isOpen);
|
|
7917
|
+
}, [state.isOpen]);
|
|
7881
7918
|
const {
|
|
7882
7919
|
groupProps,
|
|
7883
7920
|
startFieldProps,
|