@axzydev/axzy_ui_system 1.4.8 → 1.5.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/README.md +2 -11
- package/dist/index.cjs +1826 -1351
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +115 -14
- package/dist/index.d.ts +115 -14
- package/dist/index.js +1481 -1010
- package/dist/index.js.map +1 -1
- package/dist/layered.css +1 -1
- package/package.json +3 -16
- package/src/App.tsx +90 -73
- package/src/components/atoms/badget/badget.tsx +23 -5
- package/src/components/atoms/chip/chip.tsx +3 -1
- package/src/components/atoms/image/image.tsx +3 -1
- package/src/components/atoms/input/input.tsx +8 -5
- package/src/components/atoms/loader/loader.tsx +3 -1
- package/src/components/atoms/slide/slide.props.ts +12 -0
- package/src/components/atoms/slide/slide.tsx +3 -0
- package/src/components/molecules/alert/alert.tsx +3 -1
- package/src/components/molecules/breadcrumbs/breadcrumbs.tsx +3 -1
- package/src/components/molecules/calendar/calendar.tsx +9 -6
- package/src/components/molecules/card/card.tsx +5 -2
- package/src/components/molecules/chip-input/chip-input.tsx +9 -7
- package/src/components/molecules/date-picker/datePicker.tsx +9 -9
- package/src/components/molecules/dropdown-menu/dropdown-menu.props.ts +1 -1
- package/src/components/molecules/dropdown-menu/dropdown-menu.tsx +6 -3
- package/src/components/molecules/field/field.tsx +3 -1
- package/src/components/molecules/form-header/form-header.tsx +3 -1
- package/src/components/molecules/line-bar-chart/line-bar-chart.props.ts +2 -2
- package/src/components/molecules/line-bar-chart/line-bar-chart.tsx +20 -15
- package/src/components/molecules/masked-input/masked-input.tsx +3 -1
- package/src/components/molecules/multi-select/multi-select.tsx +12 -9
- package/src/components/molecules/pagination/pagination.tsx +11 -5
- package/src/components/molecules/search-select/search-select.tsx +11 -9
- package/src/components/molecules/select/select.tsx +6 -4
- package/src/components/molecules/stepper/stepper.tsx +6 -4
- package/src/components/molecules/table/table.tsx +30 -28
- package/src/components/molecules/time-picker/timePicker.tsx +8 -6
- package/src/components/molecules/wysiwyg/wysiwyg.tsx +23 -12
- package/src/components/organisms/confirm-dialog/confirm-dialog.props.ts +4 -4
- package/src/components/organisms/confirm-dialog/confirm-dialog.tsx +16 -8
- package/src/components/organisms/data-table/dataTable.tsx +31 -25
- package/src/components/organisms/dialog/dialog.tsx +3 -0
- package/src/components/organisms/drawer/drawer.tsx +3 -0
- package/src/components/organisms/dropfile/dropfile.tsx +19 -17
- package/src/components/organisms/form-builder/fieldRenderer.tsx +4 -2
- package/src/components/organisms/navbar/navbar.tsx +4 -2
- package/src/components/organisms/page-header/page-header.tsx +3 -1
- package/src/components/organisms/searchTable/components/PaginationControls.tsx +8 -6
- package/src/components/organisms/searchTable/components/PaginationInfo.tsx +3 -1
- package/src/components/organisms/searchTable/components/SearchAndSortBar.tsx +7 -5
- package/src/components/organisms/searchTable/components/SearchInput.tsx +4 -2
- package/src/components/organisms/searchTable/components/SortButton.tsx +13 -11
- package/src/components/organisms/searchTable/components/TableEmptyState.tsx +4 -2
- package/src/components/organisms/searchTable/components/TableRow.tsx +6 -4
- package/src/components/organisms/searchTable/searchTable.tsx +4 -2
- package/src/components/organisms/sidebar/sidebar.props.ts +1 -1
- package/src/components/organisms/sidebar/sidebar.tsx +9 -4
- package/src/components/organisms/toast/toast.tsx +3 -1
- package/src/components/organisms/topbar/topbar.tsx +4 -2
- package/src/components/templates/page/page.props.ts +4 -4
- package/src/components/templates/page/page.tsx +6 -4
- package/src/components/theme-provider/themeProvider.tsx +28 -17
- package/src/dev.css +77 -2
- package/src/global.d.ts +10 -0
- package/src/i18n/context.ts +9 -0
- package/src/i18n/index.ts +22 -0
- package/src/i18n/locales/en.ts +163 -0
- package/src/i18n/locales/es.ts +165 -0
- package/src/i18n/provider.tsx +44 -0
- package/src/i18n/translator.ts +82 -0
- package/src/i18n/types.ts +54 -0
- package/src/i18n/useITTranslation.ts +20 -0
- package/src/index.css +0 -1
- package/src/index.ts +7 -1
- package/src/sandbox/LandingShowcase.tsx +224 -580
- package/src/sandbox/NotFoundShowcase.tsx +51 -36
- package/src/sandbox/TopbarSearch.tsx +6 -4
- package/src/sandbox/controls.tsx +180 -0
- package/src/sandbox/i18n.ts +1929 -0
- package/src/sandbox/icons.tsx +25 -0
- package/src/sandbox/locale.tsx +72 -0
- package/src/sandbox/ui.tsx +377 -0
- package/src/sandbox/useHashRoute.ts +46 -10
- package/src/showcases/DataShowcases.tsx +103 -87
- package/src/showcases/FeedbackShowcases.tsx +37 -30
- package/src/showcases/FormShowcases.tsx +302 -214
- package/src/showcases/GettingStartedShowcase.tsx +151 -145
- package/src/showcases/HelpShowcase.tsx +126 -128
- package/src/showcases/HomeShowcase.tsx +678 -482
- package/src/showcases/LayoutPrimitivesShowcases.tsx +129 -114
- package/src/showcases/NavigationShowcases.tsx +45 -37
- package/src/showcases/PageShowcases.tsx +171 -152
- package/src/showcases/ProductoDetalle.tsx +272 -129
- package/src/showcases/ShowcaseLayout.tsx +270 -216
- package/src/showcases/SizesShowcase.tsx +123 -64
- package/src/showcases/StructureShowcases.tsx +157 -131
- package/src/showcases/portfolioUi.tsx +153 -0
- package/src/showcases/techIcons.ts +3 -0
- package/src/utils/table.utils.ts +10 -2
- package/src/components/atoms/avatar/avatar.doc.mdx +0 -48
- package/src/components/atoms/avatar/avatar.stories.tsx +0 -64
- package/src/components/atoms/badget/badget.doc.mdx +0 -46
- package/src/components/atoms/badget/badget.stories.tsx +0 -75
- package/src/components/atoms/button/button.doc.mdx +0 -59
- package/src/components/atoms/button/button.stories.tsx +0 -173
- package/src/components/atoms/checkbox/checkbox.doc.mdx +0 -54
- package/src/components/atoms/checkbox/checkbox.stories.tsx +0 -53
- package/src/components/atoms/chip/chip.doc.mdx +0 -47
- package/src/components/atoms/chip/chip.stories.tsx +0 -64
- package/src/components/atoms/divider/divider.doc.mdx +0 -42
- package/src/components/atoms/divider/divider.stories.tsx +0 -33
- package/src/components/atoms/flex/flex.doc.mdx +0 -59
- package/src/components/atoms/flex/flex.stories.tsx +0 -70
- package/src/components/atoms/grid/grid.doc.mdx +0 -54
- package/src/components/atoms/grid/grid.stories.tsx +0 -71
- package/src/components/atoms/image/image.doc.mdx +0 -44
- package/src/components/atoms/image/image.stories.tsx +0 -48
- package/src/components/atoms/input/input.doc.mdx +0 -70
- package/src/components/atoms/input/input.stories.tsx +0 -113
- package/src/components/atoms/input-number/input-number.doc.mdx +0 -74
- package/src/components/atoms/input-number/input-number.stories.tsx +0 -111
- package/src/components/atoms/loader/loader.doc.mdx +0 -43
- package/src/components/atoms/loader/loader.stories.tsx +0 -104
- package/src/components/atoms/popover/popover.doc.mdx +0 -53
- package/src/components/atoms/popover/popover.stories.tsx +0 -24
- package/src/components/atoms/progress/progress.doc.mdx +0 -48
- package/src/components/atoms/progress/progress.stories.tsx +0 -39
- package/src/components/atoms/radio/radio.doc.mdx +0 -62
- package/src/components/atoms/radio/radio.stories.tsx +0 -48
- package/src/components/atoms/segmented-control/segmented-control.doc.mdx +0 -60
- package/src/components/atoms/segmented-control/segmented-control.stories.tsx +0 -62
- package/src/components/atoms/skeleton/skeleton.doc.mdx +0 -43
- package/src/components/atoms/skeleton/skeleton.stories.tsx +0 -29
- package/src/components/atoms/slide/slide.doc.mdx +0 -46
- package/src/components/atoms/slide/slide.stories.tsx +0 -120
- package/src/components/atoms/slider/slider.doc.mdx +0 -49
- package/src/components/atoms/slider/slider.stories.tsx +0 -29
- package/src/components/atoms/stack/stack.doc.mdx +0 -126
- package/src/components/atoms/stack/stack.stories.tsx +0 -283
- package/src/components/atoms/text/text.doc.mdx +0 -41
- package/src/components/atoms/text/text.stories.tsx +0 -66
- package/src/components/atoms/textarea/textarea.doc.mdx +0 -64
- package/src/components/atoms/textarea/textarea.stories.tsx +0 -26
- package/src/components/atoms/tooltip/tooltip.doc.mdx +0 -47
- package/src/components/atoms/tooltip/tooltip.stories.tsx +0 -19
- package/src/components/isolation/isolation.stories.tsx +0 -202
- package/src/components/molecules/accordion/accordion.doc.mdx +0 -47
- package/src/components/molecules/accordion/accordion.stories.tsx +0 -68
- package/src/components/molecules/alert/alert.doc.mdx +0 -48
- package/src/components/molecules/alert/alert.stories.tsx +0 -40
- package/src/components/molecules/breadcrumbs/breadcrumbs.doc.mdx +0 -57
- package/src/components/molecules/breadcrumbs/breadcrumbs.stories.tsx +0 -20
- package/src/components/molecules/calendar/calendar.doc.mdx +0 -76
- package/src/components/molecules/calendar/calendar.stories.tsx +0 -90
- package/src/components/molecules/card/card.doc.mdx +0 -54
- package/src/components/molecules/card/card.stories.tsx +0 -57
- package/src/components/molecules/chip-input/chip-input.doc.mdx +0 -44
- package/src/components/molecules/chip-input/chip-input.stories.tsx +0 -52
- package/src/components/molecules/date-picker/date-picker.doc.mdx +0 -65
- package/src/components/molecules/date-picker/date-picker.stories.tsx +0 -88
- package/src/components/molecules/dropdown-menu/dropdown-menu.doc.mdx +0 -46
- package/src/components/molecules/dropdown-menu/dropdown-menu.stories.tsx +0 -41
- package/src/components/molecules/empty-state/empty-state.doc.mdx +0 -50
- package/src/components/molecules/empty-state/empty-state.stories.tsx +0 -19
- package/src/components/molecules/field/field.doc.mdx +0 -43
- package/src/components/molecules/field/field.stories.tsx +0 -42
- package/src/components/molecules/form-header/form-header.doc.mdx +0 -38
- package/src/components/molecules/form-header/form-header.stories.tsx +0 -52
- package/src/components/molecules/masked-input/masked-input.doc.mdx +0 -78
- package/src/components/molecules/masked-input/masked-input.stories.tsx +0 -126
- package/src/components/molecules/multi-select/multi-select.doc.mdx +0 -55
- package/src/components/molecules/multi-select/multi-select.stories.tsx +0 -59
- package/src/components/molecules/pagination/pagination.doc.mdx +0 -62
- package/src/components/molecules/pagination/pagination.stories.tsx +0 -110
- package/src/components/molecules/search-select/search-select.doc.mdx +0 -77
- package/src/components/molecules/search-select/search-select.stories.tsx +0 -146
- package/src/components/molecules/select/select.doc.mdx +0 -75
- package/src/components/molecules/select/select.stories.tsx +0 -85
- package/src/components/molecules/stat-card/stat-card.doc.mdx +0 -48
- package/src/components/molecules/stat-card/stat-card.stories.tsx +0 -40
- package/src/components/molecules/stepper/stepper.doc.mdx +0 -54
- package/src/components/molecules/stepper/stepper.stories.tsx +0 -154
- package/src/components/molecules/table/table.doc.mdx +0 -140
- package/src/components/molecules/table/table.stories.tsx +0 -402
- package/src/components/molecules/tabs/tabs.doc.mdx +0 -52
- package/src/components/molecules/tabs/tabs.stories.tsx +0 -31
- package/src/components/molecules/time-picker/timePicker.doc.mdx +0 -68
- package/src/components/molecules/time-picker/timePicker.stories.tsx +0 -130
- package/src/components/molecules/wysiwyg/wysiwyg.stories.tsx +0 -95
- package/src/components/organisms/confirm-dialog/confirm-dialog.doc.mdx +0 -60
- package/src/components/organisms/confirm-dialog/confirm-dialog.stories.tsx +0 -32
- package/src/components/organisms/data-table/ITDataTable.doc.mdx +0 -132
- package/src/components/organisms/data-table/ITDataTable.stories.tsx +0 -353
- package/src/components/organisms/dialog/dialog.doc.mdx +0 -54
- package/src/components/organisms/dialog/dialog.stories.tsx +0 -126
- package/src/components/organisms/drawer/drawer.doc.mdx +0 -59
- package/src/components/organisms/drawer/drawer.stories.tsx +0 -40
- package/src/components/organisms/dropfile/dropfile.doc.mdx +0 -74
- package/src/components/organisms/dropfile/dropfile.stories.tsx +0 -93
- package/src/components/organisms/form-builder/formBuilder.doc.mdx +0 -251
- package/src/components/organisms/form-builder/formBuilder.stories.tsx +0 -914
- package/src/components/organisms/navbar/navbar.doc.mdx +0 -77
- package/src/components/organisms/navbar/navbar.stories.tsx +0 -83
- package/src/components/organisms/page-header/page-header.doc.mdx +0 -54
- package/src/components/organisms/page-header/page-header.stories.tsx +0 -74
- package/src/components/organisms/searchTable/searchTable.doc.mdx +0 -79
- package/src/components/organisms/searchTable/searchTable.stories.tsx +0 -73
- package/src/components/organisms/sidebar/sidebar.doc.mdx +0 -176
- package/src/components/organisms/sidebar/sidebar.stories.tsx +0 -234
- package/src/components/organisms/toast/toast.doc.mdx +0 -50
- package/src/components/organisms/toast/toast.stories.tsx +0 -137
- package/src/components/organisms/topbar/topbar.doc.mdx +0 -72
- package/src/components/organisms/topbar/topbar.stories.tsx +0 -79
- package/src/components/organisms/triple-filter/tripleFilter.doc.mdx +0 -62
- package/src/components/organisms/triple-filter/tripleFilter.stories.tsx +0 -31
- package/src/components/templates/layout/layout.doc.mdx +0 -53
- package/src/components/templates/layout/layout.stories.tsx +0 -113
- package/src/components/templates/page/page.doc.mdx +0 -86
- package/src/components/templates/page/page.stories.tsx +0 -97
- package/src/components/theme-provider/themeProvider.doc.mdx +0 -85
- package/src/components/theme-provider/themeProvider.stories.tsx +0 -58
|
@@ -3,7 +3,6 @@ import { FaCode } from "react-icons/fa";
|
|
|
3
3
|
import ITStack from "../components/atoms/stack/stack";
|
|
4
4
|
import ITFlex from "../components/atoms/flex/flex";
|
|
5
5
|
import ITGrid from "../components/atoms/grid/grid";
|
|
6
|
-
import ITCard from "../components/molecules/card/card";
|
|
7
6
|
import ITButton from "../components/atoms/button/button";
|
|
8
7
|
import ITStatCard from "../components/molecules/stat-card/stat-card";
|
|
9
8
|
import ITAvatar from "../components/atoms/avatar/avatar";
|
|
@@ -13,6 +12,7 @@ import ITSlideToggle from "../components/atoms/slide/slide";
|
|
|
13
12
|
import ITSelect from "../components/molecules/select/select";
|
|
14
13
|
import ITInput from "../components/atoms/input/input";
|
|
15
14
|
import { ShowcaseLayout, CodeViewer } from "./ShowcaseLayout";
|
|
15
|
+
import { useITTranslation } from "@/i18n";
|
|
16
16
|
|
|
17
17
|
// ─────────────────────────────────────────
|
|
18
18
|
// 1. ITStack Showcase
|
|
@@ -71,6 +71,7 @@ const StackChip = ({ label, color = "primary" }: { label: string; color?: "prima
|
|
|
71
71
|
};
|
|
72
72
|
|
|
73
73
|
export const StackShowcase = () => {
|
|
74
|
+
const { t } = useITTranslation();
|
|
74
75
|
const [direction, setDirection] = useState<"row" | "column">("column");
|
|
75
76
|
const [spacing, setSpacing] = useState(3);
|
|
76
77
|
const [withDivider, setWithDivider] = useState(false);
|
|
@@ -173,7 +174,7 @@ export const StackShowcase = () => {
|
|
|
173
174
|
return (
|
|
174
175
|
<ShowcaseLayout
|
|
175
176
|
title="ITStack"
|
|
176
|
-
description="
|
|
177
|
+
description={t("showcase.layoutPrimitives.stackDesc")}
|
|
177
178
|
code={buildCode()}
|
|
178
179
|
doc={{
|
|
179
180
|
summary:
|
|
@@ -248,7 +249,7 @@ export const StackShowcase = () => {
|
|
|
248
249
|
controls={
|
|
249
250
|
<>
|
|
250
251
|
<div>
|
|
251
|
-
<p className="text-
|
|
252
|
+
<p className="mb-1.5 block font-mono text-[10px] font-medium uppercase tracking-[0.14em] text-slate-500 dark:text-slate-400">{t("showcase.layoutPrimitives.direction")}</p>
|
|
252
253
|
<ITSegmentedControl
|
|
253
254
|
options={[
|
|
254
255
|
{ value: "column", label: "Column" },
|
|
@@ -260,23 +261,23 @@ export const StackShowcase = () => {
|
|
|
260
261
|
onChange={(v) => setDirection(v as any)}
|
|
261
262
|
/>
|
|
262
263
|
</div>
|
|
263
|
-
<ITSlider label="
|
|
264
|
+
<ITSlider label={t("showcase.layoutPrimitives.spacingUnits")} value={spacing} onChange={setSpacing} min={0} max={12} />
|
|
264
265
|
<ITSelect
|
|
265
266
|
name="align_items"
|
|
266
|
-
label="
|
|
267
|
+
label={t("showcase.layoutPrimitives.alignItems")}
|
|
267
268
|
value={align}
|
|
268
269
|
onChange={(e) => setAlign(e.target.value)}
|
|
269
270
|
options={alignOptions}
|
|
270
271
|
/>
|
|
271
272
|
<ITSelect
|
|
272
273
|
name="justify_content"
|
|
273
|
-
label="
|
|
274
|
+
label={t("showcase.layoutPrimitives.justifyContent")}
|
|
274
275
|
value={justify}
|
|
275
276
|
onChange={(e) => setJustify(e.target.value)}
|
|
276
277
|
options={justifyOptions}
|
|
277
278
|
/>
|
|
278
279
|
<div>
|
|
279
|
-
<p className="text-
|
|
280
|
+
<p className="mb-1.5 block font-mono text-[10px] font-medium uppercase tracking-[0.14em] text-slate-500 dark:text-slate-400">{t("showcase.layoutPrimitives.flexWrap")}</p>
|
|
280
281
|
<ITSegmentedControl
|
|
281
282
|
options={[
|
|
282
283
|
{ value: "nowrap", label: "Nowrap" },
|
|
@@ -288,8 +289,10 @@ export const StackShowcase = () => {
|
|
|
288
289
|
/>
|
|
289
290
|
</div>
|
|
290
291
|
<ITFlex justify="between" align="center">
|
|
291
|
-
<span className="text-
|
|
292
|
-
<ITSlideToggle isOn={withDivider} onToggle={setWithDivider} size="sm"
|
|
292
|
+
<span className="font-mono text-[11px] font-medium uppercase tracking-[0.14em] text-slate-500 dark:text-slate-400">{t("showcase.layoutPrimitives.showDivider")}</span>
|
|
293
|
+
<ITSlideToggle isOn={withDivider} onToggle={setWithDivider} size="sm"
|
|
294
|
+
ariaLabel={t("showcase.layoutPrimitives.showDivider")}
|
|
295
|
+
/>
|
|
293
296
|
</ITFlex>
|
|
294
297
|
</>
|
|
295
298
|
}
|
|
@@ -297,15 +300,15 @@ export const StackShowcase = () => {
|
|
|
297
300
|
<ITStack spacing={8}>
|
|
298
301
|
{/* ── Section 1: Spacing Scale ── */}
|
|
299
302
|
<GallerySection
|
|
300
|
-
title="
|
|
301
|
-
subtitle="
|
|
303
|
+
title={t("showcase.layoutPrimitives.spacingScale")}
|
|
304
|
+
subtitle={t("showcase.layoutPrimitives.spacingScaleSubtitle")}
|
|
302
305
|
>
|
|
303
306
|
<div className="grid grid-cols-1 lg:grid-cols-2 gap-6">
|
|
304
307
|
{[
|
|
305
|
-
{ gap: 1, label: "
|
|
306
|
-
{ gap: 3, label: "
|
|
307
|
-
{ gap: 6, label: "
|
|
308
|
-
{ gap: 10, label: "
|
|
308
|
+
{ gap: 1, label: t("showcase.layoutPrimitives.scaleTight"), desc: t("showcase.layoutPrimitives.scaleTightDesc") },
|
|
309
|
+
{ gap: 3, label: t("showcase.layoutPrimitives.scaleDefault"), desc: t("showcase.layoutPrimitives.scaleDefaultDesc") },
|
|
310
|
+
{ gap: 6, label: t("showcase.layoutPrimitives.scaleRelaxed"), desc: t("showcase.layoutPrimitives.scaleRelaxedDesc") },
|
|
311
|
+
{ gap: 10, label: t("showcase.layoutPrimitives.scaleSpacious"), desc: t("showcase.layoutPrimitives.scaleSpaciousDesc") },
|
|
309
312
|
].map((s) => (
|
|
310
313
|
<div key={s.gap} className="bg-white dark:bg-slate-800/60 rounded-2xl border border-slate-200 dark:border-slate-700 p-5 shadow-sm">
|
|
311
314
|
<div className="flex items-center justify-between mb-3">
|
|
@@ -325,17 +328,17 @@ export const StackShowcase = () => {
|
|
|
325
328
|
|
|
326
329
|
{/* ── Section 2: Justify Content ── */}
|
|
327
330
|
<GallerySection
|
|
328
|
-
title="
|
|
329
|
-
subtitle="
|
|
331
|
+
title={t("showcase.layoutPrimitives.justifyTitle")}
|
|
332
|
+
subtitle={t("showcase.layoutPrimitives.justifySubtitle")}
|
|
330
333
|
>
|
|
331
334
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
332
335
|
{[
|
|
333
|
-
{ label: "start", desc: "
|
|
334
|
-
{ label: "center", desc: "
|
|
335
|
-
{ label: "end", desc: "
|
|
336
|
-
{ label: "between", desc: "
|
|
337
|
-
{ label: "around", desc: "
|
|
338
|
-
{ label: "evenly", desc: "
|
|
336
|
+
{ label: "start", desc: t("showcase.layoutPrimitives.justifyStartDesc") },
|
|
337
|
+
{ label: "center", desc: t("showcase.layoutPrimitives.justifyCenterDesc") },
|
|
338
|
+
{ label: "end", desc: t("showcase.layoutPrimitives.justifyEndDesc") },
|
|
339
|
+
{ label: "between", desc: t("showcase.layoutPrimitives.justifyBetweenDesc") },
|
|
340
|
+
{ label: "around", desc: t("showcase.layoutPrimitives.justifyAroundDesc") },
|
|
341
|
+
{ label: "evenly", desc: t("showcase.layoutPrimitives.justifyEvenlyDesc") },
|
|
339
342
|
].map((j) => (
|
|
340
343
|
<div key={j.label} className="bg-white dark:bg-slate-800/60 rounded-2xl border border-slate-200 dark:border-slate-700 p-5 shadow-sm">
|
|
341
344
|
<div className="flex items-center justify-between mb-1">
|
|
@@ -356,16 +359,16 @@ export const StackShowcase = () => {
|
|
|
356
359
|
|
|
357
360
|
{/* ── Section 3: Align Items ── */}
|
|
358
361
|
<GallerySection
|
|
359
|
-
title="
|
|
360
|
-
subtitle="
|
|
362
|
+
title={t("showcase.layoutPrimitives.alignTitle")}
|
|
363
|
+
subtitle={t("showcase.layoutPrimitives.alignSubtitle")}
|
|
361
364
|
>
|
|
362
365
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
363
366
|
{[
|
|
364
|
-
{ label: "start", desc: "
|
|
365
|
-
{ label: "center", desc: "
|
|
366
|
-
{ label: "end", desc: "
|
|
367
|
-
{ label: "stretch", desc: "
|
|
368
|
-
{ label: "baseline", desc: "
|
|
367
|
+
{ label: "start", desc: t("showcase.layoutPrimitives.alignStartDesc") },
|
|
368
|
+
{ label: "center", desc: t("showcase.layoutPrimitives.alignCenterDesc") },
|
|
369
|
+
{ label: "end", desc: t("showcase.layoutPrimitives.alignEndDesc") },
|
|
370
|
+
{ label: "stretch", desc: t("showcase.layoutPrimitives.alignStretchDesc") },
|
|
371
|
+
{ label: "baseline", desc: t("showcase.layoutPrimitives.alignBaselineDesc") },
|
|
369
372
|
].map((a) => (
|
|
370
373
|
<div key={a.label} className="bg-white dark:bg-slate-800/60 rounded-2xl border border-slate-200 dark:border-slate-700 p-5 shadow-sm">
|
|
371
374
|
<div className="flex items-center justify-between mb-1">
|
|
@@ -393,12 +396,12 @@ export const StackShowcase = () => {
|
|
|
393
396
|
|
|
394
397
|
{/* ── Section 4: Real UI cases ── */}
|
|
395
398
|
<GallerySection
|
|
396
|
-
title="
|
|
397
|
-
subtitle="
|
|
399
|
+
title={t("showcase.structure.galleryRealCases")}
|
|
400
|
+
subtitle={t("showcase.layoutPrimitives.stackGallerySubtitle")}
|
|
398
401
|
>
|
|
399
402
|
<div className="grid grid-cols-1 lg:grid-cols-2 gap-5">
|
|
400
403
|
{/* Page header with actions */}
|
|
401
|
-
<PatternCard title="
|
|
404
|
+
<PatternCard title={t("showcase.layoutPrimitives.patternPageHeader")} desc={t("showcase.layoutPrimitives.patternPageHeaderDesc")} code={PATTERN_CODES.pageHeader}>
|
|
402
405
|
<div className="rounded-xl p-4 border border-slate-200 dark:border-slate-700 bg-slate-50 dark:bg-slate-800/80">
|
|
403
406
|
<ITStack direction="row" spacing={3} justifyContent="between" alignItems="center">
|
|
404
407
|
<div>
|
|
@@ -418,13 +421,13 @@ export const StackShowcase = () => {
|
|
|
418
421
|
</PatternCard>
|
|
419
422
|
|
|
420
423
|
{/* Tag cloud */}
|
|
421
|
-
<PatternCard title="
|
|
424
|
+
<PatternCard title={t("showcase.layoutPrimitives.patternTagCloud")} desc={t("showcase.layoutPrimitives.patternTagCloudDesc")} code={PATTERN_CODES.tagCloud}>
|
|
422
425
|
<div className="rounded-xl p-4 border border-slate-200 dark:border-slate-700 bg-slate-50 dark:bg-slate-800/80">
|
|
423
426
|
<ITStack direction="row" spacing={2} flexWrap="wrap">
|
|
424
427
|
<StackChip label="React" color="primary" />
|
|
425
428
|
<StackChip label="TypeScript" color="success" />
|
|
426
429
|
<StackChip label="Tailwind" color="info" />
|
|
427
|
-
<StackChip label="
|
|
430
|
+
<StackChip label="Sandbox" color="warning" />
|
|
428
431
|
<StackChip label="Vite" color="primary" />
|
|
429
432
|
<StackChip label="CSS Vars" color="info" />
|
|
430
433
|
<StackChip label="Flexbox" color="success" />
|
|
@@ -434,7 +437,7 @@ export const StackShowcase = () => {
|
|
|
434
437
|
</PatternCard>
|
|
435
438
|
|
|
436
439
|
{/* Section list with dividers */}
|
|
437
|
-
<PatternCard title="
|
|
440
|
+
<PatternCard title={t("showcase.layoutPrimitives.patternSectionList")} desc={t("showcase.layoutPrimitives.patternSectionListDesc")} code={PATTERN_CODES.sectionList}>
|
|
438
441
|
<div className="rounded-xl p-2 border border-slate-200 dark:border-slate-700 bg-slate-50 dark:bg-slate-800/80">
|
|
439
442
|
<ITStack spacing={0} divider={<div className="h-px bg-slate-200 dark:bg-slate-700 mx-3" />}>
|
|
440
443
|
{[
|
|
@@ -469,7 +472,7 @@ export const StackShowcase = () => {
|
|
|
469
472
|
</PatternCard>
|
|
470
473
|
|
|
471
474
|
{/* Notification banner */}
|
|
472
|
-
<PatternCard title="
|
|
475
|
+
<PatternCard title={t("showcase.layoutPrimitives.patternNotification")} desc={t("showcase.layoutPrimitives.patternNotificationDesc")} code={PATTERN_CODES.notification}>
|
|
473
476
|
<div className="rounded-xl border border-emerald-200 dark:border-emerald-800/50 overflow-hidden bg-emerald-50 dark:bg-emerald-950/40">
|
|
474
477
|
<ITStack direction="row" spacing={3} alignItems="center" className="p-4">
|
|
475
478
|
<div className="w-9 h-9 rounded-full bg-emerald-500 flex items-center justify-center text-white shrink-0 shadow-sm">
|
|
@@ -487,7 +490,7 @@ export const StackShowcase = () => {
|
|
|
487
490
|
</PatternCard>
|
|
488
491
|
|
|
489
492
|
{/* Stats row */}
|
|
490
|
-
<PatternCard title="
|
|
493
|
+
<PatternCard title={t("showcase.layoutPrimitives.patternStatsRow")} desc={t("showcase.layoutPrimitives.patternStatsRowDesc")} code={PATTERN_CODES.statsRow}>
|
|
491
494
|
<div className="rounded-xl p-4 border border-slate-200 dark:border-slate-700 bg-slate-50 dark:bg-slate-800/80">
|
|
492
495
|
<ITStack direction="row" spacing={3}>
|
|
493
496
|
{[
|
|
@@ -496,7 +499,7 @@ export const StackShowcase = () => {
|
|
|
496
499
|
{ label: "Conversion", value: "3.24%", delta: "−0.8%", color: "amber" },
|
|
497
500
|
].map((stat) => (
|
|
498
501
|
<div key={stat.label} className="flex-1 min-w-0 bg-white dark:bg-slate-800 rounded-xl p-3 border border-slate-200 dark:border-slate-700 shadow-sm">
|
|
499
|
-
<p className="text-[10px] uppercase tracking-
|
|
502
|
+
<p className="font-mono text-[10px] font-medium uppercase tracking-[0.14em] text-slate-500 dark:text-slate-400">{stat.label}</p>
|
|
500
503
|
<p className="text-xl font-bold text-slate-800 dark:text-slate-100 mt-1 font-mono">{stat.value}</p>
|
|
501
504
|
<p className={`text-[10px] font-semibold mt-0.5 ${
|
|
502
505
|
stat.color === "emerald" ? "text-emerald-600 dark:text-emerald-400" :
|
|
@@ -532,19 +535,20 @@ const GallerySection = ({ title, subtitle, children }: { title: string; subtitle
|
|
|
532
535
|
);
|
|
533
536
|
|
|
534
537
|
const PatternCard = ({ title, desc, code, children }: { title: string; desc?: string; code?: string; children: React.ReactNode }) => {
|
|
538
|
+
const { t } = useITTranslation();
|
|
535
539
|
const [showCode, setShowCode] = useState(false);
|
|
536
540
|
return (
|
|
537
541
|
<div className="bg-white dark:bg-slate-900/60 rounded-2xl border border-slate-200 dark:border-slate-700 shadow-sm hover:shadow-md transition-shadow overflow-hidden">
|
|
538
542
|
<div className="flex items-start justify-between gap-2 p-4 pb-3">
|
|
539
543
|
<div className="min-w-0">
|
|
540
|
-
<p className="text-
|
|
544
|
+
<p className="font-mono text-[11px] font-medium uppercase tracking-[0.14em] text-slate-500 dark:text-slate-400">{title}</p>
|
|
541
545
|
{desc && <p className="text-[11px] text-slate-500 dark:text-slate-400 mt-0.5">{desc}</p>}
|
|
542
546
|
</div>
|
|
543
547
|
{code && (
|
|
544
548
|
<ITButton variant="outlined" color="gray" size="sm" onClick={() => setShowCode(!showCode)}>
|
|
545
549
|
<ITFlex align="center" gap={1}>
|
|
546
550
|
<FaCode size={9} />
|
|
547
|
-
{showCode ? "
|
|
551
|
+
{showCode ? t("showcase.common.hideCode") : t("showcase.common.code")}
|
|
548
552
|
</ITFlex>
|
|
549
553
|
</ITButton>
|
|
550
554
|
)}
|
|
@@ -635,6 +639,7 @@ const FLEX_PATTERN_CODES = {
|
|
|
635
639
|
};
|
|
636
640
|
|
|
637
641
|
export const FlexShowcase = () => {
|
|
642
|
+
const { t } = useITTranslation();
|
|
638
643
|
const [direction, setDirection] = useState<"row" | "column" | "row-reverse" | "column-reverse">("row");
|
|
639
644
|
const [justify, setJustify] = useState("start");
|
|
640
645
|
const [align, setAlign] = useState("center");
|
|
@@ -662,7 +667,7 @@ export const FlexShowcase = () => {
|
|
|
662
667
|
return (
|
|
663
668
|
<ShowcaseLayout
|
|
664
669
|
title="ITFlex"
|
|
665
|
-
description="
|
|
670
|
+
description={t("showcase.layoutPrimitives.flexDesc")}
|
|
666
671
|
code={buildCode()}
|
|
667
672
|
demo={
|
|
668
673
|
<div className="w-full max-w-xl flex flex-col">
|
|
@@ -704,7 +709,7 @@ export const FlexShowcase = () => {
|
|
|
704
709
|
controls={
|
|
705
710
|
<ITStack spacing={4}>
|
|
706
711
|
<div>
|
|
707
|
-
<p className="text-
|
|
712
|
+
<p className="mb-1.5 block font-mono text-[10px] font-medium uppercase tracking-[0.14em] text-slate-500 dark:text-slate-400">{t("showcase.layoutPrimitives.direction")}</p>
|
|
708
713
|
<ITSegmentedControl
|
|
709
714
|
options={[
|
|
710
715
|
{ value: "row", label: "Row" },
|
|
@@ -719,14 +724,14 @@ export const FlexShowcase = () => {
|
|
|
719
724
|
</div>
|
|
720
725
|
<ITSelect
|
|
721
726
|
name="flex_justify"
|
|
722
|
-
label="
|
|
727
|
+
label={t("showcase.layoutPrimitives.justifyContent")}
|
|
723
728
|
value={justify}
|
|
724
729
|
onChange={(e) => setJustify(e.target.value)}
|
|
725
730
|
options={justifyOptions}
|
|
726
731
|
/>
|
|
727
732
|
<ITSelect
|
|
728
733
|
name="flex_align"
|
|
729
|
-
label="
|
|
734
|
+
label={t("showcase.layoutPrimitives.alignItems")}
|
|
730
735
|
value={align}
|
|
731
736
|
onChange={(e) => setAlign(e.target.value)}
|
|
732
737
|
options={[
|
|
@@ -738,7 +743,7 @@ export const FlexShowcase = () => {
|
|
|
738
743
|
]}
|
|
739
744
|
/>
|
|
740
745
|
<div>
|
|
741
|
-
<p className="text-
|
|
746
|
+
<p className="mb-1.5 block font-mono text-[10px] font-medium uppercase tracking-[0.14em] text-slate-500 dark:text-slate-400">{t("showcase.layoutPrimitives.flexWrap")}</p>
|
|
742
747
|
<ITSegmentedControl
|
|
743
748
|
options={[
|
|
744
749
|
{ value: "nowrap", label: "Nowrap" },
|
|
@@ -749,19 +754,19 @@ export const FlexShowcase = () => {
|
|
|
749
754
|
onChange={(v) => setWrap(v as string)}
|
|
750
755
|
/>
|
|
751
756
|
</div>
|
|
752
|
-
<ITSlider label="
|
|
757
|
+
<ITSlider label={t("showcase.layoutPrimitives.gapUnits")} value={gap} onChange={setGap} min={0} max={12} />
|
|
753
758
|
</ITStack>
|
|
754
759
|
}
|
|
755
760
|
gallery={
|
|
756
761
|
<ITStack spacing={8}>
|
|
757
762
|
{/* ── Section 1: Real UI cases ── */}
|
|
758
763
|
<GallerySection
|
|
759
|
-
title="
|
|
760
|
-
subtitle="
|
|
764
|
+
title={t("showcase.structure.galleryRealCases")}
|
|
765
|
+
subtitle={t("showcase.layoutPrimitives.flexGallerySubtitle")}
|
|
761
766
|
>
|
|
762
767
|
<div className="grid grid-cols-1 lg:grid-cols-2 gap-5">
|
|
763
768
|
{/* Space-between row */}
|
|
764
|
-
<PatternCard title="
|
|
769
|
+
<PatternCard title={t("showcase.layoutPrimitives.patternToolbarRow")} desc="justify-between + nested actions" code={FLEX_PATTERN_CODES.spaceBetween}>
|
|
765
770
|
<div className="rounded-xl p-4 border border-slate-200 dark:border-slate-700 overflow-x-auto bg-slate-50 dark:bg-slate-800/80">
|
|
766
771
|
<ITFlex direction="row" justify="between" align="center" gap={3}>
|
|
767
772
|
<ITFlex direction="column" gap={0}>
|
|
@@ -777,7 +782,7 @@ export const FlexShowcase = () => {
|
|
|
777
782
|
</PatternCard>
|
|
778
783
|
|
|
779
784
|
{/* Grow items */}
|
|
780
|
-
<PatternCard title="
|
|
785
|
+
<PatternCard title={t("showcase.layoutPrimitives.patternGrowLayout")} desc="flex-grow distributes remaining space" code={FLEX_PATTERN_CODES.growItems}>
|
|
781
786
|
<div className="rounded-xl p-4 border border-slate-200 dark:border-slate-700 bg-slate-50 dark:bg-slate-800/80">
|
|
782
787
|
<ITFlex direction="row" gap={3}>
|
|
783
788
|
<ITFlex grow direction="column" gap={1} className="bg-blue-100 dark:bg-blue-900/30 rounded-xl p-4">
|
|
@@ -789,15 +794,15 @@ export const FlexShowcase = () => {
|
|
|
789
794
|
<p className="text-sm font-semibold text-emerald-900 dark:text-emerald-200">Main area</p>
|
|
790
795
|
</ITFlex>
|
|
791
796
|
<div className="bg-slate-100 dark:bg-slate-800 rounded-xl p-4 text-center">
|
|
792
|
-
<p className="text-[10px] uppercase tracking-
|
|
793
|
-
<p className="text-
|
|
797
|
+
<p className="font-mono text-[10px] font-medium uppercase tracking-[0.14em] text-slate-500 dark:text-slate-400">Fixed</p>
|
|
798
|
+
<p className="mt-1 font-mono text-[11px] font-medium uppercase tracking-[0.14em] text-slate-500 dark:text-slate-400">100px</p>
|
|
794
799
|
</div>
|
|
795
800
|
</ITFlex>
|
|
796
801
|
</div>
|
|
797
802
|
</PatternCard>
|
|
798
803
|
|
|
799
804
|
{/* Centered card */}
|
|
800
|
-
<PatternCard title="
|
|
805
|
+
<PatternCard title={t("showcase.layoutPrimitives.patternCenteredHero")} desc="justify-center + align-center" code={FLEX_PATTERN_CODES.centeredCard}>
|
|
801
806
|
<div className="rounded-xl border border-primary-100 dark:border-primary-800/40 overflow-x-auto bg-blue-50 dark:bg-blue-950/30">
|
|
802
807
|
<ITFlex direction="column" justify="center" align="center" gap={3} className="min-h-56 text-center px-6 py-6">
|
|
803
808
|
<div className="w-14 h-14 rounded-2xl flex items-center justify-center text-white text-2xl font-bold"
|
|
@@ -818,7 +823,7 @@ export const FlexShowcase = () => {
|
|
|
818
823
|
</PatternCard>
|
|
819
824
|
|
|
820
825
|
{/* Form row with wrap */}
|
|
821
|
-
<PatternCard title="
|
|
826
|
+
<PatternCard title={t("showcase.layoutPrimitives.patternResponsiveForm")} desc="wrap + grow + basis" code={FLEX_PATTERN_CODES.formRowWrap}>
|
|
822
827
|
<div className="rounded-xl p-4 border border-slate-200 dark:border-slate-700 bg-slate-50 dark:bg-slate-800/80">
|
|
823
828
|
<ITFlex direction="row" wrap="wrap" gap={3}>
|
|
824
829
|
{[
|
|
@@ -838,7 +843,7 @@ export const FlexShowcase = () => {
|
|
|
838
843
|
</PatternCard>
|
|
839
844
|
|
|
840
845
|
{/* Stretch column */}
|
|
841
|
-
<PatternCard title="
|
|
846
|
+
<PatternCard title={t("showcase.layoutPrimitives.patternFullHeight")} desc="column + stretch + grow" code={FLEX_PATTERN_CODES.stretchColumn}>
|
|
842
847
|
<div className="rounded-xl border border-slate-200 dark:border-slate-700 overflow-hidden h-72 bg-slate-50 dark:bg-slate-800/80">
|
|
843
848
|
<ITFlex direction="column" align="stretch" gap={0} className="h-full">
|
|
844
849
|
<div className="h-12 px-4 flex items-center justify-between bg-slate-100 dark:bg-slate-800 border-b border-slate-200 dark:border-slate-700">
|
|
@@ -915,6 +920,7 @@ const GRID_PATTERN_CODES = {
|
|
|
915
920
|
};
|
|
916
921
|
|
|
917
922
|
export const GridShowcase = () => {
|
|
923
|
+
const { t } = useITTranslation();
|
|
918
924
|
const [spacing, setSpacing] = useState(3);
|
|
919
925
|
const [columns, setColumns] = useState(3);
|
|
920
926
|
|
|
@@ -931,7 +937,7 @@ export const GridShowcase = () => {
|
|
|
931
937
|
return (
|
|
932
938
|
<ShowcaseLayout
|
|
933
939
|
title="ITGrid"
|
|
934
|
-
description="
|
|
940
|
+
description={t("showcase.layoutPrimitives.gridDesc")}
|
|
935
941
|
code={buildCode()}
|
|
936
942
|
demo={
|
|
937
943
|
<div className="w-full max-w-xl flex flex-col">
|
|
@@ -964,21 +970,21 @@ export const GridShowcase = () => {
|
|
|
964
970
|
}
|
|
965
971
|
controls={
|
|
966
972
|
<ITStack spacing={4}>
|
|
967
|
-
<ITSlider label="
|
|
968
|
-
<ITSlider label="
|
|
973
|
+
<ITSlider label={t("showcase.layoutPrimitives.columnsLabel")} value={columns} onChange={setColumns} min={1} max={6} />
|
|
974
|
+
<ITSlider label={t("showcase.layoutPrimitives.spacingUnits")} value={spacing} onChange={setSpacing} min={0} max={8} />
|
|
969
975
|
</ITStack>
|
|
970
976
|
}
|
|
971
977
|
gallery={
|
|
972
978
|
<ITStack spacing={8}>
|
|
973
979
|
<GallerySection
|
|
974
|
-
title="
|
|
975
|
-
subtitle="
|
|
980
|
+
title={t("showcase.structure.galleryRealCases")}
|
|
981
|
+
subtitle={t("showcase.layoutPrimitives.gridGallerySubtitle")}
|
|
976
982
|
>
|
|
977
983
|
<div className="grid grid-cols-1 lg:grid-cols-2 gap-5">
|
|
978
984
|
|
|
979
985
|
{/* 1. App dashboard — sidebar (3) + main (9) */}
|
|
980
986
|
<PatternCard
|
|
981
|
-
title="
|
|
987
|
+
title={t("showcase.layoutPrimitives.patternAppDashboard")}
|
|
982
988
|
desc="md=3 + md=9 → stacks on mobile"
|
|
983
989
|
code={GRID_PATTERN_CODES.appDashboard}
|
|
984
990
|
>
|
|
@@ -1033,7 +1039,7 @@ export const GridShowcase = () => {
|
|
|
1033
1039
|
].map((s) => (
|
|
1034
1040
|
<ITGrid key={s.label} item xs={12} sm={4}>
|
|
1035
1041
|
<div className="rounded-lg border border-slate-200 dark:border-slate-700 p-3 bg-slate-50/50 dark:bg-slate-800/30">
|
|
1036
|
-
<p className="text-[10px] uppercase tracking-
|
|
1042
|
+
<p className="font-mono text-[10px] font-medium uppercase tracking-[0.14em] text-slate-500 dark:text-slate-400">{s.label}</p>
|
|
1037
1043
|
<p className="text-lg font-bold text-slate-800 dark:text-slate-100 font-mono mt-0.5">{s.value}</p>
|
|
1038
1044
|
</div>
|
|
1039
1045
|
</ITGrid>
|
|
@@ -1047,7 +1053,7 @@ export const GridShowcase = () => {
|
|
|
1047
1053
|
|
|
1048
1054
|
{/* 2. User profile — avatar card (4) + activity (8) */}
|
|
1049
1055
|
<PatternCard
|
|
1050
|
-
title="
|
|
1056
|
+
title={t("showcase.layoutPrimitives.patternUserProfile")}
|
|
1051
1057
|
desc="md=4 + md=8 with nested activity"
|
|
1052
1058
|
code={GRID_PATTERN_CODES.userProfile}
|
|
1053
1059
|
>
|
|
@@ -1104,7 +1110,7 @@ export const GridShowcase = () => {
|
|
|
1104
1110
|
|
|
1105
1111
|
{/* 3. Settings page — section nav (3) + form panels (9) */}
|
|
1106
1112
|
<PatternCard
|
|
1107
|
-
title="
|
|
1113
|
+
title={t("showcase.pages.gallerySettings")}
|
|
1108
1114
|
desc="md=3 nav + md=9 form panels"
|
|
1109
1115
|
code={GRID_PATTERN_CODES.settingsPage}
|
|
1110
1116
|
>
|
|
@@ -1164,7 +1170,7 @@ export const GridShowcase = () => {
|
|
|
1164
1170
|
|
|
1165
1171
|
{/* 4. Article layout — body (8) + meta (4) */}
|
|
1166
1172
|
<PatternCard
|
|
1167
|
-
title="
|
|
1173
|
+
title={t("showcase.layoutPrimitives.patternArticleLayout")}
|
|
1168
1174
|
desc="md=8 body + md=4 sticky meta"
|
|
1169
1175
|
code={GRID_PATTERN_CODES.articleLayout}
|
|
1170
1176
|
>
|
|
@@ -1192,7 +1198,7 @@ export const GridShowcase = () => {
|
|
|
1192
1198
|
<ITGrid item xs={12} md={4}>
|
|
1193
1199
|
<div className="p-5 space-y-4 bg-slate-50/50 dark:bg-slate-800/30">
|
|
1194
1200
|
<div>
|
|
1195
|
-
<p className="text-[10px] uppercase tracking-
|
|
1201
|
+
<p className="mb-2 block font-mono text-[10px] font-medium uppercase tracking-[0.14em] text-slate-500 dark:text-slate-400">Written by</p>
|
|
1196
1202
|
<div className="flex items-center gap-2.5">
|
|
1197
1203
|
<div className="w-9 h-9 rounded-full bg-emerald-100 dark:bg-emerald-900/30 flex items-center justify-center text-emerald-700 dark:text-emerald-300 text-xs font-bold">EM</div>
|
|
1198
1204
|
<div>
|
|
@@ -1202,7 +1208,7 @@ export const GridShowcase = () => {
|
|
|
1202
1208
|
</div>
|
|
1203
1209
|
</div>
|
|
1204
1210
|
<div>
|
|
1205
|
-
<p className="text-[10px] uppercase tracking-
|
|
1211
|
+
<p className="mb-2 block font-mono text-[10px] font-medium uppercase tracking-[0.14em] text-slate-500 dark:text-slate-400">Tags</p>
|
|
1206
1212
|
<div className="flex flex-wrap gap-1">
|
|
1207
1213
|
{["Performance", "Webpack", "React"].map((t) => (
|
|
1208
1214
|
<span key={t} className="px-2 py-0.5 rounded-md text-[10px] font-medium bg-slate-200 dark:bg-slate-700 text-slate-700 dark:text-slate-300">{t}</span>
|
|
@@ -1218,7 +1224,7 @@ export const GridShowcase = () => {
|
|
|
1218
1224
|
|
|
1219
1225
|
{/* 5. Pricing tiers — 3 equal columns */}
|
|
1220
1226
|
<PatternCard
|
|
1221
|
-
title="
|
|
1227
|
+
title={t("showcase.layoutPrimitives.patternPricingComparison")}
|
|
1222
1228
|
desc="md=4 × 3 → comparison table"
|
|
1223
1229
|
code={GRID_PATTERN_CODES.pricingTiers}
|
|
1224
1230
|
>
|
|
@@ -1301,6 +1307,7 @@ export const GridShowcase = () => {
|
|
|
1301
1307
|
// ─────────────────────────────────────────
|
|
1302
1308
|
|
|
1303
1309
|
export const ScreenDashboardShowcase = () => {
|
|
1310
|
+
const { t } = useITTranslation();
|
|
1304
1311
|
const code = `// Dashboard completo en 30 líneas
|
|
1305
1312
|
<ITStack spacing={6}>
|
|
1306
1313
|
{/* Header row */}
|
|
@@ -1339,37 +1346,37 @@ export const GridShowcase = () => {
|
|
|
1339
1346
|
</ITStack>`;
|
|
1340
1347
|
|
|
1341
1348
|
return (
|
|
1342
|
-
<
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1349
|
+
<ShowcaseLayout
|
|
1350
|
+
demoAncho="completo"
|
|
1351
|
+
title={t("showcase.layoutPrimitives.screensTitle")}
|
|
1352
|
+
description={t("showcase.layoutPrimitives.screensSubtitle")}
|
|
1353
|
+
code={code}
|
|
1354
|
+
demo={
|
|
1355
|
+
<div className="w-full">
|
|
1356
|
+
<p className="mb-4 font-mono text-[11px] uppercase tracking-[0.14em] text-slate-500 dark:text-slate-400">
|
|
1357
|
+
{t("showcase.layoutPrimitives.dashboardCard")}
|
|
1358
|
+
</p>
|
|
1359
|
+
<ITStack spacing={6}>
|
|
1353
1360
|
<ITFlex justify="between" align="center">
|
|
1354
1361
|
<div>
|
|
1355
|
-
<h2 className="text-xl font-bold text-slate-800 dark:text-white">
|
|
1356
|
-
<p className="text-xs text-slate-400">
|
|
1362
|
+
<h2 className="text-xl font-bold text-slate-800 dark:text-white">{t("showcase.structure.navDashboard")}</h2>
|
|
1363
|
+
<p className="text-xs text-slate-400">{t("showcase.layoutPrimitives.dashboardSubtitle")}</p>
|
|
1357
1364
|
</div>
|
|
1358
|
-
<ITButton label="
|
|
1365
|
+
<ITButton label={t("showcase.layoutPrimitives.export")} variant="outlined" size="sm" />
|
|
1359
1366
|
</ITFlex>
|
|
1360
1367
|
|
|
1361
1368
|
<ITGrid container spacing={3}>
|
|
1362
1369
|
<ITGrid item xs={12} sm={6} lg={3}>
|
|
1363
|
-
<ITStatCard label="
|
|
1370
|
+
<ITStatCard label={t("showcase.layoutPrimitives.statActiveUsers")} value="1,245" trend="+12%" trendDirection="up" />
|
|
1364
1371
|
</ITGrid>
|
|
1365
1372
|
<ITGrid item xs={12} sm={6} lg={3}>
|
|
1366
|
-
<ITStatCard label="
|
|
1373
|
+
<ITStatCard label={t("showcase.structure.statSalesToday")} value="$4,320" trend="+5.4%" trendDirection="up" color="bg-blue-50 dark:bg-blue-950/20" />
|
|
1367
1374
|
</ITGrid>
|
|
1368
1375
|
<ITGrid item xs={12} sm={6} lg={3}>
|
|
1369
|
-
<ITStatCard label="
|
|
1376
|
+
<ITStatCard label={t("showcase.structure.navOrders")} value="89" trend="-2.1%" trendDirection="down" color="bg-amber-50 dark:bg-amber-950/20" />
|
|
1370
1377
|
</ITGrid>
|
|
1371
1378
|
<ITGrid item xs={12} sm={6} lg={3}>
|
|
1372
|
-
<ITStatCard label="
|
|
1379
|
+
<ITStatCard label={t("showcase.layoutPrimitives.statOpenTickets")} value="12" trend="-8%" trendDirection="down" color="bg-rose-50 dark:bg-rose-950/20" />
|
|
1373
1380
|
</ITGrid>
|
|
1374
1381
|
</ITGrid>
|
|
1375
1382
|
|
|
@@ -1377,8 +1384,8 @@ export const GridShowcase = () => {
|
|
|
1377
1384
|
<ITGrid item xs={12} lg={8}>
|
|
1378
1385
|
<div className="bg-slate-50 dark:bg-slate-900/50 rounded-xl p-6 border border-slate-100 dark:border-slate-800">
|
|
1379
1386
|
<ITFlex justify="between" align="center" className="mb-4">
|
|
1380
|
-
<span className="text-sm font-bold text-slate-700 dark:text-slate-200">
|
|
1381
|
-
<span className="text-xs text-slate-400"
|
|
1387
|
+
<span className="text-sm font-bold text-slate-700 dark:text-slate-200">{t("showcase.layoutPrimitives.salesChart")}</span>
|
|
1388
|
+
<span className="text-xs text-slate-400">{t("showcase.layoutPrimitives.last30Days")}</span>
|
|
1382
1389
|
</ITFlex>
|
|
1383
1390
|
<div className="h-48 flex items-end gap-2">
|
|
1384
1391
|
{[40, 65, 45, 80, 55, 90, 70, 85, 60, 95, 75, 50].map((h, i) => (
|
|
@@ -1389,7 +1396,7 @@ export const GridShowcase = () => {
|
|
|
1389
1396
|
</ITGrid>
|
|
1390
1397
|
<ITGrid item xs={12} lg={4}>
|
|
1391
1398
|
<div className="bg-slate-50 dark:bg-slate-900/50 rounded-xl p-6 border border-slate-100 dark:border-slate-800 h-full">
|
|
1392
|
-
<span className="text-sm font-bold text-slate-700 dark:text-slate-200 mb-3 block">
|
|
1399
|
+
<span className="text-sm font-bold text-slate-700 dark:text-slate-200 mb-3 block">{t("showcase.structure.recentActivity")}</span>
|
|
1393
1400
|
<ITStack spacing={3}>
|
|
1394
1401
|
{[
|
|
1395
1402
|
{ user: "Ana López", action: "creó un reporte" },
|
|
@@ -1408,15 +1415,15 @@ export const GridShowcase = () => {
|
|
|
1408
1415
|
</div>
|
|
1409
1416
|
</ITGrid>
|
|
1410
1417
|
</ITGrid>
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
</div>
|
|
1418
|
+
</ITStack>
|
|
1419
|
+
</div>
|
|
1420
|
+
}
|
|
1421
|
+
/>
|
|
1416
1422
|
);
|
|
1417
1423
|
};
|
|
1418
1424
|
|
|
1419
1425
|
export const ScreenFormShowcase = () => {
|
|
1426
|
+
const { t } = useITTranslation();
|
|
1420
1427
|
const formCode = `// Formulario responsivo en 20 líneas
|
|
1421
1428
|
<ITStack spacing={6}>
|
|
1422
1429
|
<div>
|
|
@@ -1450,19 +1457,28 @@ export const ScreenFormShowcase = () => {
|
|
|
1450
1457
|
</ITStack>`;
|
|
1451
1458
|
|
|
1452
1459
|
return (
|
|
1453
|
-
<
|
|
1454
|
-
|
|
1460
|
+
<ShowcaseLayout
|
|
1461
|
+
demoAncho="completo"
|
|
1462
|
+
title={t("showcase.layoutPrimitives.screensTitle")}
|
|
1463
|
+
description={t("showcase.layoutPrimitives.screensSubtitle")}
|
|
1464
|
+
code={formCode}
|
|
1465
|
+
demo={
|
|
1466
|
+
<div className="w-full">
|
|
1467
|
+
<p className="mb-4 font-mono text-[11px] uppercase tracking-[0.14em] text-slate-500 dark:text-slate-400">
|
|
1468
|
+
{t("showcase.layoutPrimitives.formCard")}
|
|
1469
|
+
</p>
|
|
1470
|
+
<ITStack spacing={6}>
|
|
1455
1471
|
<div>
|
|
1456
|
-
<h2 className="text-xl font-bold text-slate-800 dark:text-white">
|
|
1457
|
-
<p className="text-xs text-slate-400">
|
|
1472
|
+
<h2 className="text-xl font-bold text-slate-800 dark:text-white">{t("showcase.layoutPrimitives.newUser")}</h2>
|
|
1473
|
+
<p className="text-xs text-slate-400">{t("showcase.layoutPrimitives.newUserSubtitle")}</p>
|
|
1458
1474
|
</div>
|
|
1459
1475
|
|
|
1460
1476
|
<ITGrid container spacing={4}>
|
|
1461
1477
|
<ITGrid item xs={12} md={6}>
|
|
1462
1478
|
<ITInput
|
|
1463
1479
|
name="nombre"
|
|
1464
|
-
label="
|
|
1465
|
-
placeholder="
|
|
1480
|
+
label={t("showcase.pages.firstName")}
|
|
1481
|
+
placeholder={t("showcase.layoutPrimitives.exampleJuan")}
|
|
1466
1482
|
onChange={() => {}}
|
|
1467
1483
|
size="sm"
|
|
1468
1484
|
/>
|
|
@@ -1470,23 +1486,23 @@ export const ScreenFormShowcase = () => {
|
|
|
1470
1486
|
<ITGrid item xs={12} md={6}>
|
|
1471
1487
|
<ITInput
|
|
1472
1488
|
name="apellido"
|
|
1473
|
-
label="
|
|
1474
|
-
placeholder="
|
|
1489
|
+
label={t("showcase.pages.lastName")}
|
|
1490
|
+
placeholder={t("showcase.layoutPrimitives.examplePerez")}
|
|
1475
1491
|
onChange={() => {}}
|
|
1476
1492
|
/>
|
|
1477
1493
|
</ITGrid>
|
|
1478
1494
|
<ITGrid item xs={12}>
|
|
1479
1495
|
<ITInput
|
|
1480
1496
|
name="email"
|
|
1481
|
-
label="
|
|
1482
|
-
placeholder="
|
|
1497
|
+
label={t("showcase.pages.emailField")}
|
|
1498
|
+
placeholder={t("showcase.layoutPrimitives.exampleEmail")}
|
|
1483
1499
|
onChange={() => {}}
|
|
1484
1500
|
/>
|
|
1485
1501
|
</ITGrid>
|
|
1486
1502
|
<ITGrid item xs={12} md={6}>
|
|
1487
1503
|
<ITSelect
|
|
1488
1504
|
name="rol"
|
|
1489
|
-
label="
|
|
1505
|
+
label={t("showcase.pages.role")}
|
|
1490
1506
|
options={[
|
|
1491
1507
|
{ label: "Seleccionar...", value: "" },
|
|
1492
1508
|
{ label: "Admin", value: "admin" },
|
|
@@ -1498,7 +1514,7 @@ export const ScreenFormShowcase = () => {
|
|
|
1498
1514
|
<ITGrid item xs={12} md={6}>
|
|
1499
1515
|
<ITSelect
|
|
1500
1516
|
name="departamento"
|
|
1501
|
-
label="
|
|
1517
|
+
label={t("showcase.layoutPrimitives.department")}
|
|
1502
1518
|
options={[
|
|
1503
1519
|
{ label: "Seleccionar...", value: "" },
|
|
1504
1520
|
{ label: "Ingeniería", value: "ingenieria" },
|
|
@@ -1509,16 +1525,15 @@ export const ScreenFormShowcase = () => {
|
|
|
1509
1525
|
</ITGrid>
|
|
1510
1526
|
<ITGrid item xs={12}>
|
|
1511
1527
|
<ITFlex justify="end" gap={3}>
|
|
1512
|
-
<ITButton label="
|
|
1513
|
-
<ITButton label="
|
|
1528
|
+
<ITButton label={t("showcase.common.cancel")} variant="outlined" size="sm" />
|
|
1529
|
+
<ITButton label={t("showcase.common.save")} size="sm" />
|
|
1514
1530
|
</ITFlex>
|
|
1515
1531
|
</ITGrid>
|
|
1516
1532
|
</ITGrid>
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
</ITCard>
|
|
1533
|
+
</ITStack>
|
|
1534
|
+
</div>
|
|
1535
|
+
}
|
|
1536
|
+
/>
|
|
1522
1537
|
);
|
|
1523
1538
|
};
|
|
1524
1539
|
|