@v-miniapp/ui-react 1.0.40 → 1.0.45
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/README.md +1 -1
- package/dist/components/icon/icon-mapping.d.ts +4 -0
- package/dist/components/navigation-bar/navigation-bar.d.ts +3 -1
- package/dist/external/index.js +2009 -2012
- package/dist/external/styles.css +1 -1
- package/dist/index.js +1029 -1032
- package/dist/styles.css +1 -1
- package/dist-storybook/assets/ANIMATION-CUdn1GTK.js +99 -0
- package/dist-storybook/assets/APP_FRAMEWORK-ljbIOHYd.js +197 -0
- package/dist-storybook/assets/BOTTOM_TAB_BAR-DxCwCfBK.js +175 -0
- package/dist-storybook/assets/CUSTOM_ERROR_BOUNDARY-B4wTQNZc.js +250 -0
- package/dist-storybook/assets/Color-AVL7NMMY-1_8XTICv.js +1 -0
- package/dist-storybook/assets/DARK_MODE-CoHseCDO.js +57 -0
- package/dist-storybook/assets/DocsRenderer-PQXLIZUC-BO86igwd.js +2 -0
- package/dist-storybook/assets/GETTING_STARTED-H_vVi5cv.js +77 -0
- package/dist-storybook/assets/INFINITE_SCROLL-BtM3uoX0.js +111 -0
- package/dist-storybook/assets/KEEP_ALIVE-CL2au0al.js +126 -0
- package/dist-storybook/assets/LOCALE-XTCey55y.js +465 -0
- package/dist-storybook/assets/MIGRATION_GUIDE-2LONslE4.js +449 -0
- package/dist-storybook/assets/MOBILE_BEHAVIOURS-DZ6alKTX.js +177 -0
- package/dist-storybook/assets/PAGE_LAYOUT-BuOpN-1Y.js +192 -0
- package/dist-storybook/assets/ROUTING_NAVIGATION-BCPHXNto.js +335 -0
- package/dist-storybook/assets/TAILWIND_INTEGRATION-_T-VfvkM.js +87 -0
- package/dist-storybook/assets/_setToString-CbM921C9.js +1 -0
- package/dist-storybook/assets/alert-DLW8CoyB.js +1 -0
- package/dist-storybook/assets/alert.stories-B-vuojPh.js +110 -0
- package/dist-storybook/assets/avatar-GxcYPA1p.js +1 -0
- package/dist-storybook/assets/avatar.stories-KYFztAc8.js +136 -0
- package/dist-storybook/assets/axe-CmvD4WV5.js +20 -0
- package/dist-storybook/assets/badge-D_LzMVtw.js +1 -0
- package/dist-storybook/assets/badge.stories-Be2ItCmQ.js +262 -0
- package/dist-storybook/assets/blocks-BuaOUtiH.js +1243 -0
- package/dist-storybook/assets/bottom-tab-bar-CtcTAxuI.js +115 -0
- package/dist-storybook/assets/bottom-tab-bar.stories-CDmEve6z.js +186 -0
- package/dist-storybook/assets/button-CL7GeC23.js +1 -0
- package/dist-storybook/assets/button.stories-CaqLWQiY.js +287 -0
- package/dist-storybook/assets/calendar-dOCsjhVU.js +1 -0
- package/dist-storybook/assets/calendar.stories-DLWZldet.js +189 -0
- package/dist-storybook/assets/carousel-1Kww3hIz.js +37 -0
- package/dist-storybook/assets/carousel.stories-B8YbGOOr.js +217 -0
- package/dist-storybook/assets/checkbox-MGytNNRt.js +1 -0
- package/dist-storybook/assets/checkbox.stories-CLvfZPiw.js +201 -0
- package/dist-storybook/assets/chip-kG4p82WT.js +247 -0
- package/dist-storybook/assets/chip.stories-BbwJb5eD.js +442 -0
- package/dist-storybook/assets/classname-CUR_zgkh.js +1 -0
- package/dist-storybook/assets/colors-_6nFGM3e.js +1 -0
- package/dist-storybook/assets/date-Cg-Uk_pp.js +1 -0
- package/dist-storybook/assets/date-field.stories-Diptwqfv.js +129 -0
- package/dist-storybook/assets/date-picker-Dnq_-0Md.js +1 -0
- package/dist-storybook/assets/date-picker.stories-BuGWvzFL.js +123 -0
- package/dist-storybook/assets/default-error-BcnD8fFO.png +0 -0
- package/dist-storybook/assets/dialog.stories-DJ0WsSkA.js +212 -0
- package/dist-storybook/assets/dropdown.stories-D6JUYP73.js +200 -0
- package/dist-storybook/assets/embla-carousel-react.esm-BYjpaHZ9.js +1 -0
- package/dist-storybook/assets/en-Cs9O0XWn.js +15 -0
- package/dist-storybook/assets/icon-DdQsMyRa.js +1 -0
- package/dist-storybook/assets/icon.stories-B-ZvRzFf.js +365 -0
- package/dist-storybook/assets/iframe-CQAwSt4E.js +1071 -0
- package/dist-storybook/assets/iframe-yMKl6hJA.css +1 -0
- package/dist-storybook/assets/image-C3EsNRhz.js +9 -0
- package/dist-storybook/assets/image.stories-C4l8D3ju.js +255 -0
- package/dist-storybook/assets/index-B-Ksafg0.js +1 -0
- package/dist-storybook/assets/index-BV0AJWP6.js +1 -0
- package/dist-storybook/assets/index-CgMRTj-o.js +1 -0
- package/dist-storybook/assets/index-DHiZ-gXR.js +1 -0
- package/dist-storybook/assets/input-wrapper-BKHgnPy6.js +1 -0
- package/dist-storybook/assets/label-DV2iCDmN.js +27 -0
- package/dist-storybook/assets/label.stories-BwTIPFXX.js +138 -0
- package/dist-storybook/assets/matchers-7Z3WT2CE-Dw4MQV_s.js +14 -0
- package/dist-storybook/assets/navigation-bar-vI-FPasP.js +79 -0
- package/dist-storybook/assets/navigation-bar.stories-DYuFaJFD.js +73 -0
- package/dist-storybook/assets/number-field-CXKmnfKe.js +1 -0
- package/dist-storybook/assets/number-field.stories--fn26TJu.js +167 -0
- package/dist-storybook/assets/omit-Bsx5nTI0.js +1 -0
- package/dist-storybook/assets/option-item-LRh_OyV4.js +1 -0
- package/dist-storybook/assets/option-item.stories-snjAvgay.js +66 -0
- package/dist-storybook/assets/pagination-DZHoBs_4.js +1 -0
- package/dist-storybook/assets/pagination.stories-BoEs0jzS.js +91 -0
- package/dist-storybook/assets/pick-BhmhLmLe.js +1 -0
- package/dist-storybook/assets/preload-helper-PPVm8Dsz.js +1 -0
- package/dist-storybook/assets/radio-B5NJxG_l.js +1 -0
- package/dist-storybook/assets/radio.stories-DuN-Awi_.js +183 -0
- package/dist-storybook/assets/rating-BdXViYBv.js +1 -0
- package/dist-storybook/assets/rating.stories-BCcQjMEx.js +117 -0
- package/dist-storybook/assets/react-18-CNyWQ7je.js +9 -0
- package/dist-storybook/assets/react-hufnxGVs.js +1 -0
- package/dist-storybook/assets/search-field-CQqgFbfg.js +1 -0
- package/dist-storybook/assets/search-field.stories-DiCZbhng.js +79 -0
- package/dist-storybook/assets/section-content-DGNB4eLN.js +1 -0
- package/dist-storybook/assets/section.stories-C2I_kKhu.js +69 -0
- package/dist-storybook/assets/sheet.stories-wk1JaKU5.js +152 -0
- package/dist-storybook/assets/skeleton-C91JgehG.js +1 -0
- package/dist-storybook/assets/skeleton.stories-BCmX-VNr.js +139 -0
- package/dist-storybook/assets/store-CPumdfcU.js +1 -0
- package/dist-storybook/assets/store-D2RudmNr.js +18 -0
- package/dist-storybook/assets/switch-p-aXI-ev.js +1 -0
- package/dist-storybook/assets/switch.stories-BqPLNKB9.js +250 -0
- package/dist-storybook/assets/tab-bar-CSeCmtIZ.js +31 -0
- package/dist-storybook/assets/tab-bar.stories-Cb6v8H2w.js +136 -0
- package/dist-storybook/assets/text-area-DwSXyqOe.js +1 -0
- package/dist-storybook/assets/text-area.stories-By8bCfgc.js +87 -0
- package/dist-storybook/assets/text-field-jK6rpOo2.js +1 -0
- package/dist-storybook/assets/text-field.stories-CrWBAhvI.js +92 -0
- package/dist-storybook/assets/toast-provider-DurnMJhd.js +9 -0
- package/dist-storybook/assets/toast.stories-iWAToAZA.js +201 -0
- package/dist-storybook/assets/tooltip-QDdel5My.js +1 -0
- package/dist-storybook/assets/tooltip.stories-RC6SuPPD.js +153 -0
- package/dist-storybook/assets/typography-DEpAJl_i.js +1 -0
- package/dist-storybook/assets/typography.stories-Bu8qFugR.js +202 -0
- package/dist-storybook/assets/uploader.stories-B2wW9qVy.js +65 -0
- package/dist-storybook/assets/use-app-pause-B_tWHKJK.js +29 -0
- package/dist-storybook/assets/use-app-resume--900G-dV.js +29 -0
- package/dist-storybook/assets/use-custom-icon-event-3VExRzvC.js +29 -0
- package/dist-storybook/assets/use-did-hide-BUsL73ab.js +48 -0
- package/dist-storybook/assets/use-did-show-C1-VLDxi.js +49 -0
- package/dist-storybook/assets/use-histories-E4E2jJEY.js +50 -0
- package/dist-storybook/assets/use-history-o1im8IDj.js +67 -0
- package/dist-storybook/assets/use-location-CUEaBO4P.js +56 -0
- package/dist-storybook/assets/use-navigate-C4CTuFSZ.js +84 -0
- package/dist-storybook/assets/use-navigation-type-Dcz4hgKo.js +44 -0
- package/dist-storybook/assets/use-page-config-DSJBVQbq.js +48 -0
- package/dist-storybook/assets/use-page-scroll-dY-U1Vv4.js +69 -0
- package/dist-storybook/assets/use-page-state-CtNpwGPN.js +79 -0
- package/dist-storybook/assets/use-settings-changed-BBJwIHTE.js +29 -0
- package/dist-storybook/assets/v-mini-icon-Dn1BmJzb.woff2 +0 -0
- package/dist-storybook/assets/visibility-sensor-CwrzJO06.js +1 -0
- package/dist-storybook/iframe.html +670 -0
- package/dist-storybook/index.html +132 -0
- package/dist-storybook/index.json +1 -0
- package/dist-storybook/project.json +1 -0
- package/dist-storybook/sb-addons/a11y-2/manager-bundle.js +5 -0
- package/dist-storybook/sb-addons/docs-1/manager-bundle.js +151 -0
- package/dist-storybook/sb-addons/storybook-build-3/manager-bundle.js +3 -0
- package/dist-storybook/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +971 -0
- package/dist-storybook/sb-manager/globals-module-info.js +799 -0
- package/dist-storybook/sb-manager/globals-runtime.js +69791 -0
- package/dist-storybook/sb-manager/globals.js +34 -0
- package/dist-storybook/sb-manager/runtime.js +13198 -0
- package/dist-storybook/stories-data.json +374 -0
- package/dist-storybook/vite-inject-mocker-entry.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import{j as o}from"./iframe-CQAwSt4E.js";import{T as M,S as k,M as y,P as N,a as T}from"./blocks-BuaOUtiH.js";import{T as e,a as j}from"./toast-provider-DurnMJhd.js";import{B as s}from"./button-CL7GeC23.js";import{t}from"./store-D2RudmNr.js";import"./preload-helper-PPVm8Dsz.js";import"./index-DHiZ-gXR.js";import"./classname-CUR_zgkh.js";import"./icon-DdQsMyRa.js";import"./colors-_6nFGM3e.js";import"./typography-DEpAJl_i.js";import"./react-hufnxGVs.js";const D=()=>{const n=`
|
|
2
|
+
## ${t("common.table.title")}
|
|
3
|
+
|
|
4
|
+
| ${t("common.table.name")} | ${t("common.table.type")} | ${t("common.table.required")} | ${t("common.table.description")} |
|
|
5
|
+
| :--- | :--- | :--- | :--- |
|
|
6
|
+
| \`type\` | \`'neutral' \\| 'informative' \\| 'positive' \\| 'negative'\` | ${t("common.table.no")} | ${t("components.toast.typeDescription")} |
|
|
7
|
+
| \`message\` | \`ReactNode\` | ${t("common.table.yes")} | ${t("components.toast.messageDescription")} |
|
|
8
|
+
| \`closeAction\` | \`boolean\` | ${t("common.table.no")} | ${t("components.toast.closeActionDescription")} |
|
|
9
|
+
| \`onCloseActionClick\` | \`() => void\` | ${t("common.table.no")} | ${t("components.toast.onCloseActionClickDescription")} |
|
|
10
|
+
| \`action\` | \`string\` | ${t("common.table.no")} | ${t("components.toast.actionDescription")} |
|
|
11
|
+
| \`onActionClick\` | \`() => void\` | ${t("common.table.no")} | ${t("components.toast.onActionClickDescription")} |
|
|
12
|
+
| \`icon\` | \`IIconProps \\| ReactNode\` | ${t("common.table.no")} | ${t("components.toast.iconDescription")} |
|
|
13
|
+
| \`className\` | \`string\` | ${t("common.table.no")} | ${t("components.toast.classNameDescription")} |
|
|
14
|
+
| \`...props\` | \`ComponentProps<'div'>\` | ${t("common.table.no")} | ${t("components.toast.propsDescription")} |
|
|
15
|
+
`;return o.jsxs(o.Fragment,{children:[o.jsx(M,{}),o.jsx(k,{}),o.jsx(y,{children:t("components.toast.description")}),o.jsx(N,{}),o.jsx(y,{children:n}),o.jsx(T,{})]})},_={title:"Components/Toast",component:e,parameters:{layout:"padded",docs:{page:D}},tags:["autodocs"],decorators:[n=>o.jsxs(o.Fragment,{children:[o.jsx(n,{}),o.jsx(j,{})]})],argTypes:{type:{control:"select",options:["neutral","informative","positive","negative"],description:t("components.toast.argTypes.typeDescription"),table:{type:{summary:"IToastType"},defaultValue:{summary:"informative"}}},message:{control:"text",description:t("components.toast.argTypes.messageDescription"),table:{type:{summary:"ReactNode"}}},closeAction:{control:"boolean",description:t("components.toast.argTypes.closeActionDescription"),table:{type:{summary:"boolean"},defaultValue:{summary:"true"}}},onCloseActionClick:{action:"close clicked",description:t("components.toast.argTypes.onCloseActionClickDescription"),table:{type:{summary:"() => void"}}},action:{control:"text",description:t("components.toast.argTypes.actionDescription"),table:{type:{summary:"string"}}},onActionClick:{action:"action clicked",description:t("components.toast.argTypes.onActionClickDescription"),table:{type:{summary:"() => void"}}},icon:{control:!1,description:t("components.toast.argTypes.iconDescription"),table:{type:{summary:"IIconProps | ReactNode"}}}}},a={storyName:t("components.toast.stories.default.title"),args:{type:"informative",message:t("components.toast.default.message")}},i={storyName:t("components.toast.stories.types.title"),render:()=>o.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[o.jsx(e,{type:"neutral",message:t("components.toast.types.neutral")}),o.jsx(e,{type:"informative",message:t("components.toast.types.informative")}),o.jsx(e,{type:"positive",message:t("components.toast.types.positive")}),o.jsx(e,{type:"negative",message:t("components.toast.types.negative")})]})},c={storyName:t("components.toast.stories.informative.title"),args:{type:"informative",message:t("components.toast.informative.message")}},m={storyName:t("components.toast.stories.positive.title"),args:{type:"positive",message:t("components.toast.positive.message")}},r={storyName:t("components.toast.stories.negative.title"),args:{type:"negative",message:t("components.toast.negative.message")}},p={storyName:t("components.toast.stories.neutral.title"),args:{type:"neutral",message:t("components.toast.neutral.message")}},l={storyName:t("components.toast.stories.withAction.title"),render:()=>o.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[o.jsx(e,{type:"informative",message:t("components.toast.withAction.informativeMessage"),action:t("components.toast.withAction.informativeAction"),onActionClick:()=>{console.log("Action clicked")}}),o.jsx(e,{type:"positive",message:t("components.toast.withAction.positiveMessage"),action:t("components.toast.withAction.positiveAction"),onActionClick:()=>{console.log("Action clicked")}}),o.jsx(e,{type:"negative",message:t("components.toast.withAction.negativeMessage"),action:t("components.toast.withAction.negativeAction"),onActionClick:()=>{console.log("Action clicked")}})]})},d={storyName:t("components.toast.stories.withoutCloseButton.title"),render:()=>o.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[o.jsx(e,{type:"informative",message:t("components.toast.withoutCloseButton.message"),closeAction:!1}),o.jsx(e,{type:"positive",message:t("components.toast.withoutCloseButton.positiveMessage"),closeAction:!1})]})},g={storyName:t("components.toast.stories.withCustomIcon.title"),render:()=>o.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[o.jsx(e,{type:"informative",message:t("components.toast.withCustomIcon.message"),icon:{name:"star",type:"fill"}}),o.jsx(e,{type:"positive",message:t("components.toast.withCustomIcon.positiveMessage"),icon:{name:"heart",type:"fill"}})]})},h={storyName:t("components.toast.stories.usingShowMethod.title"),render:()=>{const n=()=>{e.show({type:"informative",message:t("components.toast.showMethod.informative")})},w=()=>{e.show({type:"positive",message:t("components.toast.showMethod.positive")})},x=()=>{e.show({type:"negative",message:t("components.toast.showMethod.negative")})},f=()=>{e.show({type:"informative",message:t("components.toast.showMethod.withActionMessage"),action:t("components.toast.showMethod.action"),onActionClick:()=>{console.log("Action clicked")}})},A=()=>{e.show({type:"positive",message:t("components.toast.showMethod.withDurationMessage"),duration:5e3})},C=()=>{e.show({type:"informative",message:t("components.toast.showMethod.bottomMessage"),position:"bottom"})};return o.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px",maxWidth:"300px"},children:[o.jsx(s,{onClick:n,theme:"neutral",children:t("components.toast.showMethod.showInformative")}),o.jsx(s,{onClick:w,theme:"neutral",children:t("components.toast.showMethod.showPositive")}),o.jsx(s,{onClick:x,theme:"neutral",children:t("components.toast.showMethod.showNegative")}),o.jsx(s,{onClick:f,theme:"neutral",children:t("components.toast.showMethod.showWithAction")}),o.jsx(s,{onClick:A,theme:"neutral",children:t("components.toast.showMethod.showWithDuration")}),o.jsx(s,{onClick:C,theme:"neutral",children:t("components.toast.showMethod.showAtBottom")})]})}},v={storyName:t("components.toast.stories.completeExample.title"),render:()=>o.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[o.jsx(e,{type:"informative",message:t("components.toast.completeExample.informativeMessage"),action:t("components.toast.completeExample.informativeAction"),onActionClick:()=>{console.log("Action clicked")}}),o.jsx(e,{type:"positive",message:t("components.toast.completeExample.positiveMessage"),action:t("components.toast.completeExample.positiveAction"),onActionClick:()=>{console.log("Action clicked")}}),o.jsx(e,{type:"negative",message:t("components.toast.completeExample.negativeMessage"),action:t("components.toast.completeExample.negativeAction"),onActionClick:()=>{console.log("Action clicked")}})]})},u={storyName:t("components.toast.stories.interactive.title"),args:{type:"informative",message:t("components.toast.interactive.message"),closeAction:!0,action:t("components.toast.interactive.action")},parameters:{controls:{expanded:!0}}};a.parameters={...a.parameters,docs:{...a.parameters?.docs,source:{originalSource:`{
|
|
16
|
+
storyName: t('components.toast.stories.default.title'),
|
|
17
|
+
args: {
|
|
18
|
+
type: 'informative',
|
|
19
|
+
message: t('components.toast.default.message')
|
|
20
|
+
}
|
|
21
|
+
}`,...a.parameters?.docs?.source}}};i.parameters={...i.parameters,docs:{...i.parameters?.docs,source:{originalSource:`{
|
|
22
|
+
storyName: t('components.toast.stories.types.title'),
|
|
23
|
+
render: () => <div style={{
|
|
24
|
+
display: 'flex',
|
|
25
|
+
flexDirection: 'column',
|
|
26
|
+
gap: '16px'
|
|
27
|
+
}}>
|
|
28
|
+
<Toast type="neutral" message={t('components.toast.types.neutral')} />
|
|
29
|
+
<Toast type="informative" message={t('components.toast.types.informative')} />
|
|
30
|
+
<Toast type="positive" message={t('components.toast.types.positive')} />
|
|
31
|
+
<Toast type="negative" message={t('components.toast.types.negative')} />
|
|
32
|
+
</div>
|
|
33
|
+
}`,...i.parameters?.docs?.source}}};c.parameters={...c.parameters,docs:{...c.parameters?.docs,source:{originalSource:`{
|
|
34
|
+
storyName: t('components.toast.stories.informative.title'),
|
|
35
|
+
args: {
|
|
36
|
+
type: 'informative',
|
|
37
|
+
message: t('components.toast.informative.message')
|
|
38
|
+
}
|
|
39
|
+
}`,...c.parameters?.docs?.source}}};m.parameters={...m.parameters,docs:{...m.parameters?.docs,source:{originalSource:`{
|
|
40
|
+
storyName: t('components.toast.stories.positive.title'),
|
|
41
|
+
args: {
|
|
42
|
+
type: 'positive',
|
|
43
|
+
message: t('components.toast.positive.message')
|
|
44
|
+
}
|
|
45
|
+
}`,...m.parameters?.docs?.source}}};r.parameters={...r.parameters,docs:{...r.parameters?.docs,source:{originalSource:`{
|
|
46
|
+
storyName: t('components.toast.stories.negative.title'),
|
|
47
|
+
args: {
|
|
48
|
+
type: 'negative',
|
|
49
|
+
message: t('components.toast.negative.message')
|
|
50
|
+
}
|
|
51
|
+
}`,...r.parameters?.docs?.source}}};p.parameters={...p.parameters,docs:{...p.parameters?.docs,source:{originalSource:`{
|
|
52
|
+
storyName: t('components.toast.stories.neutral.title'),
|
|
53
|
+
args: {
|
|
54
|
+
type: 'neutral',
|
|
55
|
+
message: t('components.toast.neutral.message')
|
|
56
|
+
}
|
|
57
|
+
}`,...p.parameters?.docs?.source}}};l.parameters={...l.parameters,docs:{...l.parameters?.docs,source:{originalSource:`{
|
|
58
|
+
storyName: t('components.toast.stories.withAction.title'),
|
|
59
|
+
render: () => <div style={{
|
|
60
|
+
display: 'flex',
|
|
61
|
+
flexDirection: 'column',
|
|
62
|
+
gap: '16px'
|
|
63
|
+
}}>
|
|
64
|
+
<Toast type="informative" message={t('components.toast.withAction.informativeMessage')} action={t('components.toast.withAction.informativeAction')} onActionClick={() => {
|
|
65
|
+
console.log('Action clicked');
|
|
66
|
+
}} />
|
|
67
|
+
<Toast type="positive" message={t('components.toast.withAction.positiveMessage')} action={t('components.toast.withAction.positiveAction')} onActionClick={() => {
|
|
68
|
+
console.log('Action clicked');
|
|
69
|
+
}} />
|
|
70
|
+
<Toast type="negative" message={t('components.toast.withAction.negativeMessage')} action={t('components.toast.withAction.negativeAction')} onActionClick={() => {
|
|
71
|
+
console.log('Action clicked');
|
|
72
|
+
}} />
|
|
73
|
+
</div>
|
|
74
|
+
}`,...l.parameters?.docs?.source}}};d.parameters={...d.parameters,docs:{...d.parameters?.docs,source:{originalSource:`{
|
|
75
|
+
storyName: t('components.toast.stories.withoutCloseButton.title'),
|
|
76
|
+
render: () => <div style={{
|
|
77
|
+
display: 'flex',
|
|
78
|
+
flexDirection: 'column',
|
|
79
|
+
gap: '16px'
|
|
80
|
+
}}>
|
|
81
|
+
<Toast type="informative" message={t('components.toast.withoutCloseButton.message')} closeAction={false} />
|
|
82
|
+
<Toast type="positive" message={t('components.toast.withoutCloseButton.positiveMessage')} closeAction={false} />
|
|
83
|
+
</div>
|
|
84
|
+
}`,...d.parameters?.docs?.source}}};g.parameters={...g.parameters,docs:{...g.parameters?.docs,source:{originalSource:`{
|
|
85
|
+
storyName: t('components.toast.stories.withCustomIcon.title'),
|
|
86
|
+
render: () => <div style={{
|
|
87
|
+
display: 'flex',
|
|
88
|
+
flexDirection: 'column',
|
|
89
|
+
gap: '16px'
|
|
90
|
+
}}>
|
|
91
|
+
<Toast type="informative" message={t('components.toast.withCustomIcon.message')} icon={{
|
|
92
|
+
name: 'star',
|
|
93
|
+
type: 'fill'
|
|
94
|
+
}} />
|
|
95
|
+
<Toast type="positive" message={t('components.toast.withCustomIcon.positiveMessage')} icon={{
|
|
96
|
+
name: 'heart',
|
|
97
|
+
type: 'fill'
|
|
98
|
+
}} />
|
|
99
|
+
</div>
|
|
100
|
+
}`,...g.parameters?.docs?.source}}};h.parameters={...h.parameters,docs:{...h.parameters?.docs,source:{originalSource:`{
|
|
101
|
+
storyName: t('components.toast.stories.usingShowMethod.title'),
|
|
102
|
+
render: () => {
|
|
103
|
+
const handleShowInformative = () => {
|
|
104
|
+
Toast.show({
|
|
105
|
+
type: 'informative',
|
|
106
|
+
message: t('components.toast.showMethod.informative')
|
|
107
|
+
});
|
|
108
|
+
};
|
|
109
|
+
const handleShowPositive = () => {
|
|
110
|
+
Toast.show({
|
|
111
|
+
type: 'positive',
|
|
112
|
+
message: t('components.toast.showMethod.positive')
|
|
113
|
+
});
|
|
114
|
+
};
|
|
115
|
+
const handleShowNegative = () => {
|
|
116
|
+
Toast.show({
|
|
117
|
+
type: 'negative',
|
|
118
|
+
message: t('components.toast.showMethod.negative')
|
|
119
|
+
});
|
|
120
|
+
};
|
|
121
|
+
const handleShowWithAction = () => {
|
|
122
|
+
Toast.show({
|
|
123
|
+
type: 'informative',
|
|
124
|
+
message: t('components.toast.showMethod.withActionMessage'),
|
|
125
|
+
action: t('components.toast.showMethod.action'),
|
|
126
|
+
onActionClick: () => {
|
|
127
|
+
console.log('Action clicked');
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
};
|
|
131
|
+
const handleShowWithDuration = () => {
|
|
132
|
+
Toast.show({
|
|
133
|
+
type: 'positive',
|
|
134
|
+
message: t('components.toast.showMethod.withDurationMessage'),
|
|
135
|
+
duration: 5000
|
|
136
|
+
});
|
|
137
|
+
};
|
|
138
|
+
const handleShowAtBottom = () => {
|
|
139
|
+
Toast.show({
|
|
140
|
+
type: 'informative',
|
|
141
|
+
message: t('components.toast.showMethod.bottomMessage'),
|
|
142
|
+
position: 'bottom'
|
|
143
|
+
});
|
|
144
|
+
};
|
|
145
|
+
return <div style={{
|
|
146
|
+
display: 'flex',
|
|
147
|
+
flexDirection: 'column',
|
|
148
|
+
gap: '12px',
|
|
149
|
+
maxWidth: '300px'
|
|
150
|
+
}}>
|
|
151
|
+
<Button onClick={handleShowInformative} theme="neutral">
|
|
152
|
+
{t('components.toast.showMethod.showInformative')}
|
|
153
|
+
</Button>
|
|
154
|
+
<Button onClick={handleShowPositive} theme="neutral">
|
|
155
|
+
{t('components.toast.showMethod.showPositive')}
|
|
156
|
+
</Button>
|
|
157
|
+
<Button onClick={handleShowNegative} theme="neutral">
|
|
158
|
+
{t('components.toast.showMethod.showNegative')}
|
|
159
|
+
</Button>
|
|
160
|
+
<Button onClick={handleShowWithAction} theme="neutral">
|
|
161
|
+
{t('components.toast.showMethod.showWithAction')}
|
|
162
|
+
</Button>
|
|
163
|
+
<Button onClick={handleShowWithDuration} theme="neutral">
|
|
164
|
+
{t('components.toast.showMethod.showWithDuration')}
|
|
165
|
+
</Button>
|
|
166
|
+
<Button onClick={handleShowAtBottom} theme="neutral">
|
|
167
|
+
{t('components.toast.showMethod.showAtBottom')}
|
|
168
|
+
</Button>
|
|
169
|
+
</div>;
|
|
170
|
+
}
|
|
171
|
+
}`,...h.parameters?.docs?.source}}};v.parameters={...v.parameters,docs:{...v.parameters?.docs,source:{originalSource:`{
|
|
172
|
+
storyName: t('components.toast.stories.completeExample.title'),
|
|
173
|
+
render: () => <div style={{
|
|
174
|
+
display: 'flex',
|
|
175
|
+
flexDirection: 'column',
|
|
176
|
+
gap: '16px'
|
|
177
|
+
}}>
|
|
178
|
+
<Toast type="informative" message={t('components.toast.completeExample.informativeMessage')} action={t('components.toast.completeExample.informativeAction')} onActionClick={() => {
|
|
179
|
+
console.log('Action clicked');
|
|
180
|
+
}} />
|
|
181
|
+
<Toast type="positive" message={t('components.toast.completeExample.positiveMessage')} action={t('components.toast.completeExample.positiveAction')} onActionClick={() => {
|
|
182
|
+
console.log('Action clicked');
|
|
183
|
+
}} />
|
|
184
|
+
<Toast type="negative" message={t('components.toast.completeExample.negativeMessage')} action={t('components.toast.completeExample.negativeAction')} onActionClick={() => {
|
|
185
|
+
console.log('Action clicked');
|
|
186
|
+
}} />
|
|
187
|
+
</div>
|
|
188
|
+
}`,...v.parameters?.docs?.source}}};u.parameters={...u.parameters,docs:{...u.parameters?.docs,source:{originalSource:`{
|
|
189
|
+
storyName: t('components.toast.stories.interactive.title'),
|
|
190
|
+
args: {
|
|
191
|
+
type: 'informative',
|
|
192
|
+
message: t('components.toast.interactive.message'),
|
|
193
|
+
closeAction: true,
|
|
194
|
+
action: t('components.toast.interactive.action')
|
|
195
|
+
},
|
|
196
|
+
parameters: {
|
|
197
|
+
controls: {
|
|
198
|
+
expanded: true
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}`,...u.parameters?.docs?.source}}};const q=["Default","Types","Informative","Positive","Negative","Neutral","WithAction","WithoutCloseButton","WithCustomIcon","UsingShowMethod","CompleteExample","Interactive"];export{v as CompleteExample,a as Default,c as Informative,u as Interactive,r as Negative,p as Neutral,m as Positive,i as Types,h as UsingShowMethod,l as WithAction,g as WithCustomIcon,d as WithoutCloseButton,q as __namedExportsOrder,_ as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as o}from"./iframe-CQAwSt4E.js";import{c as e,g as n}from"./classname-CUR_zgkh.js";import{I as p}from"./icon-DdQsMyRa.js";const s=n("tooltip"),d=r=>{const{type:a="default",position:t="top",closeable:i,className:c,children:l,...m}=r;return o.jsxs("div",{className:e(s,`${s}--${a}`,c),...m,children:[o.jsx("div",{className:e(`${s}__arrow`,`${s}__arrow--${t}`,`${s}__arrow--${a}`)}),o.jsx("div",{className:`${s}__content`,children:l}),i&&o.jsx("div",{className:`${s}__close`,children:o.jsx(p,{name:"xmark",size:16})})]})};d.__docgenInfo={description:"",methods:[],displayName:"Tooltip"};export{d as T};
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import{j as t}from"./iframe-CQAwSt4E.js";import{T as e}from"./tooltip-QDdel5My.js";import{t as o}from"./store-D2RudmNr.js";import{T as a,S as d,M as c,P as g,a as h}from"./blocks-BuaOUtiH.js";import"./preload-helper-PPVm8Dsz.js";import"./classname-CUR_zgkh.js";import"./icon-DdQsMyRa.js";import"./colors-_6nFGM3e.js";import"./index-DHiZ-gXR.js";const x=()=>{const m=`
|
|
2
|
+
## ${o("common.table.title")}
|
|
3
|
+
| ${o("common.table.name")} | ${o("common.table.type")} | ${o("common.table.required")} | ${o("common.table.description")} |
|
|
4
|
+
| :--- | :--- | :---: | :--- |
|
|
5
|
+
| \`type\` | \`'default' | 'reverse'\` | ${o("common.table.no")} | ${o("components.tooltip.argTypes.typeDescription")} |
|
|
6
|
+
| \`position\` | \`ITooltipPosition\` | ${o("common.table.no")} | ${o("components.tooltip.argTypes.positionDescription")} |
|
|
7
|
+
| \`closeable\` | \`boolean\` | ${o("common.table.no")} | ${o("components.tooltip.argTypes.closeableDescription")} |
|
|
8
|
+
| \`children\` | \`ReactNode\` | ${o("common.table.no")} | ${o("components.tooltip.argTypes.childrenDescription")} |
|
|
9
|
+
| \`className\` | \`string\` | ${o("common.table.no")} | ${o("components.tooltip.argTypes.classNameDescription")} |
|
|
10
|
+
| \`...props\` | \`ComponentPropsWithRef<'div'>\` | ${o("common.table.no")} | ${o("components.tooltip.argTypes.propsDescription")} |
|
|
11
|
+
`;return t.jsxs(t.Fragment,{children:[t.jsx(a,{}),t.jsx(d,{}),t.jsx(c,{children:o("components.tooltip.description")}),t.jsx(g,{}),t.jsx(c,{children:m}),t.jsx(h,{})]})},B={title:"Components/Tooltip",component:e,parameters:{layout:"padded",docs:{page:x}},tags:["autodocs"],argTypes:{type:{control:"select",options:["default","reverse"],description:o("components.tooltip.argTypes.typeDescription"),table:{type:{summary:'"default" | "reverse"'},defaultValue:{summary:"default"}}},position:{control:"select",options:["top","bottom","right","left","top-left","top-right","bottom-left","bottom-right","left-top","left-bottom","right-top","right-bottom"],description:o("components.tooltip.argTypes.positionDescription"),table:{type:{summary:"ITooltipPosition"},defaultValue:{summary:"top"}}},closeable:{control:"boolean",description:o("components.tooltip.argTypes.closeableDescription"),table:{type:{summary:"boolean"}}},children:{description:o("components.tooltip.argTypes.childrenDescription")},className:{description:o("components.tooltip.argTypes.classNameDescription")}}},s={name:o("components.tooltip.stories.default.name"),args:{children:o("components.tooltip.stories.default.content")}},i={name:o("components.tooltip.stories.types.name"),render:()=>t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[t.jsxs("div",{children:[t.jsx("p",{style:{marginBottom:"8px"},children:o("components.tooltip.stories.types.default")}),t.jsx(e,{type:"default",position:"top",children:o("components.tooltip.stories.types.defaultContent")})]}),t.jsxs("div",{children:[t.jsx("p",{style:{marginBottom:"8px"},children:o("components.tooltip.stories.types.reverse")}),t.jsx(e,{type:"reverse",position:"top",children:o("components.tooltip.stories.types.reverseContent")})]})]})},n={name:o("components.tooltip.stories.positions.name"),render:()=>t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"24px"},children:[t.jsxs("div",{children:[t.jsx("h3",{style:{marginBottom:"12px"},children:o("components.tooltip.stories.positions.top")}),t.jsxs("div",{style:{display:"flex",gap:"16px"},children:[t.jsx(e,{position:"top",children:o("components.tooltip.positions.top")}),t.jsx(e,{position:"top-left",children:o("components.tooltip.positions.topLeft")}),t.jsx(e,{position:"top-right",children:o("components.tooltip.positions.topRight")})]})]}),t.jsxs("div",{children:[t.jsx("h3",{style:{marginBottom:"12px"},children:o("components.tooltip.stories.positions.bottom")}),t.jsxs("div",{style:{display:"flex",gap:"16px"},children:[t.jsx(e,{position:"bottom",children:o("components.tooltip.positions.bottom")}),t.jsx(e,{position:"bottom-left",children:o("components.tooltip.positions.bottomLeft")}),t.jsx(e,{position:"bottom-right",children:o("components.tooltip.positions.bottomRight")})]})]}),t.jsxs("div",{children:[t.jsx("h3",{style:{marginBottom:"12px"},children:o("components.tooltip.stories.positions.left")}),t.jsxs("div",{style:{display:"flex",gap:"16px"},children:[t.jsx(e,{position:"left",children:o("components.tooltip.positions.left")}),t.jsx(e,{position:"left-top",children:o("components.tooltip.positions.leftTop")}),t.jsx(e,{position:"left-bottom",children:o("components.tooltip.positions.leftBottom")})]})]}),t.jsxs("div",{children:[t.jsx("h3",{style:{marginBottom:"12px"},children:o("components.tooltip.stories.positions.right")}),t.jsxs("div",{style:{display:"flex",gap:"16px"},children:[t.jsx(e,{position:"right",children:o("components.tooltip.positions.right")}),t.jsx(e,{position:"right-top",children:o("components.tooltip.positions.rightTop")}),t.jsx(e,{position:"right-bottom",children:o("components.tooltip.positions.rightBottom")})]})]})]})},p={name:o("components.tooltip.stories.closeable.name"),args:{children:o("components.tooltip.stories.closeable.content"),closeable:!0}},l={name:o("components.tooltip.stories.longContent.name"),args:{children:o("components.tooltip.stories.longContent.content")}},r={name:o("components.tooltip.stories.interactive.name"),args:{children:o("components.tooltip.stories.interactive.content"),position:"top"}};s.parameters={...s.parameters,docs:{...s.parameters?.docs,source:{originalSource:`{
|
|
12
|
+
name: t('components.tooltip.stories.default.name'),
|
|
13
|
+
args: {
|
|
14
|
+
children: t('components.tooltip.stories.default.content')
|
|
15
|
+
}
|
|
16
|
+
}`,...s.parameters?.docs?.source}}};i.parameters={...i.parameters,docs:{...i.parameters?.docs,source:{originalSource:`{
|
|
17
|
+
name: t('components.tooltip.stories.types.name'),
|
|
18
|
+
render: () => <div style={{
|
|
19
|
+
display: 'flex',
|
|
20
|
+
flexDirection: 'column',
|
|
21
|
+
gap: '16px'
|
|
22
|
+
}}>
|
|
23
|
+
<div>
|
|
24
|
+
<p style={{
|
|
25
|
+
marginBottom: '8px'
|
|
26
|
+
}}>
|
|
27
|
+
{t('components.tooltip.stories.types.default')}
|
|
28
|
+
</p>
|
|
29
|
+
<Tooltip type="default" position="top">
|
|
30
|
+
{t('components.tooltip.stories.types.defaultContent')}
|
|
31
|
+
</Tooltip>
|
|
32
|
+
</div>
|
|
33
|
+
<div>
|
|
34
|
+
<p style={{
|
|
35
|
+
marginBottom: '8px'
|
|
36
|
+
}}>
|
|
37
|
+
{t('components.tooltip.stories.types.reverse')}
|
|
38
|
+
</p>
|
|
39
|
+
<Tooltip type="reverse" position="top">
|
|
40
|
+
{t('components.tooltip.stories.types.reverseContent')}
|
|
41
|
+
</Tooltip>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
}`,...i.parameters?.docs?.source}}};n.parameters={...n.parameters,docs:{...n.parameters?.docs,source:{originalSource:`{
|
|
45
|
+
name: t('components.tooltip.stories.positions.name'),
|
|
46
|
+
render: () => <div style={{
|
|
47
|
+
display: 'flex',
|
|
48
|
+
flexDirection: 'column',
|
|
49
|
+
gap: '24px'
|
|
50
|
+
}}>
|
|
51
|
+
<div>
|
|
52
|
+
<h3 style={{
|
|
53
|
+
marginBottom: '12px'
|
|
54
|
+
}}>
|
|
55
|
+
{t('components.tooltip.stories.positions.top')}
|
|
56
|
+
</h3>
|
|
57
|
+
<div style={{
|
|
58
|
+
display: 'flex',
|
|
59
|
+
gap: '16px'
|
|
60
|
+
}}>
|
|
61
|
+
<Tooltip position="top">
|
|
62
|
+
{t('components.tooltip.positions.top')}
|
|
63
|
+
</Tooltip>
|
|
64
|
+
<Tooltip position="top-left">
|
|
65
|
+
{t('components.tooltip.positions.topLeft')}
|
|
66
|
+
</Tooltip>
|
|
67
|
+
<Tooltip position="top-right">
|
|
68
|
+
{t('components.tooltip.positions.topRight')}
|
|
69
|
+
</Tooltip>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
<div>
|
|
73
|
+
<h3 style={{
|
|
74
|
+
marginBottom: '12px'
|
|
75
|
+
}}>
|
|
76
|
+
{t('components.tooltip.stories.positions.bottom')}
|
|
77
|
+
</h3>
|
|
78
|
+
<div style={{
|
|
79
|
+
display: 'flex',
|
|
80
|
+
gap: '16px'
|
|
81
|
+
}}>
|
|
82
|
+
<Tooltip position="bottom">
|
|
83
|
+
{t('components.tooltip.positions.bottom')}
|
|
84
|
+
</Tooltip>
|
|
85
|
+
<Tooltip position="bottom-left">
|
|
86
|
+
{t('components.tooltip.positions.bottomLeft')}
|
|
87
|
+
</Tooltip>
|
|
88
|
+
<Tooltip position="bottom-right">
|
|
89
|
+
{t('components.tooltip.positions.bottomRight')}
|
|
90
|
+
</Tooltip>
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
<div>
|
|
94
|
+
<h3 style={{
|
|
95
|
+
marginBottom: '12px'
|
|
96
|
+
}}>
|
|
97
|
+
{t('components.tooltip.stories.positions.left')}
|
|
98
|
+
</h3>
|
|
99
|
+
<div style={{
|
|
100
|
+
display: 'flex',
|
|
101
|
+
gap: '16px'
|
|
102
|
+
}}>
|
|
103
|
+
<Tooltip position="left">
|
|
104
|
+
{t('components.tooltip.positions.left')}
|
|
105
|
+
</Tooltip>
|
|
106
|
+
<Tooltip position="left-top">
|
|
107
|
+
{t('components.tooltip.positions.leftTop')}
|
|
108
|
+
</Tooltip>
|
|
109
|
+
<Tooltip position="left-bottom">
|
|
110
|
+
{t('components.tooltip.positions.leftBottom')}
|
|
111
|
+
</Tooltip>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
<div>
|
|
115
|
+
<h3 style={{
|
|
116
|
+
marginBottom: '12px'
|
|
117
|
+
}}>
|
|
118
|
+
{t('components.tooltip.stories.positions.right')}
|
|
119
|
+
</h3>
|
|
120
|
+
<div style={{
|
|
121
|
+
display: 'flex',
|
|
122
|
+
gap: '16px'
|
|
123
|
+
}}>
|
|
124
|
+
<Tooltip position="right">
|
|
125
|
+
{t('components.tooltip.positions.right')}
|
|
126
|
+
</Tooltip>
|
|
127
|
+
<Tooltip position="right-top">
|
|
128
|
+
{t('components.tooltip.positions.rightTop')}
|
|
129
|
+
</Tooltip>
|
|
130
|
+
<Tooltip position="right-bottom">
|
|
131
|
+
{t('components.tooltip.positions.rightBottom')}
|
|
132
|
+
</Tooltip>
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
}`,...n.parameters?.docs?.source}}};p.parameters={...p.parameters,docs:{...p.parameters?.docs,source:{originalSource:`{
|
|
137
|
+
name: t('components.tooltip.stories.closeable.name'),
|
|
138
|
+
args: {
|
|
139
|
+
children: t('components.tooltip.stories.closeable.content'),
|
|
140
|
+
closeable: true
|
|
141
|
+
}
|
|
142
|
+
}`,...p.parameters?.docs?.source}}};l.parameters={...l.parameters,docs:{...l.parameters?.docs,source:{originalSource:`{
|
|
143
|
+
name: t('components.tooltip.stories.longContent.name'),
|
|
144
|
+
args: {
|
|
145
|
+
children: t('components.tooltip.stories.longContent.content')
|
|
146
|
+
}
|
|
147
|
+
}`,...l.parameters?.docs?.source}}};r.parameters={...r.parameters,docs:{...r.parameters?.docs,source:{originalSource:`{
|
|
148
|
+
name: t('components.tooltip.stories.interactive.name'),
|
|
149
|
+
args: {
|
|
150
|
+
children: t('components.tooltip.stories.interactive.content'),
|
|
151
|
+
position: 'top'
|
|
152
|
+
}
|
|
153
|
+
}`,...r.parameters?.docs?.source}}};const C=["Default","Types","Positions","Closeable","LongContent","Interactive"];export{p as Closeable,s as Default,r as Interactive,l as LongContent,n as Positions,i as Types,C as __namedExportsOrder,B as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as l}from"./iframe-CQAwSt4E.js";import{c as m,g as n}from"./classname-CUR_zgkh.js";import{g as f}from"./colors-_6nFGM3e.js";const e=n("typography"),u=({component:s,size:a="inherit",weight:o="inherit",color:r,className:t,...i})=>{const p=s||"div";return l.jsx(p,{className:m(e,`${e}__size--${a}`,`${e}__weight--${o}`,t),...i,style:{color:f(r)}})};u.__docgenInfo={description:"",methods:[],displayName:"Typography",props:{size:{defaultValue:{value:"'inherit'",computed:!1},required:!1},weight:{defaultValue:{value:"'inherit'",computed:!1},required:!1}}};export{u as T};
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import{j as o}from"./iframe-CQAwSt4E.js";import{T as t}from"./typography-DEpAJl_i.js";import{t as e}from"./store-D2RudmNr.js";import{T as c,S as l,M as g,P as m,a as d}from"./blocks-BuaOUtiH.js";import"./preload-helper-PPVm8Dsz.js";import"./classname-CUR_zgkh.js";import"./colors-_6nFGM3e.js";import"./index-DHiZ-gXR.js";const f=()=>{const h=`
|
|
2
|
+
## ${e("common.table.title")}
|
|
3
|
+
|
|
4
|
+
### Typography
|
|
5
|
+
|
|
6
|
+
| ${e("common.table.name")} | ${e("common.table.type")} | ${e("common.table.required")} | ${e("common.table.description")} |
|
|
7
|
+
| :--- | :--- | :---: | :--- |
|
|
8
|
+
| \`component\` | \`ElementType\` | ${e("common.table.no")} | ${e("components.typography.componentDescription")} |
|
|
9
|
+
| \`size\` | \`ITypographySize\` | ${e("common.table.no")} | ${e("components.typography.sizeDescription")} |
|
|
10
|
+
| \`weight\` | \`ITypographyWeight\` | ${e("common.table.no")} | ${e("components.typography.weightDescription")} |
|
|
11
|
+
| \`color\` | \`IColor\` | ${e("common.table.no")} | ${e("components.typography.colorDescription")} |
|
|
12
|
+
| \`className\` | \`string\` | ${e("common.table.no")} | ${e("components.typography.classNameDescription")} |
|
|
13
|
+
| \`children\` | \`ReactNode\` | ${e("common.table.no")} | ${e("components.typography.childrenDescription")} |
|
|
14
|
+
| \`...props\` | \`ComponentPropsWithRef<ElementType>\` | ${e("common.table.no")} | ${e("components.typography.propsDescription")} |
|
|
15
|
+
|
|
16
|
+
### ITypographySize
|
|
17
|
+
|
|
18
|
+
| ${e("common.table.value")} | ${e("common.table.description")} |
|
|
19
|
+
| :--- | :--- |
|
|
20
|
+
| \`'inherit'\` | ${e("components.typography.sizes.inherit")} |
|
|
21
|
+
| \`'3x-small'\` | ${e("components.typography.sizes.3xSmall")} |
|
|
22
|
+
| \`'2x-small'\` | ${e("components.typography.sizes.2xSmall")} |
|
|
23
|
+
| \`'x-small'\` | ${e("components.typography.sizes.xSmall")} |
|
|
24
|
+
| \`'small'\` | ${e("components.typography.sizes.small")} |
|
|
25
|
+
| \`'base'\` | ${e("components.typography.sizes.base")} |
|
|
26
|
+
| \`'large'\` | ${e("components.typography.sizes.large")} |
|
|
27
|
+
| \`'x-large'\` | ${e("components.typography.sizes.xLarge")} |
|
|
28
|
+
| \`'2x-large'\` | ${e("components.typography.sizes.2xLarge")} |
|
|
29
|
+
| \`'3x-large'\` | ${e("components.typography.sizes.3xLarge")} |
|
|
30
|
+
| \`'4x-large'\` | ${e("components.typography.sizes.4xLarge")} |
|
|
31
|
+
| \`'5x-large'\` | ${e("components.typography.sizes.5xLarge")} |
|
|
32
|
+
|
|
33
|
+
### ITypographyWeight
|
|
34
|
+
|
|
35
|
+
| ${e("common.table.value")} | ${e("common.table.description")} |
|
|
36
|
+
| :--- | :--- |
|
|
37
|
+
| \`'inherit'\` | ${e("components.typography.weights.inherit")} |
|
|
38
|
+
| \`'100'\` | ${e("components.typography.weights.100")} |
|
|
39
|
+
| \`'200'\` | ${e("components.typography.weights.200")} |
|
|
40
|
+
| \`'300'\` | ${e("components.typography.weights.300")} |
|
|
41
|
+
| \`'400'\` / \`'regular'\` | ${e("components.typography.weights.regular")} |
|
|
42
|
+
| \`'500'\` / \`'medium'\` | ${e("components.typography.weights.medium")} |
|
|
43
|
+
| \`'600'\` / \`'semibold'\` | ${e("components.typography.weights.semibold")} |
|
|
44
|
+
| \`'700'\` / \`'bold'\` | ${e("components.typography.weights.bold")} |
|
|
45
|
+
| \`'800'\` | ${e("components.typography.weights.800")} |
|
|
46
|
+
| \`'900'\` | ${e("components.typography.weights.900")} |
|
|
47
|
+
`;return o.jsxs(o.Fragment,{children:[o.jsx(c,{}),o.jsx(l,{}),o.jsx(g,{children:e("components.typography.description")}),o.jsx(m,{}),o.jsx(g,{children:h}),o.jsx(d,{})]})},D={title:"Components/Typography",component:t,parameters:{layout:"padded",docs:{page:f}},tags:["autodocs"],argTypes:{component:{control:"select",options:["div","p","span","h1","h2","h3","h4","h5","h6"],description:e("components.typography.argTypes.componentDescription"),table:{type:{summary:"ElementType"},defaultValue:{summary:"div"}}},size:{control:"select",options:["inherit","5x-large","4x-large","3x-large","2x-large","x-large","large","base","small","x-small","2x-small","3x-small"],description:e("components.typography.argTypes.sizeDescription"),table:{type:{summary:"ITypographySize"},defaultValue:{summary:"inherit"}}},weight:{control:"select",options:["inherit","bold","semibold","medium","regular","100","200","300","400","500","600","700","800","900"],description:e("components.typography.argTypes.weightDescription"),table:{type:{summary:"ITypographyWeight"},defaultValue:{summary:"inherit"}}},color:{control:"text",description:e("components.typography.argTypes.colorDescription")+" (e.g., alias-object-primary) or CSS color value (e.g., #FF0000).",table:{type:{summary:"IColor"}}},className:{control:"text",description:e("components.typography.argTypes.classNameDescription"),table:{type:{summary:"string"}}},children:{control:"text",description:e("components.typography.argTypes.childrenDescription"),table:{type:{summary:"ReactNode"}}}}},s={name:e("components.typography.stories.default.name"),args:{children:e("components.typography.stories.default.text")}},r={name:e("components.typography.stories.differentSizes.name"),render:()=>o.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[o.jsx(t,{size:"3x-small",children:e("components.typography.stories.differentSizes.size3xSmall")}),o.jsx(t,{size:"2x-small",children:e("components.typography.stories.differentSizes.size2xSmall")}),o.jsx(t,{size:"x-small",children:e("components.typography.stories.differentSizes.sizeXSmall")}),o.jsx(t,{size:"small",children:e("components.typography.stories.differentSizes.sizeSmall")}),o.jsx(t,{size:"base",children:e("components.typography.stories.differentSizes.sizeBase")}),o.jsx(t,{size:"large",children:e("components.typography.stories.differentSizes.sizeLarge")}),o.jsx(t,{size:"x-large",children:e("components.typography.stories.differentSizes.sizeXLarge")}),o.jsx(t,{size:"2x-large",children:e("components.typography.stories.differentSizes.size2xLarge")}),o.jsx(t,{size:"3x-large",children:e("components.typography.stories.differentSizes.size3xLarge")}),o.jsx(t,{size:"4x-large",children:e("components.typography.stories.differentSizes.size4xLarge")}),o.jsx(t,{size:"5x-large",children:e("components.typography.stories.differentSizes.size5xLarge")})]})},p={name:e("components.typography.stories.differentWeights.name"),render:()=>o.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[o.jsx(t,{weight:"100",children:e("components.typography.stories.differentWeights.weight100")}),o.jsx(t,{weight:"200",children:e("components.typography.stories.differentWeights.weight200")}),o.jsx(t,{weight:"300",children:e("components.typography.stories.differentWeights.weight300")}),o.jsx(t,{weight:"400",children:e("components.typography.stories.differentWeights.weight400")}),o.jsx(t,{weight:"500",children:e("components.typography.stories.differentWeights.weight500")}),o.jsx(t,{weight:"600",children:e("components.typography.stories.differentWeights.weight600")}),o.jsx(t,{weight:"700",children:e("components.typography.stories.differentWeights.weight700")}),o.jsx(t,{weight:"800",children:e("components.typography.stories.differentWeights.weight800")}),o.jsx(t,{weight:"900",children:e("components.typography.stories.differentWeights.weight900")})]})},i={name:e("components.typography.stories.withColors.name"),render:()=>o.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[o.jsx(t,{color:"alias-object-primary",children:e("components.typography.stories.withColors.primary")}),o.jsx(t,{color:"alias-object-secondary",children:e("components.typography.stories.withColors.secondary")}),o.jsx(t,{color:"alias-object-tertiary",children:e("components.typography.stories.withColors.tertiary")}),o.jsx(t,{color:"alias-object-danger",children:e("components.typography.stories.withColors.danger")}),o.jsx(t,{color:"alias-object-success",children:e("components.typography.stories.withColors.success")})]})},n={name:e("components.typography.stories.asDifferentElements.name"),render:()=>o.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[o.jsx(t,{component:"h1",size:"4x-large",weight:"bold",children:e("components.typography.stories.asDifferentElements.heading1")}),o.jsx(t,{component:"h2",size:"3x-large",weight:"bold",children:e("components.typography.stories.asDifferentElements.heading2")}),o.jsx(t,{component:"h3",size:"2x-large",weight:"semibold",children:e("components.typography.stories.asDifferentElements.heading3")}),o.jsx(t,{component:"h4",size:"x-large",weight:"semibold",children:e("components.typography.stories.asDifferentElements.heading4")}),o.jsx(t,{component:"p",size:"base",children:e("components.typography.stories.asDifferentElements.paragraph")}),o.jsx(t,{component:"span",size:"small",children:e("components.typography.stories.asDifferentElements.span")})]})},a={render:()=>o.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"24px"},children:[o.jsx(t,{component:"h2",size:"x-large",weight:"bold",color:"alias-object-primary",children:e("components.typography.stories.completeExample.title")}),o.jsx(t,{component:"p",size:"base",weight:"regular",children:e("components.typography.stories.completeExample.paragraph")}),o.jsx(t,{component:"span",size:"small",weight:"medium",color:"#666666",children:e("components.typography.stories.completeExample.caption")})]})},y={name:e("components.typography.stories.interactive.name"),args:{children:e("components.typography.stories.interactive.text"),size:"base",weight:"regular",color:"alias-object-primary",component:"div"}};s.parameters={...s.parameters,docs:{...s.parameters?.docs,source:{originalSource:`{
|
|
48
|
+
name: t('components.typography.stories.default.name'),
|
|
49
|
+
args: {
|
|
50
|
+
children: t('components.typography.stories.default.text')
|
|
51
|
+
}
|
|
52
|
+
}`,...s.parameters?.docs?.source}}};r.parameters={...r.parameters,docs:{...r.parameters?.docs,source:{originalSource:`{
|
|
53
|
+
name: t('components.typography.stories.differentSizes.name'),
|
|
54
|
+
render: () => <div style={{
|
|
55
|
+
display: 'flex',
|
|
56
|
+
flexDirection: 'column',
|
|
57
|
+
gap: '16px'
|
|
58
|
+
}}>
|
|
59
|
+
<Typography size="3x-small">
|
|
60
|
+
{t('components.typography.stories.differentSizes.size3xSmall')}
|
|
61
|
+
</Typography>
|
|
62
|
+
<Typography size="2x-small">
|
|
63
|
+
{t('components.typography.stories.differentSizes.size2xSmall')}
|
|
64
|
+
</Typography>
|
|
65
|
+
<Typography size="x-small">
|
|
66
|
+
{t('components.typography.stories.differentSizes.sizeXSmall')}
|
|
67
|
+
</Typography>
|
|
68
|
+
<Typography size="small">
|
|
69
|
+
{t('components.typography.stories.differentSizes.sizeSmall')}
|
|
70
|
+
</Typography>
|
|
71
|
+
<Typography size="base">
|
|
72
|
+
{t('components.typography.stories.differentSizes.sizeBase')}
|
|
73
|
+
</Typography>
|
|
74
|
+
<Typography size="large">
|
|
75
|
+
{t('components.typography.stories.differentSizes.sizeLarge')}
|
|
76
|
+
</Typography>
|
|
77
|
+
<Typography size="x-large">
|
|
78
|
+
{t('components.typography.stories.differentSizes.sizeXLarge')}
|
|
79
|
+
</Typography>
|
|
80
|
+
<Typography size="2x-large">
|
|
81
|
+
{t('components.typography.stories.differentSizes.size2xLarge')}
|
|
82
|
+
</Typography>
|
|
83
|
+
<Typography size="3x-large">
|
|
84
|
+
{t('components.typography.stories.differentSizes.size3xLarge')}
|
|
85
|
+
</Typography>
|
|
86
|
+
<Typography size="4x-large">
|
|
87
|
+
{t('components.typography.stories.differentSizes.size4xLarge')}
|
|
88
|
+
</Typography>
|
|
89
|
+
<Typography size="5x-large">
|
|
90
|
+
{t('components.typography.stories.differentSizes.size5xLarge')}
|
|
91
|
+
</Typography>
|
|
92
|
+
</div>
|
|
93
|
+
}`,...r.parameters?.docs?.source}}};p.parameters={...p.parameters,docs:{...p.parameters?.docs,source:{originalSource:`{
|
|
94
|
+
name: t('components.typography.stories.differentWeights.name'),
|
|
95
|
+
render: () => <div style={{
|
|
96
|
+
display: 'flex',
|
|
97
|
+
flexDirection: 'column',
|
|
98
|
+
gap: '16px'
|
|
99
|
+
}}>
|
|
100
|
+
<Typography weight="100">
|
|
101
|
+
{t('components.typography.stories.differentWeights.weight100')}
|
|
102
|
+
</Typography>
|
|
103
|
+
<Typography weight="200">
|
|
104
|
+
{t('components.typography.stories.differentWeights.weight200')}
|
|
105
|
+
</Typography>
|
|
106
|
+
<Typography weight="300">
|
|
107
|
+
{t('components.typography.stories.differentWeights.weight300')}
|
|
108
|
+
</Typography>
|
|
109
|
+
<Typography weight="400">
|
|
110
|
+
{t('components.typography.stories.differentWeights.weight400')}
|
|
111
|
+
</Typography>
|
|
112
|
+
<Typography weight="500">
|
|
113
|
+
{t('components.typography.stories.differentWeights.weight500')}
|
|
114
|
+
</Typography>
|
|
115
|
+
<Typography weight="600">
|
|
116
|
+
{t('components.typography.stories.differentWeights.weight600')}
|
|
117
|
+
</Typography>
|
|
118
|
+
<Typography weight="700">
|
|
119
|
+
{t('components.typography.stories.differentWeights.weight700')}
|
|
120
|
+
</Typography>
|
|
121
|
+
<Typography weight="800">
|
|
122
|
+
{t('components.typography.stories.differentWeights.weight800')}
|
|
123
|
+
</Typography>
|
|
124
|
+
<Typography weight="900">
|
|
125
|
+
{t('components.typography.stories.differentWeights.weight900')}
|
|
126
|
+
</Typography>
|
|
127
|
+
</div>
|
|
128
|
+
}`,...p.parameters?.docs?.source}}};i.parameters={...i.parameters,docs:{...i.parameters?.docs,source:{originalSource:`{
|
|
129
|
+
name: t('components.typography.stories.withColors.name'),
|
|
130
|
+
render: () => <div style={{
|
|
131
|
+
display: 'flex',
|
|
132
|
+
flexDirection: 'column',
|
|
133
|
+
gap: '16px'
|
|
134
|
+
}}>
|
|
135
|
+
<Typography color="alias-object-primary">
|
|
136
|
+
{t('components.typography.stories.withColors.primary')}
|
|
137
|
+
</Typography>
|
|
138
|
+
<Typography color="alias-object-secondary">
|
|
139
|
+
{t('components.typography.stories.withColors.secondary')}
|
|
140
|
+
</Typography>
|
|
141
|
+
<Typography color="alias-object-tertiary">
|
|
142
|
+
{t('components.typography.stories.withColors.tertiary')}
|
|
143
|
+
</Typography>
|
|
144
|
+
<Typography color="alias-object-danger">
|
|
145
|
+
{t('components.typography.stories.withColors.danger')}
|
|
146
|
+
</Typography>
|
|
147
|
+
<Typography color="alias-object-success">
|
|
148
|
+
{t('components.typography.stories.withColors.success')}
|
|
149
|
+
</Typography>
|
|
150
|
+
</div>
|
|
151
|
+
}`,...i.parameters?.docs?.source}}};n.parameters={...n.parameters,docs:{...n.parameters?.docs,source:{originalSource:`{
|
|
152
|
+
name: t('components.typography.stories.asDifferentElements.name'),
|
|
153
|
+
render: () => <div style={{
|
|
154
|
+
display: 'flex',
|
|
155
|
+
flexDirection: 'column',
|
|
156
|
+
gap: '16px'
|
|
157
|
+
}}>
|
|
158
|
+
<Typography component="h1" size="4x-large" weight="bold">
|
|
159
|
+
{t('components.typography.stories.asDifferentElements.heading1')}
|
|
160
|
+
</Typography>
|
|
161
|
+
<Typography component="h2" size="3x-large" weight="bold">
|
|
162
|
+
{t('components.typography.stories.asDifferentElements.heading2')}
|
|
163
|
+
</Typography>
|
|
164
|
+
<Typography component="h3" size="2x-large" weight="semibold">
|
|
165
|
+
{t('components.typography.stories.asDifferentElements.heading3')}
|
|
166
|
+
</Typography>
|
|
167
|
+
<Typography component="h4" size="x-large" weight="semibold">
|
|
168
|
+
{t('components.typography.stories.asDifferentElements.heading4')}
|
|
169
|
+
</Typography>
|
|
170
|
+
<Typography component="p" size="base">
|
|
171
|
+
{t('components.typography.stories.asDifferentElements.paragraph')}
|
|
172
|
+
</Typography>
|
|
173
|
+
<Typography component="span" size="small">
|
|
174
|
+
{t('components.typography.stories.asDifferentElements.span')}
|
|
175
|
+
</Typography>
|
|
176
|
+
</div>
|
|
177
|
+
}`,...n.parameters?.docs?.source}}};a.parameters={...a.parameters,docs:{...a.parameters?.docs,source:{originalSource:`{
|
|
178
|
+
render: () => <div style={{
|
|
179
|
+
display: 'flex',
|
|
180
|
+
flexDirection: 'column',
|
|
181
|
+
gap: '24px'
|
|
182
|
+
}}>
|
|
183
|
+
<Typography component="h2" size="x-large" weight="bold" color="alias-object-primary">
|
|
184
|
+
{t('components.typography.stories.completeExample.title')}
|
|
185
|
+
</Typography>
|
|
186
|
+
<Typography component="p" size="base" weight="regular">
|
|
187
|
+
{t('components.typography.stories.completeExample.paragraph')}
|
|
188
|
+
</Typography>
|
|
189
|
+
<Typography component="span" size="small" weight="medium" color="#666666">
|
|
190
|
+
{t('components.typography.stories.completeExample.caption')}
|
|
191
|
+
</Typography>
|
|
192
|
+
</div>
|
|
193
|
+
}`,...a.parameters?.docs?.source}}};y.parameters={...y.parameters,docs:{...y.parameters?.docs,source:{originalSource:`{
|
|
194
|
+
name: t('components.typography.stories.interactive.name'),
|
|
195
|
+
args: {
|
|
196
|
+
children: t('components.typography.stories.interactive.text'),
|
|
197
|
+
size: 'base',
|
|
198
|
+
weight: 'regular',
|
|
199
|
+
color: 'alias-object-primary',
|
|
200
|
+
component: 'div'
|
|
201
|
+
}
|
|
202
|
+
}`,...y.parameters?.docs?.source}}};const $=["Default","DifferentSizes","DifferentWeights","WithColors","AsDifferentElements","CompleteExample","Interactive"];export{n as AsDifferentElements,a as CompleteExample,s as Default,r as DifferentSizes,p as DifferentWeights,y as Interactive,i as WithColors,$ as __namedExportsOrder,D as default};
|