@axzydev/axzy_ui_system 1.2.13 → 1.2.15
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 +43 -0
- package/dist/index.cjs +6503 -6398
- 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 +169 -110
- package/dist/index.d.ts +169 -110
- package/dist/index.js +6519 -6414
- package/dist/index.js.map +1 -1
- package/package.json +4 -2
- package/src/App.tsx +86 -81
- package/src/components/{avatar → atoms/avatar}/avatar.doc.mdx +2 -2
- package/src/components/{avatar → atoms/avatar}/avatar.stories.tsx +1 -2
- package/src/components/{avatar → atoms/avatar}/avatar.tsx +1 -1
- package/src/components/{badget → atoms/badget}/badget.doc.mdx +4 -4
- package/src/components/{badget → atoms/badget}/badget.props.ts +1 -1
- package/src/components/{badget → atoms/badget}/badget.stories.tsx +1 -2
- package/src/components/{badget → atoms/badget}/badget.tsx +3 -3
- package/src/components/{button → atoms/button}/button.doc.mdx +3 -3
- package/src/components/{button → atoms/button}/button.props.ts +3 -3
- package/src/components/{button → atoms/button}/button.stories.tsx +1 -2
- package/src/components/{button → atoms/button}/button.tsx +7 -7
- package/src/components/{checkbox → atoms/checkbox}/checkbox.doc.mdx +2 -2
- package/src/components/{checkbox → atoms/checkbox}/checkbox.stories.tsx +2 -3
- package/src/components/{checkbox → atoms/checkbox}/checkbox.tsx +1 -1
- package/src/components/{divider → atoms/divider}/divider.doc.mdx +2 -2
- package/src/components/{divider → atoms/divider}/divider.stories.tsx +3 -4
- package/src/components/{flex → atoms/flex}/flex.doc.mdx +2 -2
- package/src/components/{flex → atoms/flex}/flex.stories.tsx +1 -2
- package/src/components/{grid → atoms/grid}/grid.doc.mdx +2 -2
- package/src/components/{grid → atoms/grid}/grid.stories.tsx +1 -2
- package/src/components/{image → atoms/image}/image.doc.mdx +2 -2
- package/src/components/{image → atoms/image}/image.stories.tsx +1 -2
- package/src/components/{input → atoms/input}/input.doc.mdx +3 -3
- package/src/components/{input → atoms/input}/input.props.ts +3 -3
- package/src/components/{input → atoms/input}/input.stories.tsx +2 -4
- package/src/components/{input → atoms/input}/input.tsx +5 -14
- package/src/components/{loader → atoms/loader}/loader.doc.mdx +2 -2
- package/src/components/{loader → atoms/loader}/loader.stories.tsx +2 -3
- package/src/components/{loader → atoms/loader}/loader.tsx +1 -1
- package/src/components/{popover → atoms/popover}/popover.doc.mdx +2 -2
- package/src/components/{popover → atoms/popover}/popover.stories.tsx +3 -4
- package/src/components/{progress → atoms/progress}/progress.doc.mdx +2 -2
- package/src/components/{progress → atoms/progress}/progress.stories.tsx +2 -3
- package/src/components/{radio → atoms/radio}/radio.doc.mdx +2 -2
- package/src/components/{radio → atoms/radio}/radio.stories.tsx +1 -3
- package/src/components/{radio → atoms/radio}/radio.tsx +1 -1
- package/src/components/{segmented-control → atoms/segmented-control}/segmented-control.doc.mdx +2 -2
- package/src/components/{segmented-control → atoms/segmented-control}/segmented-control.stories.tsx +1 -2
- package/src/components/{segmented-control → atoms/segmented-control}/segmented-control.tsx +1 -1
- package/src/components/{skeleton → atoms/skeleton}/skeleton.doc.mdx +2 -2
- package/src/components/{skeleton → atoms/skeleton}/skeleton.stories.tsx +2 -3
- package/src/components/{slide → atoms/slide}/slide.doc.mdx +2 -2
- package/src/components/{slide → atoms/slide}/slide.stories.tsx +1 -2
- package/src/components/{slider → atoms/slider}/slider.doc.mdx +2 -2
- package/src/components/{slider → atoms/slider}/slider.stories.tsx +1 -2
- package/src/components/{slider → atoms/slider}/slider.tsx +1 -1
- package/src/components/{stack → atoms/stack}/stack.doc.mdx +2 -2
- package/src/components/{stack → atoms/stack}/stack.stories.tsx +2 -3
- package/src/components/{text → atoms/text}/text.doc.mdx +2 -2
- package/src/components/{text → atoms/text}/text.stories.tsx +1 -2
- package/src/components/{textarea → atoms/textarea}/textarea.doc.mdx +2 -2
- package/src/components/{textarea → atoms/textarea}/textarea.props.ts +0 -2
- package/src/components/{textarea → atoms/textarea}/textarea.stories.tsx +1 -2
- package/src/components/{textarea → atoms/textarea}/textarea.tsx +1 -1
- package/src/components/{tooltip → atoms/tooltip}/tooltip.doc.mdx +2 -2
- package/src/components/{tooltip → atoms/tooltip}/tooltip.stories.tsx +2 -3
- package/src/components/{tooltip → atoms/tooltip}/tooltip.tsx +1 -1
- package/src/components/isolation/isolation.stories.tsx +202 -0
- package/src/components/{alert → molecules/alert}/alert.doc.mdx +2 -2
- package/src/components/{alert → molecules/alert}/alert.stories.tsx +1 -2
- package/src/components/{alert → molecules/alert}/alert.tsx +1 -2
- package/src/components/{breadcrumbs → molecules/breadcrumbs}/breadcrumbs.doc.mdx +2 -2
- package/src/components/{breadcrumbs → molecules/breadcrumbs}/breadcrumbs.stories.tsx +1 -2
- package/src/components/{breadcrumbs → molecules/breadcrumbs}/breadcrumbs.tsx +1 -1
- package/src/components/{calendar → molecules/calendar}/calendar.doc.mdx +2 -2
- package/src/components/{calendar → molecules/calendar}/calendar.stories.tsx +1 -2
- package/src/components/{calendar → molecules/calendar}/calendar.tsx +42 -42
- package/src/components/molecules/calendar/index.ts +2 -0
- package/src/components/{card → molecules/card}/card.doc.mdx +2 -2
- package/src/components/{card → molecules/card}/card.stories.tsx +2 -3
- package/src/components/{card → molecules/card}/card.tsx +4 -4
- package/src/components/{date-picker → molecules/date-picker}/date-picker.doc.mdx +3 -3
- package/src/components/{date-picker → molecules/date-picker}/date-picker.props.ts +1 -1
- package/src/components/{date-picker → molecules/date-picker}/date-picker.stories.tsx +1 -3
- package/src/components/{date-picker → molecules/date-picker}/datePicker.tsx +3 -3
- package/src/components/{empty-state → molecules/empty-state}/empty-state.doc.mdx +3 -3
- package/src/components/{empty-state → molecules/empty-state}/empty-state.stories.tsx +3 -4
- package/src/components/{empty-state → molecules/empty-state}/empty-state.tsx +1 -1
- package/src/components/{form-header → molecules/form-header}/form-header.doc.mdx +2 -2
- package/src/components/{form-header → molecules/form-header}/form-header.stories.tsx +1 -2
- package/src/components/{form-header → molecules/form-header}/form-header.tsx +2 -2
- package/src/components/{pagination → molecules/pagination}/pagination.doc.mdx +2 -2
- package/src/components/{pagination → molecules/pagination}/pagination.stories.tsx +1 -2
- package/src/components/{pagination → molecules/pagination}/pagination.tsx +8 -8
- package/src/components/{search-select → molecules/search-select}/index.ts +1 -1
- package/src/components/{search-select → molecules/search-select}/search-select.doc.mdx +2 -2
- package/src/components/{search-select → molecules/search-select}/search-select.props.ts +3 -0
- package/src/components/{search-select → molecules/search-select}/search-select.stories.tsx +1 -2
- package/src/components/{search-select → molecules/search-select}/search-select.tsx +8 -6
- package/src/components/{select → molecules/select}/select.doc.mdx +2 -2
- package/src/components/{select → molecules/select}/select.stories.tsx +1 -2
- package/src/components/{select → molecules/select}/select.tsx +8 -16
- package/src/components/{stat-card → molecules/stat-card}/stat-card.doc.mdx +2 -2
- package/src/components/{stat-card → molecules/stat-card}/stat-card.stories.tsx +2 -3
- package/src/components/{stat-card → molecules/stat-card}/stat-card.tsx +1 -1
- package/src/components/{stepper → molecules/stepper}/stepper.doc.mdx +2 -2
- package/src/components/{stepper → molecules/stepper}/stepper.stories.tsx +1 -2
- package/src/components/{stepper → molecules/stepper}/stepper.tsx +9 -10
- package/src/components/{table → molecules/table}/table.doc.mdx +2 -2
- package/src/components/{table → molecules/table}/table.stories.tsx +5 -22
- package/src/components/{table → molecules/table}/table.tsx +5 -15
- package/src/components/{tabs → molecules/tabs}/tabs.doc.mdx +2 -2
- package/src/components/{tabs → molecules/tabs}/tabs.stories.tsx +1 -2
- package/src/components/{tabs → molecules/tabs}/tabs.tsx +1 -1
- package/src/components/{time-picker → molecules/time-picker}/timePicker.doc.mdx +3 -3
- package/src/components/{time-picker → molecules/time-picker}/timePicker.props.ts +4 -2
- package/src/components/{time-picker → molecules/time-picker}/timePicker.stories.tsx +3 -4
- package/src/components/{time-picker → molecules/time-picker}/timePicker.tsx +5 -5
- package/src/components/{confirm-dialog → organisms/confirm-dialog}/confirm-dialog.doc.mdx +2 -2
- package/src/components/{confirm-dialog → organisms/confirm-dialog}/confirm-dialog.stories.tsx +2 -3
- package/src/components/{confirm-dialog → organisms/confirm-dialog}/confirm-dialog.tsx +4 -4
- package/src/components/{data-table → organisms/data-table}/ITDataTable.doc.mdx +2 -2
- package/src/components/{data-table → organisms/data-table}/ITDataTable.stories.tsx +3 -4
- package/src/components/{data-table → organisms/data-table}/dataTable.props.ts +1 -1
- package/src/components/{data-table → organisms/data-table}/dataTable.tsx +11 -9
- package/src/components/{dialog → organisms/dialog}/dialog.doc.mdx +2 -2
- package/src/components/{dialog → organisms/dialog}/dialog.stories.tsx +3 -5
- package/src/components/{dialog → organisms/dialog}/dialog.tsx +2 -2
- package/src/components/{drawer → organisms/drawer}/drawer.doc.mdx +2 -2
- package/src/components/{drawer → organisms/drawer}/drawer.stories.tsx +2 -3
- package/src/components/{drawer → organisms/drawer}/drawer.tsx +1 -1
- package/src/components/{dropfile → organisms/dropfile}/dropfile.doc.mdx +3 -3
- package/src/components/{dropfile → organisms/dropfile}/dropfile.props.ts +8 -4
- package/src/components/{dropfile → organisms/dropfile}/dropfile.stories.tsx +2 -5
- package/src/components/{dropfile → organisms/dropfile}/dropfile.tsx +25 -12
- package/src/components/{form-builder → organisms/form-builder}/fieldRenderer.tsx +30 -20
- package/src/components/{form-builder → organisms/form-builder}/formBuilder.context.tsx +3 -2
- package/src/components/{form-builder → organisms/form-builder}/formBuilder.doc.mdx +2 -2
- package/src/components/{form-builder → organisms/form-builder}/formBuilder.stories.tsx +0 -1
- package/src/components/{form-builder → organisms/form-builder}/formBuilder.tsx +4 -5
- package/src/components/{form-builder → organisms/form-builder}/useFormBuilder.ts +4 -4
- package/src/components/{navbar → organisms/navbar}/navbar.doc.mdx +2 -2
- package/src/components/{navbar → organisms/navbar}/navbar.stories.tsx +1 -2
- package/src/components/{navbar → organisms/navbar}/navbar.tsx +1 -1
- package/src/components/{page-header → organisms/page-header}/page-header.doc.mdx +2 -2
- package/src/components/{page-header → organisms/page-header}/page-header.props.ts +1 -1
- package/src/components/{page-header → organisms/page-header}/page-header.stories.tsx +5 -6
- package/src/components/{page-header → organisms/page-header}/page-header.tsx +2 -2
- package/src/components/{searchTable → organisms/searchTable}/components/EditableCell.tsx +4 -5
- package/src/components/{searchTable → organisms/searchTable}/components/PaginationControls.tsx +6 -6
- package/src/components/{searchTable → organisms/searchTable}/components/PaginationInfo.tsx +1 -1
- package/src/components/{searchTable → organisms/searchTable}/components/SearchAndSortBar.tsx +3 -3
- package/src/components/{searchTable → organisms/searchTable}/components/SearchInput.tsx +1 -1
- package/src/components/{searchTable → organisms/searchTable}/components/SortButton.tsx +1 -1
- package/src/components/{searchTable → organisms/searchTable}/components/TableEmptyState.tsx +1 -1
- package/src/components/{searchTable → organisms/searchTable}/components/TableHeaderCell.tsx +1 -1
- package/src/components/{searchTable → organisms/searchTable}/searchTable.doc.mdx +2 -2
- package/src/components/{searchTable → organisms/searchTable}/searchTable.stories.tsx +1 -2
- package/src/components/{searchTable → organisms/searchTable}/searchTable.tsx +1 -2
- package/src/components/{sidebar → organisms/sidebar}/sidebar.doc.mdx +2 -2
- package/src/components/{sidebar → organisms/sidebar}/sidebar.stories.tsx +1 -2
- package/src/components/{sidebar → organisms/sidebar}/sidebar.tsx +45 -43
- package/src/components/{toast → organisms/toast}/toast.doc.mdx +2 -2
- package/src/components/{toast → organisms/toast}/toast.stories.tsx +2 -3
- package/src/components/{toast → organisms/toast}/toast.tsx +1 -2
- package/src/components/{topbar → organisms/topbar}/topbar.doc.mdx +2 -2
- package/src/components/{topbar → organisms/topbar}/topbar.stories.tsx +1 -2
- package/src/components/{topbar → organisms/topbar}/topbar.tsx +25 -25
- package/src/components/{triple-filter → organisms/triple-filter}/tripleFilter.doc.mdx +2 -2
- package/src/components/{triple-filter → organisms/triple-filter}/tripleFilter.props.ts +0 -1
- package/src/components/{triple-filter → organisms/triple-filter}/tripleFilter.stories.tsx +0 -1
- package/src/components/{triple-filter → organisms/triple-filter}/tripleFilter.tsx +1 -1
- package/src/components/{layout → templates/layout}/layout.doc.mdx +2 -2
- package/src/components/{layout → templates/layout}/layout.props.ts +2 -2
- package/src/components/{layout → templates/layout}/layout.stories.tsx +1 -2
- package/src/components/{layout → templates/layout}/layout.tsx +2 -2
- package/src/components/{page → templates/page}/page.doc.mdx +2 -2
- package/src/components/{page → templates/page}/page.props.ts +1 -1
- package/src/components/{page → templates/page}/page.stories.tsx +6 -7
- package/src/components/{page → templates/page}/page.tsx +6 -6
- package/src/components/theme-provider/themePresets.ts +154 -0
- package/src/components/theme-provider/themeProvider.doc.mdx +10 -2
- package/src/components/theme-provider/themeProvider.props.ts +6 -0
- package/src/components/theme-provider/themeProvider.stories.tsx +3 -4
- package/src/components/theme-provider/themeProvider.tsx +210 -268
- package/src/hooks/useEditableRow.ts +1 -1
- package/src/index.css +36 -86
- package/src/index.ts +97 -97
- package/src/showcases/DataShowcases.tsx +4 -8
- package/src/showcases/FeedbackShowcases.tsx +6 -6
- package/src/showcases/FormShowcases.tsx +7 -7
- package/src/showcases/GettingStartedShowcase.tsx +8 -9
- package/src/showcases/HomeShowcase.tsx +12 -12
- package/src/showcases/LayoutPrimitivesShowcases.tsx +36 -57
- package/src/showcases/PageShowcases.tsx +41 -53
- package/src/showcases/ShowcaseLayout.tsx +1 -2
- package/src/showcases/SizesShowcase.tsx +85 -0
- package/src/showcases/StructureShowcases.tsx +31 -33
- package/src/theme/theme-context.ts +37 -0
- package/src/theme/theme.ts +71 -64
- package/src/theme/theme.types.ts +41 -0
- package/src/types/badget.types.ts +3 -3
- package/src/types/button.types.ts +3 -3
- package/src/types/sizes.types.ts +2 -1
- package/src/utils/styles.ts +37 -0
- package/src/components/calendar/index.ts +0 -3
- package/src/components/stepper/stepper.css +0 -26
- package/src/components/toast/toast.css +0 -32
- package/src/types/input.types.ts +0 -14
- /package/src/components/{avatar → atoms/avatar}/avatar.props.ts +0 -0
- /package/src/components/{checkbox → atoms/checkbox}/checkbox.props.ts +0 -0
- /package/src/components/{divider → atoms/divider}/divider.props.ts +0 -0
- /package/src/components/{divider → atoms/divider}/divider.tsx +0 -0
- /package/src/components/{flex → atoms/flex}/flex.props.ts +0 -0
- /package/src/components/{flex → atoms/flex}/flex.tsx +0 -0
- /package/src/components/{grid → atoms/grid}/grid.props.ts +0 -0
- /package/src/components/{grid → atoms/grid}/grid.tsx +0 -0
- /package/src/components/{image → atoms/image}/image.props.ts +0 -0
- /package/src/components/{image → atoms/image}/image.tsx +0 -0
- /package/src/components/{loader → atoms/loader}/loader.props.ts +0 -0
- /package/src/components/{popover → atoms/popover}/popover.props.ts +0 -0
- /package/src/components/{popover → atoms/popover}/popover.tsx +0 -0
- /package/src/components/{progress → atoms/progress}/progress.props.ts +0 -0
- /package/src/components/{progress → atoms/progress}/progress.tsx +0 -0
- /package/src/components/{radio → atoms/radio}/radio.props.ts +0 -0
- /package/src/components/{segmented-control → atoms/segmented-control}/segmented-control.props.ts +0 -0
- /package/src/components/{skeleton → atoms/skeleton}/skeleton.props.ts +0 -0
- /package/src/components/{skeleton → atoms/skeleton}/skeleton.tsx +0 -0
- /package/src/components/{slide → atoms/slide}/slide.props.ts +0 -0
- /package/src/components/{slide → atoms/slide}/slide.tsx +0 -0
- /package/src/components/{slider → atoms/slider}/slider.props.ts +0 -0
- /package/src/components/{stack → atoms/stack}/stack.props.ts +0 -0
- /package/src/components/{stack → atoms/stack}/stack.tsx +0 -0
- /package/src/components/{text → atoms/text}/text.props.ts +0 -0
- /package/src/components/{text → atoms/text}/text.tsx +0 -0
- /package/src/components/{tooltip → atoms/tooltip}/tooltip.props.ts +0 -0
- /package/src/components/{alert → molecules/alert}/alert.props.ts +0 -0
- /package/src/components/{breadcrumbs → molecules/breadcrumbs}/breadcrumbs.props.ts +0 -0
- /package/src/components/{calendar → molecules/calendar}/calendar.props.ts +0 -0
- /package/src/components/{card → molecules/card}/card.props.ts +0 -0
- /package/src/components/{empty-state → molecules/empty-state}/empty-state.props.ts +0 -0
- /package/src/components/{form-header → molecules/form-header}/form-header.props.ts +0 -0
- /package/src/components/{pagination → molecules/pagination}/pagination.props.ts +0 -0
- /package/src/components/{select → molecules/select}/select.props.ts +0 -0
- /package/src/components/{stat-card → molecules/stat-card}/stat-card.props.ts +0 -0
- /package/src/components/{stepper → molecules/stepper}/stepper.props.ts +0 -0
- /package/src/components/{table → molecules/table}/table.props.ts +0 -0
- /package/src/components/{tabs → molecules/tabs}/tabs.props.ts +0 -0
- /package/src/components/{confirm-dialog → organisms/confirm-dialog}/confirm-dialog.props.ts +0 -0
- /package/src/components/{dialog → organisms/dialog}/dialog.props.ts +0 -0
- /package/src/components/{drawer → organisms/drawer}/drawer.props.ts +0 -0
- /package/src/components/{form-builder → organisms/form-builder}/formBuilder.props.ts +0 -0
- /package/src/components/{navbar → organisms/navbar}/navbar.props.ts +0 -0
- /package/src/components/{searchTable → organisms/searchTable}/components/TableHeader.tsx +0 -0
- /package/src/components/{searchTable → organisms/searchTable}/components/TableRow.tsx +0 -0
- /package/src/components/{searchTable → organisms/searchTable}/searchTable.props.ts +0 -0
- /package/src/components/{sidebar → organisms/sidebar}/sidebar.props.ts +0 -0
- /package/src/components/{toast → organisms/toast}/toast.props.ts +0 -0
- /package/src/components/{topbar → organisms/topbar}/topbar.props.ts +0 -0
|
@@ -11,8 +11,6 @@ import {
|
|
|
11
11
|
FaCode,
|
|
12
12
|
FaCheck,
|
|
13
13
|
FaPlayCircle,
|
|
14
|
-
FaPlus,
|
|
15
|
-
FaSearch,
|
|
16
14
|
} from "react-icons/fa";
|
|
17
15
|
import {
|
|
18
16
|
ITCard,
|
|
@@ -45,7 +43,7 @@ const CARD_PATTERN_CODES = {
|
|
|
45
43
|
image="/courses/typescript.jpg"
|
|
46
44
|
onClick={() => resume(course.id)}
|
|
47
45
|
actions={
|
|
48
|
-
<ITButton label="Continue lesson 8" variant="filled" color="primary" size="
|
|
46
|
+
<ITButton label="Continue lesson 8" variant="filled" color="primary" size="sm" />
|
|
49
47
|
}
|
|
50
48
|
>
|
|
51
49
|
<ITFlex align="center" gap={3} className="mb-3">
|
|
@@ -53,7 +51,7 @@ const CARD_PATTERN_CODES = {
|
|
|
53
51
|
<ITDivider orientation="vertical" className="h-3" />
|
|
54
52
|
<ITText muted className="text-xs font-mono">4h 32m</ITText>
|
|
55
53
|
<ITDivider orientation="vertical" className="h-3" />
|
|
56
|
-
<ITBadget label="★ 4.9" color="warning" size="
|
|
54
|
+
<ITBadget label="★ 4.9" color="warning" size="sm" variant="outlined" />
|
|
57
55
|
</ITFlex>
|
|
58
56
|
<ITProgress value={66} color="primary" size="md" />
|
|
59
57
|
<ITFlex justify="between" align="center" className="mt-2">
|
|
@@ -65,7 +63,7 @@ const CARD_PATTERN_CODES = {
|
|
|
65
63
|
<ITBadget
|
|
66
64
|
label="Most popular"
|
|
67
65
|
color="primary"
|
|
68
|
-
size="
|
|
66
|
+
size="sm"
|
|
69
67
|
className="absolute -top-2 left-4 z-10 shadow-md"
|
|
70
68
|
/>
|
|
71
69
|
<ITCard
|
|
@@ -73,7 +71,7 @@ const CARD_PATTERN_CODES = {
|
|
|
73
71
|
className="ring-2 ring-primary-500/30"
|
|
74
72
|
actions={
|
|
75
73
|
<ITButton label="Start 14-day free trial"
|
|
76
|
-
variant="filled" color="primary" size="
|
|
74
|
+
variant="filled" color="primary" size="md" className="w-full" />
|
|
77
75
|
}
|
|
78
76
|
>
|
|
79
77
|
<ITFlex align="baseline" gap={1}>
|
|
@@ -95,8 +93,8 @@ const CARD_PATTERN_CODES = {
|
|
|
95
93
|
activity: `<ITCard
|
|
96
94
|
actions={
|
|
97
95
|
<ITFlex gap={2}>
|
|
98
|
-
<ITButton label="Reply" variant="text" color="primary" size="
|
|
99
|
-
<ITButton label="Mute" variant="text" color="gray" size="
|
|
96
|
+
<ITButton label="Reply" variant="text" color="primary" size="sm" />
|
|
97
|
+
<ITButton label="Mute" variant="text" color="gray" size="sm" />
|
|
100
98
|
</ITFlex>
|
|
101
99
|
}
|
|
102
100
|
>
|
|
@@ -106,7 +104,7 @@ const CARD_PATTERN_CODES = {
|
|
|
106
104
|
<ITText className="text-sm leading-relaxed">
|
|
107
105
|
<ITText as="span" className="font-semibold">Daniela Klein</ITText>
|
|
108
106
|
{' '}deployed{' '}
|
|
109
|
-
<ITBadget label="v2.4.1" color="primary" size="
|
|
107
|
+
<ITBadget label="v2.4.1" color="primary" size="sm" variant="outlined" />
|
|
110
108
|
{' '}to <ITText as="span" className="font-semibold">production</ITText>.
|
|
111
109
|
</ITText>
|
|
112
110
|
<ITText muted className="text-xs mt-1.5 block">3 minutes ago · api-service</ITText>
|
|
@@ -131,8 +129,8 @@ const CARD_PATTERN_CODES = {
|
|
|
131
129
|
onClick={() => openProfile(user.id)}
|
|
132
130
|
actions={
|
|
133
131
|
<ITFlex gap={2}>
|
|
134
|
-
<ITButton label="Message" variant="filled" color="primary" size="
|
|
135
|
-
<ITButton label="View profile" variant="outlined" color="gray" size="
|
|
132
|
+
<ITButton label="Message" variant="filled" color="primary" size="sm" />
|
|
133
|
+
<ITButton label="View profile" variant="outlined" color="gray" size="sm" />
|
|
136
134
|
</ITFlex>
|
|
137
135
|
}
|
|
138
136
|
>
|
|
@@ -148,7 +146,7 @@ const CARD_PATTERN_CODES = {
|
|
|
148
146
|
</ITText>
|
|
149
147
|
<ITFlex gap={1} wrap="wrap" className="mt-3">
|
|
150
148
|
{['TypeScript', 'Distributed systems', 'Open source'].map(t => (
|
|
151
|
-
<ITBadget key={t} label={t} color="primary" size="
|
|
149
|
+
<ITBadget key={t} label={t} color="primary" size="sm" variant="outlined" />
|
|
152
150
|
))}
|
|
153
151
|
</ITFlex>
|
|
154
152
|
</ITCard>`,
|
|
@@ -158,7 +156,7 @@ const CARD_PATTERN_CODES = {
|
|
|
158
156
|
imageClassName="h-40"
|
|
159
157
|
onClick={() => play(album.id)}
|
|
160
158
|
actions={
|
|
161
|
-
<ITButton label="Play album" variant="filled" color="primary" size="
|
|
159
|
+
<ITButton label="Play album" variant="filled" color="primary" size="sm" />
|
|
162
160
|
}
|
|
163
161
|
>
|
|
164
162
|
<ITFlex justify="between" gap={3}>
|
|
@@ -183,7 +181,7 @@ const CARD_PATTERN_CODES = {
|
|
|
183
181
|
|
|
184
182
|
const TEXT_PATTERN_CODES = {
|
|
185
183
|
articleHeader: `<ITFlex align="center" gap={2} className="mb-3">
|
|
186
|
-
<ITBadget label="ENGINEERING" color="primary" size="
|
|
184
|
+
<ITBadget label="ENGINEERING" color="primary" size="sm" variant="outlined" />
|
|
187
185
|
<ITText muted as="span" className="text-[11px] uppercase tracking-wider font-semibold">
|
|
188
186
|
Featured
|
|
189
187
|
</ITText>
|
|
@@ -204,7 +202,7 @@ const TEXT_PATTERN_CODES = {
|
|
|
204
202
|
</ITFlex>`,
|
|
205
203
|
sectionHeading: `<ITFlex justify="between" align="start" gap={4} className="mb-2">
|
|
206
204
|
<ITText as="h2" className="text-xl font-bold">Recent activity</ITText>
|
|
207
|
-
<ITButton label="View all →" variant="text" color="primary" size="
|
|
205
|
+
<ITButton label="View all →" variant="text" color="primary" size="sm" />
|
|
208
206
|
</ITFlex>
|
|
209
207
|
<ITText as="p" muted className="text-sm leading-relaxed">
|
|
210
208
|
Latest commits, deployments and reviews from your team this week.
|
|
@@ -260,7 +258,7 @@ const PatternCard = ({ title, desc, code, children }: { title: string; desc?: st
|
|
|
260
258
|
{desc && <p className="text-[11px] text-slate-500 dark:text-slate-400 mt-0.5">{desc}</p>}
|
|
261
259
|
</div>
|
|
262
260
|
{code && (
|
|
263
|
-
<ITButton variant="outlined" color="gray" size="
|
|
261
|
+
<ITButton variant="outlined" color="gray" size="sm" onClick={() => setShowCode(!showCode)}>
|
|
264
262
|
<ITFlex align="center" gap={1}>
|
|
265
263
|
<FaCode size={9} />
|
|
266
264
|
{showCode ? "Hide code" : "Code"}
|
|
@@ -289,7 +287,7 @@ export const CardShowcase = () => {
|
|
|
289
287
|
if (title) lines.push(` title="${title}"`);
|
|
290
288
|
if (showImage) lines.push(` image="https://images.unsplash.com/photo-1554224155-6726b3ff858f?w=400&h=200&fit=crop"`);
|
|
291
289
|
if (clickable) lines.push(` onClick={() => openDetails()}`);
|
|
292
|
-
if (showActions) lines.push(` actions={<ITButton label="View" variant="filled" color="primary" size="
|
|
290
|
+
if (showActions) lines.push(` actions={<ITButton label="View" variant="filled" color="primary" size="sm" />}`);
|
|
293
291
|
lines.push(`>`);
|
|
294
292
|
lines.push(` <p className="text-3xl font-bold">$48,230</p>`);
|
|
295
293
|
lines.push(` <p className="text-xs text-emerald-600">↑ 12.4% vs last month</p>`);
|
|
@@ -309,7 +307,7 @@ export const CardShowcase = () => {
|
|
|
309
307
|
title={title || undefined}
|
|
310
308
|
image={showImage ? "https://images.unsplash.com/photo-1554224155-6726b3ff858f?w=400&h=200&fit=crop" : undefined}
|
|
311
309
|
actions={showActions ? (
|
|
312
|
-
<ITButton label="View details" variant="filled" color="primary" size="
|
|
310
|
+
<ITButton label="View details" variant="filled" color="primary" size="sm" />
|
|
313
311
|
) : undefined}
|
|
314
312
|
onClick={clickable ? () => {} : undefined}
|
|
315
313
|
className="max-w-sm mx-auto"
|
|
@@ -378,7 +376,7 @@ export const CardShowcase = () => {
|
|
|
378
376
|
image="https://images.unsplash.com/photo-1516321318423-f06f85e504b3?w=600&h=200&fit=crop"
|
|
379
377
|
onClick={() => {}}
|
|
380
378
|
actions={
|
|
381
|
-
<ITButton label="Continue lesson 8" variant="filled" color="primary" size="
|
|
379
|
+
<ITButton label="Continue lesson 8" variant="filled" color="primary" size="sm" />
|
|
382
380
|
}
|
|
383
381
|
>
|
|
384
382
|
<ITFlex align="center" gap={3} className="mb-3">
|
|
@@ -386,7 +384,7 @@ export const CardShowcase = () => {
|
|
|
386
384
|
<ITDivider orientation="vertical" className="h-3" />
|
|
387
385
|
<ITText muted className="text-xs font-mono">4h 32m</ITText>
|
|
388
386
|
<ITDivider orientation="vertical" className="h-3" />
|
|
389
|
-
<ITBadget label="★ 4.9" color="warning" size="
|
|
387
|
+
<ITBadget label="★ 4.9" color="warning" size="sm" variant="outlined" />
|
|
390
388
|
</ITFlex>
|
|
391
389
|
<ITProgress value={66} color="primary" size="md" />
|
|
392
390
|
<ITFlex justify="between" align="center" className="mt-2">
|
|
@@ -411,14 +409,14 @@ export const CardShowcase = () => {
|
|
|
411
409
|
<ITBadget
|
|
412
410
|
label="Most popular"
|
|
413
411
|
color="primary"
|
|
414
|
-
size="
|
|
412
|
+
size="sm"
|
|
415
413
|
className="absolute -top-2 left-4 z-10 shadow-md"
|
|
416
414
|
/>
|
|
417
415
|
<ITCard
|
|
418
416
|
title="Scale"
|
|
419
417
|
className="ring-2 ring-primary-500/30"
|
|
420
418
|
actions={
|
|
421
|
-
<ITButton label="Start 14-day free trial" variant="filled" color="primary" size="
|
|
419
|
+
<ITButton label="Start 14-day free trial" variant="filled" color="primary" size="md" className="w-full" />
|
|
422
420
|
}
|
|
423
421
|
>
|
|
424
422
|
<ITFlex align="baseline" gap={1}>
|
|
@@ -450,8 +448,8 @@ export const CardShowcase = () => {
|
|
|
450
448
|
<ITCard
|
|
451
449
|
actions={
|
|
452
450
|
<ITFlex gap={2}>
|
|
453
|
-
<ITButton label="Reply" variant="text" color="primary" size="
|
|
454
|
-
<ITButton label="Mute" variant="text" color="gray" size="
|
|
451
|
+
<ITButton label="Reply" variant="text" color="primary" size="sm" />
|
|
452
|
+
<ITButton label="Mute" variant="text" color="gray" size="sm" />
|
|
455
453
|
</ITFlex>
|
|
456
454
|
}
|
|
457
455
|
>
|
|
@@ -461,7 +459,7 @@ export const CardShowcase = () => {
|
|
|
461
459
|
<ITText className="text-sm leading-relaxed text-slate-700">
|
|
462
460
|
<ITText as="span" className="font-semibold">Daniela Klein</ITText>
|
|
463
461
|
{' '}deployed{' '}
|
|
464
|
-
<ITBadget label="v2.4.1" color="primary" size="
|
|
462
|
+
<ITBadget label="v2.4.1" color="primary" size="sm" variant="outlined" />
|
|
465
463
|
{' '}to <ITText as="span" className="font-semibold">production</ITText>.
|
|
466
464
|
</ITText>
|
|
467
465
|
<ITText muted className="text-xs mt-1.5 block">3 minutes ago · api-service</ITText>
|
|
@@ -496,8 +494,8 @@ export const CardShowcase = () => {
|
|
|
496
494
|
onClick={() => {}}
|
|
497
495
|
actions={
|
|
498
496
|
<ITFlex gap={2}>
|
|
499
|
-
<ITButton label="Message" variant="filled" color="primary" size="
|
|
500
|
-
<ITButton label="View profile" variant="outlined" color="gray" size="
|
|
497
|
+
<ITButton label="Message" variant="filled" color="primary" size="sm" />
|
|
498
|
+
<ITButton label="View profile" variant="outlined" color="gray" size="sm" />
|
|
501
499
|
</ITFlex>
|
|
502
500
|
}
|
|
503
501
|
>
|
|
@@ -513,7 +511,7 @@ export const CardShowcase = () => {
|
|
|
513
511
|
</ITText>
|
|
514
512
|
<ITFlex gap={1} wrap="wrap" className="mt-3">
|
|
515
513
|
{['TypeScript', 'Distributed systems', 'Open source'].map((t) => (
|
|
516
|
-
<ITBadget key={t} label={t} color="primary" size="
|
|
514
|
+
<ITBadget key={t} label={t} color="primary" size="sm" variant="outlined" />
|
|
517
515
|
))}
|
|
518
516
|
</ITFlex>
|
|
519
517
|
</ITCard>
|
|
@@ -683,7 +681,7 @@ export const TextShowcase = () => {
|
|
|
683
681
|
<ITText muted as="span" className="text-[10px]">
|
|
684
682
|
Trunca con "…" al superar (0 = desactivado).
|
|
685
683
|
</ITText>
|
|
686
|
-
<ITButton variant="text" color="primary" size="
|
|
684
|
+
<ITButton variant="text" color="primary" size="sm" onClick={() => setMaxLength("0")}>
|
|
687
685
|
Reset
|
|
688
686
|
</ITButton>
|
|
689
687
|
</ITFlex>
|
|
@@ -699,7 +697,7 @@ export const TextShowcase = () => {
|
|
|
699
697
|
<ITText muted as="span" className="text-[10px]">
|
|
700
698
|
Inserta un <br /> al superar el límite.
|
|
701
699
|
</ITText>
|
|
702
|
-
<ITButton variant="text" color="primary" size="
|
|
700
|
+
<ITButton variant="text" color="primary" size="sm" onClick={() => setBreakLength("0")}>
|
|
703
701
|
Reset
|
|
704
702
|
</ITButton>
|
|
705
703
|
</ITFlex>
|
|
@@ -756,7 +754,7 @@ export const TextShowcase = () => {
|
|
|
756
754
|
>
|
|
757
755
|
<div className="max-w-md">
|
|
758
756
|
<ITFlex align="center" gap={2} className="mb-3">
|
|
759
|
-
<ITBadget label="ENGINEERING" color="primary" size="
|
|
757
|
+
<ITBadget label="ENGINEERING" color="primary" size="sm" variant="outlined" />
|
|
760
758
|
<ITText muted as="span" className="text-[11px] uppercase tracking-wider font-semibold">Featured</ITText>
|
|
761
759
|
</ITFlex>
|
|
762
760
|
<ITText as="h2" className="text-2xl font-bold text-slate-800 dark:text-slate-100 leading-tight mb-2 block">
|
|
@@ -787,7 +785,7 @@ export const TextShowcase = () => {
|
|
|
787
785
|
<ITText as="h2" className="text-xl font-bold text-slate-800 dark:text-slate-100">
|
|
788
786
|
Recent activity
|
|
789
787
|
</ITText>
|
|
790
|
-
<ITButton label="View all →" variant="text" color="primary" size="
|
|
788
|
+
<ITButton label="View all →" variant="text" color="primary" size="sm" />
|
|
791
789
|
</ITFlex>
|
|
792
790
|
<ITText as="p" muted className="text-sm leading-relaxed">
|
|
793
791
|
Latest commits, deployments and reviews from your team this week. Updates every 30 seconds.
|
|
@@ -846,7 +844,7 @@ export const TextShowcase = () => {
|
|
|
846
844
|
<ITDivider orientation="vertical" className="h-3" />
|
|
847
845
|
<ITText muted as="span" className="text-[11px] font-mono">api-service</ITText>
|
|
848
846
|
<ITDivider orientation="vertical" className="h-3" />
|
|
849
|
-
<ITBadget label="+124 -38" color="success" size="
|
|
847
|
+
<ITBadget label="+124 -38" color="success" size="sm" variant="outlined" />
|
|
850
848
|
</ITFlex>
|
|
851
849
|
</div>
|
|
852
850
|
</PatternCard>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { createContext, useContext } from "react";
|
|
2
|
+
import type { ITThemePalette } from "./theme.types";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Contexto de theming compartido por ITThemeProvider y componentes que lo
|
|
6
|
+
* consumen (p.ej. ITFormHeader). Vive en @/theme para que ninguna capa
|
|
7
|
+
* atómica dependa de otra a través del provider.
|
|
8
|
+
*/
|
|
9
|
+
export interface ITThemeContextType {
|
|
10
|
+
palette: ITThemePalette;
|
|
11
|
+
colors: ITThemePalette;
|
|
12
|
+
setPalette: (newPalette: ITThemePalette) => void;
|
|
13
|
+
updateColor: (key: string, value: string) => void;
|
|
14
|
+
resetTheme: () => void;
|
|
15
|
+
applyPreset: (colors: ITThemePalette) => void;
|
|
16
|
+
resolvedTheme: "light" | "dark";
|
|
17
|
+
darkModeMode: "light" | "dark" | "system";
|
|
18
|
+
setDarkModeMode: (mode: "light" | "dark" | "system") => void;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const ITThemeContext = createContext<ITThemeContextType | undefined>(undefined);
|
|
22
|
+
|
|
23
|
+
export const useITTheme = () => {
|
|
24
|
+
const context = useContext(ITThemeContext);
|
|
25
|
+
if (!context) {
|
|
26
|
+
throw new Error("useITTheme must be used within an ITThemeProvider");
|
|
27
|
+
}
|
|
28
|
+
return context;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Versión segura de useITTheme que retorna undefined
|
|
33
|
+
* si se usa fuera de ITThemeProvider (no lanza error).
|
|
34
|
+
*/
|
|
35
|
+
export const useITThemeSafe = (): ITThemeContextType | undefined => {
|
|
36
|
+
return useContext(ITThemeContext);
|
|
37
|
+
};
|
package/src/theme/theme.ts
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
import type { SizesTypes } from "@/types/sizes.types";
|
|
2
|
+
|
|
3
|
+
/** Escala única de medidas del sistema. `theme.input` usa `md` como default. */
|
|
4
|
+
export const inputSizeTokens: Record<SizesTypes, { padding: string; fontSize: string }> = {
|
|
5
|
+
sm: { padding: "0.25rem 0.625rem", fontSize: "0.75rem" },
|
|
6
|
+
md: { padding: "0.375rem 0.75rem", fontSize: "0.8125rem" },
|
|
7
|
+
lg: { padding: "0.5rem 0.8125rem", fontSize: "0.875rem" },
|
|
8
|
+
};
|
|
9
|
+
|
|
1
10
|
/**
|
|
2
11
|
* 1. Paleta base (Raw HEX values - Default Theme Fallback)
|
|
3
12
|
*/
|
|
@@ -104,52 +113,52 @@ export const semanticColors = {
|
|
|
104
113
|
*/
|
|
105
114
|
export const components = {
|
|
106
115
|
layout: {
|
|
107
|
-
backgroundColor: `var(--layout-bg, ${semanticColors.gray[50]})`,
|
|
108
|
-
contentPadding: 'var(--layout-padding, 1.5rem)',
|
|
116
|
+
backgroundColor: `var(--it-layout-bg, ${semanticColors.gray[50]})`,
|
|
117
|
+
contentPadding: 'var(--it-layout-padding, 1.5rem)',
|
|
109
118
|
},
|
|
110
119
|
topbar: {
|
|
111
|
-
backgroundColor: 'var(--topbar-bg, rgba(255, 255, 255, 0.90))',
|
|
112
|
-
borderColor: `var(--topbar-border, ${semanticColors.gray[200]})`,
|
|
113
|
-
iconColor: `var(--topbar-icon, ${semanticColors.gray[500]})`,
|
|
114
|
-
iconHoverColor: `var(--topbar-icon-hover, ${semanticColors.gray[700]})`,
|
|
115
|
-
shadow: 'var(--topbar-shadow, 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.025))',
|
|
116
|
-
textColor: `var(--topbar-text, ${semanticColors.gray[700]})`,
|
|
117
|
-
textHoverColor: `var(--topbar-text-hover, ${semanticColors.gray[900]})`,
|
|
120
|
+
backgroundColor: 'var(--it-topbar-bg, rgba(255, 255, 255, 0.90))',
|
|
121
|
+
borderColor: `var(--it-topbar-border, ${semanticColors.gray[200]})`,
|
|
122
|
+
iconColor: `var(--it-topbar-icon, ${semanticColors.gray[500]})`,
|
|
123
|
+
iconHoverColor: `var(--it-topbar-icon-hover, ${semanticColors.gray[700]})`,
|
|
124
|
+
shadow: 'var(--it-topbar-shadow, 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.025))',
|
|
125
|
+
textColor: `var(--it-topbar-text, ${semanticColors.gray[700]})`,
|
|
126
|
+
textHoverColor: `var(--it-topbar-text-hover, ${semanticColors.gray[900]})`,
|
|
118
127
|
userMenu: {
|
|
119
|
-
backgroundColor: `var(--topbar-user-bg, ${semanticColors.gray[50]})`,
|
|
120
|
-
hoverBackground: `var(--topbar-user-hover, ${semanticColors.gray[100]})`,
|
|
121
|
-
textColor: `var(--topbar-user-text, ${semanticColors.gray[900]})`,
|
|
122
|
-
subtitleColor: `var(--topbar-user-subtitle, ${semanticColors.gray[500]})`,
|
|
128
|
+
backgroundColor: `var(--it-topbar-user-bg, ${semanticColors.gray[50]})`,
|
|
129
|
+
hoverBackground: `var(--it-topbar-user-hover, ${semanticColors.gray[100]})`,
|
|
130
|
+
textColor: `var(--it-topbar-user-text, ${semanticColors.gray[900]})`,
|
|
131
|
+
subtitleColor: `var(--it-topbar-user-subtitle, ${semanticColors.gray[500]})`,
|
|
123
132
|
dropdown: {
|
|
124
|
-
backgroundColor: 'var(--topbar-user-dropdown-bg, #ffffff)',
|
|
125
|
-
borderColor: `var(--topbar-user-dropdown-border, ${semanticColors.gray[200]})`,
|
|
126
|
-
itemHoverBackground: `var(--topbar-user-item-hover, ${semanticColors.gray[50]})`,
|
|
133
|
+
backgroundColor: 'var(--it-topbar-user-dropdown-bg, #ffffff)',
|
|
134
|
+
borderColor: `var(--it-topbar-user-dropdown-border, ${semanticColors.gray[200]})`,
|
|
135
|
+
itemHoverBackground: `var(--it-topbar-user-item-hover, ${semanticColors.gray[50]})`,
|
|
127
136
|
}
|
|
128
137
|
}
|
|
129
138
|
},
|
|
130
139
|
sidebar: {
|
|
131
|
-
backgroundColor: 'var(--sidebar-bg, rgba(255, 255, 255, 0.90))',
|
|
132
|
-
borderColor: `var(--sidebar-border, ${semanticColors.gray[200]})`,
|
|
140
|
+
backgroundColor: 'var(--it-sidebar-bg, rgba(255, 255, 255, 0.90))',
|
|
141
|
+
borderColor: `var(--it-sidebar-border, ${semanticColors.gray[200]})`,
|
|
133
142
|
label: {
|
|
134
|
-
color: `var(--sidebar-label-color, ${semanticColors.gray[700]})`,
|
|
135
|
-
size: 'var(--sidebar-label-size, 0.9rem)',
|
|
136
|
-
weight: 'var(--sidebar-label-weight, 500)',
|
|
143
|
+
color: `var(--it-sidebar-label-color, ${semanticColors.gray[700]})`,
|
|
144
|
+
size: 'var(--it-sidebar-label-size, 0.9rem)',
|
|
145
|
+
weight: 'var(--it-sidebar-label-weight, 500)',
|
|
137
146
|
},
|
|
138
147
|
icon: {
|
|
139
|
-
color: `var(--sidebar-icon-color, ${semanticColors.gray[500]})`,
|
|
140
|
-
size: 'var(--sidebar-icon-size, 1.25rem)',
|
|
148
|
+
color: `var(--it-sidebar-icon-color, ${semanticColors.gray[500]})`,
|
|
149
|
+
size: 'var(--it-sidebar-icon-size, 1.25rem)',
|
|
141
150
|
},
|
|
142
151
|
hover: {
|
|
143
|
-
backgroundColor: `var(--sidebar-hover-bg, ${semanticColors.gray[100]})`,
|
|
152
|
+
backgroundColor: `var(--it-sidebar-hover-bg, ${semanticColors.gray[100]})`,
|
|
144
153
|
},
|
|
145
154
|
active: {
|
|
146
|
-
backgroundColor: `var(--sidebar-active-bg, ${semanticColors.gray[50]})`,
|
|
147
|
-
color: `var(--sidebar-active-color, ${semanticColors.gray[900]})`,
|
|
148
|
-
iconColor: `var(--sidebar-active-icon, ${semanticColors.primary[500]})`,
|
|
155
|
+
backgroundColor: `var(--it-sidebar-active-bg, ${semanticColors.gray[50]})`,
|
|
156
|
+
color: `var(--it-sidebar-active-color, ${semanticColors.gray[900]})`,
|
|
157
|
+
iconColor: `var(--it-sidebar-active-icon, ${semanticColors.primary[500]})`,
|
|
149
158
|
},
|
|
150
159
|
badge: {
|
|
151
|
-
backgroundColor: `var(--sidebar-badge-bg, ${semanticColors.primary[500]})`,
|
|
152
|
-
color: 'var(--sidebar-badge-color, #ffffff)',
|
|
160
|
+
backgroundColor: `var(--it-sidebar-badge-bg, ${semanticColors.primary[500]})`,
|
|
161
|
+
color: 'var(--it-sidebar-badge-color, #ffffff)',
|
|
153
162
|
},
|
|
154
163
|
},
|
|
155
164
|
|
|
@@ -290,17 +299,17 @@ export const components = {
|
|
|
290
299
|
},
|
|
291
300
|
|
|
292
301
|
card: {
|
|
293
|
-
backgroundColor: 'var(--card-bg, #ffffff)',
|
|
302
|
+
backgroundColor: 'var(--it-card-bg, #ffffff)',
|
|
294
303
|
borderRadius: 'var(--radius-2xl)',
|
|
295
|
-
borderColor: `var(--card-border, ${semanticColors.gray[200]})`,
|
|
304
|
+
borderColor: `var(--it-card-border, ${semanticColors.gray[200]})`,
|
|
296
305
|
borderWidth: '1px',
|
|
297
|
-
shadow: 'var(--card-shadow, var(--shadow-md))',
|
|
306
|
+
shadow: 'var(--it-card-shadow, var(--shadow-md))',
|
|
298
307
|
hover: {
|
|
299
|
-
shadow: 'var(--card-shadow-hover, var(--shadow-lg))',
|
|
308
|
+
shadow: 'var(--it-card-shadow-hover, var(--shadow-lg))',
|
|
300
309
|
},
|
|
301
310
|
header: {
|
|
302
|
-
backgroundColor: `var(--card-header-bg, ${semanticColors.gray[50]})`,
|
|
303
|
-
borderBottom: `1px solid var(--card-header-border, var(--color-secondary-200))`,
|
|
311
|
+
backgroundColor: `var(--it-card-header-bg, ${semanticColors.gray[50]})`,
|
|
312
|
+
borderBottom: `1px solid var(--it-card-header-border, var(--color-secondary-200))`,
|
|
304
313
|
padding: '1rem 1.5rem',
|
|
305
314
|
borderTopLeftRadius: 'var(--radius-2xl)',
|
|
306
315
|
borderTopRightRadius: 'var(--radius-2xl)',
|
|
@@ -311,23 +320,21 @@ export const components = {
|
|
|
311
320
|
},
|
|
312
321
|
|
|
313
322
|
input: {
|
|
314
|
-
backgroundColor: 'var(--input-bg, #ffffff)',
|
|
315
|
-
borderColor: `var(--input-border, ${semanticColors.gray[300]})`,
|
|
323
|
+
backgroundColor: 'var(--it-input-bg, #ffffff)',
|
|
324
|
+
borderColor: `var(--it-input-border, ${semanticColors.gray[300]})`,
|
|
316
325
|
borderRadius: 'var(--radius-md)',
|
|
317
|
-
padding: '0.5rem 0.75rem',
|
|
318
|
-
fontSize: '0.875rem',
|
|
319
326
|
focus: {
|
|
320
|
-
borderColor: `var(--input-focus-border, ${semanticColors.primary[500]})`,
|
|
321
|
-
ring: `var(--input-focus-ring, 0 0 0 3px ${semanticColors.primary[100]})`,
|
|
327
|
+
borderColor: `var(--it-input-focus-border, ${semanticColors.primary[500]})`,
|
|
328
|
+
ring: `var(--it-input-focus-ring, 0 0 0 3px ${semanticColors.primary[100]})`,
|
|
322
329
|
},
|
|
323
|
-
placeholder: `var(--input-placeholder, ${semanticColors.gray[400]})`,
|
|
330
|
+
placeholder: `var(--it-input-placeholder, ${semanticColors.gray[400]})`,
|
|
324
331
|
disabled: {
|
|
325
|
-
backgroundColor: `var(--input-disabled-bg, ${semanticColors.gray[100]})`,
|
|
326
|
-
borderColor: `var(--input-disabled-border, ${semanticColors.gray[200]})`,
|
|
332
|
+
backgroundColor: `var(--it-input-disabled-bg, ${semanticColors.gray[100]})`,
|
|
333
|
+
borderColor: `var(--it-input-disabled-border, ${semanticColors.gray[200]})`,
|
|
327
334
|
},
|
|
328
335
|
error: {
|
|
329
|
-
borderColor: `var(--input-error-border, ${semanticColors.danger[500]})`,
|
|
330
|
-
ring: `var(--input-error-ring, 0 0 0 3px ${semanticColors.danger[100]})`,
|
|
336
|
+
borderColor: `var(--it-input-error-border, ${semanticColors.danger[500]})`,
|
|
337
|
+
ring: `var(--it-input-error-ring, 0 0 0 3px ${semanticColors.danger[100]})`,
|
|
331
338
|
},
|
|
332
339
|
},
|
|
333
340
|
|
|
@@ -378,45 +385,45 @@ export const components = {
|
|
|
378
385
|
|
|
379
386
|
modal: {
|
|
380
387
|
overlay: {
|
|
381
|
-
backgroundColor: 'var(--modal-overlay, rgba(15, 23, 42, 0.75))',
|
|
388
|
+
backgroundColor: 'var(--it-modal-overlay, rgba(15, 23, 42, 0.75))',
|
|
382
389
|
},
|
|
383
390
|
content: {
|
|
384
|
-
backgroundColor: 'var(--modal-bg, #ffffff)',
|
|
391
|
+
backgroundColor: 'var(--it-modal-bg, #ffffff)',
|
|
385
392
|
borderRadius: 'var(--radius-2xl)',
|
|
386
|
-
shadow: 'var(--modal-shadow, var(--shadow-xl))',
|
|
393
|
+
shadow: 'var(--it-modal-shadow, var(--shadow-xl))',
|
|
387
394
|
},
|
|
388
395
|
header: {
|
|
389
396
|
padding: '1.5rem 1.5rem 0.5rem 1.5rem',
|
|
390
|
-
borderBottom: `1px solid var(--modal-header-border, var(--color-secondary-200))`,
|
|
397
|
+
borderBottom: `1px solid var(--it-modal-header-border, var(--color-secondary-200))`,
|
|
391
398
|
},
|
|
392
399
|
body: {
|
|
393
400
|
padding: '1.5rem',
|
|
394
401
|
},
|
|
395
402
|
footer: {
|
|
396
403
|
padding: '1rem 1.5rem',
|
|
397
|
-
borderTop: `1px solid var(--modal-footer-border, var(--color-secondary-200))`,
|
|
398
|
-
backgroundColor: `var(--modal-footer-bg, ${semanticColors.gray[50]})`,
|
|
404
|
+
borderTop: `1px solid var(--it-modal-footer-border, var(--color-secondary-200))`,
|
|
405
|
+
backgroundColor: `var(--it-modal-footer-bg, ${semanticColors.gray[50]})`,
|
|
399
406
|
},
|
|
400
407
|
},
|
|
401
408
|
|
|
402
409
|
calendar: {
|
|
403
|
-
backgroundColor: 'var(--calendar-bg, #ffffff)',
|
|
404
|
-
borderColor: `var(--calendar-border, ${semanticColors.gray[200]})`,
|
|
410
|
+
backgroundColor: 'var(--it-calendar-bg, #ffffff)',
|
|
411
|
+
borderColor: `var(--it-calendar-border, ${semanticColors.gray[200]})`,
|
|
405
412
|
header: {
|
|
406
|
-
textColor: `var(--calendar-header-text, ${semanticColors.gray[800]})`,
|
|
407
|
-
hoverBackground: `var(--calendar-header-hover, ${semanticColors.gray[100]})`,
|
|
413
|
+
textColor: `var(--it-calendar-header-text, ${semanticColors.gray[800]})`,
|
|
414
|
+
hoverBackground: `var(--it-calendar-header-hover, ${semanticColors.gray[100]})`,
|
|
408
415
|
},
|
|
409
416
|
days: {
|
|
410
|
-
textColor: `var(--calendar-days-text, ${semanticColors.gray[700]})`,
|
|
411
|
-
weekendColor: `var(--calendar-days-weekend, ${semanticColors.gray[500]})`,
|
|
412
|
-
outsideMonthColor: `var(--calendar-days-outside, ${semanticColors.gray[300]})`,
|
|
417
|
+
textColor: `var(--it-calendar-days-text, ${semanticColors.gray[700]})`,
|
|
418
|
+
weekendColor: `var(--it-calendar-days-weekend, ${semanticColors.gray[500]})`,
|
|
419
|
+
outsideMonthColor: `var(--it-calendar-days-outside, ${semanticColors.gray[300]})`,
|
|
413
420
|
},
|
|
414
421
|
selection: {
|
|
415
|
-
selectedColor: 'var(--calendar-selected-text, #ffffff)',
|
|
416
|
-
selectedBackground: `var(--calendar-selected-bg, ${semanticColors.primary[600]})`,
|
|
417
|
-
rangeBackground: `var(--calendar-range-bg, ${semanticColors.primary[50]})`,
|
|
418
|
-
todayBackground: `var(--calendar-today-bg, ${semanticColors.primary[50]})`,
|
|
419
|
-
todayColor: `var(--calendar-today-text, ${semanticColors.primary[600]})`,
|
|
422
|
+
selectedColor: 'var(--it-calendar-selected-text, #ffffff)',
|
|
423
|
+
selectedBackground: `var(--it-calendar-selected-bg, ${semanticColors.primary[600]})`,
|
|
424
|
+
rangeBackground: `var(--it-calendar-range-bg, ${semanticColors.primary[50]})`,
|
|
425
|
+
todayBackground: `var(--it-calendar-today-bg, ${semanticColors.primary[50]})`,
|
|
426
|
+
todayColor: `var(--it-calendar-today-text, ${semanticColors.primary[600]})`,
|
|
420
427
|
},
|
|
421
428
|
},
|
|
422
429
|
};
|
package/src/theme/theme.types.ts
CHANGED
|
@@ -12,6 +12,47 @@ export type ColorScale = {
|
|
|
12
12
|
950?: string;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
+
export interface ITThemePalette {
|
|
16
|
+
/** Main brand accent color (hex). Drives primary buttons, active nav items, focus rings, links, and the `--color-primary` CSS variable. @default "#06b6d4" */
|
|
17
|
+
primary: string;
|
|
18
|
+
/** Secondary/neutral accent color (hex). Used for less prominent actions and secondary badges/buttons. @default "#6b7280" */
|
|
19
|
+
secondary: string;
|
|
20
|
+
/** Tertiary accent color (hex), used for a third level of emphasis (e.g. alternate badges, chart accents). @default "#8b5cf6" */
|
|
21
|
+
ternary: string;
|
|
22
|
+
/** Semantic color for destructive/error states (hex): delete buttons, error badges, invalid form fields. @default "#ef4444" */
|
|
23
|
+
danger: string;
|
|
24
|
+
/** Semantic color for success/confirmation states (hex): success badges, completed steps, positive stats. @default "#22c55e" */
|
|
25
|
+
success: string;
|
|
26
|
+
/** Semantic color for informational states (hex): info banners/badges, neutral notices. @default "#3b82f6" */
|
|
27
|
+
info: string;
|
|
28
|
+
/** Semantic color for alert/caution states (hex), distinct from `warning`. Used by components that need a stronger visual cue than warning. @default "#f97316" */
|
|
29
|
+
alert: string;
|
|
30
|
+
/** Semantic color for warning states (hex): warning badges/banners, pending states. @default "#eab308" */
|
|
31
|
+
warning: string;
|
|
32
|
+
/** Colors for the app shell's sidebar and top navbar (ITSidebar, ITNavbar, ITTopbar, ITLayout). */
|
|
33
|
+
layout: {
|
|
34
|
+
/** Background color of the sidebar (hex). @default "#ffffff" */
|
|
35
|
+
sidebarBg: string;
|
|
36
|
+
/** Text/icon color used on the sidebar. @default "#334155" */
|
|
37
|
+
sidebarText: string;
|
|
38
|
+
/** Background color of the top navigation bar (hex). @default "#ffffff" */
|
|
39
|
+
navbarBg: string;
|
|
40
|
+
/** Text/icon color used on the top navigation bar. @default "#1e293b" */
|
|
41
|
+
navbarText: string;
|
|
42
|
+
};
|
|
43
|
+
/** Colors for ITTable/ITDataTable/ITSearchTable header and rows. */
|
|
44
|
+
table: {
|
|
45
|
+
/** Background color of the table header row (hex). @default "#f8fafc" */
|
|
46
|
+
headerBg: string;
|
|
47
|
+
/** Text color of the table header row. @default "#334155" */
|
|
48
|
+
headerText: string;
|
|
49
|
+
/** Background color of table body rows (hex). @default "#ffffff" */
|
|
50
|
+
rowBg: string;
|
|
51
|
+
/** Text color of table body rows. @default "#1e293b" */
|
|
52
|
+
rowText: string;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
15
56
|
export type SemanticThemeColors = {
|
|
16
57
|
primary?: ColorScale;
|
|
17
58
|
secondary?: ColorScale;
|
|
@@ -24,9 +24,9 @@ export const outlinedBadgeColors = {
|
|
|
24
24
|
} as const;
|
|
25
25
|
|
|
26
26
|
export const badgeSizes = {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
sm: "text-[10px] px-1.5 py-[3px]",
|
|
28
|
+
md: "text-[11px] px-2 py-[3px]",
|
|
29
|
+
lg: "text-xs px-2.5 py-1",
|
|
30
30
|
} as const;
|
|
31
31
|
|
|
32
32
|
export const getBadgeColorClasses = (color: ColorsTypes, variant: keyof typeof badgeVariants) => {
|
|
@@ -10,7 +10,7 @@ export const buttonVariants: Record<string, string> = {
|
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
export const buttonSizes: Record<string, string> = {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
sm: "text-xs px-2.5 py-1",
|
|
14
|
+
md: "text-[13px] px-3.5 py-1.5",
|
|
15
|
+
lg: "text-sm px-4 py-2",
|
|
16
16
|
};
|
package/src/types/sizes.types.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
/** Escala única de tamaños del sistema: "sm" | "md" | "lg". */
|
|
2
|
+
export type SizesTypes = "sm" | "md" | "lg";
|
package/src/utils/styles.ts
CHANGED
|
@@ -1,4 +1,41 @@
|
|
|
1
1
|
import clsx from "clsx";
|
|
2
|
+
import type { CSSProperties } from "react";
|
|
3
|
+
import { inputSizeTokens } from "@/theme/theme";
|
|
4
|
+
|
|
5
|
+
/** Theme shape expected from `theme.input` (used by input-like components). */
|
|
6
|
+
export type InputThemeLike = {
|
|
7
|
+
backgroundColor?: string;
|
|
8
|
+
borderColor?: string;
|
|
9
|
+
borderRadius?: string;
|
|
10
|
+
disabled?: { backgroundColor?: string; borderColor?: string };
|
|
11
|
+
error?: { borderColor?: string; ring?: string };
|
|
12
|
+
focus?: { ring?: string };
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Estilo base compartido por componentes de tipo campo (ITInput, ITSelect,
|
|
17
|
+
* ITSearchSelect…). Aplica los tokens del theme + la medida estándar de `size`.
|
|
18
|
+
* `extra` permite sobreescribir propiedades específicas del componente.
|
|
19
|
+
*/
|
|
20
|
+
export function inputFieldStyle(
|
|
21
|
+
inputTheme: InputThemeLike,
|
|
22
|
+
size: "sm" | "md" | "lg" = "md",
|
|
23
|
+
extra?: CSSProperties
|
|
24
|
+
): CSSProperties {
|
|
25
|
+
const sizeConfig = inputSizeTokens[size] ?? inputSizeTokens.md;
|
|
26
|
+
return {
|
|
27
|
+
backgroundColor: inputTheme.backgroundColor,
|
|
28
|
+
borderColor: inputTheme.borderColor,
|
|
29
|
+
borderRadius: inputTheme.borderRadius,
|
|
30
|
+
padding: sizeConfig.padding,
|
|
31
|
+
fontSize: sizeConfig.fontSize,
|
|
32
|
+
borderWidth: "1px",
|
|
33
|
+
borderStyle: "solid",
|
|
34
|
+
transition: "all 0.2s",
|
|
35
|
+
color: "var(--it-input-text-color, var(--color-secondary-900))",
|
|
36
|
+
...extra,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
2
39
|
|
|
3
40
|
// ──────────────────────────────────────────────
|
|
4
41
|
// INPUT-LIKE COMPONENTS
|