@pismo/marola 1.1.5 → 1.1.7

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.
@@ -0,0 +1 @@
1
+ ._badge-root_1nh6a_1{box-sizing:border-box;margin:0;padding:0;font-variant:tabular-nums;list-style:none;font-family:IBM Plex Sans,sans-serif;position:relative;display:inline-block;line-height:1}._badge_1nh6a_1{z-index:auto;position:absolute;top:.25rem;right:.5rem;min-width:1rem;height:1rem;color:#fff;font-weight:500;font-size:.75rem;line-height:1rem;white-space:nowrap;text-align:center;border-radius:50%;background-color:var(--error-text);transform:translate(50%,-50%);transform-origin:100% 0}._badge--red_1nh6a_31{background-color:var(--error-text)}._badge--green_1nh6a_34{background-color:var(--colors-brand-success-color-success)}._badge--blue_1nh6a_37{background-color:var(--colors-brand-primary-color-primary-active)}._badge--blueInvert_1nh6a_40{background-color:var(--colors-brand-primary-color-primary-bg);color:var(--colors-brand-primary-color-primary-active)}._badge--gray_1nh6a_44{background-color:rgb(from var(--black-100) r g b/.15);color:var(--black)}._badge--basic_1nh6a_48{background-color:#fff;color:var(--black);border:1px solid rgba(from var(--black-100) r g b/.06);line-height:.875rem}._badge--double_1nh6a_54{width:1.625rem;border-radius:100px}._badge--triple_1nh6a_58{width:2.5rem;border-radius:100px}._badge--medium_1nh6a_62{min-width:1.25rem;min-height:1.25rem;line-height:1.25rem}
@@ -0,0 +1,10 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ export type BadgeProps = {
4
+ count: number;
5
+ children?: ReactNode;
6
+ variant?: 'red' | 'green' | 'blue' | 'blueInvert' | 'gray' | 'basic';
7
+ size?: 'small' | 'medium';
8
+ className?: string;
9
+ };
10
+ export declare const Badge: ({ count, children, variant, size, className }: BadgeProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,35 @@
1
+ import '../../assets/Badge.css';
2
+ import { jsxs as n, jsx as o } from "react/jsx-runtime";
3
+ import { useMemo as l } from "react";
4
+ import { c as t } from "../../clsx-DB4S2d7J.js";
5
+ const h = "_badge_1nh6a_1", e = {
6
+ "badge-root": "_badge-root_1nh6a_1",
7
+ badge: h,
8
+ "badge--red": "_badge--red_1nh6a_31",
9
+ "badge--green": "_badge--green_1nh6a_34",
10
+ "badge--blue": "_badge--blue_1nh6a_37",
11
+ "badge--blueInvert": "_badge--blueInvert_1nh6a_40",
12
+ "badge--gray": "_badge--gray_1nh6a_44",
13
+ "badge--basic": "_badge--basic_1nh6a_48",
14
+ "badge--double": "_badge--double_1nh6a_54",
15
+ "badge--triple": "_badge--triple_1nh6a_58",
16
+ "badge--medium": "_badge--medium_1nh6a_62"
17
+ }, p = ({ count: a, children: r, variant: d, size: b, className: g }) => {
18
+ const _ = a > 99 ? "triple" : a > 9 ? "double" : "single", s = l(
19
+ () => t([
20
+ e.badge,
21
+ e[`badge--${d}`],
22
+ e[`badge--${b}`],
23
+ e[`badge--${_}`],
24
+ g
25
+ ]),
26
+ [g, d, b, _]
27
+ );
28
+ return /* @__PURE__ */ n("span", { className: e["badge-root"], children: [
29
+ r,
30
+ /* @__PURE__ */ o("span", { className: s, children: a > 999 ? "999+" : a })
31
+ ] });
32
+ };
33
+ export {
34
+ p as Badge
35
+ };
@@ -0,0 +1,14 @@
1
+ import { BadgeProps } from '../../main';
2
+ import { StoryObj } from '@storybook/react';
3
+
4
+ declare const meta: {
5
+ title: string;
6
+ component: ({ count, children, variant, size, className }: BadgeProps) => import("react/jsx-runtime").JSX.Element;
7
+ tags: string[];
8
+ parameters: {
9
+ layout: string;
10
+ };
11
+ };
12
+ export default meta;
13
+ type Story = StoryObj<typeof meta>;
14
+ export declare const Default: Story;
@@ -0,0 +1 @@
1
+ export {};
@@ -18,7 +18,13 @@ export type SingleInputProps = InputHTMLAttributes<HTMLInputElement> & {
18
18
  /** Right icon element */
19
19
  rightIcon?: ReactNode;
20
20
  /** Input type. Default: text */
21
- type?: CustomInputTypeAttribute;
21
+ type?: CustomInputTypeAttribute | 'number-as-text';
22
+ /** allow only integer value. Default: false */
23
+ isInteger?: boolean;
24
+ /** use comma or dot as decimal separator, for example in Brazil it's use comma as pattern. Default: false */
25
+ useCommaInDecimal?: boolean;
26
+ /** allow negative numbers, it's similar use 'min=0' in input type 'number'. Default: false */
27
+ allowNegativeNumbers?: boolean;
22
28
  /** Decimal length when the input type is 'number' */
23
29
  decimalLength?: number;
24
30
  /** Hide the chars counter */