maz-ui 5.0.0 → 5.1.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{MazDropzone.DJ8au25t.css → MazDropzone.BW2grpTi.css} +1 -1
- package/dist/chunks/{MazDrawer.DANxKYxJ.js → MazDrawer.CC8zomfx.js} +2 -2
- package/dist/chunks/{MazDropzone.POH3pmfi.js → MazDropzone.Dez5j0WP.js} +2 -2
- package/dist/components/MazDrawer.js +1 -1
- package/dist/components/MazDropzone.js +1 -1
- package/dist/components/MazDropzone.vue.d.ts +2 -2
- package/dist/components/MazInputPrice.vue.d.ts +1 -1
- package/dist/components/index.js +2 -2
- package/docs/README.md +207 -0
- package/docs/agents/agents-md.md +52 -0
- package/docs/agents/claude-rule.md +52 -0
- package/docs/components/maz-accordion.md +76 -0
- package/docs/components/maz-alert.md +241 -0
- package/docs/components/maz-animated-counter.md +87 -0
- package/docs/components/maz-animated-element.md +46 -0
- package/docs/components/maz-animated-text.md +53 -0
- package/docs/components/maz-avatar.md +193 -0
- package/docs/components/maz-backdrop.md +178 -0
- package/docs/components/maz-badge.md +167 -0
- package/docs/components/maz-bottom-sheet.md +257 -0
- package/docs/components/maz-btn-group.md +316 -0
- package/docs/components/maz-btn.md +423 -0
- package/docs/components/maz-card-spotlight.md +84 -0
- package/docs/components/maz-card.md +321 -0
- package/docs/components/maz-carousel.md +153 -0
- package/docs/components/maz-chart.md +206 -0
- package/docs/components/maz-checkbox.md +138 -0
- package/docs/components/maz-checklist.md +251 -0
- package/docs/components/maz-circular-progress-bar.md +109 -0
- package/docs/components/maz-code-highlight.md +155 -0
- package/docs/components/maz-container.md +241 -0
- package/docs/components/maz-date-picker.md +791 -0
- package/docs/components/maz-dialog-confirm.md +215 -0
- package/docs/components/maz-dialog.md +143 -0
- package/docs/components/maz-drawer.md +106 -0
- package/docs/components/maz-dropdown.md +419 -0
- package/docs/components/maz-dropzone.md +387 -0
- package/docs/components/maz-expand-animation.md +82 -0
- package/docs/components/maz-fullscreen-loader.md +58 -0
- package/docs/components/maz-gallery.md +79 -0
- package/docs/components/maz-icon.md +203 -0
- package/docs/components/maz-input-code.md +73 -0
- package/docs/components/maz-input-number.md +79 -0
- package/docs/components/maz-input-phone-number.md +536 -0
- package/docs/components/maz-input-price.md +68 -0
- package/docs/components/maz-input-tags.md +112 -0
- package/docs/components/maz-input.md +334 -0
- package/docs/components/maz-lazy-img.md +113 -0
- package/docs/components/maz-link.md +146 -0
- package/docs/components/maz-loading-bar.md +38 -0
- package/docs/components/maz-markdown-editor.md +320 -0
- package/docs/components/maz-pagination.md +82 -0
- package/docs/components/maz-popover.md +794 -0
- package/docs/components/maz-pull-to-refresh.md +222 -0
- package/docs/components/maz-radio-buttons.md +313 -0
- package/docs/components/maz-radio.md +119 -0
- package/docs/components/maz-read-more.md +209 -0
- package/docs/components/maz-reading-progress-bar.md +96 -0
- package/docs/components/maz-select-country.md +513 -0
- package/docs/components/maz-select.md +318 -0
- package/docs/components/maz-sidebar-content.md +25 -0
- package/docs/components/maz-sidebar-footer.md +25 -0
- package/docs/components/maz-sidebar-group.md +27 -0
- package/docs/components/maz-sidebar-header.md +25 -0
- package/docs/components/maz-sidebar-menu-button.md +41 -0
- package/docs/components/maz-sidebar-menu-item.md +25 -0
- package/docs/components/maz-sidebar-menu-sub.md +32 -0
- package/docs/components/maz-sidebar-menu.md +25 -0
- package/docs/components/maz-sidebar-separator.md +21 -0
- package/docs/components/maz-sidebar-trigger.md +25 -0
- package/docs/components/maz-sidebar.md +507 -0
- package/docs/components/maz-skeleton.md +226 -0
- package/docs/components/maz-slider.md +165 -0
- package/docs/components/maz-spinner.md +84 -0
- package/docs/components/maz-stepper.md +301 -0
- package/docs/components/maz-switch.md +86 -0
- package/docs/components/maz-table-cell.md +27 -0
- package/docs/components/maz-table-row.md +28 -0
- package/docs/components/maz-table-title.md +27 -0
- package/docs/components/maz-table-virtualizer.md +31 -0
- package/docs/components/maz-table.md +426 -0
- package/docs/components/maz-tabs-bar.md +43 -0
- package/docs/components/maz-tabs-content-item.md +27 -0
- package/docs/components/maz-tabs-content.md +27 -0
- package/docs/components/maz-tabs.md +308 -0
- package/docs/components/maz-textarea.md +255 -0
- package/docs/components/maz-ticker.md +427 -0
- package/docs/components/maz-timeline.md +304 -0
- package/docs/components/maz-ui-provider.md +26 -0
- package/docs/components/maz-window-mockup.md +182 -0
- package/docs/composables/use-aos.md +41 -0
- package/docs/composables/use-breakpoints.md +42 -0
- package/docs/composables/use-dialog.md +58 -0
- package/docs/composables/use-display-names.md +130 -0
- package/docs/composables/use-drag.md +185 -0
- package/docs/composables/use-form-validator.md +1123 -0
- package/docs/composables/use-idle-timeout.md +172 -0
- package/docs/composables/use-pull-to-refresh.md +86 -0
- package/docs/composables/use-reading-time.md +132 -0
- package/docs/composables/use-string-matching.md +41 -0
- package/docs/composables/use-swipe.md +171 -0
- package/docs/composables/use-timer.md +104 -0
- package/docs/composables/use-toast.md +50 -0
- package/docs/composables/use-user-visibility.md +127 -0
- package/docs/composables/use-wait.md +50 -0
- package/docs/composables/use-window-size.md +25 -0
- package/docs/directives/click-outside.md +182 -0
- package/docs/directives/fullscreen-img.md +83 -0
- package/docs/directives/lazy-img.md +182 -0
- package/docs/directives/tooltip.md +298 -0
- package/docs/directives/zoom-img.md +100 -0
- package/docs/ecosystem/eslint-config.md +289 -0
- package/docs/ecosystem/icons/icon-set.md +25 -0
- package/docs/ecosystem/icons/index.md +584 -0
- package/docs/ecosystem/mcp.md +165 -0
- package/docs/ecosystem/node/exec-promise.md +93 -0
- package/docs/ecosystem/node/index.md +53 -0
- package/docs/ecosystem/node/logger.md +152 -0
- package/docs/ecosystem/node/print-banner.md +101 -0
- package/docs/ecosystem/node/setup-agents.md +102 -0
- package/docs/ecosystem/nuxt.md +551 -0
- package/docs/ecosystem/stylelint-config.md +310 -0
- package/docs/ecosystem/themes.md +966 -0
- package/docs/ecosystem/translations.md +1173 -0
- package/docs/ecosystem/utils/camel-case.md +37 -0
- package/docs/ecosystem/utils/capitalize.md +37 -0
- package/docs/ecosystem/utils/check-availability.md +85 -0
- package/docs/ecosystem/utils/cookie.md +86 -0
- package/docs/ecosystem/utils/country-code-to-unicode-flag.md +128 -0
- package/docs/ecosystem/utils/currency.md +53 -0
- package/docs/ecosystem/utils/date.md +53 -0
- package/docs/ecosystem/utils/debounce-callback.md +44 -0
- package/docs/ecosystem/utils/debounce-id.md +75 -0
- package/docs/ecosystem/utils/debounce.md +71 -0
- package/docs/ecosystem/utils/fetch-locale-ip.md +39 -0
- package/docs/ecosystem/utils/format-json.md +39 -0
- package/docs/ecosystem/utils/format-phone-number.md +43 -0
- package/docs/ecosystem/utils/get-browser-locale.md +35 -0
- package/docs/ecosystem/utils/get-country-flag-url.md +67 -0
- package/docs/ecosystem/utils/get-error-message.md +45 -0
- package/docs/ecosystem/utils/idle-timeout.md +96 -0
- package/docs/ecosystem/utils/index.md +57 -0
- package/docs/ecosystem/utils/is-client.md +38 -0
- package/docs/ecosystem/utils/is-equal.md +44 -0
- package/docs/ecosystem/utils/is-ios.md +43 -0
- package/docs/ecosystem/utils/is-server.md +37 -0
- package/docs/ecosystem/utils/is-standalone-mode.md +49 -0
- package/docs/ecosystem/utils/kebab-case.md +42 -0
- package/docs/ecosystem/utils/normalize-string.md +83 -0
- package/docs/ecosystem/utils/number.md +51 -0
- package/docs/ecosystem/utils/pascal-case.md +41 -0
- package/docs/ecosystem/utils/prevent-ios-input-zoom.md +72 -0
- package/docs/ecosystem/utils/script-loader.md +85 -0
- package/docs/ecosystem/utils/sleep.md +65 -0
- package/docs/ecosystem/utils/snake-case.md +42 -0
- package/docs/ecosystem/utils/swipe-handler.md +97 -0
- package/docs/ecosystem/utils/textarea-autogrow.md +47 -0
- package/docs/ecosystem/utils/throttle-id.md +54 -0
- package/docs/ecosystem/utils/throttle.md +63 -0
- package/docs/ecosystem/utils/truthy-filter.md +37 -0
- package/docs/ecosystem/utils/types/deep-key-of.md +54 -0
- package/docs/ecosystem/utils/types/deep-partial.md +48 -0
- package/docs/ecosystem/utils/types/deep-required.md +45 -0
- package/docs/ecosystem/utils/types/flatten-object-keys.md +50 -0
- package/docs/ecosystem/utils/types/generic-instance-type.md +48 -0
- package/docs/ecosystem/utils/types/infer-maybe-ref.md +41 -0
- package/docs/ecosystem/utils/upper-first.md +38 -0
- package/docs/ecosystem/utils/user-visibility.md +75 -0
- package/docs/guide/ai-agents.md +237 -0
- package/docs/guide/browser-support.md +88 -0
- package/docs/guide/getting-started.md +191 -0
- package/docs/guide/global-defaults.md +103 -0
- package/docs/guide/maz-ui-provider.md +231 -0
- package/docs/guide/migration-v5.md +871 -0
- package/docs/guide/resolvers.md +650 -0
- package/docs/guide/tailwind.md +483 -0
- package/docs/guide/vue.md +286 -0
- package/docs/manifest.json +1 -0
- package/docs/plugins/aos.md +312 -0
- package/docs/plugins/dialog.md +269 -0
- package/docs/plugins/toast.md +221 -0
- package/docs/plugins/wait.md +78 -0
- package/docs/reference/icons.md +46 -0
- package/docs/reference/tailwind-tokens.md +191 -0
- package/docs/rules.md +57 -0
- package/package.json +31 -4
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "MazContainer"
|
|
3
|
+
description: "MazContainer is a lightweight component to wrap content with optional header, border, elevation, and rounded corners - a simpler alternative to MazCard"
|
|
4
|
+
package: "maz-ui"
|
|
5
|
+
url: "https://maz-ui.com/components/maz-container"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# MazContainer
|
|
9
|
+
|
|
10
|
+
> MazContainer is a lightweight component to wrap content with optional header, border, elevation, and rounded corners - a simpler alternative to MazCard
|
|
11
|
+
|
|
12
|
+
- Package: `maz-ui`
|
|
13
|
+
- Import: `import MazContainer from 'maz-ui/components/MazContainer'`
|
|
14
|
+
- Nuxt: auto-imported by `@maz-ui/nuxt`, no import needed in a Nuxt app
|
|
15
|
+
- Web: https://maz-ui.com/components/maz-container
|
|
16
|
+
|
|
17
|
+
> Before use it, you should install the MazUi plugin in your project, follow instructions in [Getting Started](../guide/getting-started.md)
|
|
18
|
+
|
|
19
|
+
**Tip:**
|
|
20
|
+
|
|
21
|
+
MazContainer is designed to be a lighter alternative to [MazCard](./maz-card.md). Use it when you need a simple container with basic styling options without the extra features like galleries, collapsible content, or actions.
|
|
22
|
+
|
|
23
|
+
## Basic usage
|
|
24
|
+
|
|
25
|
+
```vue
|
|
26
|
+
<template>
|
|
27
|
+
<MazContainer>
|
|
28
|
+
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
|
|
29
|
+
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s.
|
|
30
|
+
</MazContainer>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script lang="ts" setup>
|
|
34
|
+
import MazContainer from 'maz-ui/components/MazContainer'
|
|
35
|
+
</script>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## With title
|
|
39
|
+
|
|
40
|
+
Add a header with a title using the `title` prop or the `title` slot.
|
|
41
|
+
|
|
42
|
+
```vue
|
|
43
|
+
<template>
|
|
44
|
+
<MazContainer title="Section Title">
|
|
45
|
+
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
|
|
46
|
+
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s.
|
|
47
|
+
</MazContainer>
|
|
48
|
+
</template>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## With icons
|
|
52
|
+
|
|
53
|
+
Add icons to the header using `start-icon` and `end-icon` props.
|
|
54
|
+
|
|
55
|
+
```vue
|
|
56
|
+
<template>
|
|
57
|
+
<MazContainer title="Settings" start-icon="/cog-6-tooth.svg">
|
|
58
|
+
Configure your application settings here.
|
|
59
|
+
</MazContainer>
|
|
60
|
+
|
|
61
|
+
<MazContainer title="User Profile" start-icon="/user.svg" end-icon="/pencil.svg">
|
|
62
|
+
View and edit your profile information.
|
|
63
|
+
</MazContainer>
|
|
64
|
+
</template>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
`startIcon` and `endIcon` also accept a full `MazIconProps` object - pass the same shape `<MazIcon>` accepts to override the icon size, add a `<title>` for screen readers, etc.
|
|
68
|
+
|
|
69
|
+
```vue
|
|
70
|
+
<MazContainer
|
|
71
|
+
title="Settings"
|
|
72
|
+
:start-icon="{
|
|
73
|
+
icon: MazCog6Tooth,
|
|
74
|
+
size: 'lg',
|
|
75
|
+
title: 'Open settings',
|
|
76
|
+
}"
|
|
77
|
+
>
|
|
78
|
+
Configure your application settings here.
|
|
79
|
+
</MazContainer>
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Styling options
|
|
83
|
+
|
|
84
|
+
### Elevation
|
|
85
|
+
|
|
86
|
+
Add shadow to make the container stand out.
|
|
87
|
+
|
|
88
|
+
```vue
|
|
89
|
+
<template>
|
|
90
|
+
<MazContainer elevation :bordered="false">
|
|
91
|
+
Container with elevation effect and no border.
|
|
92
|
+
</MazContainer>
|
|
93
|
+
</template>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Bordered
|
|
97
|
+
|
|
98
|
+
By default, the container has a border. You can disable it.
|
|
99
|
+
|
|
100
|
+
```vue
|
|
101
|
+
<template>
|
|
102
|
+
<MazContainer title="With border (default)">
|
|
103
|
+
This container has a border.
|
|
104
|
+
</MazContainer>
|
|
105
|
+
|
|
106
|
+
<MazContainer title="Without border" :bordered="false">
|
|
107
|
+
This container has no border.
|
|
108
|
+
</MazContainer>
|
|
109
|
+
</template>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Transparent
|
|
113
|
+
|
|
114
|
+
Remove the background color with the `transparent` prop.
|
|
115
|
+
|
|
116
|
+
```vue
|
|
117
|
+
<template>
|
|
118
|
+
<MazContainer title="Transparent container" transparent>
|
|
119
|
+
This container has a transparent background.
|
|
120
|
+
</MazContainer>
|
|
121
|
+
</template>
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Rounded sizes
|
|
125
|
+
|
|
126
|
+
Customize the border radius with the `rounded-size` prop.
|
|
127
|
+
|
|
128
|
+
```vue
|
|
129
|
+
<template>
|
|
130
|
+
<MazContainer v-for="size in roundedSizes" :key="size" :rounded-size="size">
|
|
131
|
+
{{ size }}
|
|
132
|
+
</MazContainer>
|
|
133
|
+
</template>
|
|
134
|
+
|
|
135
|
+
<script lang="ts" setup>
|
|
136
|
+
import MazContainer from 'maz-ui/components/MazContainer'
|
|
137
|
+
|
|
138
|
+
const roundedSizes = ['none', 'sm', 'md', 'lg', 'xl', 'full']
|
|
139
|
+
</script>
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### No padding
|
|
143
|
+
|
|
144
|
+
Remove internal padding with `:padding="false"`.
|
|
145
|
+
|
|
146
|
+
```vue
|
|
147
|
+
<template>
|
|
148
|
+
<MazContainer title="No padding" :padding="false">
|
|
149
|
+
Content without container padding - useful for custom layouts.
|
|
150
|
+
</MazContainer>
|
|
151
|
+
</template>
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Full width
|
|
155
|
+
|
|
156
|
+
Use the `block` prop to make the container take full width.
|
|
157
|
+
|
|
158
|
+
```vue
|
|
159
|
+
<template>
|
|
160
|
+
<MazContainer title="Full width container" block>
|
|
161
|
+
This container spans the full width of its parent.
|
|
162
|
+
</MazContainer>
|
|
163
|
+
</template>
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
## Custom header
|
|
167
|
+
|
|
168
|
+
Use the `header` slot to fully customize the header, or use `title`, `icon-start`, and `icon-end` slots for more granular control.
|
|
169
|
+
|
|
170
|
+
```vue
|
|
171
|
+
<template>
|
|
172
|
+
<MazContainer>
|
|
173
|
+
<template #header>
|
|
174
|
+
<div class="flex items-center justify-between w-full px-4 py-3 bg-primary text-primary-foreground">
|
|
175
|
+
<span class="font-semibold">Custom Header</span>
|
|
176
|
+
<MazBadge size="sm" color="white" class="text-primary">
|
|
177
|
+
New
|
|
178
|
+
</MazBadge>
|
|
179
|
+
</div>
|
|
180
|
+
</template>
|
|
181
|
+
Content with a fully customized header.
|
|
182
|
+
</MazContainer>
|
|
183
|
+
</template>
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## Combining options
|
|
187
|
+
|
|
188
|
+
```vue
|
|
189
|
+
<template>
|
|
190
|
+
<MazContainer
|
|
191
|
+
title="Dashboard Overview"
|
|
192
|
+
start-icon="/chart-bar.svg"
|
|
193
|
+
elevation
|
|
194
|
+
:bordered="false"
|
|
195
|
+
rounded-size="xl"
|
|
196
|
+
block
|
|
197
|
+
>
|
|
198
|
+
<div class="flex gap-4 flex-wrap">
|
|
199
|
+
<MazContainer class="flex-1 min-w-[150px]">
|
|
200
|
+
<p class="text-muted text-sm">Users</p>
|
|
201
|
+
<p class="text-2xl font-bold">1,234</p>
|
|
202
|
+
</MazContainer>
|
|
203
|
+
<MazContainer class="flex-1 min-w-[150px]">
|
|
204
|
+
<p class="text-muted text-sm">Revenue</p>
|
|
205
|
+
<p class="text-2xl font-bold">$12.5k</p>
|
|
206
|
+
</MazContainer>
|
|
207
|
+
<MazContainer class="flex-1 min-w-[150px]">
|
|
208
|
+
<p class="text-muted text-sm">Orders</p>
|
|
209
|
+
<p class="text-2xl font-bold">567</p>
|
|
210
|
+
</MazContainer>
|
|
211
|
+
</div>
|
|
212
|
+
</MazContainer>
|
|
213
|
+
</template>
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
## MazContainer API
|
|
217
|
+
|
|
218
|
+
`import MazContainer from 'maz-ui/components/MazContainer'`
|
|
219
|
+
|
|
220
|
+
### Props
|
|
221
|
+
|
|
222
|
+
- `title` (`string`): Title of the card in header.
|
|
223
|
+
- `elevation` (`boolean`, default: `false`): Add elevation to the component.
|
|
224
|
+
- `padding` (`boolean`, default: `true`): Add padding to the content.
|
|
225
|
+
- `bordered` (`boolean`, default: `true`): Add border to the component.
|
|
226
|
+
- `rounded-size` (`MazRoundedSize`, default: `'md'`): Size of the rounded. Values: `'none'`, `'sm'`, `'md'`, `'lg'`, `'xl'`, `'full'` (non exhaustive).
|
|
227
|
+
- `transparent` (`boolean`, default: `false`): Remove background color.
|
|
228
|
+
- `overflow-hidden` (`boolean`, default: `true`): Hide overflow.
|
|
229
|
+
- `start-icon` (`MazIconLike`): Icon displayed on the inline-start edge of the header (left in LTR, right in RTL). Accepts a bare value (Vue component, raw SVG string, URL or `data:` URI) or a full `MazIconProps` object.
|
|
230
|
+
- `end-icon` (`MazIconLike`): Icon displayed on the inline-end edge of the header (right in LTR, left in RTL). Accepts a bare value or a full `MazIconProps` object.
|
|
231
|
+
- `icon-size` (`MazIconSize`, default: `"md"`): Size of the icon.
|
|
232
|
+
- `block` (`boolean`, default: `false`): Display the container in full width.
|
|
233
|
+
- `content-class` (`string`): Additional class to add to the content wrapper.
|
|
234
|
+
|
|
235
|
+
### Slots
|
|
236
|
+
|
|
237
|
+
- `#header`: Replace the header
|
|
238
|
+
- `#icon-start`: inline-start edge of the header (left in LTR, right in RTL)
|
|
239
|
+
- `#title`: title
|
|
240
|
+
- `#icon-end`: inline-end edge of the header (right in LTR, left in RTL)
|
|
241
|
+
- `#default`: content of the container
|