fis-component 0.1.12 → 0.1.14

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.
@@ -41,6 +41,12 @@ export interface InputDateProps extends Omit<InputFieldProps, "value" | "onChang
41
41
  autoFocus?: boolean;
42
42
  /**Disabled date function*/
43
43
  disabledDate?: (current: dayjs.Dayjs) => boolean;
44
+ /**Disabled time function - returns an object specifying which hours/minutes/seconds should be disabled*/
45
+ disabledTime?: (current: dayjs.Dayjs) => {
46
+ disabledHours?: () => number[];
47
+ disabledMinutes?: (hour: number) => number[];
48
+ disabledSeconds?: (hour: number, minute: number) => number[];
49
+ };
44
50
  /**Custom input format*/
45
51
  inputReadOnly?: boolean;
46
52
  }
@@ -4,6 +4,7 @@ export interface FISTextPropsI extends React.HTMLAttributes<HTMLElement> {
4
4
  variant?: keyof ThemeType;
5
5
  tag?: keyof JSX.IntrinsicElements;
6
6
  color?: keyof ThemeType;
7
+ as?: keyof JSX.IntrinsicElements;
7
8
  }
8
9
  declare const FISText: React.ForwardRefExoticComponent<FISTextPropsI & React.RefAttributes<any>>;
9
10
  export default FISText;
package/dist/esm/index.js CHANGED
@@ -72290,7 +72290,7 @@ const HiddenDatePickerSC = styled(DatePicker) `
72290
72290
  `;
72291
72291
 
72292
72292
  const FISInputDate = forwardRef((props, ref) => {
72293
- const { className, value, textLabel = "", iconLabel, required, message = "", disabled, negative, positive, format, onClickIconLabel, onChange, getPopupContainer, minDate, maxDate, picker = "date", allowClear = true, showToday = true, showTime = false, autoFocus = false, disabledDate, inputReadOnly = false, onBlur: originalOnBlur, ...restProps } = props;
72293
+ const { className, value, textLabel = "", iconLabel, required, message = "", disabled, negative, positive, format, onClickIconLabel, onChange, getPopupContainer, minDate, maxDate, picker = "date", allowClear = true, showToday = true, showTime = false, autoFocus = false, disabledDate, disabledTime, inputReadOnly = false, onBlur: originalOnBlur, ...restProps } = props;
72294
72294
  const getDefaultFormat = (pickerMode) => {
72295
72295
  switch (pickerMode) {
72296
72296
  case "year":
@@ -72372,7 +72372,7 @@ const FISInputDate = forwardRef((props, ref) => {
72372
72372
  setInputValue("");
72373
72373
  }
72374
72374
  };
72375
- return (jsxs(DivWrapperSC$2, { className: className, children: [(textLabel || iconLabel) && (jsx(FISInputLabel, { textLabel: textLabel, required: required, iconLabel: iconLabel, onClickIconLabel: onClickIconLabel })), jsxs(DivInputWrapperSC$1, { children: [jsx(FISInputField, { ...restProps, ref: mergeRef, typeSuffix: "icon", iconSuffix: jsx(DateIcon, {}), value: inputValue, negative: negative, disabled: disabled, placeholder: restProps.placeholder, readOnly: inputReadOnly, autoFocus: autoFocus, onFocus: () => setOpen(true), onChange: handleInputChange, onBlur: handleInputBlur, onClickSuffix: () => setOpen(true), autoComplete: "off" }), jsx(HiddenDatePickerSC, { open: open, value: dateValue, onChange: (value) => handleChange(value), onOpenChange: handleOpenChange, format: finalFormat, getPopupContainer: getPopupContainer, minDate: minDate, maxDate: maxDate, picker: picker, allowClear: allowClear, showToday: showToday, showTime: showTime, disabledDate: disabledDate })] }), message && (jsx(DivHintWrapperSC$1, { children: jsx(SpanHintSC$3, { className: classNames({
72375
+ return (jsxs(DivWrapperSC$2, { className: className, children: [(textLabel || iconLabel) && (jsx(FISInputLabel, { textLabel: textLabel, required: required, iconLabel: iconLabel, onClickIconLabel: onClickIconLabel })), jsxs(DivInputWrapperSC$1, { children: [jsx(FISInputField, { ...restProps, ref: mergeRef, typeSuffix: "icon", iconSuffix: jsx(DateIcon, {}), value: inputValue, negative: negative, disabled: disabled, placeholder: restProps.placeholder, readOnly: inputReadOnly, autoFocus: autoFocus, onFocus: () => setOpen(true), onChange: handleInputChange, onBlur: handleInputBlur, onClickSuffix: () => setOpen(true), autoComplete: "off" }), jsx(HiddenDatePickerSC, { open: open, value: dateValue, onChange: (value) => handleChange(value), onOpenChange: handleOpenChange, format: finalFormat, getPopupContainer: getPopupContainer, minDate: minDate, maxDate: maxDate, picker: picker, allowClear: allowClear, showToday: showToday, showTime: showTime, disabledDate: disabledDate, disabledTime: disabledTime })] }), message && (jsx(DivHintWrapperSC$1, { children: jsx(SpanHintSC$3, { className: classNames({
72376
72376
  disabled,
72377
72377
  negative,
72378
72378
  positive,
@@ -75190,7 +75190,7 @@ const TextSC = styled.p `
75190
75190
  }}
75191
75191
  `;
75192
75192
 
75193
- const FISText = forwardRef(({ tag, variant, children, color, ...rest }, ref) => (jsx(TextSC, { as: tag, "$variant": variant, "$color": color ? theme[color] : "", ref: ref, ...rest, children: children })));
75193
+ const FISText = forwardRef(({ tag, variant, children, color, ...rest }, ref) => (jsx(TextSC, { as: tag, "$variant": variant, "$color": color ? getTheme(color) : "", ref: ref, ...rest, children: children })));
75194
75194
  FISText.displayName = "FISText";
75195
75195
 
75196
75196
  export { FISAlertBanner, FISAvatar, FISBadge, FISBreadcrumb, FISButton, FISButtonGroup, FISCheckbox, FISCheckboxGroup, FISChipButton, FISCollapse, FISCombobox, FISDateRange, FISDivider, FISIconButton, FISInputArea, FISInputDate, FISInputField, FISInputLabel, FISInputStepper, FISInputText, FISInputTime, FISLinkButton, FISMenuItem, FISMenuSection, FISMenuSelect, FISPagination, FISProgressCircular, FISProgressLinear, FISRadio, RadioGroup as FISRadioGroup, FISSegmented, FISSelect, FISSelectItem, FISSorter, FISSplitButton, FISSwitch, FISTab, FISTable, FISTableCell, FISTableHeaderCell, FISText, FISThemeProvider, FISToast, FISTooltip, SegmentedPanelItem, TabPanelItem, useNotification, useToast };