@pismo/marola 2.1.23 → 2.1.25

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.
Files changed (31) hide show
  1. package/dist/DatePicker.module-CnuDEiKF.js +44 -0
  2. package/dist/assets/DatePicker.css +1 -1
  3. package/dist/assets/DoubleInput.css +1 -0
  4. package/dist/assets/Toggle.css +1 -1
  5. package/dist/assets/Tooltip.css +1 -1
  6. package/dist/components/DatePicker/DatePicker.d.ts +17 -7
  7. package/dist/components/DatePicker/DatePicker.js +864 -855
  8. package/dist/components/DatePicker/DatePicker.stories.d.ts +17 -10
  9. package/dist/components/DatePicker/renderCalendarDays.js +1 -1
  10. package/dist/components/DatePicker/renderDualCalendarHeader.js +1 -1
  11. package/dist/components/DatePicker/renderHeader.js +1 -1
  12. package/dist/components/DatePicker/renderNavigatorInput.js +1 -1
  13. package/dist/components/DatePicker/renderPeriodSelection.js +1 -1
  14. package/dist/components/DoubleInput/DoubleInput.d.ts +21 -0
  15. package/dist/components/DoubleInput/DoubleInput.js +25 -0
  16. package/dist/components/DoubleInput/DoubleInput.stories.d.ts +21 -0
  17. package/dist/components/Input/Input.d.ts +2 -0
  18. package/dist/components/Input/Input.js +274 -273
  19. package/dist/components/InputSearch/InputSearch.d.ts +1 -0
  20. package/dist/components/InputSearch/InputSearch.stories.d.ts +1 -0
  21. package/dist/components/Toggle/Toggle.js +27 -27
  22. package/dist/components/Tooltip/Tooltip.d.ts +1 -1
  23. package/dist/components/Tooltip/Tooltip.js +230 -220
  24. package/dist/components/Tooltip/Tooltip.stories.d.ts +1 -1
  25. package/dist/main.d.ts +1 -0
  26. package/dist/main.js +137 -134
  27. package/dist/utils/inputNumberAsText.d.ts +1 -1
  28. package/dist/utils/inputNumberAsText.js +13 -9
  29. package/package.json +1 -1
  30. package/dist/DatePicker.module-C9zgeg52.js +0 -46
  31. /package/dist/components/Typography/{typography.test.d.ts → Typography.test.d.ts} +0 -0
@@ -1,9 +1,11 @@
1
1
  import { StoryObj } from '@storybook/react';
2
2
  import { default as dayjs } from 'dayjs';
3
+ import { DatePickerProps } from './DatePicker';
3
4
  declare const meta: {
4
5
  title: string;
5
- component: import('react').FC<{
6
- mode: "range" | "single";
6
+ component: (props: DatePickerProps) => import("react/jsx-runtime").JSX.Element;
7
+ tags: string[];
8
+ decorators: ((Story: import('@storybook/core/csf').PartialStoryFn<import('@storybook/react').ReactRenderer, {
7
9
  viewMode: "month" | "day" | "year";
8
10
  locale?: string | undefined;
9
11
  placeholder?: string | undefined;
@@ -11,14 +13,14 @@ declare const meta: {
11
13
  minDate?: dayjs.Dayjs | undefined;
12
14
  maxDate?: dayjs.Dayjs | undefined;
13
15
  disableDates?: ((date: dayjs.Dayjs) => boolean) | undefined;
14
- testid?: string | undefined;
15
16
  onChange: (date: dayjs.Dayjs | [dayjs.Dayjs | null, dayjs.Dayjs | null]) => void;
16
17
  placement?: "bottom" | "top" | "bottom-start" | "bottom-end" | "top-start" | "top-end" | undefined;
17
18
  navigatorInput?: boolean | undefined;
18
- }>;
19
- tags: string[];
20
- decorators: ((Story: import('@storybook/core/csf').PartialStoryFn<import('@storybook/react').ReactRenderer, {
21
- mode: "range" | "single";
19
+ className?: string | undefined;
20
+ 'data-testid'?: string | undefined;
21
+ mode: "single";
22
+ value?: Date | undefined;
23
+ } | {
22
24
  viewMode: "month" | "day" | "year";
23
25
  locale?: string | undefined;
24
26
  placeholder?: string | undefined;
@@ -26,16 +28,21 @@ declare const meta: {
26
28
  minDate?: dayjs.Dayjs | undefined;
27
29
  maxDate?: dayjs.Dayjs | undefined;
28
30
  disableDates?: ((date: dayjs.Dayjs) => boolean) | undefined;
29
- testid?: string | undefined;
30
31
  onChange: (date: dayjs.Dayjs | [dayjs.Dayjs | null, dayjs.Dayjs | null]) => void;
31
32
  placement?: "bottom" | "top" | "bottom-start" | "bottom-end" | "top-start" | "top-end" | undefined;
32
33
  navigatorInput?: boolean | undefined;
34
+ className?: string | undefined;
35
+ 'data-testid'?: string | undefined;
36
+ mode: "range";
37
+ values?: [Date, Date] | undefined;
33
38
  }>) => import("react/jsx-runtime").JSX.Element)[];
34
39
  };
35
40
  export default meta;
36
- type Story = StoryObj<typeof meta>;
37
- export declare const Default: Story;
41
+ type Story = StoryObj<DatePickerProps>;
42
+ export declare const Single: Story;
43
+ export declare const SingleWithValue: Story;
38
44
  export declare const RangePicker: Story;
45
+ export declare const RangeWithValues: Story;
39
46
  export declare const MonthView: Story;
40
47
  export declare const YearView: Story;
41
48
  export declare const LocalizedPortuguese: Story;
@@ -1,6 +1,6 @@
1
1
  import { jsx as d, jsxs as Y } from "react/jsx-runtime";
2
2
  import { d as x } from "../../dayjs.min-ClQKmc--.js";
3
- import { s } from "../../DatePicker.module-C9zgeg52.js";
3
+ import { s } from "../../DatePicker.module-CnuDEiKF.js";
4
4
  import { getWeekdayNames as E, getMonthGrid as I, isDateInRange as C, isRangeStart as p, isRangeEnd as c, isDisabled as y, isCurrentDay as W, formatDateForInput as h } from "./dateUtils.js";
5
5
  const A = (a, n, i) => {
6
6
  if (!n[0] || !i) return !1;
@@ -1,6 +1,6 @@
1
1
  import { jsxs as s, jsx as a } from "react/jsx-runtime";
2
2
  import { Icon as o } from "../Icon/Icon.js";
3
- import { s as t } from "../../DatePicker.module-C9zgeg52.js";
3
+ import { s as t } from "../../DatePicker.module-CnuDEiKF.js";
4
4
  import { getPreviousMonth as d, getNextMonth as n } from "./dateUtils.js";
5
5
  const v = ({ currentMonth: e, locale: r, setCurrentMonth: i }) => /* @__PURE__ */ s("div", { className: t["month-header-row"], "data-testid": "dual-calendar-header", children: [
6
6
  /* @__PURE__ */ a(
@@ -1,6 +1,6 @@
1
1
  import { jsxs as i, jsx as e, Fragment as n } from "react/jsx-runtime";
2
2
  import { Icon as o } from "../Icon/Icon.js";
3
- import { s as t } from "../../DatePicker.module-C9zgeg52.js";
3
+ import { s as t } from "../../DatePicker.module-CnuDEiKF.js";
4
4
  const k = ({
5
5
  currentViewMode: r,
6
6
  currentMonth: a,
@@ -1,6 +1,6 @@
1
1
  import { jsxs as f, jsx as n } from "react/jsx-runtime";
2
2
  import { Icon as s } from "../Icon/Icon.js";
3
- import { s as i } from "../../DatePicker.module-C9zgeg52.js";
3
+ import { s as i } from "../../DatePicker.module-CnuDEiKF.js";
4
4
  const p = ({
5
5
  navigateToPrevious: b,
6
6
  navigateToNext: u,
@@ -1,6 +1,6 @@
1
1
  import { jsx as m } from "react/jsx-runtime";
2
2
  import { d as Y } from "../../dayjs.min-ClQKmc--.js";
3
- import { s } from "../../DatePicker.module-C9zgeg52.js";
3
+ import { s } from "../../DatePicker.module-CnuDEiKF.js";
4
4
  const T = ({
5
5
  currentViewMode: d,
6
6
  currentMonth: i,
@@ -0,0 +1,21 @@
1
+ import { CSSProperties } from 'react';
2
+ import { InputProps } from '../Input/Input';
3
+ export type DoubleInputProps = {
4
+ /** Element to be used a separator between inputs */
5
+ separator: React.ReactNode;
6
+ /** Styles to be applied to separator element */
7
+ separatorStyles?: CSSProperties;
8
+ /** Props to be used in left input element */
9
+ leftInputProps: InputProps;
10
+ /** Props to be used in right input element */
11
+ rightInputProps: InputProps;
12
+ /** Control the left element width */
13
+ leftWidth?: string;
14
+ /** Control the right element width */
15
+ rightWidth?: string;
16
+ /** CSS classes to be applied on the container element */
17
+ className?: string;
18
+ /** Id to be applied as `data-testid` on the container element */
19
+ 'data-testid'?: string;
20
+ };
21
+ export declare const DoubleInput: ({ separator, leftInputProps, rightInputProps, leftWidth, rightWidth, separatorStyles, className, "data-testid": dataTestId, }: DoubleInputProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,25 @@
1
+ import { jsxs as l, jsx as t } from "react/jsx-runtime";
2
+ import { c as d } from "../../clsx-OuTLNxxd.js";
3
+ import { Input as r } from "../Input/Input.js";
4
+ import '../../assets/DoubleInput.css';const m = "_container_49u1c_1", _ = "_separator_49u1c_28", a = {
5
+ container: m,
6
+ "left-input": "_left-input_49u1c_16",
7
+ "right-input": "_right-input_49u1c_22",
8
+ separator: _
9
+ }, v = ({
10
+ separator: s,
11
+ leftInputProps: n,
12
+ rightInputProps: o,
13
+ leftWidth: i = "auto",
14
+ rightWidth: e = "auto",
15
+ separatorStyles: c,
16
+ className: p,
17
+ "data-testid": u
18
+ }) => /* @__PURE__ */ l("div", { className: d(a.container, p), "data-testid": u, children: [
19
+ /* @__PURE__ */ t("div", { style: { minWidth: i, maxWidth: i }, className: a["left-input"], children: /* @__PURE__ */ t(r, { ...n }) }),
20
+ /* @__PURE__ */ t("div", { className: a.separator, id: "double-input-separator", style: c, children: s }),
21
+ /* @__PURE__ */ t("div", { style: { minWidth: e, maxWidth: e }, className: a["right-input"], children: /* @__PURE__ */ t(r, { ...o }) })
22
+ ] });
23
+ export {
24
+ v as DoubleInput
25
+ };
@@ -0,0 +1,21 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ component: ({ separator, leftInputProps, rightInputProps, leftWidth, rightWidth, separatorStyles, className, "data-testid": dataTestId, }: import('./DoubleInput').DoubleInputProps) => import("react/jsx-runtime").JSX.Element;
5
+ tags: string[];
6
+ decorators: ((Story: import('@storybook/core/csf').PartialStoryFn<import('@storybook/react').ReactRenderer, {
7
+ separator: import('react').ReactNode;
8
+ separatorStyles?: import('react').CSSProperties | undefined;
9
+ leftInputProps: import('../Input/Input').InputProps;
10
+ rightInputProps: import('../Input/Input').InputProps;
11
+ leftWidth?: string | undefined;
12
+ rightWidth?: string | undefined;
13
+ className?: string | undefined;
14
+ 'data-testid'?: string | undefined;
15
+ }>) => import("react/jsx-runtime").JSX.Element)[];
16
+ };
17
+ export default meta;
18
+ type Story = StoryObj<typeof meta>;
19
+ export declare const Simple: Story;
20
+ export declare const WithLabels: Story;
21
+ export declare const WithIconAsSeparator: Story;
@@ -18,6 +18,8 @@ export type SingleInputProps = InputHTMLAttributes<HTMLInputElement> & {
18
18
  rightIcon?: ReactNode;
19
19
  /** Input type. Default: text */
20
20
  type?: CustomInputTypeAttribute | 'number-as-text';
21
+ /** allow leading zeros to use as a number code (000123) or phone number (08001234567) */
22
+ allowLeadingZeros?: boolean;
21
23
  /** allow only integer value. Default: false */
22
24
  isInteger?: boolean;
23
25
  /** use comma or dot as decimal separator, for example in Brazil it's use comma as pattern. Default: false */