@sbkbs/ui 1.0.6 → 2.0.0-beta.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/CHANGELOG.md +57 -0
- package/MIGRATION.md +96 -0
- package/README.md +221 -115
- package/dist/assets/favicon/apple-touch-icon.png +0 -0
- package/dist/assets/favicon/favicon-96x96.png +0 -0
- package/dist/assets/favicon/favicon.ico +0 -0
- package/dist/assets/favicon/favicon.svg +1 -0
- package/dist/assets/favicon/site.webmanifest +21 -0
- package/dist/assets/favicon/web-app-manifest-192x192.png +0 -0
- package/dist/assets/favicon/web-app-manifest-512x512.png +0 -0
- package/dist/base.css +38 -0
- package/dist/components/Accordion/Accordion.d.ts +13 -1
- package/dist/components/Accordion/Accordion.js +100 -52
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/Alert/Alert.d.ts +17 -4
- package/dist/components/Alert/Alert.js +64 -20
- package/dist/components/Alert/Alert.js.map +1 -1
- package/dist/components/Avatar/Avatar.d.ts +12 -6
- package/dist/components/Avatar/Avatar.js +66 -0
- package/dist/components/Avatar/Avatar.js.map +1 -0
- package/dist/components/Badge/Badge.d.ts +11 -2
- package/dist/components/Badge/Badge.js +42 -30
- package/dist/components/Badge/Badge.js.map +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +5 -2
- package/dist/components/Breadcrumb/Breadcrumb.js +23 -16
- package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/components/Button/Button.d.ts +10 -8
- package/dist/components/Button/Button.js +73 -114
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Card/Card.d.ts +33 -3
- package/dist/components/Card/Card.js +91 -30
- package/dist/components/Card/Card.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +4 -1
- package/dist/components/Checkbox/Checkbox.js +32 -31
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/Chip/Chip.d.ts +7 -1
- package/dist/components/Chip/Chip.js +19 -9
- package/dist/components/Chip/Chip.js.map +1 -1
- package/dist/components/Combobox/Combobox.d.ts +10 -2
- package/dist/components/Combobox/Combobox.js +146 -133
- package/dist/components/Combobox/Combobox.js.map +1 -1
- package/dist/components/Divider/Divider.d.ts +7 -1
- package/dist/components/Divider/Divider.js +28 -12
- package/dist/components/Divider/Divider.js.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +33 -0
- package/dist/components/DropdownMenu/DropdownMenu.js +147 -0
- package/dist/components/DropdownMenu/DropdownMenu.js.map +1 -0
- package/dist/components/EmptyState/EmptyState.d.ts +7 -1
- package/dist/components/EmptyState/EmptyState.js +28 -19
- package/dist/components/EmptyState/EmptyState.js.map +1 -1
- package/dist/components/Field/Field.d.ts +21 -0
- package/dist/components/Field/Field.js +35 -0
- package/dist/components/Field/Field.js.map +1 -0
- package/dist/components/FileUpload/FileUpload.d.ts +9 -2
- package/dist/components/FileUpload/FileUpload.js +128 -102
- package/dist/components/FileUpload/FileUpload.js.map +1 -1
- package/dist/components/Footer/Footer.d.ts +19 -6
- package/dist/components/Footer/Footer.js +47 -115
- package/dist/components/Footer/Footer.js.map +1 -1
- package/dist/components/GlassPanel/GlassPanel.d.ts +18 -0
- package/dist/components/GlassPanel/GlassPanel.js +39 -0
- package/dist/components/GlassPanel/GlassPanel.js.map +1 -0
- package/dist/components/Header/Header.d.ts +25 -14
- package/dist/components/Header/Header.js +88 -148
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/Highlight/Highlight.d.ts +13 -0
- package/dist/components/Highlight/Highlight.js +18 -0
- package/dist/components/Highlight/Highlight.js.map +1 -0
- package/dist/components/Icon/Icon.d.ts +21 -0
- package/dist/components/Icon/Icon.js +31 -0
- package/dist/components/Icon/Icon.js.map +1 -0
- package/dist/components/IconButton/IconButton.d.ts +12 -0
- package/dist/components/IconButton/IconButton.js +49 -0
- package/dist/components/IconButton/IconButton.js.map +1 -0
- package/dist/components/Input/Input.d.ts +3 -2
- package/dist/components/Input/Input.js +51 -69
- package/dist/components/Input/Input.js.map +1 -1
- package/dist/components/Layout/Layout.d.ts +2 -0
- package/dist/components/Layout/Layout.js +24 -18
- package/dist/components/Layout/Layout.js.map +1 -1
- package/dist/components/Logo/Logo.d.ts +27 -0
- package/dist/components/Logo/Logo.js +107 -0
- package/dist/components/Logo/Logo.js.map +1 -0
- package/dist/components/MiniCard/MiniCard.d.ts +21 -0
- package/dist/components/MiniCard/MiniCard.js +90 -0
- package/dist/components/MiniCard/MiniCard.js.map +1 -0
- package/dist/components/Modal/Modal.d.ts +16 -3
- package/dist/components/Modal/Modal.js +124 -93
- package/dist/components/Modal/Modal.js.map +1 -1
- package/dist/components/Navigation/Navigation.d.ts +1 -0
- package/dist/components/Navigation/Navigation.js +14 -14
- package/dist/components/Navigation/Navigation.js.map +1 -1
- package/dist/components/NumberInput/NumberInput.d.ts +5 -2
- package/dist/components/NumberInput/NumberInput.js +98 -128
- package/dist/components/NumberInput/NumberInput.js.map +1 -1
- package/dist/components/PageHeader/PageHeader.d.ts +8 -1
- package/dist/components/PageHeader/PageHeader.js +26 -25
- package/dist/components/PageHeader/PageHeader.js.map +1 -1
- package/dist/components/Pagination/Pagination.d.ts +15 -2
- package/dist/components/Pagination/Pagination.js +68 -34
- package/dist/components/Pagination/Pagination.js.map +1 -1
- package/dist/components/Paragraph/Paragraph.d.ts +8 -2
- package/dist/components/Paragraph/Paragraph.js +39 -36
- package/dist/components/Paragraph/Paragraph.js.map +1 -1
- package/dist/components/Popover/Popover.d.ts +12 -1
- package/dist/components/Popover/Popover.js +49 -37
- package/dist/components/Popover/Popover.js.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.d.ts +12 -6
- package/dist/components/ProgressBar/ProgressBar.js +71 -0
- package/dist/components/ProgressBar/ProgressBar.js.map +1 -0
- package/dist/components/Radio/Radio.d.ts +2 -1
- package/dist/components/Radio/Radio.js +27 -31
- package/dist/components/Radio/Radio.js.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.d.ts +6 -1
- package/dist/components/SectionHeader/SectionHeader.js +14 -12
- package/dist/components/SectionHeader/SectionHeader.js.map +1 -1
- package/dist/components/Select/Select.d.ts +6 -2
- package/dist/components/Select/Select.js +47 -35
- package/dist/components/Select/Select.js.map +1 -1
- package/dist/components/SideNav/SideNav.d.ts +55 -0
- package/dist/components/SideNav/SideNav.js +141 -0
- package/dist/components/SideNav/SideNav.js.map +1 -0
- package/dist/components/Skeleton/Skeleton.d.ts +12 -1
- package/dist/components/Skeleton/Skeleton.js +33 -18
- package/dist/components/Skeleton/Skeleton.js.map +1 -1
- package/dist/components/Spinner/Spinner.d.ts +11 -3
- package/dist/components/Spinner/Spinner.js +57 -0
- package/dist/components/Spinner/Spinner.js.map +1 -0
- package/dist/components/Stepper/Stepper.d.ts +1 -1
- package/dist/components/Stepper/Stepper.js +41 -53
- package/dist/components/Stepper/Stepper.js.map +1 -1
- package/dist/components/Subtitle/Subtitle.d.ts +9 -3
- package/dist/components/Subtitle/Subtitle.js +29 -35
- package/dist/components/Subtitle/Subtitle.js.map +1 -1
- package/dist/components/Switch/Switch.d.ts +2 -1
- package/dist/components/Switch/Switch.js +45 -33
- package/dist/components/Switch/Switch.js.map +1 -1
- package/dist/components/Table/Table.d.ts +19 -1
- package/dist/components/Table/Table.js +48 -11
- package/dist/components/Table/Table.js.map +1 -1
- package/dist/components/Tabs/Tabs.d.ts +16 -2
- package/dist/components/Tabs/Tabs.js +80 -44
- package/dist/components/Tabs/Tabs.js.map +1 -1
- package/dist/components/Tag/Tag.d.ts +8 -1
- package/dist/components/Tag/Tag.js +27 -12
- package/dist/components/Tag/Tag.js.map +1 -1
- package/dist/components/Textarea/Textarea.d.ts +3 -1
- package/dist/components/Textarea/Textarea.js +36 -40
- package/dist/components/Textarea/Textarea.js.map +1 -1
- package/dist/components/Title/Title.d.ts +9 -3
- package/dist/components/Title/Title.js +42 -42
- package/dist/components/Title/Title.js.map +1 -1
- package/dist/components/Toast/Toast.d.ts +39 -11
- package/dist/components/Toast/Toast.js +130 -76
- package/dist/components/Toast/Toast.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +12 -2
- package/dist/components/Tooltip/Tooltip.js +50 -32
- package/dist/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/Typography/weight.d.ts +9 -0
- package/dist/components/Typography/weight.js +5 -0
- package/dist/components/Typography/weight.js.map +1 -0
- package/dist/fonts.css +8 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +55 -43
- package/dist/index.js +118 -83
- package/dist/index.js.map +1 -1
- package/dist/reset.css +9 -0
- package/dist/styles.css +1 -0
- package/dist/tailwind.css +153 -0
- package/dist/theme/ThemeProvider.d.ts +21 -3
- package/dist/theme/ThemeProvider.js +57 -18
- package/dist/theme/ThemeProvider.js.map +1 -1
- package/dist/theme/tokens.d.ts +43 -0
- package/dist/theme/tokens.js +39 -0
- package/dist/theme/tokens.js.map +1 -0
- package/dist/theme.css +296 -263
- package/dist/tokens.css +327 -0
- package/dist/utils/cn.d.ts +2 -2
- package/dist/utils/cn.js +19 -4
- package/dist/utils/cn.js.map +1 -1
- package/dist/utils/styles.d.ts +37 -0
- package/dist/utils/styles.js +35 -0
- package/dist/utils/styles.js.map +1 -0
- package/package.json +140 -117
- package/dist/components/Accordion/Accordion.stories.d.ts +0 -7
- package/dist/components/Alert/Alert.stories.d.ts +0 -8
- package/dist/components/Badge/Badge.stories.d.ts +0 -8
- package/dist/components/Breadcrumb/Breadcrumb.stories.d.ts +0 -8
- package/dist/components/Button/Button.stories.d.ts +0 -7
- package/dist/components/Card/Card.stories.d.ts +0 -8
- package/dist/components/Checkbox/Checkbox.stories.d.ts +0 -7
- package/dist/components/Combobox/Combobox.stories.d.ts +0 -9
- package/dist/components/Feedback/Feedback.stories.d.ts +0 -5
- package/dist/components/FileUpload/FileUpload.stories.d.ts +0 -10
- package/dist/components/Input/Input.stories.d.ts +0 -9
- package/dist/components/Modal/Modal.stories.d.ts +0 -8
- package/dist/components/NumberInput/NumberInput.stories.d.ts +0 -8
- package/dist/components/Pagination/Pagination.stories.d.ts +0 -8
- package/dist/components/Radio/Radio.stories.d.ts +0 -7
- package/dist/components/Select/Select.stories.d.ts +0 -8
- package/dist/components/Stepper/Stepper.stories.d.ts +0 -8
- package/dist/components/Switch/Switch.stories.d.ts +0 -8
- package/dist/components/Tabs/Tabs.stories.d.ts +0 -8
- package/dist/components/Textarea/Textarea.stories.d.ts +0 -7
- package/dist/components/Toast/Toast.stories.d.ts +0 -8
- package/dist/oficios-ui.css +0 -1
- package/dist/oficios-ui.umd.cjs +0 -2
- package/dist/oficios-ui.umd.cjs.map +0 -1
- package/dist/sbk-icon.png +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.js","sources":["../../../src/components/Tag/Tag.tsx"],"sourcesContent":["import type React from 'react';\nimport { cn } from '../../utils/cn';\n\nexport interface TagProps extends React.HTMLAttributes<HTMLSpanElement> {\n onRemove?: () => void;\n}\n\nexport const Tag
|
|
1
|
+
{"version":3,"file":"Tag.js","sources":["../../../src/components/Tag/Tag.tsx"],"sourcesContent":["import type React from 'react';\nimport { X } from 'lucide-react';\nimport { cn } from '../../utils/cn';\nimport { buttonReset, focusRing } from '../../utils/styles';\n\nexport interface TagProps extends React.HTMLAttributes<HTMLSpanElement> {\n icon?: React.ReactNode;\n onRemove?: () => void;\n /** Rótulo acessível do botão de remover. Padrão: \"Remover\". */\n removeLabel?: string;\n}\n\n/** Etiqueta de metadado, opcionalmente removível. */\nexport const Tag = ({\n className,\n children,\n icon,\n onRemove,\n removeLabel = 'Remover',\n ...props\n}: TagProps) => (\n <span\n className={cn(\n 'inline-flex items-center gap-1.5 rounded-sbk-xs border border-sbk-line bg-sbk-surface px-2.5 py-1 text-xs font-light text-sbk-fg [&_svg]:size-3.5',\n className,\n )}\n {...props}\n >\n {icon && (\n <span aria-hidden=\"true\" className=\"inline-flex text-sbk-fg-muted\">\n {icon}\n </span>\n )}\n {children}\n {onRemove && (\n <button\n aria-label={typeof children === 'string' ? `${removeLabel} ${children}` : removeLabel}\n className={cn(\n buttonReset,\n '-mr-1 inline-flex size-4 cursor-pointer items-center justify-center rounded-full text-sbk-fg-muted hover:bg-sbk-surface-hover hover:text-sbk-fg',\n focusRing,\n )}\n onClick={onRemove}\n type=\"button\"\n >\n <X aria-hidden=\"true\" />\n </button>\n )}\n </span>\n);\n\nTag.displayName = 'Tag';\n"],"names":["Tag","className","children","icon","onRemove","removeLabel","props","jsxs","cn","jsx","buttonReset","focusRing","X"],"mappings":";;;;AAaO,MAAMA,IAAM,CAAC;AAAA,EAClB,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,GAAGC;AACL,MACE,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC;AAAA,MACT;AAAA,MACAP;AAAA,IAAA;AAAA,IAED,GAAGK;AAAA,IAEH,UAAA;AAAA,MAAAH,uBACE,QAAA,EAAK,eAAY,QAAO,WAAU,iCAChC,UAAAA,GACH;AAAA,MAEDD;AAAA,MACAE,KACC,gBAAAK;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,cAAY,OAAOP,KAAa,WAAW,GAAGG,CAAW,IAAIH,CAAQ,KAAKG;AAAA,UAC1E,WAAWG;AAAA,YACTE;AAAA,YACA;AAAA,YACAC;AAAA,UAAA;AAAA,UAEF,SAASP;AAAA,UACT,MAAK;AAAA,UAEL,UAAA,gBAAAK,EAACG,GAAA,EAAE,eAAY,OAAA,CAAO;AAAA,QAAA;AAAA,MAAA;AAAA,IACxB;AAAA,EAAA;AAEJ;AAGFZ,EAAI,cAAc;"}
|
|
@@ -2,6 +2,8 @@ import React from 'react';
|
|
|
2
2
|
export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
3
3
|
error?: string;
|
|
4
4
|
helperText?: string;
|
|
5
|
-
label?:
|
|
5
|
+
label?: React.ReactNode;
|
|
6
|
+
/** Permite redimensionar verticalmente. Padrão: true. */
|
|
7
|
+
resizable?: boolean;
|
|
6
8
|
}
|
|
7
9
|
export declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -1,46 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import p, { useId as x } from "react";
|
|
3
3
|
import { cn as l } from "../../utils/cn.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
children: o
|
|
37
|
-
}
|
|
38
|
-
)
|
|
39
|
-
] });
|
|
4
|
+
import { describedBy as y, fieldControl as b } from "../../utils/styles.js";
|
|
5
|
+
import { Field as u } from "../Field/Field.js";
|
|
6
|
+
const I = p.forwardRef(
|
|
7
|
+
({ label: o, helperText: a, error: e, resizable: d = !0, className: m, id: s, required: i, ...n }, c) => {
|
|
8
|
+
const f = x(), t = s ?? f;
|
|
9
|
+
return /* @__PURE__ */ r(
|
|
10
|
+
u,
|
|
11
|
+
{
|
|
12
|
+
error: e,
|
|
13
|
+
helperText: a,
|
|
14
|
+
id: t,
|
|
15
|
+
label: o,
|
|
16
|
+
required: i,
|
|
17
|
+
children: /* @__PURE__ */ r(
|
|
18
|
+
"textarea",
|
|
19
|
+
{
|
|
20
|
+
ref: c,
|
|
21
|
+
"aria-describedby": y(t, e, a),
|
|
22
|
+
"aria-invalid": e ? !0 : void 0,
|
|
23
|
+
className: l(
|
|
24
|
+
b,
|
|
25
|
+
"min-h-24 px-3.5 py-2 text-base",
|
|
26
|
+
d ? "resize-y" : "resize-none",
|
|
27
|
+
m
|
|
28
|
+
),
|
|
29
|
+
id: t,
|
|
30
|
+
required: i,
|
|
31
|
+
...n
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
);
|
|
40
36
|
}
|
|
41
37
|
);
|
|
42
|
-
|
|
38
|
+
I.displayName = "Textarea";
|
|
43
39
|
export {
|
|
44
|
-
|
|
40
|
+
I as Textarea
|
|
45
41
|
};
|
|
46
42
|
//# sourceMappingURL=Textarea.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.js","sources":["../../../src/components/Textarea/Textarea.tsx"],"sourcesContent":["import React from 'react';\nimport { cn } from '../../utils/cn';\n\nexport interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {\n error?: string;\n helperText?: string;\n label?:
|
|
1
|
+
{"version":3,"file":"Textarea.js","sources":["../../../src/components/Textarea/Textarea.tsx"],"sourcesContent":["import React, { useId } from 'react';\nimport { cn } from '../../utils/cn';\nimport { describedBy, fieldControl } from '../../utils/styles';\nimport { Field } from '../Field/Field';\n\nexport interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {\n error?: string;\n helperText?: string;\n label?: React.ReactNode;\n /** Permite redimensionar verticalmente. Padrão: true. */\n resizable?: boolean;\n}\n\nexport const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n ({ label, helperText, error, resizable = true, className, id, required, ...props }, ref) => {\n const autoId = useId();\n const textareaId = id ?? autoId;\n\n return (\n <Field\n error={error}\n helperText={helperText}\n id={textareaId}\n label={label}\n required={required}\n >\n <textarea\n ref={ref}\n aria-describedby={describedBy(textareaId, error, helperText)}\n aria-invalid={error ? true : undefined}\n className={cn(\n fieldControl,\n 'min-h-24 px-3.5 py-2 text-base',\n resizable ? 'resize-y' : 'resize-none',\n className,\n )}\n id={textareaId}\n required={required}\n {...props}\n />\n </Field>\n );\n },\n);\n\nTextarea.displayName = 'Textarea';\n"],"names":["Textarea","React","label","helperText","error","resizable","className","id","required","props","ref","autoId","useId","textareaId","jsx","Field","describedBy","cn","fieldControl"],"mappings":";;;;;AAaO,MAAMA,IAAWC,EAAM;AAAA,EAC5B,CAAC,EAAE,OAAAC,GAAO,YAAAC,GAAY,OAAAC,GAAO,WAAAC,IAAY,IAAM,WAAAC,GAAW,IAAAC,GAAI,UAAAC,GAAU,GAAGC,EAAA,GAASC,MAAQ;AAC1F,UAAMC,IAASC,EAAA,GACTC,IAAaN,KAAMI;AAEzB,WACE,gBAAAG;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,OAAAX;AAAA,QACA,YAAAD;AAAA,QACA,IAAIU;AAAA,QACJ,OAAAX;AAAA,QACA,UAAAM;AAAA,QAEA,UAAA,gBAAAM;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,KAAAJ;AAAA,YACA,oBAAkBM,EAAYH,GAAYT,GAAOD,CAAU;AAAA,YAC3D,gBAAcC,IAAQ,KAAO;AAAA,YAC7B,WAAWa;AAAA,cACTC;AAAA,cACA;AAAA,cACAb,IAAY,aAAa;AAAA,cACzBC;AAAA,YAAA;AAAA,YAEF,IAAIO;AAAA,YACJ,UAAAL;AAAA,YACC,GAAGC;AAAA,UAAA;AAAA,QAAA;AAAA,MACN;AAAA,IAAA;AAAA,EAGN;AACF;AAEAT,EAAS,cAAc;"}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
+
import { type TextWeight } from '../Typography/weight';
|
|
2
3
|
export interface TitleProps extends React.HTMLAttributes<HTMLHeadingElement> {
|
|
3
4
|
align?: 'left' | 'center' | 'right';
|
|
4
5
|
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
5
6
|
children: React.ReactNode;
|
|
6
|
-
|
|
7
|
+
/** `heading`: Verde Escuro (padrão). `default`: cor de texto. `inherit`: herda do pai. */
|
|
8
|
+
color?: 'heading' | 'default' | 'inherit';
|
|
7
9
|
italic?: boolean;
|
|
8
10
|
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl';
|
|
9
|
-
|
|
11
|
+
/** Padrão: semibold (Seminegrito, brand book). */
|
|
12
|
+
weight?: TextWeight;
|
|
10
13
|
}
|
|
11
|
-
export declare const Title:
|
|
14
|
+
export declare const Title: {
|
|
15
|
+
({ as: Tag, size, weight, align, color, italic, children, className, ...props }: TitleProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { cn as g } from "../../utils/cn.js";
|
|
3
|
+
import { weightClass as o } from "../Typography/weight.js";
|
|
4
|
+
const c = {
|
|
5
|
+
xs: "text-sm",
|
|
6
|
+
sm: "text-base",
|
|
7
|
+
md: "text-lg",
|
|
8
|
+
lg: "text-xl",
|
|
9
|
+
xl: "text-2xl",
|
|
10
|
+
"2xl": "text-[2rem]",
|
|
11
|
+
"3xl": "text-[2.5rem]",
|
|
12
|
+
"4xl": "text-5xl"
|
|
13
|
+
}, f = {
|
|
14
|
+
heading: "text-sbk-fg-heading",
|
|
15
|
+
default: "text-sbk-fg",
|
|
16
|
+
inherit: "text-inherit"
|
|
17
|
+
}, h = { left: "text-left", center: "text-center", right: "text-right" }, d = ({
|
|
3
18
|
as: t = "h1",
|
|
4
19
|
size: e = "2xl",
|
|
5
|
-
weight:
|
|
6
|
-
align:
|
|
7
|
-
|
|
8
|
-
italic:
|
|
9
|
-
children:
|
|
10
|
-
className:
|
|
11
|
-
...
|
|
12
|
-
}) =>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}, m = {
|
|
30
|
-
left: "text-left",
|
|
31
|
-
center: "text-center",
|
|
32
|
-
right: "text-right"
|
|
33
|
-
}, c = r ? "bg-[linear-gradient(135deg,var(--text-primary)_0%,var(--primary-color)_50%,var(--secondary-color)_100%)] bg-clip-text text-transparent" : "", v = [
|
|
34
|
-
"m-0 leading-[var(--line-height-tight)] text-[var(--text-primary)] transition-[var(--transition-colors)]",
|
|
35
|
-
f[e],
|
|
36
|
-
g[o],
|
|
37
|
-
m[a],
|
|
38
|
-
n ? "italic" : "not-italic",
|
|
39
|
-
c,
|
|
40
|
-
l
|
|
41
|
-
].filter(Boolean).join(" ");
|
|
42
|
-
return /* @__PURE__ */ d(x, { className: v, ...s, children: i });
|
|
43
|
-
};
|
|
20
|
+
weight: x = "semibold",
|
|
21
|
+
align: l = "left",
|
|
22
|
+
color: i = "heading",
|
|
23
|
+
italic: s = !1,
|
|
24
|
+
children: a,
|
|
25
|
+
className: m,
|
|
26
|
+
...n
|
|
27
|
+
}) => /* @__PURE__ */ r(
|
|
28
|
+
t,
|
|
29
|
+
{
|
|
30
|
+
className: g(
|
|
31
|
+
"m-0 font-sbk leading-tight tracking-[-0.01em] text-balance",
|
|
32
|
+
c[e],
|
|
33
|
+
o(x),
|
|
34
|
+
f[i],
|
|
35
|
+
h[l],
|
|
36
|
+
s && "italic",
|
|
37
|
+
m
|
|
38
|
+
),
|
|
39
|
+
...n,
|
|
40
|
+
children: a
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
d.displayName = "Title";
|
|
44
44
|
export {
|
|
45
|
-
|
|
45
|
+
d as Title
|
|
46
46
|
};
|
|
47
47
|
//# sourceMappingURL=Title.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Title.js","sources":["../../../src/components/Title/Title.tsx"],"sourcesContent":["import type React from 'react';\n\nexport interface TitleProps extends React.HTMLAttributes<HTMLHeadingElement> {\n align?: 'left' | 'center' | 'right';\n as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n children: React.ReactNode;\n
|
|
1
|
+
{"version":3,"file":"Title.js","sources":["../../../src/components/Title/Title.tsx"],"sourcesContent":["import type React from 'react';\nimport { cn } from '../../utils/cn';\nimport { type TextWeight, weightClass } from '../Typography/weight';\n\nexport interface TitleProps extends React.HTMLAttributes<HTMLHeadingElement> {\n align?: 'left' | 'center' | 'right';\n as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n children: React.ReactNode;\n /** `heading`: Verde Escuro (padrão). `default`: cor de texto. `inherit`: herda do pai. */\n color?: 'heading' | 'default' | 'inherit';\n italic?: boolean;\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl';\n /** Padrão: semibold (Seminegrito, brand book). */\n weight?: TextWeight;\n}\n\nconst SIZE_CLASS: Record<NonNullable<TitleProps['size']>, string> = {\n xs: 'text-sm',\n sm: 'text-base',\n md: 'text-lg',\n lg: 'text-xl',\n xl: 'text-2xl',\n '2xl': 'text-[2rem]',\n '3xl': 'text-[2.5rem]',\n '4xl': 'text-5xl',\n};\n\nconst COLOR_CLASS = {\n heading: 'text-sbk-fg-heading',\n default: 'text-sbk-fg',\n inherit: 'text-inherit',\n} as const;\nconst ALIGN_CLASS = { left: 'text-left', center: 'text-center', right: 'text-right' } as const;\n\nexport const Title = ({\n as: Tag = 'h1',\n size = '2xl',\n weight = 'semibold',\n align = 'left',\n color = 'heading',\n italic = false,\n children,\n className,\n ...props\n}: TitleProps) => (\n <Tag\n className={cn(\n 'm-0 font-sbk leading-tight tracking-[-0.01em] text-balance',\n SIZE_CLASS[size],\n weightClass(weight),\n COLOR_CLASS[color],\n ALIGN_CLASS[align],\n italic && 'italic',\n className,\n )}\n {...props}\n >\n {children}\n </Tag>\n);\n\nTitle.displayName = 'Title';\n"],"names":["SIZE_CLASS","COLOR_CLASS","ALIGN_CLASS","Title","Tag","size","weight","align","color","italic","children","className","props","jsx","cn","weightClass"],"mappings":";;;AAgBA,MAAMA,IAA8D;AAAA,EAClE,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACT,GAEMC,IAAc;AAAA,EAClB,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AACX,GACMC,IAAc,EAAE,MAAM,aAAa,QAAQ,eAAe,OAAO,aAAA,GAE1DC,IAAQ,CAAC;AAAA,EACpB,IAAIC,IAAM;AAAA,EACV,MAAAC,IAAO;AAAA,EACP,QAAAC,IAAS;AAAA,EACT,OAAAC,IAAQ;AAAA,EACR,OAAAC,IAAQ;AAAA,EACR,QAAAC,IAAS;AAAA,EACT,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,GAAGC;AACL,MACE,gBAAAC;AAAA,EAACT;AAAA,EAAA;AAAA,IACC,WAAWU;AAAA,MACT;AAAA,MACAd,EAAWK,CAAI;AAAA,MACfU,EAAYT,CAAM;AAAA,MAClBL,EAAYO,CAAK;AAAA,MACjBN,EAAYK,CAAK;AAAA,MACjBE,KAAU;AAAA,MACVE;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,IAEH,UAAAF;AAAA,EAAA;AACH;AAGFP,EAAM,cAAc;"}
|
|
@@ -1,26 +1,54 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
+
export type ToastTone = 'info' | 'success' | 'warning' | 'error';
|
|
2
3
|
export interface ToastProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
3
|
-
|
|
4
|
+
/** Ação opcional (ex.: "Desfazer"). */
|
|
5
|
+
action?: {
|
|
6
|
+
label: string;
|
|
7
|
+
onClick: () => void;
|
|
8
|
+
};
|
|
4
9
|
description?: React.ReactNode;
|
|
10
|
+
/** Tempo até fechar (ms). 0 mantém aberto. Sobrescreve o padrão do provider. */
|
|
11
|
+
durationMs?: number;
|
|
12
|
+
id?: string;
|
|
5
13
|
onDismiss?: () => void;
|
|
6
14
|
title: React.ReactNode;
|
|
7
|
-
tone?:
|
|
15
|
+
tone?: ToastTone;
|
|
16
|
+
variant?: 'default' | 'glass';
|
|
8
17
|
}
|
|
9
|
-
export declare const Toast:
|
|
18
|
+
export declare const Toast: {
|
|
19
|
+
({ tone, variant, title, description, action, onDismiss, durationMs: _durationMs, className, ...props }: ToastProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
type ToastInput = Omit<ToastProps, 'id'> & {
|
|
23
|
+
id?: string;
|
|
24
|
+
};
|
|
25
|
+
type ToastItem = ToastProps & {
|
|
26
|
+
id: string;
|
|
27
|
+
};
|
|
10
28
|
interface ToastContextValue {
|
|
11
29
|
dismissToast: (id: string) => void;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
toasts: Array<ToastProps & {
|
|
16
|
-
id: string;
|
|
17
|
-
}>;
|
|
30
|
+
/** Adiciona um toast e retorna o id. */
|
|
31
|
+
pushToast: (toast: ToastInput) => string;
|
|
32
|
+
toasts: ToastItem[];
|
|
18
33
|
}
|
|
34
|
+
export type ToastPosition = 'top-right' | 'top-center' | 'bottom-right' | 'bottom-center' | 'bottom-left';
|
|
19
35
|
export interface ToastProviderProps {
|
|
20
36
|
children: React.ReactNode;
|
|
37
|
+
/** Duração padrão (ms). Padrão: 5000. */
|
|
21
38
|
durationMs?: number;
|
|
39
|
+
/** Quantidade máxima visível; os mais antigos saem primeiro. Padrão: 4. */
|
|
40
|
+
max?: number;
|
|
41
|
+
position?: ToastPosition;
|
|
22
42
|
}
|
|
23
|
-
export declare const ToastProvider:
|
|
43
|
+
export declare const ToastProvider: ({ children, durationMs, max, position, }: ToastProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
44
|
export declare const useToast: () => ToastContextValue;
|
|
25
|
-
export
|
|
45
|
+
export interface ToastViewportProps {
|
|
46
|
+
onPause?: () => void;
|
|
47
|
+
onResume?: () => void;
|
|
48
|
+
position?: ToastPosition;
|
|
49
|
+
}
|
|
50
|
+
export declare const ToastViewport: {
|
|
51
|
+
({ position, onPause, onResume, }: ToastViewportProps): import("react/jsx-runtime").JSX.Element | null;
|
|
52
|
+
displayName: string;
|
|
53
|
+
};
|
|
26
54
|
export {};
|
|
@@ -1,110 +1,164 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { jsxs as x, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useState as E, useRef as M, useCallback as k, useEffect as z, useMemo as P, useContext as N, createContext as j } from "react";
|
|
3
|
+
import { XCircle as O, AlertTriangle as R, CheckCircle2 as F, Info as S, X as V } from "lucide-react";
|
|
4
|
+
import { cn as b } from "../../utils/cn.js";
|
|
5
|
+
import { focusRing as T, buttonReset as w } from "../../utils/styles.js";
|
|
6
|
+
const X = {
|
|
7
|
+
info: { bar: "bg-sbk-info", icon: "text-sbk-info-fg", Icon: S },
|
|
8
|
+
success: { bar: "bg-sbk-success", icon: "text-sbk-success-fg", Icon: F },
|
|
9
|
+
warning: { bar: "bg-sbk-warning", icon: "text-sbk-warning-fg", Icon: R },
|
|
10
|
+
error: { bar: "bg-sbk-error", icon: "text-sbk-error-fg", Icon: O }
|
|
11
|
+
}, C = ({
|
|
12
|
+
tone: s = "info",
|
|
13
|
+
variant: a = "default",
|
|
14
|
+
title: c,
|
|
15
|
+
description: r,
|
|
16
|
+
action: t,
|
|
17
|
+
onDismiss: i,
|
|
18
|
+
durationMs: l,
|
|
19
|
+
className: u,
|
|
20
|
+
...d
|
|
11
21
|
}) => {
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
success: "border-[var(--success-color)]/40",
|
|
15
|
-
warning: "border-[var(--warning-color)]/40",
|
|
16
|
-
error: "border-[var(--md-error)]/40"
|
|
17
|
-
}[e], l = e === "error" || e === "warning" ? "assertive" : "polite", r = e === "error" || e === "warning" ? "alert" : "status";
|
|
18
|
-
return /* @__PURE__ */ v(
|
|
22
|
+
const { bar: f, icon: g, Icon: h } = X[s], m = s === "error" || s === "warning";
|
|
23
|
+
return /* @__PURE__ */ x(
|
|
19
24
|
"div",
|
|
20
25
|
{
|
|
21
|
-
className: y(
|
|
22
|
-
"w-[22rem] rounded-[var(--border-radius-md)] border bg-[var(--bg-secondary)] p-3 shadow-[var(--shadow-lg)]",
|
|
23
|
-
d,
|
|
24
|
-
n
|
|
25
|
-
),
|
|
26
26
|
"aria-atomic": "true",
|
|
27
|
-
"aria-live":
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
"aria-live": m ? "assertive" : "polite",
|
|
28
|
+
className: b(
|
|
29
|
+
"relative flex w-[22rem] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-sbk-focus focus-visible:outline-solid max-w-[calc(100vw-2rem)] items-start gap-3 overflow-hidden rounded-sbk-sm py-3 pl-4 pr-3 text-sbk-fg animate-sbk-scale-in motion-reduce:animate-none",
|
|
30
|
+
a === "glass" ? "sbk-glass sbk-glass-strong" : "border border-sbk-line bg-sbk-surface shadow-sbk-md",
|
|
31
|
+
u
|
|
32
|
+
),
|
|
33
|
+
onKeyDown: (e) => e.key === "Escape" && (i == null ? void 0 : i()),
|
|
34
|
+
role: m ? "alert" : "status",
|
|
32
35
|
tabIndex: 0,
|
|
33
|
-
...
|
|
36
|
+
...d,
|
|
34
37
|
children: [
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
/* @__PURE__ */ o("span", { "aria-hidden": "true", className: b("absolute inset-y-0 left-0 w-1", f) }),
|
|
39
|
+
/* @__PURE__ */ o(h, { "aria-hidden": "true", className: b("mt-0.5 size-5 shrink-0", g), strokeWidth: 1.75 }),
|
|
40
|
+
/* @__PURE__ */ x("div", { className: "grid min-w-0 flex-1 gap-0.5", children: [
|
|
41
|
+
/* @__PURE__ */ o("p", { className: "m-0 text-sm font-semibold text-sbk-fg-heading", children: c }),
|
|
42
|
+
r && /* @__PURE__ */ o("p", { className: "m-0 text-sm font-light text-sbk-fg-muted", children: r }),
|
|
43
|
+
t && /* @__PURE__ */ o(
|
|
38
44
|
"button",
|
|
39
45
|
{
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
46
|
+
className: b(
|
|
47
|
+
w,
|
|
48
|
+
"mt-1 w-fit cursor-pointer text-sm font-semibold text-sbk-primary underline-offset-4 hover:underline",
|
|
49
|
+
T
|
|
50
|
+
),
|
|
51
|
+
onClick: t.onClick,
|
|
43
52
|
type: "button",
|
|
44
|
-
children:
|
|
53
|
+
children: t.label
|
|
45
54
|
}
|
|
46
55
|
)
|
|
47
56
|
] }),
|
|
48
|
-
|
|
57
|
+
i && /* @__PURE__ */ o(
|
|
58
|
+
"button",
|
|
59
|
+
{
|
|
60
|
+
"aria-label": "Fechar notificação",
|
|
61
|
+
className: b(
|
|
62
|
+
w,
|
|
63
|
+
"inline-flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-sbk-xs text-sbk-fg-muted hover:bg-sbk-surface-hover hover:text-sbk-fg",
|
|
64
|
+
T
|
|
65
|
+
),
|
|
66
|
+
onClick: i,
|
|
67
|
+
type: "button",
|
|
68
|
+
children: /* @__PURE__ */ o(V, { "aria-hidden": "true", className: "size-4" })
|
|
69
|
+
}
|
|
70
|
+
)
|
|
49
71
|
]
|
|
50
72
|
}
|
|
51
73
|
);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
74
|
+
};
|
|
75
|
+
C.displayName = "Toast";
|
|
76
|
+
const v = j(void 0);
|
|
77
|
+
let A = 0;
|
|
78
|
+
const q = ({
|
|
79
|
+
children: s,
|
|
80
|
+
durationMs: a = 5e3,
|
|
81
|
+
max: c = 4,
|
|
82
|
+
position: r = "bottom-right"
|
|
83
|
+
}) => {
|
|
84
|
+
const [t, i] = E([]), l = M(/* @__PURE__ */ new Map()), u = k((e) => {
|
|
85
|
+
clearTimeout(l.current.get(e)), l.current.delete(e), i((n) => n.filter((p) => p.id !== e));
|
|
86
|
+
}, []), d = k(
|
|
87
|
+
(e, n) => {
|
|
88
|
+
n > 0 && l.current.set(
|
|
89
|
+
e,
|
|
90
|
+
setTimeout(() => u(e), n)
|
|
91
|
+
);
|
|
62
92
|
},
|
|
63
|
-
[
|
|
93
|
+
[u]
|
|
94
|
+
), f = k(
|
|
95
|
+
(e) => {
|
|
96
|
+
const n = e.id ?? `sbk-toast-${++A}`;
|
|
97
|
+
return i((p) => [...p.filter((I) => I.id !== n), { ...e, id: n }].slice(-c)), d(n, e.durationMs ?? a), n;
|
|
98
|
+
},
|
|
99
|
+
[a, c, d]
|
|
64
100
|
);
|
|
65
|
-
|
|
66
|
-
const
|
|
101
|
+
z(() => {
|
|
102
|
+
const e = l.current;
|
|
67
103
|
return () => {
|
|
68
|
-
|
|
104
|
+
e.forEach(clearTimeout), e.clear();
|
|
69
105
|
};
|
|
70
106
|
}, []);
|
|
71
|
-
const
|
|
72
|
-
()
|
|
73
|
-
|
|
107
|
+
const g = () => {
|
|
108
|
+
l.current.forEach(clearTimeout), l.current.clear();
|
|
109
|
+
}, h = () => t.forEach((e) => d(e.id, e.durationMs ?? a)), m = P(
|
|
110
|
+
() => ({ toasts: t, pushToast: f, dismissToast: u }),
|
|
111
|
+
[t, f, u]
|
|
74
112
|
);
|
|
75
|
-
return /* @__PURE__ */ v
|
|
76
|
-
|
|
77
|
-
/* @__PURE__ */
|
|
113
|
+
return /* @__PURE__ */ x(v.Provider, { value: m, children: [
|
|
114
|
+
s,
|
|
115
|
+
/* @__PURE__ */ o(y, { onPause: g, onResume: h, position: r })
|
|
78
116
|
] });
|
|
79
|
-
},
|
|
80
|
-
const
|
|
81
|
-
if (!
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
117
|
+
}, G = () => {
|
|
118
|
+
const s = N(v);
|
|
119
|
+
if (!s) throw new Error("useToast deve ser usado dentro de ToastProvider");
|
|
120
|
+
return s;
|
|
121
|
+
}, B = {
|
|
122
|
+
"top-right": "top-4 right-4",
|
|
123
|
+
"top-center": "top-4 left-1/2 -translate-x-1/2",
|
|
124
|
+
"bottom-right": "bottom-4 right-4",
|
|
125
|
+
"bottom-center": "bottom-4 left-1/2 -translate-x-1/2",
|
|
126
|
+
"bottom-left": "bottom-4 left-4"
|
|
127
|
+
}, y = ({
|
|
128
|
+
position: s = "bottom-right",
|
|
129
|
+
onPause: a,
|
|
130
|
+
onResume: c
|
|
131
|
+
}) => {
|
|
132
|
+
const r = N(v);
|
|
133
|
+
return !r || r.toasts.length === 0 ? null : /* @__PURE__ */ o(
|
|
134
|
+
"section",
|
|
88
135
|
{
|
|
89
136
|
"aria-label": "Notificações",
|
|
90
|
-
className:
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
137
|
+
className: b(
|
|
138
|
+
"pointer-events-none fixed z-[var(--sbk-z-toast)] grid gap-2",
|
|
139
|
+
B[s]
|
|
140
|
+
),
|
|
141
|
+
onBlur: c,
|
|
142
|
+
onFocus: a,
|
|
143
|
+
onMouseEnter: a,
|
|
144
|
+
onMouseLeave: c,
|
|
145
|
+
children: r.toasts.map((t) => /* @__PURE__ */ o(
|
|
146
|
+
C,
|
|
94
147
|
{
|
|
95
|
-
...
|
|
148
|
+
...t,
|
|
96
149
|
className: "pointer-events-auto",
|
|
97
|
-
onDismiss: () =>
|
|
150
|
+
onDismiss: () => r.dismissToast(t.id)
|
|
98
151
|
},
|
|
99
|
-
|
|
152
|
+
t.id
|
|
100
153
|
))
|
|
101
154
|
}
|
|
102
155
|
);
|
|
103
156
|
};
|
|
157
|
+
y.displayName = "ToastViewport";
|
|
104
158
|
export {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
159
|
+
C as Toast,
|
|
160
|
+
q as ToastProvider,
|
|
161
|
+
y as ToastViewport,
|
|
162
|
+
G as useToast
|
|
109
163
|
};
|
|
110
164
|
//# sourceMappingURL=Toast.js.map
|