@v-miniapp/ui-react 1.0.41 → 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/external/index.js +1993 -2004
- package/dist/index.js +1011 -1022
- 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,69 @@
|
|
|
1
|
+
import{j as t}from"./iframe-CQAwSt4E.js";import{S as a,a as m,b as p}from"./section-content-DGNB4eLN.js";import{t as e}from"./store-D2RudmNr.js";import{T as u,S,M as l,P as h,a as y}from"./blocks-BuaOUtiH.js";import"./preload-helper-PPVm8Dsz.js";import"./classname-CUR_zgkh.js";import"./icon-DdQsMyRa.js";import"./colors-_6nFGM3e.js";import"./typography-DEpAJl_i.js";import"./index-DHiZ-gXR.js";const x=()=>{const d=`
|
|
2
|
+
## ${e("common.table.title")}
|
|
3
|
+
|
|
4
|
+
| ${e("common.table.name")} | ${e("common.table.type")} | ${e("common.table.required")} | ${e("common.table.description")} |
|
|
5
|
+
| :--- | :--- | :--- | :--- |
|
|
6
|
+
| \`space\` | \`boolean\` | ${e("common.table.no")} | ${e("components.section.spaceDescription")} |
|
|
7
|
+
| \`shape\` | \`'rounded' | 'square'\` | ${e("common.table.no")} | ${e("components.section.shapeDescription")} |
|
|
8
|
+
| \`children\` | \`ReactNode\` | ${e("common.table.no")} | ${e("components.section.childrenDescription")} |
|
|
9
|
+
| \`className\` | \`string\` | ${e("common.table.no")} | ${e("components.section.classNameDescription")} |
|
|
10
|
+
| \`...props\` | \`ComponentPropsWithRef<'div'>\` | ${e("common.table.no")} | ${e("components.section.propsDescription")} |
|
|
11
|
+
`;return t.jsxs(t.Fragment,{children:[t.jsx(u,{}),t.jsx(S,{}),t.jsx(l,{children:e("components.section.description")}),t.jsx(h,{}),t.jsx(l,{children:d}),t.jsx(y,{})]})},v={title:"Components/Section",component:a,parameters:{layout:"padded",docs:{page:x}},tags:["autodocs"],argTypes:{space:{control:"boolean",description:e("components.section.argTypes.spaceDescription"),table:{type:{summary:"boolean"},defaultValue:{summary:"true"}}},shape:{control:"select",options:["rounded","square"],description:e("components.section.argTypes.shapeDescription"),table:{type:{summary:'"rounded" | "square"'},defaultValue:{summary:"rounded"}}}}},n={storyName:e("components.section.stories.default.storyName"),name:e("components.section.stories.default.name"),args:{children:t.jsx("p",{children:e("components.section.stories.default.content")})}},o={storyName:e("components.section.stories.withoutSpacing.storyName"),name:e("components.section.stories.withoutSpacing.name"),args:{space:!1,children:t.jsx("p",{children:e("components.section.stories.withoutSpacing.content")})}},s={storyName:e("components.section.stories.squareShape.storyName"),name:e("components.section.stories.squareShape.name"),args:{shape:"square",children:t.jsx("p",{children:e("components.section.stories.squareShape.content")})}},i={storyName:e("components.section.stories.withTitleAndContent.storyName"),name:e("components.section.stories.withTitleAndContent.name"),render:()=>t.jsxs(a,{children:[t.jsx(m,{title:e("components.section.stories.withTitleAndContent.title")}),t.jsx(p,{children:t.jsx("p",{children:e("components.section.stories.withTitleAndContent.content")})})]})},c={storyName:e("components.section.stories.multipleSections.storyName"),name:e("components.section.stories.multipleSections.name"),render:()=>t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[t.jsxs(a,{children:[t.jsx(m,{title:e("components.section.stories.multipleSections.firstTitle")}),t.jsx(p,{children:t.jsx("p",{children:e("components.section.stories.multipleSections.firstContent")})})]}),t.jsxs(a,{children:[t.jsx(m,{title:e("components.section.stories.multipleSections.secondTitle")}),t.jsx(p,{children:t.jsx("p",{children:e("components.section.stories.multipleSections.secondContent")})})]})]})},r={storyName:e("components.section.stories.interactive.storyName"),name:e("components.section.stories.interactive.name"),args:{children:t.jsx("p",{children:e("components.section.stories.interactive.content")})}};n.parameters={...n.parameters,docs:{...n.parameters?.docs,source:{originalSource:`{
|
|
12
|
+
storyName: t('components.section.stories.default.storyName'),
|
|
13
|
+
name: t('components.section.stories.default.name'),
|
|
14
|
+
args: {
|
|
15
|
+
children: <p>{t('components.section.stories.default.content')}</p>
|
|
16
|
+
}
|
|
17
|
+
}`,...n.parameters?.docs?.source}}};o.parameters={...o.parameters,docs:{...o.parameters?.docs,source:{originalSource:`{
|
|
18
|
+
storyName: t('components.section.stories.withoutSpacing.storyName'),
|
|
19
|
+
name: t('components.section.stories.withoutSpacing.name'),
|
|
20
|
+
args: {
|
|
21
|
+
space: false,
|
|
22
|
+
children: <p>{t('components.section.stories.withoutSpacing.content')}</p>
|
|
23
|
+
}
|
|
24
|
+
}`,...o.parameters?.docs?.source}}};s.parameters={...s.parameters,docs:{...s.parameters?.docs,source:{originalSource:`{
|
|
25
|
+
storyName: t('components.section.stories.squareShape.storyName'),
|
|
26
|
+
name: t('components.section.stories.squareShape.name'),
|
|
27
|
+
args: {
|
|
28
|
+
shape: 'square',
|
|
29
|
+
children: <p>{t('components.section.stories.squareShape.content')}</p>
|
|
30
|
+
}
|
|
31
|
+
}`,...s.parameters?.docs?.source}}};i.parameters={...i.parameters,docs:{...i.parameters?.docs,source:{originalSource:`{
|
|
32
|
+
storyName: t('components.section.stories.withTitleAndContent.storyName'),
|
|
33
|
+
name: t('components.section.stories.withTitleAndContent.name'),
|
|
34
|
+
render: () => <Section>
|
|
35
|
+
<SectionTitle title={t('components.section.stories.withTitleAndContent.title')} />
|
|
36
|
+
<SectionContent>
|
|
37
|
+
<p>{t('components.section.stories.withTitleAndContent.content')}</p>
|
|
38
|
+
</SectionContent>
|
|
39
|
+
</Section>
|
|
40
|
+
}`,...i.parameters?.docs?.source}}};c.parameters={...c.parameters,docs:{...c.parameters?.docs,source:{originalSource:`{
|
|
41
|
+
storyName: t('components.section.stories.multipleSections.storyName'),
|
|
42
|
+
name: t('components.section.stories.multipleSections.name'),
|
|
43
|
+
render: () => <div style={{
|
|
44
|
+
display: 'flex',
|
|
45
|
+
flexDirection: 'column',
|
|
46
|
+
gap: '16px'
|
|
47
|
+
}}>
|
|
48
|
+
<Section>
|
|
49
|
+
<SectionTitle title={t('components.section.stories.multipleSections.firstTitle')} />
|
|
50
|
+
<SectionContent>
|
|
51
|
+
<p>{t('components.section.stories.multipleSections.firstContent')}</p>
|
|
52
|
+
</SectionContent>
|
|
53
|
+
</Section>
|
|
54
|
+
<Section>
|
|
55
|
+
<SectionTitle title={t('components.section.stories.multipleSections.secondTitle')} />
|
|
56
|
+
<SectionContent>
|
|
57
|
+
<p>
|
|
58
|
+
{t('components.section.stories.multipleSections.secondContent')}
|
|
59
|
+
</p>
|
|
60
|
+
</SectionContent>
|
|
61
|
+
</Section>
|
|
62
|
+
</div>
|
|
63
|
+
}`,...c.parameters?.docs?.source}}};r.parameters={...r.parameters,docs:{...r.parameters?.docs,source:{originalSource:`{
|
|
64
|
+
storyName: t('components.section.stories.interactive.storyName'),
|
|
65
|
+
name: t('components.section.stories.interactive.name'),
|
|
66
|
+
args: {
|
|
67
|
+
children: <p>{t('components.section.stories.interactive.content')}</p>
|
|
68
|
+
}
|
|
69
|
+
}`,...r.parameters?.docs?.source}}};const D=["Default","WithoutSpacing","SquareShape","WithSectionTitleAndContent","MultipleSections","Interactive"];export{n as Default,r as Interactive,c as MultipleSections,s as SquareShape,i as WithSectionTitleAndContent,o as WithoutSpacing,D as __namedExportsOrder,v as default};
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import{j as t,r as c}from"./iframe-CQAwSt4E.js";import{S as r,d as p,e as i,f}from"./chip-kG4p82WT.js";import{B as s}from"./button-CL7GeC23.js";import{t as e}from"./store-D2RudmNr.js";import{T as C,S as x,M as B,P as j,a as y}from"./blocks-BuaOUtiH.js";import"./preload-helper-PPVm8Dsz.js";import"./classname-CUR_zgkh.js";import"./icon-DdQsMyRa.js";import"./colors-_6nFGM3e.js";import"./navigation-bar-vI-FPasP.js";import"./visibility-sensor-CwrzJO06.js";import"./index-B-Ksafg0.js";import"./store-CPumdfcU.js";import"./_setToString-CbM921C9.js";import"./react-hufnxGVs.js";import"./omit-Bsx5nTI0.js";import"./pick-BhmhLmLe.js";import"./image-C3EsNRhz.js";import"./typography-DEpAJl_i.js";import"./bottom-tab-bar-CtcTAxuI.js";import"./toast-provider-DurnMJhd.js";import"./carousel-1Kww3hIz.js";import"./embla-carousel-react.esm-BYjpaHZ9.js";import"./pagination-DZHoBs_4.js";import"./section-content-DGNB4eLN.js";import"./option-item-LRh_OyV4.js";import"./index-BV0AJWP6.js";import"./alert-DLW8CoyB.js";import"./skeleton-C91JgehG.js";import"./label-DV2iCDmN.js";import"./input-wrapper-BKHgnPy6.js";import"./text-field-jK6rpOo2.js";import"./number-field-CXKmnfKe.js";import"./checkbox-MGytNNRt.js";import"./radio-B5NJxG_l.js";import"./date-Cg-Uk_pp.js";import"./date-picker-Dnq_-0Md.js";import"./calendar-dOCsjhVU.js";import"./search-field-CQqgFbfg.js";import"./text-area-DwSXyqOe.js";import"./avatar-GxcYPA1p.js";import"./badge-D_LzMVtw.js";import"./switch-p-aXI-ev.js";import"./tab-bar-CSeCmtIZ.js";import"./rating-BdXViYBv.js";import"./tooltip-QDdel5My.js";import"./index-DHiZ-gXR.js";const b=()=>{const n=`
|
|
2
|
+
## ${e("common.table.title")}
|
|
3
|
+
|
|
4
|
+
| ${e("common.table.name")} | ${e("common.table.type")} | ${e("common.table.required")} | ${e("common.table.description")} |
|
|
5
|
+
| :--- | :--- | :--- | :--- |
|
|
6
|
+
| \`open\` | \`boolean\` | ${e("common.table.no")} | ${e("components.sheet.openDescription")} |
|
|
7
|
+
| \`onBackdropClick\` | \`(e: React.MouseEvent) => void\` | ${e("common.table.no")} | ${e("components.sheet.onBackdropClickDescription")} |
|
|
8
|
+
| \`portal\` | \`boolean\` | ${e("common.table.no")} | ${e("components.sheet.portalDescription")} |
|
|
9
|
+
| \`overlay\` | \`'default' | 'blur'\` | ${e("common.table.no")} | ${e("components.sheet.overlayDescription")} |
|
|
10
|
+
| \`children\` | \`ReactNode\` | ${e("common.table.no")} | ${e("components.sheet.childrenDescription")} |
|
|
11
|
+
| \`className\` | \`string\` | ${e("common.table.no")} | ${e("components.sheet.classNameDescription")} |
|
|
12
|
+
|
|
13
|
+
### SheetHeader
|
|
14
|
+
|
|
15
|
+
| ${e("common.table.name")} | ${e("common.table.type")} | ${e("common.table.required")} | ${e("common.table.description")} |
|
|
16
|
+
| :--- | :--- | :--- | :--- |
|
|
17
|
+
| \`title\` | \`string\` | ${e("common.table.no")} | ${e("components.sheet.titleDescription")} |
|
|
18
|
+
| \`backIcon\` | \`boolean\` | ${e("common.table.no")} | ${e("components.sheet.backIconDescription")} |
|
|
19
|
+
| \`closeIcon\` | \`boolean\` | ${e("common.table.no")} | ${e("components.sheet.closeIconDescription")} |
|
|
20
|
+
| \`onBackClick\` | \`() => void\` | ${e("common.table.no")} | ${e("components.sheet.onBackClickDescription")} |
|
|
21
|
+
| \`onCloseClick\` | \`() => void\` | ${e("common.table.no")} | ${e("components.sheet.onCloseClickDescription")} |
|
|
22
|
+
|
|
23
|
+
### SheetBody
|
|
24
|
+
|
|
25
|
+
| ${e("common.table.name")} | ${e("common.table.type")} | ${e("common.table.required")} | ${e("common.table.description")} |
|
|
26
|
+
| :--- | :--- | :--- | :--- |
|
|
27
|
+
| \`horizontalSpace\` | \`boolean\` | ${e("common.table.no")} | ${e("components.sheet.horizontalSpaceDescription")} |
|
|
28
|
+
`;return t.jsxs(t.Fragment,{children:[t.jsx(C,{}),t.jsx(x,{}),t.jsx(B,{children:e("components.sheet.description")}),t.jsx(j,{}),t.jsx(B,{children:n}),t.jsx(y,{})]})},Be={title:"Components/Sheet",component:r,parameters:{layout:"fullscreen",docs:{page:b}},tags:["autodocs"],argTypes:{open:{control:"boolean",description:e("components.sheet.argTypes.openDescription"),table:{type:{summary:"boolean"}}},onBackdropClick:{action:"backdrop-clicked",description:e("components.sheet.argTypes.onBackdropClickDescription"),table:{type:{summary:"(e: React.MouseEvent) => void"}}},portal:{control:"boolean",description:e("components.sheet.argTypes.portalDescription"),table:{type:{summary:"boolean"}}},overlay:{control:"select",options:["default","blur"],description:e("components.sheet.argTypes.overlayDescription"),table:{type:{summary:"default | blur"}}},children:{description:e("components.sheet.argTypes.childrenDescription"),table:{type:{summary:"ReactNode"}}},className:{description:e("components.sheet.argTypes.classNameDescription"),table:{type:{summary:"string"}}}}},l={name:e("components.sheet.stories.default.name"),render:()=>{const[n,o]=c.useState(!1),[S,a]=c.useState(!1);return t.jsxs("div",{children:[t.jsx(s,{theme:"neutral",onClick:()=>o(!0),children:e("components.sheet.stories.default.openButton")}),t.jsxs(r,{open:S,portal:!0,onBackdropClick:()=>a(!1),children:[t.jsx(p,{title:e("components.sheet.stories.default.title2"),closeIcon:!0,onCloseClick:()=>a(!1)}),t.jsx(i,{children:t.jsx("p",{children:e("components.sheet.stories.default.content2")})})]}),t.jsxs(r,{open:n,portal:!0,onBackdropClick:()=>o(!1),children:[t.jsx(p,{title:e("components.sheet.stories.default.title"),closeIcon:!0,onCloseClick:()=>o(!1)}),t.jsxs(i,{children:[t.jsx("p",{children:e("components.sheet.stories.default.content")}),t.jsx(s,{theme:"neutral",onClick:()=>a(!0),style:{marginTop:"16px"},children:e("components.sheet.stories.default.open2")})]})]})]})}},m={name:e("components.sheet.stories.withFooter.name"),render:()=>{const[n,o]=c.useState(!1);return t.jsxs("div",{children:[t.jsx(s,{theme:"neutral",onClick:()=>o(!0),children:e("components.sheet.stories.withFooter.openButton")}),t.jsxs(r,{open:n,onBackdropClick:()=>o(!1),children:[t.jsx(p,{title:e("components.sheet.stories.withFooter.title")}),t.jsx(i,{children:t.jsx("p",{children:e("components.sheet.stories.withFooter.content")})}),t.jsxs(f,{children:[t.jsx(s,{theme:"neutral",onClick:()=>o(!1),children:e("common.actions.cancel")}),t.jsx(s,{theme:"neutral",onClick:()=>o(!1),children:e("common.actions.confirm")})]})]})]})}},h={name:e("components.sheet.stories.withBackIcon.name"),render:()=>{const[n,o]=c.useState(!1);return t.jsxs("div",{children:[t.jsx(s,{theme:"neutral",onClick:()=>o(!0),children:e("components.sheet.stories.withBackIcon.openButton")}),t.jsxs(r,{open:n,onBackdropClick:()=>o(!1),children:[t.jsx(p,{title:e("components.sheet.stories.withBackIcon.title"),backIcon:!0,onBackClick:()=>o(!1)}),t.jsx(i,{children:e("components.sheet.stories.withBackIcon.content")})]})]})}},d={name:e("components.sheet.stories.withoutHorizontalSpace.name"),render:()=>{const[n,o]=c.useState(!1);return t.jsxs("div",{children:[t.jsx(s,{theme:"neutral",onClick:()=>o(!0),children:e("components.sheet.stories.withoutHorizontalSpace.openButton")}),t.jsx(r,{open:n,onBackdropClick:()=>o(!1),children:t.jsx(i,{horizontalSpace:!1,children:t.jsx("p",{children:e("components.sheet.stories.withoutHorizontalSpace.content")})})})]})}},u={name:e("components.sheet.stories.nested.name"),render:()=>{const[n,o]=c.useState(!1),[S,a]=c.useState(!1);return t.jsxs("div",{children:[t.jsx(s,{theme:"neutral",onClick:()=>o(!0),children:e("components.sheet.stories.nested.openButton")}),t.jsxs(r,{open:n,onBackdropClick:()=>o(!1),children:[t.jsx(p,{title:e("components.sheet.stories.nested.title"),closeIcon:!0,onCloseClick:()=>o(!1)}),t.jsxs(i,{children:[t.jsx("p",{children:e("components.sheet.stories.nested.content")}),t.jsx(s,{theme:"neutral",onClick:()=>a(!0),style:{marginTop:"16px"},children:e("components.sheet.stories.nested.openNestedButton")})]})]}),t.jsxs(r,{open:S,onBackdropClick:()=>a(!1),children:[t.jsx(p,{title:e("components.sheet.stories.nested.nestedTitle"),closeIcon:!0,onCloseClick:()=>a(!1)}),t.jsx(i,{children:t.jsx("p",{children:e("components.sheet.stories.nested.nestedContent")})})]})]})}},k={name:e("components.sheet.stories.interactive.name"),render:()=>{const[n,o]=c.useState(!0);return t.jsxs(r,{open:n,onBackdropClick:()=>o(!1),children:[t.jsx(p,{title:e("components.sheet.stories.interactive.title"),closeIcon:!0,onCloseClick:()=>o(!1)}),t.jsx(i,{children:t.jsx("p",{children:e("components.sheet.stories.interactive.content")})})]})}};l.parameters={...l.parameters,docs:{...l.parameters?.docs,source:{originalSource:`{
|
|
29
|
+
name: t('components.sheet.stories.default.name'),
|
|
30
|
+
render: () => {
|
|
31
|
+
const [open, setOpen] = useState(false);
|
|
32
|
+
const [open2, setOpen2] = useState(false);
|
|
33
|
+
return <div>
|
|
34
|
+
<Button theme="neutral" onClick={() => setOpen(true)}>
|
|
35
|
+
{t('components.sheet.stories.default.openButton')}
|
|
36
|
+
</Button>
|
|
37
|
+
<Sheet open={open2} portal onBackdropClick={() => setOpen2(false)}>
|
|
38
|
+
<SheetHeader title={t('components.sheet.stories.default.title2')} closeIcon onCloseClick={() => setOpen2(false)} />
|
|
39
|
+
<SheetBody>
|
|
40
|
+
<p>{t('components.sheet.stories.default.content2')}</p>
|
|
41
|
+
</SheetBody>
|
|
42
|
+
</Sheet>
|
|
43
|
+
<Sheet open={open} portal onBackdropClick={() => setOpen(false)}>
|
|
44
|
+
<SheetHeader title={t('components.sheet.stories.default.title')} closeIcon onCloseClick={() => setOpen(false)} />
|
|
45
|
+
<SheetBody>
|
|
46
|
+
<p>{t('components.sheet.stories.default.content')}</p>
|
|
47
|
+
<Button theme="neutral" onClick={() => setOpen2(true)} style={{
|
|
48
|
+
marginTop: '16px'
|
|
49
|
+
}}>
|
|
50
|
+
{t('components.sheet.stories.default.open2')}
|
|
51
|
+
</Button>
|
|
52
|
+
</SheetBody>
|
|
53
|
+
</Sheet>
|
|
54
|
+
</div>;
|
|
55
|
+
}
|
|
56
|
+
}`,...l.parameters?.docs?.source}}};m.parameters={...m.parameters,docs:{...m.parameters?.docs,source:{originalSource:`{
|
|
57
|
+
name: t('components.sheet.stories.withFooter.name'),
|
|
58
|
+
render: () => {
|
|
59
|
+
const [open, setOpen] = useState(false);
|
|
60
|
+
return <div>
|
|
61
|
+
<Button theme="neutral" onClick={() => setOpen(true)}>
|
|
62
|
+
{t('components.sheet.stories.withFooter.openButton')}
|
|
63
|
+
</Button>
|
|
64
|
+
<Sheet open={open} onBackdropClick={() => setOpen(false)}>
|
|
65
|
+
<SheetHeader title={t('components.sheet.stories.withFooter.title')} />
|
|
66
|
+
<SheetBody>
|
|
67
|
+
<p>{t('components.sheet.stories.withFooter.content')}</p>
|
|
68
|
+
</SheetBody>
|
|
69
|
+
<SheetFooter>
|
|
70
|
+
<Button theme="neutral" onClick={() => setOpen(false)}>
|
|
71
|
+
{t('common.actions.cancel')}
|
|
72
|
+
</Button>
|
|
73
|
+
<Button theme="neutral" onClick={() => setOpen(false)}>
|
|
74
|
+
{t('common.actions.confirm')}
|
|
75
|
+
</Button>
|
|
76
|
+
</SheetFooter>
|
|
77
|
+
</Sheet>
|
|
78
|
+
</div>;
|
|
79
|
+
}
|
|
80
|
+
}`,...m.parameters?.docs?.source}}};h.parameters={...h.parameters,docs:{...h.parameters?.docs,source:{originalSource:`{
|
|
81
|
+
name: t('components.sheet.stories.withBackIcon.name'),
|
|
82
|
+
render: () => {
|
|
83
|
+
const [open, setOpen] = useState(false);
|
|
84
|
+
return <div>
|
|
85
|
+
<Button theme="neutral" onClick={() => setOpen(true)}>
|
|
86
|
+
{t('components.sheet.stories.withBackIcon.openButton')}
|
|
87
|
+
</Button>
|
|
88
|
+
<Sheet open={open} onBackdropClick={() => setOpen(false)}>
|
|
89
|
+
<SheetHeader title={t('components.sheet.stories.withBackIcon.title')} backIcon onBackClick={() => setOpen(false)} />
|
|
90
|
+
<SheetBody>
|
|
91
|
+
{t('components.sheet.stories.withBackIcon.content')}
|
|
92
|
+
</SheetBody>
|
|
93
|
+
</Sheet>
|
|
94
|
+
</div>;
|
|
95
|
+
}
|
|
96
|
+
}`,...h.parameters?.docs?.source}}};d.parameters={...d.parameters,docs:{...d.parameters?.docs,source:{originalSource:`{
|
|
97
|
+
name: t('components.sheet.stories.withoutHorizontalSpace.name'),
|
|
98
|
+
render: () => {
|
|
99
|
+
const [open, setOpen] = useState(false);
|
|
100
|
+
return <div>
|
|
101
|
+
<Button theme="neutral" onClick={() => setOpen(true)}>
|
|
102
|
+
{t('components.sheet.stories.withoutHorizontalSpace.openButton')}
|
|
103
|
+
</Button>
|
|
104
|
+
<Sheet open={open} onBackdropClick={() => setOpen(false)}>
|
|
105
|
+
<SheetBody horizontalSpace={false}>
|
|
106
|
+
<p>
|
|
107
|
+
{t('components.sheet.stories.withoutHorizontalSpace.content')}
|
|
108
|
+
</p>
|
|
109
|
+
</SheetBody>
|
|
110
|
+
</Sheet>
|
|
111
|
+
</div>;
|
|
112
|
+
}
|
|
113
|
+
}`,...d.parameters?.docs?.source}}};u.parameters={...u.parameters,docs:{...u.parameters?.docs,source:{originalSource:`{
|
|
114
|
+
name: t('components.sheet.stories.nested.name'),
|
|
115
|
+
render: () => {
|
|
116
|
+
const [open, setOpen] = useState(false);
|
|
117
|
+
const [openNested, setOpenNested] = useState(false);
|
|
118
|
+
return <div>
|
|
119
|
+
<Button theme="neutral" onClick={() => setOpen(true)}>
|
|
120
|
+
{t('components.sheet.stories.nested.openButton')}
|
|
121
|
+
</Button>
|
|
122
|
+
<Sheet open={open} onBackdropClick={() => setOpen(false)}>
|
|
123
|
+
<SheetHeader title={t('components.sheet.stories.nested.title')} closeIcon onCloseClick={() => setOpen(false)} />
|
|
124
|
+
<SheetBody>
|
|
125
|
+
<p>{t('components.sheet.stories.nested.content')}</p>
|
|
126
|
+
<Button theme="neutral" onClick={() => setOpenNested(true)} style={{
|
|
127
|
+
marginTop: '16px'
|
|
128
|
+
}}>
|
|
129
|
+
{t('components.sheet.stories.nested.openNestedButton')}
|
|
130
|
+
</Button>
|
|
131
|
+
</SheetBody>
|
|
132
|
+
</Sheet>
|
|
133
|
+
<Sheet open={openNested} onBackdropClick={() => setOpenNested(false)}>
|
|
134
|
+
<SheetHeader title={t('components.sheet.stories.nested.nestedTitle')} closeIcon onCloseClick={() => setOpenNested(false)} />
|
|
135
|
+
<SheetBody>
|
|
136
|
+
<p>{t('components.sheet.stories.nested.nestedContent')}</p>
|
|
137
|
+
</SheetBody>
|
|
138
|
+
</Sheet>
|
|
139
|
+
</div>;
|
|
140
|
+
}
|
|
141
|
+
}`,...u.parameters?.docs?.source}}};k.parameters={...k.parameters,docs:{...k.parameters?.docs,source:{originalSource:`{
|
|
142
|
+
name: t('components.sheet.stories.interactive.name'),
|
|
143
|
+
render: () => {
|
|
144
|
+
const [open, setOpen] = useState(true);
|
|
145
|
+
return <Sheet open={open} onBackdropClick={() => setOpen(false)}>
|
|
146
|
+
<SheetHeader title={t('components.sheet.stories.interactive.title')} closeIcon onCloseClick={() => setOpen(false)} />
|
|
147
|
+
<SheetBody>
|
|
148
|
+
<p>{t('components.sheet.stories.interactive.content')}</p>
|
|
149
|
+
</SheetBody>
|
|
150
|
+
</Sheet>;
|
|
151
|
+
}
|
|
152
|
+
}`,...k.parameters?.docs?.source}}};const fe=["Default","WithSheetFooter","SheetHeaderWithBackIcon","SheetBodyWithoutHorizontalSpace","Nested","Interactive"];export{l as Default,k as Interactive,u as Nested,d as SheetBodyWithoutHorizontalSpace,h as SheetHeaderWithBackIcon,m as WithSheetFooter,fe as __namedExportsOrder,Be as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r}from"./iframe-CQAwSt4E.js";import{c as n,g as u}from"./classname-CUR_zgkh.js";const s=u("skeleton"),o=({animated:e=!0,className:t,width:l,height:a,shape:m="square",...i})=>r.jsx("div",{...i,className:n(s,`${s}--${m}`,{[`${s}--animated`]:e},t),style:{...l?{"--width":l+(typeof l=="number"?"px":"")}:{},...a?{"--height":a+(typeof a=="number"?"px":"")}:{}}}),d=e=>r.jsx(o,{...e,className:n(`${s}--title`,e.className)}),p=({lineCount:e=3,...t})=>r.jsx("div",{children:new Array(e).fill(0).map((l,a)=>r.jsx(o,{...t,className:n(`${s}__paragraph-line`,t.className)},a))});o.__docgenInfo={description:"",methods:[],displayName:"Skeleton",props:{animated:{defaultValue:{value:"true",computed:!1},required:!1},shape:{defaultValue:{value:"'square'",computed:!1},required:!1}}};d.__docgenInfo={description:"",methods:[],displayName:"SkeletonTitle"};p.__docgenInfo={description:"",methods:[],displayName:"SkeletonParagraph",props:{lineCount:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"3",computed:!1}}}};export{o as S,d as a,p as b};
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import{j as n}from"./iframe-CQAwSt4E.js";import{S as m,a as d,b as l}from"./skeleton-C91JgehG.js";import{t as e}from"./store-D2RudmNr.js";import{T as g,S as u,M as c,P as x,a as k}from"./blocks-BuaOUtiH.js";import"./preload-helper-PPVm8Dsz.js";import"./classname-CUR_zgkh.js";import"./index-DHiZ-gXR.js";const S=()=>{const h=`
|
|
2
|
+
## ${e("common.table.title")}
|
|
3
|
+
|
|
4
|
+
### Skeleton
|
|
5
|
+
|
|
6
|
+
| ${e("common.table.name")} | ${e("common.table.type")} | ${e("common.table.required")} | ${e("common.table.description")} |
|
|
7
|
+
| :--- | :--- | :--- | :--- |
|
|
8
|
+
| \`width\` | \`number | string\` | ${e("common.table.no")} | ${e("components.skeleton.widthDescription")} |
|
|
9
|
+
| \`height\` | \`number | string\` | ${e("common.table.no")} | ${e("components.skeleton.heightDescription")} |
|
|
10
|
+
| \`shape\` | \`'rounded' | 'rounded-8' | 'rounded-4' | 'pill' | 'none'\` | ${e("common.table.no")} | ${e("components.skeleton.shapeDescription")} |
|
|
11
|
+
| \`animated\` | \`boolean\` | ${e("common.table.no")} | ${e("components.skeleton.animatedDescription")} |
|
|
12
|
+
| \`className\` | \`string\` | ${e("common.table.no")} | ${e("components.skeleton.classNameDescription")} |
|
|
13
|
+
| \`...props\` | \`ComponentPropsWithRef<'div'>\` | ${e("common.table.no")} | ${e("components.skeleton.propsDescription")} |
|
|
14
|
+
|
|
15
|
+
### SkeletonTitle & SkeletonParagraph
|
|
16
|
+
|
|
17
|
+
| ${e("common.table.name")} | ${e("common.table.type")} | ${e("common.table.required")} | ${e("common.table.description")} |
|
|
18
|
+
| :--- | :--- | :--- | :--- |
|
|
19
|
+
| \`lineCount\` | \`number\` | ${e("common.table.no")} | ${e("components.skeleton.lineCountDescription")} |
|
|
20
|
+
| \`paragraphProps\` | \`object\` | ${e("common.table.no")} | ${e("components.skeleton.paragraphPropsDescription")} |
|
|
21
|
+
| \`title\` | \`boolean\` | ${e("common.table.no")} | ${e("components.skeleton.titleDescription")} |
|
|
22
|
+
| \`paragraph\` | \`boolean\` | ${e("common.table.no")} | ${e("components.skeleton.paragraphDescription")} |
|
|
23
|
+
`;return n.jsxs(n.Fragment,{children:[n.jsx(g,{}),n.jsx(u,{}),n.jsx(c,{children:e("components.skeleton.description")}),n.jsx(x,{}),n.jsx(c,{children:h}),n.jsx(k,{})]})},w={title:"Components/Skeleton",component:m,parameters:{layout:"padded",docs:{page:S}},tags:["autodocs"],argTypes:{width:{control:"text",description:e("components.skeleton.argTypes.widthDescription"),table:{type:{summary:"number | string"}}},height:{control:"text",description:e("components.skeleton.argTypes.heightDescription"),table:{type:{summary:"number | string"}}},shape:{control:"select",options:["rounded","rounded-8","rounded-4","pill","none"],description:e("components.skeleton.argTypes.shapeDescription"),table:{type:{summary:'"rounded" | "rounded-8" | "rounded-4" | "pill" | "none"'}}},animated:{control:"boolean",description:e("components.skeleton.argTypes.animatedDescription"),table:{type:{summary:"boolean"},defaultValue:{summary:"true"}}},className:{description:e("components.skeleton.argTypes.classNameDescription"),table:{type:{summary:"string"}}}}},t={name:e("components.skeleton.stories.default.name"),args:{width:200,height:20}},o={name:e("components.skeleton.stories.differentShapes.name"),render:()=>n.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[n.jsxs("div",{children:[n.jsx("p",{style:{marginBottom:"8px"},children:e("components.skeleton.stories.differentShapes.rounded")}),n.jsx(m,{width:200,height:20,shape:"rounded"})]}),n.jsxs("div",{children:[n.jsx("p",{style:{marginBottom:"8px"},children:e("components.skeleton.stories.differentShapes.pill")}),n.jsx(m,{width:200,height:20,shape:"pill"})]}),n.jsxs("div",{children:[n.jsx("p",{style:{marginBottom:"8px"},children:e("components.skeleton.stories.differentShapes.square")}),n.jsx(m,{width:200,height:20,shape:"none"})]})]})},s={name:e("components.skeleton.stories.titleComponent.name"),render:()=>n.jsxs("div",{children:[n.jsx("h3",{style:{marginBottom:"12px"},children:e("components.skeleton.stories.titleComponent.title")}),n.jsx(d,{width:300,height:24})]})},r={name:e("components.skeleton.stories.paragraphComponent.name"),render:()=>n.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[n.jsxs("div",{children:[n.jsx("h3",{style:{marginBottom:"12px"},children:e("components.skeleton.stories.paragraphComponent.defaultTitle")}),n.jsx(l,{})]}),n.jsxs("div",{children:[n.jsx("h3",{style:{marginBottom:"12px"},children:e("components.skeleton.stories.paragraphComponent.customLineCountTitle")}),n.jsx(l,{lineCount:5})]}),n.jsxs("div",{children:[n.jsx("h3",{style:{marginBottom:"12px"},children:e("components.skeleton.stories.paragraphComponent.customSizeTitle")}),n.jsx(l,{lineCount:3,width:400,height:16})]})]})},a={name:e("components.skeleton.stories.withoutAnimation.name"),args:{width:200,height:20,animated:!1}},i={name:e("components.skeleton.stories.loadingStatePattern.name"),render:()=>n.jsx("div",{children:n.jsxs(n.Fragment,{children:[n.jsx(d,{width:300,height:24}),n.jsx("div",{style:{marginTop:"16px"},children:n.jsx(l,{lineCount:3})})]})})},p={name:e("components.skeleton.stories.interactive.name"),args:{width:200,height:20,shape:"rounded"}};t.parameters={...t.parameters,docs:{...t.parameters?.docs,source:{originalSource:`{
|
|
24
|
+
name: t('components.skeleton.stories.default.name'),
|
|
25
|
+
args: {
|
|
26
|
+
width: 200,
|
|
27
|
+
height: 20
|
|
28
|
+
}
|
|
29
|
+
}`,...t.parameters?.docs?.source}}};o.parameters={...o.parameters,docs:{...o.parameters?.docs,source:{originalSource:`{
|
|
30
|
+
name: t('components.skeleton.stories.differentShapes.name'),
|
|
31
|
+
render: () => <div style={{
|
|
32
|
+
display: 'flex',
|
|
33
|
+
flexDirection: 'column',
|
|
34
|
+
gap: '16px'
|
|
35
|
+
}}>
|
|
36
|
+
<div>
|
|
37
|
+
<p style={{
|
|
38
|
+
marginBottom: '8px'
|
|
39
|
+
}}>
|
|
40
|
+
{t('components.skeleton.stories.differentShapes.rounded')}
|
|
41
|
+
</p>
|
|
42
|
+
<Skeleton width={200} height={20} shape="rounded" />
|
|
43
|
+
</div>
|
|
44
|
+
<div>
|
|
45
|
+
<p style={{
|
|
46
|
+
marginBottom: '8px'
|
|
47
|
+
}}>
|
|
48
|
+
{t('components.skeleton.stories.differentShapes.pill')}
|
|
49
|
+
</p>
|
|
50
|
+
<Skeleton width={200} height={20} shape="pill" />
|
|
51
|
+
</div>
|
|
52
|
+
<div>
|
|
53
|
+
<p style={{
|
|
54
|
+
marginBottom: '8px'
|
|
55
|
+
}}>
|
|
56
|
+
{t('components.skeleton.stories.differentShapes.square')}
|
|
57
|
+
</p>
|
|
58
|
+
<Skeleton width={200} height={20} shape="none" />
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
}`,...o.parameters?.docs?.source}}};s.parameters={...s.parameters,docs:{...s.parameters?.docs,source:{originalSource:`{
|
|
62
|
+
name: t('components.skeleton.stories.titleComponent.name'),
|
|
63
|
+
render: () => <div>
|
|
64
|
+
<h3 style={{
|
|
65
|
+
marginBottom: '12px'
|
|
66
|
+
}}>
|
|
67
|
+
{t('components.skeleton.stories.titleComponent.title')}
|
|
68
|
+
</h3>
|
|
69
|
+
<SkeletonTitle width={300} height={24} />
|
|
70
|
+
</div>
|
|
71
|
+
}`,...s.parameters?.docs?.source}}};r.parameters={...r.parameters,docs:{...r.parameters?.docs,source:{originalSource:`{
|
|
72
|
+
name: t('components.skeleton.stories.paragraphComponent.name'),
|
|
73
|
+
render: () => <div style={{
|
|
74
|
+
display: 'flex',
|
|
75
|
+
flexDirection: 'column',
|
|
76
|
+
gap: '16px'
|
|
77
|
+
}}>
|
|
78
|
+
<div>
|
|
79
|
+
<h3 style={{
|
|
80
|
+
marginBottom: '12px'
|
|
81
|
+
}}>
|
|
82
|
+
{t('components.skeleton.stories.paragraphComponent.defaultTitle')}
|
|
83
|
+
</h3>
|
|
84
|
+
<SkeletonParagraph />
|
|
85
|
+
</div>
|
|
86
|
+
<div>
|
|
87
|
+
<h3 style={{
|
|
88
|
+
marginBottom: '12px'
|
|
89
|
+
}}>
|
|
90
|
+
{t('components.skeleton.stories.paragraphComponent.customLineCountTitle')}
|
|
91
|
+
</h3>
|
|
92
|
+
<SkeletonParagraph lineCount={5} />
|
|
93
|
+
</div>
|
|
94
|
+
<div>
|
|
95
|
+
<h3 style={{
|
|
96
|
+
marginBottom: '12px'
|
|
97
|
+
}}>
|
|
98
|
+
{t('components.skeleton.stories.paragraphComponent.customSizeTitle')}
|
|
99
|
+
</h3>
|
|
100
|
+
<SkeletonParagraph lineCount={3} width={400} height={16} />
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
}`,...r.parameters?.docs?.source}}};a.parameters={...a.parameters,docs:{...a.parameters?.docs,source:{originalSource:`{
|
|
104
|
+
name: t('components.skeleton.stories.withoutAnimation.name'),
|
|
105
|
+
args: {
|
|
106
|
+
width: 200,
|
|
107
|
+
height: 20,
|
|
108
|
+
animated: false
|
|
109
|
+
}
|
|
110
|
+
}`,...a.parameters?.docs?.source}}};i.parameters={...i.parameters,docs:{...i.parameters?.docs,source:{originalSource:`{
|
|
111
|
+
name: t('components.skeleton.stories.loadingStatePattern.name'),
|
|
112
|
+
render: () => {
|
|
113
|
+
const loading = true;
|
|
114
|
+
return <div>
|
|
115
|
+
{loading ? <>
|
|
116
|
+
<SkeletonTitle width={300} height={24} />
|
|
117
|
+
<div style={{
|
|
118
|
+
marginTop: '16px'
|
|
119
|
+
}}>
|
|
120
|
+
<SkeletonParagraph lineCount={3} />
|
|
121
|
+
</div>
|
|
122
|
+
</> : <>
|
|
123
|
+
<h1>
|
|
124
|
+
{t('components.skeleton.stories.loadingStatePattern.actualTitle')}
|
|
125
|
+
</h1>
|
|
126
|
+
<p>
|
|
127
|
+
{t('components.skeleton.stories.loadingStatePattern.actualContent')}
|
|
128
|
+
</p>
|
|
129
|
+
</>}
|
|
130
|
+
</div>;
|
|
131
|
+
}
|
|
132
|
+
}`,...i.parameters?.docs?.source}}};p.parameters={...p.parameters,docs:{...p.parameters?.docs,source:{originalSource:`{
|
|
133
|
+
name: t('components.skeleton.stories.interactive.name'),
|
|
134
|
+
args: {
|
|
135
|
+
width: 200,
|
|
136
|
+
height: 20,
|
|
137
|
+
shape: 'rounded'
|
|
138
|
+
}
|
|
139
|
+
}`,...p.parameters?.docs?.source}}};const D=["Default","DifferentShapes","SkeletonTitleComponent","SkeletonParagraphComponent","WithoutAnimation","LoadingStatePattern","Interactive"];export{t as Default,o as DifferentShapes,p as Interactive,i as LoadingStatePattern,r as SkeletonParagraphComponent,s as SkeletonTitleComponent,a as WithoutAnimation,D as __namedExportsOrder,w as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as ue}from"./iframe-CQAwSt4E.js";import{f as oe,g as ee,h as re,i as ce,j as fe,k as ae,l as de,m as ge,n as he,o as be,c as me,d as Le,p as qe,q as pe,a as B,s as ye,t as Te,u as ve,v as _e,w as Re,x as we,b as Ae}from"./_setToString-CbM921C9.js";import{c as Oe}from"./react-hufnxGVs.js";const ne={"pullToRefresh.canReleaseText":"Thả để làm mới","pullToRefresh.completeText":"Làm mới hoàn tất","pullToRefresh.pullingText":"Kéo để làm mới","pullToRefresh.refreshingText":"Đang làm mới...","calendar.monthLabel[0]":"Tháng 1","calendar.monthLabel[1]":"Tháng 2","calendar.monthLabel[2]":"Tháng 3","calendar.monthLabel[3]":"Tháng 4","calendar.monthLabel[4]":"Tháng 5","calendar.monthLabel[5]":"Tháng 6","calendar.monthLabel[6]":"Tháng 7","calendar.monthLabel[7]":"Tháng 8","calendar.monthLabel[8]":"Tháng 9","calendar.monthLabel[9]":"Tháng 10","calendar.monthLabel[10]":"Tháng 11","calendar.monthLabel[11]":"Tháng 12","calendar.weekdayLabel[0]":"CN","calendar.weekdayLabel[1]":"T2","calendar.weekdayLabel[2]":"T3","calendar.weekdayLabel[3]":"T4","calendar.weekdayLabel[4]":"T5","calendar.weekdayLabel[5]":"T6","calendar.weekdayLabel[6]":"T7","calendar.headerLabel":"{month} - {year}","calendar.weekday":"{day}"};var A,J;function te(){if(J)return A;J=1;var r=oe(),n=ee();function e(a,i,t){(t!==void 0&&!n(a[i],t)||t===void 0&&!(i in a))&&r(a,i,t)}return A=e,A}var O,N;function Ie(){if(N)return O;N=1;function r(n){return function(e,a,i){for(var t=-1,u=Object(e),s=i(e),l=s.length;l--;){var c=s[n?l:++t];if(a(u[c],c,u)===!1)break}return e}}return O=r,O}var I,K;function Me(){if(K)return I;K=1;var r=Ie(),n=r();return I=n,I}var M,$;function Fe(){if($)return M;$=1;var r=re(),n=ce();function e(a){return n(a)&&r(a)}return M=e,M}var F,U;function ie(){if(U)return F;U=1;function r(n,e){if(!(e==="constructor"&&typeof n[e]=="function")&&e!="__proto__")return n[e]}return F=r,F}var x,W;function xe(){if(W)return x;W=1;var r=fe(),n=ae();function e(a){return r(a,n(a))}return x=e,x}var k,H;function ke(){if(H)return k;H=1;var r=te(),n=de(),e=ge(),a=he(),i=be(),t=me(),u=Le(),s=Fe(),l=qe(),c=pe(),g=B(),L=ye(),h=Te(),b=ie(),m=xe();function q(v,G,p,se,le,_,y){var d=b(v,p),o=b(G,p),V=y.get(o);if(V){r(v,p,V);return}var f=_?_(d,o,p+"",v,G,y):void 0,T=f===void 0;if(T){var R=u(o),w=!R&&l(o),E=!R&&!w&&h(o);f=o,R||w||E?u(d)?f=d:s(d)?f=a(d):w?(T=!1,f=n(o,!0)):E?(T=!1,f=e(o,!0)):f=[]:L(o)||t(o)?(f=d,t(d)?f=m(d):(!g(d)||c(d))&&(f=i(o))):T=!1}T&&(y.set(o,f),le(f,o,se,_,y),y.delete(o)),r(v,p,f)}return k=q,k}var C,Q;function Ce(){if(Q)return C;Q=1;var r=ve(),n=te(),e=Me(),a=ke(),i=B(),t=ae(),u=ie();function s(l,c,g,L,h){l!==c&&e(c,function(b,m){if(h||(h=new r),i(b))a(l,c,m,g,s,L,h);else{var q=L?L(u(l,m),b,m+"",l,c,h):void 0;q===void 0&&(q=b),n(l,m,q)}},t)}return C=s,C}var j,X;function je(){if(X)return j;X=1;var r=_e(),n=Re(),e=we();function a(i,t){return e(n(i,t,r),i+"")}return j=a,j}var P,Y;function Pe(){if(Y)return P;Y=1;var r=ee(),n=re(),e=Ae(),a=B();function i(t,u,s){if(!a(s))return!1;var l=typeof u;return(l=="number"?n(s)&&e(u,s.length):l=="string"&&u in s)?r(s[u],t):!1}return P=i,P}var S,Z;function Se(){if(Z)return S;Z=1;var r=je(),n=Pe();function e(a){return r(function(i,t){var u=-1,s=t.length,l=s>1?t[s-1]:void 0,c=s>2?t[2]:void 0;for(l=a.length>3&&typeof l=="function"?(s--,l):void 0,c&&n(t[0],t[1],c)&&(l=s<3?void 0:l,s=1),i=Object(i);++u<s;){var g=t[u];g&&a(i,g,u,l)}return i})}return S=e,S}var D,z;function De(){if(z)return D;z=1;var r=Ce(),n=Se(),e=n(function(a,i,t){r(a,i,t)});return D=e,D}var Be=De();const Ge=ue(Be),Ve={"pullToRefresh.canReleaseText":"Release to refresh","pullToRefresh.completeText":"Refresh complete","pullToRefresh.pullingText":"Pulling to refresh","pullToRefresh.refreshingText":"Refreshing...","calendar.monthLabel[0]":"January","calendar.monthLabel[1]":"February","calendar.monthLabel[2]":"March","calendar.monthLabel[3]":"April","calendar.monthLabel[4]":"May","calendar.monthLabel[5]":"June","calendar.monthLabel[6]":"July","calendar.monthLabel[7]":"August","calendar.monthLabel[8]":"September","calendar.monthLabel[9]":"October","calendar.monthLabel[10]":"November","calendar.monthLabel[11]":"December","calendar.weekdayLabel[0]":"Sun","calendar.weekdayLabel[1]":"Mon","calendar.weekdayLabel[2]":"Tue","calendar.weekdayLabel[3]":"Wed","calendar.weekdayLabel[4]":"Thu","calendar.weekdayLabel[5]":"Fri","calendar.weekdayLabel[6]":"Sat","calendar.headerLabel":"{month} - {year}","calendar.weekday":"{day}"};function Ee(r,n){if(!n)return r;const e=[];let a=0;return r.replace(/\{(\w+)\}/g,(i,t,u)=>(u>a&&e.push(r.slice(a,u)),e.push(n[t]?.toString()??i),a=u+i.length,i)),a<r.length&&e.push(r.slice(a)),e.join("")}const Je={vi:ne,en:Ve},Ne=(r,n)=>Ge({},r,n),We=Oe((r,n)=>({language:"system",systemLanguage:window.LANG_CODE||new URL(window?.location.href).searchParams.get("langCode")||"vi",initialized:!1,resources:Je,translate:(e,a,i)=>{const t=i??n().language,{resources:u,systemLanguage:s}=n();let l=t;t==="system"&&(l=s);const g=(u[l]??ne)[e];return g?Ee(g,a):(console.warn(`Translation key "${e}" not found in locale "${t}"`),e)},setLanguage:e=>{r({language:e})},init:e=>{r(({resources:a})=>({resources:Ne(a,e?.resources),initialized:!0}))}}));export{Ge as m,We as u};
|