@tekton-ui/core 0.2.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 +758 -0
- package/dist/blueprint.d.ts +44 -0
- package/dist/blueprint.d.ts.map +1 -0
- package/dist/blueprint.js +163 -0
- package/dist/blueprint.js.map +1 -0
- package/dist/component-schemas.d.ts +78 -0
- package/dist/component-schemas.d.ts.map +1 -0
- package/dist/component-schemas.js +1037 -0
- package/dist/component-schemas.js.map +1 -0
- package/dist/css-generator.d.ts +42 -0
- package/dist/css-generator.d.ts.map +1 -0
- package/dist/css-generator.js +339 -0
- package/dist/css-generator.js.map +1 -0
- package/dist/icon-library.d.ts +109 -0
- package/dist/icon-library.d.ts.map +1 -0
- package/dist/icon-library.js +204 -0
- package/dist/icon-library.js.map +1 -0
- package/dist/index.d.ts +36 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +51 -0
- package/dist/index.js.map +1 -0
- package/dist/layout-css-generator.d.ts +158 -0
- package/dist/layout-css-generator.d.ts.map +1 -0
- package/dist/layout-css-generator.js +901 -0
- package/dist/layout-css-generator.js.map +1 -0
- package/dist/layout-resolver.d.ts +92 -0
- package/dist/layout-resolver.d.ts.map +1 -0
- package/dist/layout-resolver.js +275 -0
- package/dist/layout-resolver.js.map +1 -0
- package/dist/layout-tokens/index.d.ts +16 -0
- package/dist/layout-tokens/index.d.ts.map +1 -0
- package/dist/layout-tokens/index.js +16 -0
- package/dist/layout-tokens/index.js.map +1 -0
- package/dist/layout-tokens/keyboard.d.ts +254 -0
- package/dist/layout-tokens/keyboard.d.ts.map +1 -0
- package/dist/layout-tokens/keyboard.js +407 -0
- package/dist/layout-tokens/keyboard.js.map +1 -0
- package/dist/layout-tokens/mobile-shells.d.ts +78 -0
- package/dist/layout-tokens/mobile-shells.d.ts.map +1 -0
- package/dist/layout-tokens/mobile-shells.js +635 -0
- package/dist/layout-tokens/mobile-shells.js.map +1 -0
- package/dist/layout-tokens/pages.d.ts +100 -0
- package/dist/layout-tokens/pages.d.ts.map +1 -0
- package/dist/layout-tokens/pages.js +576 -0
- package/dist/layout-tokens/pages.js.map +1 -0
- package/dist/layout-tokens/responsive.d.ts +109 -0
- package/dist/layout-tokens/responsive.d.ts.map +1 -0
- package/dist/layout-tokens/responsive.js +167 -0
- package/dist/layout-tokens/responsive.js.map +1 -0
- package/dist/layout-tokens/safe-area.d.ts +156 -0
- package/dist/layout-tokens/safe-area.d.ts.map +1 -0
- package/dist/layout-tokens/safe-area.js +316 -0
- package/dist/layout-tokens/safe-area.js.map +1 -0
- package/dist/layout-tokens/sections-advanced.d.ts +277 -0
- package/dist/layout-tokens/sections-advanced.d.ts.map +1 -0
- package/dist/layout-tokens/sections-advanced.js +593 -0
- package/dist/layout-tokens/sections-advanced.js.map +1 -0
- package/dist/layout-tokens/sections.d.ts +137 -0
- package/dist/layout-tokens/sections.d.ts.map +1 -0
- package/dist/layout-tokens/sections.js +694 -0
- package/dist/layout-tokens/sections.js.map +1 -0
- package/dist/layout-tokens/shells.d.ts +77 -0
- package/dist/layout-tokens/shells.d.ts.map +1 -0
- package/dist/layout-tokens/shells.js +408 -0
- package/dist/layout-tokens/shells.js.map +1 -0
- package/dist/layout-tokens/touch-target.d.ts +119 -0
- package/dist/layout-tokens/touch-target.d.ts.map +1 -0
- package/dist/layout-tokens/touch-target.js +156 -0
- package/dist/layout-tokens/touch-target.js.map +1 -0
- package/dist/layout-tokens/types.d.ts +632 -0
- package/dist/layout-tokens/types.d.ts.map +1 -0
- package/dist/layout-tokens/types.js +49 -0
- package/dist/layout-tokens/types.js.map +1 -0
- package/dist/layout-validation.d.ts +1547 -0
- package/dist/layout-validation.d.ts.map +1 -0
- package/dist/layout-validation.js +628 -0
- package/dist/layout-validation.js.map +1 -0
- package/dist/render.d.ts +23 -0
- package/dist/render.d.ts.map +1 -0
- package/dist/render.js +244 -0
- package/dist/render.js.map +1 -0
- package/dist/schema-validation.d.ts +208 -0
- package/dist/schema-validation.d.ts.map +1 -0
- package/dist/schema-validation.js +205 -0
- package/dist/schema-validation.js.map +1 -0
- package/dist/screen-generation/generators/css-in-js-generator.d.ts +82 -0
- package/dist/screen-generation/generators/css-in-js-generator.d.ts.map +1 -0
- package/dist/screen-generation/generators/css-in-js-generator.js +335 -0
- package/dist/screen-generation/generators/css-in-js-generator.js.map +1 -0
- package/dist/screen-generation/generators/index.d.ts +13 -0
- package/dist/screen-generation/generators/index.d.ts.map +1 -0
- package/dist/screen-generation/generators/index.js +32 -0
- package/dist/screen-generation/generators/index.js.map +1 -0
- package/dist/screen-generation/generators/react-generator.d.ts +100 -0
- package/dist/screen-generation/generators/react-generator.d.ts.map +1 -0
- package/dist/screen-generation/generators/react-generator.js +379 -0
- package/dist/screen-generation/generators/react-generator.js.map +1 -0
- package/dist/screen-generation/generators/tailwind-generator.d.ts +105 -0
- package/dist/screen-generation/generators/tailwind-generator.d.ts.map +1 -0
- package/dist/screen-generation/generators/tailwind-generator.js +355 -0
- package/dist/screen-generation/generators/tailwind-generator.js.map +1 -0
- package/dist/screen-generation/generators/types.d.ts +136 -0
- package/dist/screen-generation/generators/types.d.ts.map +1 -0
- package/dist/screen-generation/generators/types.js +18 -0
- package/dist/screen-generation/generators/types.js.map +1 -0
- package/dist/screen-generation/generators/utils.d.ts +187 -0
- package/dist/screen-generation/generators/utils.d.ts.map +1 -0
- package/dist/screen-generation/generators/utils.js +312 -0
- package/dist/screen-generation/generators/utils.js.map +1 -0
- package/dist/screen-generation/index.d.ts +14 -0
- package/dist/screen-generation/index.d.ts.map +1 -0
- package/dist/screen-generation/index.js +33 -0
- package/dist/screen-generation/index.js.map +1 -0
- package/dist/screen-generation/resolver/component-resolver.d.ts +157 -0
- package/dist/screen-generation/resolver/component-resolver.d.ts.map +1 -0
- package/dist/screen-generation/resolver/component-resolver.js +295 -0
- package/dist/screen-generation/resolver/component-resolver.js.map +1 -0
- package/dist/screen-generation/resolver/index.d.ts +10 -0
- package/dist/screen-generation/resolver/index.d.ts.map +1 -0
- package/dist/screen-generation/resolver/index.js +46 -0
- package/dist/screen-generation/resolver/index.js.map +1 -0
- package/dist/screen-generation/resolver/layout-resolver.d.ts +155 -0
- package/dist/screen-generation/resolver/layout-resolver.d.ts.map +1 -0
- package/dist/screen-generation/resolver/layout-resolver.js +193 -0
- package/dist/screen-generation/resolver/layout-resolver.js.map +1 -0
- package/dist/screen-generation/resolver/screen-resolver.d.ts +174 -0
- package/dist/screen-generation/resolver/screen-resolver.d.ts.map +1 -0
- package/dist/screen-generation/resolver/screen-resolver.js +373 -0
- package/dist/screen-generation/resolver/screen-resolver.js.map +1 -0
- package/dist/screen-generation/resolver/token-resolver.d.ts +170 -0
- package/dist/screen-generation/resolver/token-resolver.d.ts.map +1 -0
- package/dist/screen-generation/resolver/token-resolver.js +260 -0
- package/dist/screen-generation/resolver/token-resolver.js.map +1 -0
- package/dist/screen-generation/types.d.ts +116 -0
- package/dist/screen-generation/types.d.ts.map +1 -0
- package/dist/screen-generation/types.js +33 -0
- package/dist/screen-generation/types.js.map +1 -0
- package/dist/screen-generation/validators.d.ts +286 -0
- package/dist/screen-generation/validators.d.ts.map +1 -0
- package/dist/screen-generation/validators.js +323 -0
- package/dist/screen-generation/validators.js.map +1 -0
- package/dist/screen-templates/__tests__/registry.test.d.ts +6 -0
- package/dist/screen-templates/__tests__/registry.test.d.ts.map +1 -0
- package/dist/screen-templates/__tests__/registry.test.js +247 -0
- package/dist/screen-templates/__tests__/registry.test.js.map +1 -0
- package/dist/screen-templates/__tests__/templates.test.d.ts +6 -0
- package/dist/screen-templates/__tests__/templates.test.d.ts.map +1 -0
- package/dist/screen-templates/__tests__/templates.test.js +179 -0
- package/dist/screen-templates/__tests__/templates.test.js.map +1 -0
- package/dist/screen-templates/index.d.ts +39 -0
- package/dist/screen-templates/index.d.ts.map +1 -0
- package/dist/screen-templates/index.js +79 -0
- package/dist/screen-templates/index.js.map +1 -0
- package/dist/screen-templates/registry.d.ts +177 -0
- package/dist/screen-templates/registry.d.ts.map +1 -0
- package/dist/screen-templates/registry.js +274 -0
- package/dist/screen-templates/registry.js.map +1 -0
- package/dist/screen-templates/templates/account/index.d.ts +6 -0
- package/dist/screen-templates/templates/account/index.d.ts.map +1 -0
- package/dist/screen-templates/templates/account/index.js +6 -0
- package/dist/screen-templates/templates/account/index.js.map +1 -0
- package/dist/screen-templates/templates/account/profile.d.ts +23 -0
- package/dist/screen-templates/templates/account/profile.d.ts.map +1 -0
- package/dist/screen-templates/templates/account/profile.js +249 -0
- package/dist/screen-templates/templates/account/profile.js.map +1 -0
- package/dist/screen-templates/templates/auth/forgot-password.d.ts +23 -0
- package/dist/screen-templates/templates/auth/forgot-password.d.ts.map +1 -0
- package/dist/screen-templates/templates/auth/forgot-password.js +203 -0
- package/dist/screen-templates/templates/auth/forgot-password.js.map +1 -0
- package/dist/screen-templates/templates/auth/index.d.ts +9 -0
- package/dist/screen-templates/templates/auth/index.d.ts.map +1 -0
- package/dist/screen-templates/templates/auth/index.js +9 -0
- package/dist/screen-templates/templates/auth/index.js.map +1 -0
- package/dist/screen-templates/templates/auth/login.d.ts +24 -0
- package/dist/screen-templates/templates/auth/login.d.ts.map +1 -0
- package/dist/screen-templates/templates/auth/login.js +254 -0
- package/dist/screen-templates/templates/auth/login.js.map +1 -0
- package/dist/screen-templates/templates/auth/signup.d.ts +24 -0
- package/dist/screen-templates/templates/auth/signup.d.ts.map +1 -0
- package/dist/screen-templates/templates/auth/signup.js +315 -0
- package/dist/screen-templates/templates/auth/signup.js.map +1 -0
- package/dist/screen-templates/templates/auth/verification.d.ts +23 -0
- package/dist/screen-templates/templates/auth/verification.d.ts.map +1 -0
- package/dist/screen-templates/templates/auth/verification.js +239 -0
- package/dist/screen-templates/templates/auth/verification.js.map +1 -0
- package/dist/screen-templates/templates/feedback/confirmation.d.ts +9 -0
- package/dist/screen-templates/templates/feedback/confirmation.d.ts.map +1 -0
- package/dist/screen-templates/templates/feedback/confirmation.js +107 -0
- package/dist/screen-templates/templates/feedback/confirmation.js.map +1 -0
- package/dist/screen-templates/templates/feedback/empty.d.ts +9 -0
- package/dist/screen-templates/templates/feedback/empty.d.ts.map +1 -0
- package/dist/screen-templates/templates/feedback/empty.js +90 -0
- package/dist/screen-templates/templates/feedback/empty.js.map +1 -0
- package/dist/screen-templates/templates/feedback/error.d.ts +9 -0
- package/dist/screen-templates/templates/feedback/error.d.ts.map +1 -0
- package/dist/screen-templates/templates/feedback/error.js +99 -0
- package/dist/screen-templates/templates/feedback/error.js.map +1 -0
- package/dist/screen-templates/templates/feedback/index.d.ts +10 -0
- package/dist/screen-templates/templates/feedback/index.d.ts.map +1 -0
- package/dist/screen-templates/templates/feedback/index.js +10 -0
- package/dist/screen-templates/templates/feedback/index.js.map +1 -0
- package/dist/screen-templates/templates/feedback/loading.d.ts +9 -0
- package/dist/screen-templates/templates/feedback/loading.d.ts.map +1 -0
- package/dist/screen-templates/templates/feedback/loading.js +77 -0
- package/dist/screen-templates/templates/feedback/loading.js.map +1 -0
- package/dist/screen-templates/templates/feedback/success.d.ts +9 -0
- package/dist/screen-templates/templates/feedback/success.d.ts.map +1 -0
- package/dist/screen-templates/templates/feedback/success.js +99 -0
- package/dist/screen-templates/templates/feedback/success.js.map +1 -0
- package/dist/screen-templates/templates/home/index.d.ts +6 -0
- package/dist/screen-templates/templates/home/index.d.ts.map +1 -0
- package/dist/screen-templates/templates/home/index.js +6 -0
- package/dist/screen-templates/templates/home/index.js.map +1 -0
- package/dist/screen-templates/templates/home/landing.d.ts +24 -0
- package/dist/screen-templates/templates/home/landing.d.ts.map +1 -0
- package/dist/screen-templates/templates/home/landing.js +197 -0
- package/dist/screen-templates/templates/home/landing.js.map +1 -0
- package/dist/screen-templates/templates/settings/index.d.ts +6 -0
- package/dist/screen-templates/templates/settings/index.d.ts.map +1 -0
- package/dist/screen-templates/templates/settings/index.js +6 -0
- package/dist/screen-templates/templates/settings/index.js.map +1 -0
- package/dist/screen-templates/templates/settings/preferences.d.ts +24 -0
- package/dist/screen-templates/templates/settings/preferences.d.ts.map +1 -0
- package/dist/screen-templates/templates/settings/preferences.js +265 -0
- package/dist/screen-templates/templates/settings/preferences.js.map +1 -0
- package/dist/screen-templates/types.d.ts +229 -0
- package/dist/screen-templates/types.d.ts.map +1 -0
- package/dist/screen-templates/types.js +7 -0
- package/dist/screen-templates/types.js.map +1 -0
- package/dist/theme-v2.d.ts +228 -0
- package/dist/theme-v2.d.ts.map +1 -0
- package/dist/theme-v2.js +158 -0
- package/dist/theme-v2.js.map +1 -0
- package/dist/theme.d.ts +60 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/theme.js +76 -0
- package/dist/theme.js.map +1 -0
- package/dist/token-resolver.d.ts +69 -0
- package/dist/token-resolver.d.ts.map +1 -0
- package/dist/token-resolver.js +122 -0
- package/dist/token-resolver.js.map +1 -0
- package/dist/token-validation.d.ts +432 -0
- package/dist/token-validation.d.ts.map +1 -0
- package/dist/token-validation.js +140 -0
- package/dist/token-validation.js.map +1 -0
- package/dist/tokens.d.ts +158 -0
- package/dist/tokens.d.ts.map +1 -0
- package/dist/tokens.js +10 -0
- package/dist/tokens.js.map +1 -0
- package/dist/types.d.ts +77 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +7 -0
- package/dist/types.js.map +1 -0
- package/package.json +53 -0
|
@@ -0,0 +1,694 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @tekton-ui/core - Section Pattern Token Definitions
|
|
3
|
+
* Concrete Section Pattern Token implementations for layout primitives
|
|
4
|
+
* [SPEC-LAYOUT-001] [PHASE-5]
|
|
5
|
+
*/
|
|
6
|
+
// ============================================================================
|
|
7
|
+
// Grid Pattern Tokens (4 patterns)
|
|
8
|
+
// ============================================================================
|
|
9
|
+
/**
|
|
10
|
+
* 2-column grid layout with responsive breakpoints
|
|
11
|
+
* Suitable for comparison layouts, before/after views, or paired content
|
|
12
|
+
*/
|
|
13
|
+
export const SECTION_GRID_2 = {
|
|
14
|
+
id: 'section.grid-2',
|
|
15
|
+
type: 'grid',
|
|
16
|
+
description: '2-column grid layout with responsive breakpoints',
|
|
17
|
+
css: {
|
|
18
|
+
display: 'grid',
|
|
19
|
+
gridTemplateColumns: 'repeat(2, 1fr)',
|
|
20
|
+
gap: 'atomic.spacing.4',
|
|
21
|
+
},
|
|
22
|
+
responsive: {
|
|
23
|
+
default: {
|
|
24
|
+
display: 'grid',
|
|
25
|
+
gridTemplateColumns: 'repeat(1, 1fr)', // Mobile: 1 column
|
|
26
|
+
gap: 'atomic.spacing.2',
|
|
27
|
+
},
|
|
28
|
+
md: {
|
|
29
|
+
display: 'grid',
|
|
30
|
+
gridTemplateColumns: 'repeat(2, 1fr)', // Tablet+: 2 columns
|
|
31
|
+
gap: 'atomic.spacing.4',
|
|
32
|
+
},
|
|
33
|
+
xl: {
|
|
34
|
+
display: 'grid',
|
|
35
|
+
gridTemplateColumns: 'repeat(2, 1fr)',
|
|
36
|
+
gap: 'atomic.spacing.5',
|
|
37
|
+
},
|
|
38
|
+
'2xl': {
|
|
39
|
+
display: 'grid',
|
|
40
|
+
gridTemplateColumns: 'repeat(2, 1fr)',
|
|
41
|
+
gap: 'atomic.spacing.6',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
tokenBindings: {
|
|
45
|
+
gap: 'atomic.spacing.4',
|
|
46
|
+
itemBackground: 'semantic.background.surface',
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* 3-column grid layout with responsive breakpoints
|
|
51
|
+
* Suitable for feature cards, product showcases, or team member displays
|
|
52
|
+
*/
|
|
53
|
+
export const SECTION_GRID_3 = {
|
|
54
|
+
id: 'section.grid-3',
|
|
55
|
+
type: 'grid',
|
|
56
|
+
description: '3-column grid layout with responsive breakpoints',
|
|
57
|
+
css: {
|
|
58
|
+
display: 'grid',
|
|
59
|
+
gridTemplateColumns: 'repeat(3, 1fr)',
|
|
60
|
+
gap: 'atomic.spacing.4',
|
|
61
|
+
},
|
|
62
|
+
responsive: {
|
|
63
|
+
default: {
|
|
64
|
+
display: 'grid',
|
|
65
|
+
gridTemplateColumns: 'repeat(1, 1fr)', // Mobile: 1 column
|
|
66
|
+
gap: 'atomic.spacing.2',
|
|
67
|
+
},
|
|
68
|
+
md: {
|
|
69
|
+
display: 'grid',
|
|
70
|
+
gridTemplateColumns: 'repeat(2, 1fr)', // Tablet: 2 columns
|
|
71
|
+
gap: 'atomic.spacing.3',
|
|
72
|
+
},
|
|
73
|
+
lg: {
|
|
74
|
+
display: 'grid',
|
|
75
|
+
gridTemplateColumns: 'repeat(3, 1fr)', // Desktop: 3 columns
|
|
76
|
+
gap: 'atomic.spacing.4',
|
|
77
|
+
},
|
|
78
|
+
xl: {
|
|
79
|
+
display: 'grid',
|
|
80
|
+
gridTemplateColumns: 'repeat(3, 1fr)',
|
|
81
|
+
gap: 'atomic.spacing.5',
|
|
82
|
+
},
|
|
83
|
+
'2xl': {
|
|
84
|
+
display: 'grid',
|
|
85
|
+
gridTemplateColumns: 'repeat(4, 1fr)',
|
|
86
|
+
gap: 'atomic.spacing.6',
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
tokenBindings: {
|
|
90
|
+
gap: 'atomic.spacing.4',
|
|
91
|
+
itemBackground: 'semantic.background.surface',
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* 4-column grid layout with responsive breakpoints
|
|
96
|
+
* Suitable for metrics, dashboards, or dense content displays
|
|
97
|
+
*/
|
|
98
|
+
export const SECTION_GRID_4 = {
|
|
99
|
+
id: 'section.grid-4',
|
|
100
|
+
type: 'grid',
|
|
101
|
+
description: '4-column grid layout with responsive breakpoints',
|
|
102
|
+
css: {
|
|
103
|
+
display: 'grid',
|
|
104
|
+
gridTemplateColumns: 'repeat(4, 1fr)',
|
|
105
|
+
gap: 'atomic.spacing.4',
|
|
106
|
+
},
|
|
107
|
+
responsive: {
|
|
108
|
+
default: {
|
|
109
|
+
display: 'grid',
|
|
110
|
+
gridTemplateColumns: 'repeat(1, 1fr)', // Mobile: 1 column
|
|
111
|
+
gap: 'atomic.spacing.2',
|
|
112
|
+
},
|
|
113
|
+
md: {
|
|
114
|
+
display: 'grid',
|
|
115
|
+
gridTemplateColumns: 'repeat(2, 1fr)', // Tablet: 2 columns
|
|
116
|
+
gap: 'atomic.spacing.3',
|
|
117
|
+
},
|
|
118
|
+
lg: {
|
|
119
|
+
display: 'grid',
|
|
120
|
+
gridTemplateColumns: 'repeat(4, 1fr)', // Desktop: 4 columns
|
|
121
|
+
gap: 'atomic.spacing.4',
|
|
122
|
+
},
|
|
123
|
+
xl: {
|
|
124
|
+
display: 'grid',
|
|
125
|
+
gridTemplateColumns: 'repeat(5, 1fr)',
|
|
126
|
+
gap: 'atomic.spacing.5',
|
|
127
|
+
},
|
|
128
|
+
'2xl': {
|
|
129
|
+
display: 'grid',
|
|
130
|
+
gridTemplateColumns: 'repeat(6, 1fr)',
|
|
131
|
+
gap: 'atomic.spacing.6',
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
tokenBindings: {
|
|
135
|
+
gap: 'atomic.spacing.4',
|
|
136
|
+
itemBackground: 'semantic.background.surface',
|
|
137
|
+
},
|
|
138
|
+
};
|
|
139
|
+
/**
|
|
140
|
+
* Auto-fill responsive grid layout
|
|
141
|
+
* Automatically adjusts column count based on available space
|
|
142
|
+
* Suitable for dynamic content grids and galleries
|
|
143
|
+
*/
|
|
144
|
+
export const SECTION_GRID_AUTO = {
|
|
145
|
+
id: 'section.grid-auto',
|
|
146
|
+
type: 'grid',
|
|
147
|
+
description: 'Auto-fill responsive grid with minimum column width',
|
|
148
|
+
css: {
|
|
149
|
+
display: 'grid',
|
|
150
|
+
gridTemplateColumns: 'repeat(auto-fill, minmax(250px, 1fr))',
|
|
151
|
+
gap: 'atomic.spacing.4',
|
|
152
|
+
},
|
|
153
|
+
responsive: {
|
|
154
|
+
default: {
|
|
155
|
+
display: 'grid',
|
|
156
|
+
gridTemplateColumns: 'repeat(auto-fill, minmax(200px, 1fr))', // Mobile: smaller min
|
|
157
|
+
gap: 'atomic.spacing.2',
|
|
158
|
+
},
|
|
159
|
+
md: {
|
|
160
|
+
display: 'grid',
|
|
161
|
+
gridTemplateColumns: 'repeat(auto-fill, minmax(250px, 1fr))', // Tablet+: standard min
|
|
162
|
+
gap: 'atomic.spacing.4',
|
|
163
|
+
},
|
|
164
|
+
xl: {
|
|
165
|
+
display: 'grid',
|
|
166
|
+
gridTemplateColumns: 'repeat(auto-fill, minmax(300px, 1fr))',
|
|
167
|
+
gap: 'atomic.spacing.5',
|
|
168
|
+
},
|
|
169
|
+
'2xl': {
|
|
170
|
+
display: 'grid',
|
|
171
|
+
gridTemplateColumns: 'repeat(auto-fill, minmax(350px, 1fr))',
|
|
172
|
+
gap: 'atomic.spacing.6',
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
tokenBindings: {
|
|
176
|
+
gap: 'atomic.spacing.4',
|
|
177
|
+
itemBackground: 'semantic.background.surface',
|
|
178
|
+
minColumnWidth: 'atomic.spacing.64',
|
|
179
|
+
},
|
|
180
|
+
};
|
|
181
|
+
// ============================================================================
|
|
182
|
+
// Split Pattern Tokens (3 patterns)
|
|
183
|
+
// ============================================================================
|
|
184
|
+
/**
|
|
185
|
+
* 30/70 split layout using flexbox
|
|
186
|
+
* First child takes 30% width, second child takes 70%
|
|
187
|
+
* Suitable for sidebar-content layouts or list-detail views
|
|
188
|
+
*/
|
|
189
|
+
export const SECTION_SPLIT_30_70 = {
|
|
190
|
+
id: 'section.split-30-70',
|
|
191
|
+
type: 'flex',
|
|
192
|
+
description: '30/70 split layout with sidebar and main content',
|
|
193
|
+
css: {
|
|
194
|
+
display: 'flex',
|
|
195
|
+
flexDirection: 'row',
|
|
196
|
+
gap: 'atomic.spacing.4',
|
|
197
|
+
},
|
|
198
|
+
responsive: {
|
|
199
|
+
default: {
|
|
200
|
+
display: 'flex',
|
|
201
|
+
flexDirection: 'column', // Mobile: stack vertically
|
|
202
|
+
gap: 'atomic.spacing.2',
|
|
203
|
+
},
|
|
204
|
+
md: {
|
|
205
|
+
display: 'flex',
|
|
206
|
+
flexDirection: 'row', // Tablet+: side by side with 30/70
|
|
207
|
+
gap: 'atomic.spacing.4',
|
|
208
|
+
},
|
|
209
|
+
xl: {
|
|
210
|
+
display: 'flex',
|
|
211
|
+
flexDirection: 'row',
|
|
212
|
+
gap: 'atomic.spacing.5',
|
|
213
|
+
},
|
|
214
|
+
'2xl': {
|
|
215
|
+
display: 'flex',
|
|
216
|
+
flexDirection: 'row',
|
|
217
|
+
gap: 'atomic.spacing.6',
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
tokenBindings: {
|
|
221
|
+
gap: 'atomic.spacing.4',
|
|
222
|
+
leftBackground: 'semantic.background.surface',
|
|
223
|
+
rightBackground: 'semantic.background.elevated',
|
|
224
|
+
leftWidth: 'atomic.spacing.96', // ~30%
|
|
225
|
+
rightWidth: 'atomic.spacing.full',
|
|
226
|
+
},
|
|
227
|
+
};
|
|
228
|
+
/**
|
|
229
|
+
* Equal 50/50 split layout using flexbox
|
|
230
|
+
* Both children take equal width
|
|
231
|
+
* Suitable for comparison views or balanced content layouts
|
|
232
|
+
*/
|
|
233
|
+
export const SECTION_SPLIT_50_50 = {
|
|
234
|
+
id: 'section.split-50-50',
|
|
235
|
+
type: 'flex',
|
|
236
|
+
description: 'Equal 50/50 split layout using flexbox',
|
|
237
|
+
css: {
|
|
238
|
+
display: 'flex',
|
|
239
|
+
flexDirection: 'row',
|
|
240
|
+
gap: 'atomic.spacing.4',
|
|
241
|
+
},
|
|
242
|
+
responsive: {
|
|
243
|
+
default: {
|
|
244
|
+
display: 'flex',
|
|
245
|
+
flexDirection: 'column', // Mobile: stack vertically
|
|
246
|
+
gap: 'atomic.spacing.2',
|
|
247
|
+
},
|
|
248
|
+
md: {
|
|
249
|
+
display: 'flex',
|
|
250
|
+
flexDirection: 'row', // Tablet+: side by side
|
|
251
|
+
gap: 'atomic.spacing.4',
|
|
252
|
+
},
|
|
253
|
+
xl: {
|
|
254
|
+
display: 'flex',
|
|
255
|
+
flexDirection: 'row',
|
|
256
|
+
gap: 'atomic.spacing.5',
|
|
257
|
+
},
|
|
258
|
+
'2xl': {
|
|
259
|
+
display: 'flex',
|
|
260
|
+
flexDirection: 'row',
|
|
261
|
+
gap: 'atomic.spacing.6',
|
|
262
|
+
},
|
|
263
|
+
},
|
|
264
|
+
tokenBindings: {
|
|
265
|
+
gap: 'atomic.spacing.4',
|
|
266
|
+
leftBackground: 'semantic.background.surface',
|
|
267
|
+
rightBackground: 'semantic.background.elevated',
|
|
268
|
+
},
|
|
269
|
+
};
|
|
270
|
+
/**
|
|
271
|
+
* 70/30 split layout using flexbox
|
|
272
|
+
* First child takes 70% width, second child takes 30%
|
|
273
|
+
* Suitable for content-sidebar layouts or detail-metadata views
|
|
274
|
+
*/
|
|
275
|
+
export const SECTION_SPLIT_70_30 = {
|
|
276
|
+
id: 'section.split-70-30',
|
|
277
|
+
type: 'flex',
|
|
278
|
+
description: '70/30 split layout with main content and sidebar',
|
|
279
|
+
css: {
|
|
280
|
+
display: 'flex',
|
|
281
|
+
flexDirection: 'row',
|
|
282
|
+
gap: 'atomic.spacing.4',
|
|
283
|
+
},
|
|
284
|
+
responsive: {
|
|
285
|
+
default: {
|
|
286
|
+
display: 'flex',
|
|
287
|
+
flexDirection: 'column', // Mobile: stack vertically
|
|
288
|
+
gap: 'atomic.spacing.2',
|
|
289
|
+
},
|
|
290
|
+
md: {
|
|
291
|
+
display: 'flex',
|
|
292
|
+
flexDirection: 'row', // Tablet+: side by side with 70/30
|
|
293
|
+
gap: 'atomic.spacing.4',
|
|
294
|
+
},
|
|
295
|
+
xl: {
|
|
296
|
+
display: 'flex',
|
|
297
|
+
flexDirection: 'row',
|
|
298
|
+
gap: 'atomic.spacing.5',
|
|
299
|
+
},
|
|
300
|
+
'2xl': {
|
|
301
|
+
display: 'flex',
|
|
302
|
+
flexDirection: 'row',
|
|
303
|
+
gap: 'atomic.spacing.6',
|
|
304
|
+
},
|
|
305
|
+
},
|
|
306
|
+
tokenBindings: {
|
|
307
|
+
gap: 'atomic.spacing.4',
|
|
308
|
+
leftBackground: 'semantic.background.elevated',
|
|
309
|
+
rightBackground: 'semantic.background.surface',
|
|
310
|
+
leftWidth: 'atomic.spacing.full',
|
|
311
|
+
rightWidth: 'atomic.spacing.96', // ~30%
|
|
312
|
+
},
|
|
313
|
+
};
|
|
314
|
+
// ============================================================================
|
|
315
|
+
// Stack Pattern Tokens (3 patterns)
|
|
316
|
+
// ============================================================================
|
|
317
|
+
/**
|
|
318
|
+
* Vertical stack layout with top alignment
|
|
319
|
+
* Items are stacked vertically and aligned to the start (top)
|
|
320
|
+
* Suitable for form layouts, content sections, or list views
|
|
321
|
+
*/
|
|
322
|
+
export const SECTION_STACK_START = {
|
|
323
|
+
id: 'section.stack-start',
|
|
324
|
+
type: 'flex',
|
|
325
|
+
description: 'Vertical stack with top alignment',
|
|
326
|
+
css: {
|
|
327
|
+
display: 'flex',
|
|
328
|
+
flexDirection: 'column',
|
|
329
|
+
alignItems: 'flex-start',
|
|
330
|
+
gap: 'atomic.spacing.4',
|
|
331
|
+
},
|
|
332
|
+
responsive: {
|
|
333
|
+
default: {
|
|
334
|
+
display: 'flex',
|
|
335
|
+
flexDirection: 'column',
|
|
336
|
+
alignItems: 'flex-start',
|
|
337
|
+
gap: 'atomic.spacing.2',
|
|
338
|
+
},
|
|
339
|
+
md: {
|
|
340
|
+
display: 'flex',
|
|
341
|
+
flexDirection: 'column',
|
|
342
|
+
alignItems: 'flex-start',
|
|
343
|
+
gap: 'atomic.spacing.4',
|
|
344
|
+
},
|
|
345
|
+
xl: {
|
|
346
|
+
display: 'flex',
|
|
347
|
+
flexDirection: 'column',
|
|
348
|
+
alignItems: 'flex-start',
|
|
349
|
+
gap: 'atomic.spacing.5',
|
|
350
|
+
},
|
|
351
|
+
'2xl': {
|
|
352
|
+
display: 'flex',
|
|
353
|
+
flexDirection: 'column',
|
|
354
|
+
alignItems: 'flex-start',
|
|
355
|
+
gap: 'atomic.spacing.6',
|
|
356
|
+
},
|
|
357
|
+
},
|
|
358
|
+
tokenBindings: {
|
|
359
|
+
gap: 'atomic.spacing.4',
|
|
360
|
+
itemBackground: 'semantic.background.surface',
|
|
361
|
+
},
|
|
362
|
+
};
|
|
363
|
+
/**
|
|
364
|
+
* Vertical stack layout with center alignment
|
|
365
|
+
* Items are stacked vertically and centered horizontally
|
|
366
|
+
* Suitable for centered content, hero sections, or empty states
|
|
367
|
+
*/
|
|
368
|
+
export const SECTION_STACK_CENTER = {
|
|
369
|
+
id: 'section.stack-center',
|
|
370
|
+
type: 'flex',
|
|
371
|
+
description: 'Vertical stack with center alignment',
|
|
372
|
+
css: {
|
|
373
|
+
display: 'flex',
|
|
374
|
+
flexDirection: 'column',
|
|
375
|
+
alignItems: 'center',
|
|
376
|
+
justifyContent: 'center',
|
|
377
|
+
gap: 'atomic.spacing.4',
|
|
378
|
+
},
|
|
379
|
+
responsive: {
|
|
380
|
+
default: {
|
|
381
|
+
display: 'flex',
|
|
382
|
+
flexDirection: 'column',
|
|
383
|
+
alignItems: 'center',
|
|
384
|
+
justifyContent: 'center',
|
|
385
|
+
gap: 'atomic.spacing.2',
|
|
386
|
+
},
|
|
387
|
+
md: {
|
|
388
|
+
display: 'flex',
|
|
389
|
+
flexDirection: 'column',
|
|
390
|
+
alignItems: 'center',
|
|
391
|
+
justifyContent: 'center',
|
|
392
|
+
gap: 'atomic.spacing.4',
|
|
393
|
+
},
|
|
394
|
+
xl: {
|
|
395
|
+
display: 'flex',
|
|
396
|
+
flexDirection: 'column',
|
|
397
|
+
alignItems: 'center',
|
|
398
|
+
justifyContent: 'center',
|
|
399
|
+
gap: 'atomic.spacing.5',
|
|
400
|
+
},
|
|
401
|
+
'2xl': {
|
|
402
|
+
display: 'flex',
|
|
403
|
+
flexDirection: 'column',
|
|
404
|
+
alignItems: 'center',
|
|
405
|
+
justifyContent: 'center',
|
|
406
|
+
gap: 'atomic.spacing.6',
|
|
407
|
+
},
|
|
408
|
+
},
|
|
409
|
+
tokenBindings: {
|
|
410
|
+
gap: 'atomic.spacing.4',
|
|
411
|
+
itemBackground: 'semantic.background.surface',
|
|
412
|
+
},
|
|
413
|
+
};
|
|
414
|
+
/**
|
|
415
|
+
* Vertical stack layout with bottom alignment
|
|
416
|
+
* Items are stacked vertically and aligned to the end (bottom)
|
|
417
|
+
* Suitable for action buttons, footers, or bottom-aligned content
|
|
418
|
+
*/
|
|
419
|
+
export const SECTION_STACK_END = {
|
|
420
|
+
id: 'section.stack-end',
|
|
421
|
+
type: 'flex',
|
|
422
|
+
description: 'Vertical stack with bottom alignment',
|
|
423
|
+
css: {
|
|
424
|
+
display: 'flex',
|
|
425
|
+
flexDirection: 'column',
|
|
426
|
+
alignItems: 'flex-end',
|
|
427
|
+
gap: 'atomic.spacing.4',
|
|
428
|
+
},
|
|
429
|
+
responsive: {
|
|
430
|
+
default: {
|
|
431
|
+
display: 'flex',
|
|
432
|
+
flexDirection: 'column',
|
|
433
|
+
alignItems: 'flex-end',
|
|
434
|
+
gap: 'atomic.spacing.2',
|
|
435
|
+
},
|
|
436
|
+
md: {
|
|
437
|
+
display: 'flex',
|
|
438
|
+
flexDirection: 'column',
|
|
439
|
+
alignItems: 'flex-end',
|
|
440
|
+
gap: 'atomic.spacing.4',
|
|
441
|
+
},
|
|
442
|
+
xl: {
|
|
443
|
+
display: 'flex',
|
|
444
|
+
flexDirection: 'column',
|
|
445
|
+
alignItems: 'flex-end',
|
|
446
|
+
gap: 'atomic.spacing.5',
|
|
447
|
+
},
|
|
448
|
+
'2xl': {
|
|
449
|
+
display: 'flex',
|
|
450
|
+
flexDirection: 'column',
|
|
451
|
+
alignItems: 'flex-end',
|
|
452
|
+
gap: 'atomic.spacing.6',
|
|
453
|
+
},
|
|
454
|
+
},
|
|
455
|
+
tokenBindings: {
|
|
456
|
+
gap: 'atomic.spacing.4',
|
|
457
|
+
itemBackground: 'semantic.background.surface',
|
|
458
|
+
},
|
|
459
|
+
};
|
|
460
|
+
// ============================================================================
|
|
461
|
+
// Sidebar Pattern Tokens (2 patterns)
|
|
462
|
+
// ============================================================================
|
|
463
|
+
/**
|
|
464
|
+
* Fixed left sidebar layout
|
|
465
|
+
* Sidebar has fixed width, main content fills remaining space
|
|
466
|
+
* Suitable for navigation sidebars or filter panels
|
|
467
|
+
*/
|
|
468
|
+
export const SECTION_SIDEBAR_LEFT = {
|
|
469
|
+
id: 'section.sidebar-left',
|
|
470
|
+
type: 'flex',
|
|
471
|
+
description: 'Fixed left sidebar with flexible main content',
|
|
472
|
+
css: {
|
|
473
|
+
display: 'flex',
|
|
474
|
+
flexDirection: 'row',
|
|
475
|
+
gap: 'atomic.spacing.4',
|
|
476
|
+
},
|
|
477
|
+
responsive: {
|
|
478
|
+
default: {
|
|
479
|
+
display: 'flex',
|
|
480
|
+
flexDirection: 'column', // Mobile: stack vertically
|
|
481
|
+
gap: 'atomic.spacing.2',
|
|
482
|
+
},
|
|
483
|
+
md: {
|
|
484
|
+
display: 'flex',
|
|
485
|
+
flexDirection: 'row', // Tablet+: sidebar on left
|
|
486
|
+
gap: 'atomic.spacing.4',
|
|
487
|
+
},
|
|
488
|
+
xl: {
|
|
489
|
+
display: 'flex',
|
|
490
|
+
flexDirection: 'row',
|
|
491
|
+
gap: 'atomic.spacing.5',
|
|
492
|
+
},
|
|
493
|
+
'2xl': {
|
|
494
|
+
display: 'flex',
|
|
495
|
+
flexDirection: 'row',
|
|
496
|
+
gap: 'atomic.spacing.6',
|
|
497
|
+
},
|
|
498
|
+
},
|
|
499
|
+
tokenBindings: {
|
|
500
|
+
gap: 'atomic.spacing.4',
|
|
501
|
+
sidebarBackground: 'semantic.background.surface',
|
|
502
|
+
mainBackground: 'semantic.background.elevated',
|
|
503
|
+
sidebarWidth: 'atomic.spacing.64', // Fixed sidebar width (256px)
|
|
504
|
+
},
|
|
505
|
+
};
|
|
506
|
+
/**
|
|
507
|
+
* Fixed right sidebar layout
|
|
508
|
+
* Main content on left, sidebar has fixed width on right
|
|
509
|
+
* Suitable for metadata panels or contextual help
|
|
510
|
+
*/
|
|
511
|
+
export const SECTION_SIDEBAR_RIGHT = {
|
|
512
|
+
id: 'section.sidebar-right',
|
|
513
|
+
type: 'flex',
|
|
514
|
+
description: 'Fixed right sidebar with flexible main content',
|
|
515
|
+
css: {
|
|
516
|
+
display: 'flex',
|
|
517
|
+
flexDirection: 'row',
|
|
518
|
+
gap: 'atomic.spacing.4',
|
|
519
|
+
},
|
|
520
|
+
responsive: {
|
|
521
|
+
default: {
|
|
522
|
+
display: 'flex',
|
|
523
|
+
flexDirection: 'column', // Mobile: stack vertically
|
|
524
|
+
gap: 'atomic.spacing.2',
|
|
525
|
+
},
|
|
526
|
+
md: {
|
|
527
|
+
display: 'flex',
|
|
528
|
+
flexDirection: 'row', // Tablet+: sidebar on right
|
|
529
|
+
gap: 'atomic.spacing.4',
|
|
530
|
+
},
|
|
531
|
+
xl: {
|
|
532
|
+
display: 'flex',
|
|
533
|
+
flexDirection: 'row',
|
|
534
|
+
gap: 'atomic.spacing.5',
|
|
535
|
+
},
|
|
536
|
+
'2xl': {
|
|
537
|
+
display: 'flex',
|
|
538
|
+
flexDirection: 'row',
|
|
539
|
+
gap: 'atomic.spacing.6',
|
|
540
|
+
},
|
|
541
|
+
},
|
|
542
|
+
tokenBindings: {
|
|
543
|
+
gap: 'atomic.spacing.4',
|
|
544
|
+
mainBackground: 'semantic.background.elevated',
|
|
545
|
+
sidebarBackground: 'semantic.background.surface',
|
|
546
|
+
sidebarWidth: 'atomic.spacing.64', // Fixed sidebar width (256px)
|
|
547
|
+
},
|
|
548
|
+
};
|
|
549
|
+
// ============================================================================
|
|
550
|
+
// Container Pattern Token (1 pattern)
|
|
551
|
+
// ============================================================================
|
|
552
|
+
/**
|
|
553
|
+
* Centered max-width container
|
|
554
|
+
* Content is centered horizontally with maximum width constraint
|
|
555
|
+
* Suitable for article content, forms, or focused reading experiences
|
|
556
|
+
*/
|
|
557
|
+
export const SECTION_CONTAINER = {
|
|
558
|
+
id: 'section.container',
|
|
559
|
+
type: 'flex',
|
|
560
|
+
description: 'Centered max-width container with horizontal padding',
|
|
561
|
+
css: {
|
|
562
|
+
display: 'flex',
|
|
563
|
+
flexDirection: 'column',
|
|
564
|
+
maxWidth: 'atomic.spacing.256', // 1024px max width
|
|
565
|
+
padding: 'atomic.spacing.4',
|
|
566
|
+
},
|
|
567
|
+
responsive: {
|
|
568
|
+
default: {
|
|
569
|
+
display: 'flex',
|
|
570
|
+
flexDirection: 'column',
|
|
571
|
+
// Mobile: no maxWidth constraint (full width)
|
|
572
|
+
padding: 'atomic.spacing.4',
|
|
573
|
+
},
|
|
574
|
+
md: {
|
|
575
|
+
display: 'flex',
|
|
576
|
+
flexDirection: 'column',
|
|
577
|
+
maxWidth: 'atomic.spacing.192', // Tablet: 768px
|
|
578
|
+
padding: 'atomic.spacing.6',
|
|
579
|
+
},
|
|
580
|
+
lg: {
|
|
581
|
+
display: 'flex',
|
|
582
|
+
flexDirection: 'column',
|
|
583
|
+
maxWidth: 'atomic.spacing.256', // Desktop: 1024px
|
|
584
|
+
padding: 'atomic.spacing.8',
|
|
585
|
+
},
|
|
586
|
+
xl: {
|
|
587
|
+
display: 'flex',
|
|
588
|
+
flexDirection: 'column',
|
|
589
|
+
maxWidth: 'atomic.spacing.320', // XL: 1280px
|
|
590
|
+
padding: 'atomic.spacing.10',
|
|
591
|
+
},
|
|
592
|
+
'2xl': {
|
|
593
|
+
display: 'flex',
|
|
594
|
+
flexDirection: 'column',
|
|
595
|
+
maxWidth: 'atomic.spacing.384', // 2XL: 1536px
|
|
596
|
+
padding: 'atomic.spacing.12',
|
|
597
|
+
},
|
|
598
|
+
},
|
|
599
|
+
tokenBindings: {
|
|
600
|
+
maxWidth: 'atomic.spacing.256',
|
|
601
|
+
padding: 'atomic.spacing.4',
|
|
602
|
+
background: 'semantic.background.surface',
|
|
603
|
+
},
|
|
604
|
+
};
|
|
605
|
+
// ============================================================================
|
|
606
|
+
// Internal Token Map
|
|
607
|
+
// ============================================================================
|
|
608
|
+
/**
|
|
609
|
+
* Internal map for quick section pattern token lookups by ID
|
|
610
|
+
* Used by getSectionPatternToken() for O(1) access
|
|
611
|
+
*/
|
|
612
|
+
const SECTION_PATTERN_TOKENS_MAP = {
|
|
613
|
+
'section.grid-2': SECTION_GRID_2,
|
|
614
|
+
'section.grid-3': SECTION_GRID_3,
|
|
615
|
+
'section.grid-4': SECTION_GRID_4,
|
|
616
|
+
'section.grid-auto': SECTION_GRID_AUTO,
|
|
617
|
+
'section.split-30-70': SECTION_SPLIT_30_70,
|
|
618
|
+
'section.split-50-50': SECTION_SPLIT_50_50,
|
|
619
|
+
'section.split-70-30': SECTION_SPLIT_70_30,
|
|
620
|
+
'section.stack-start': SECTION_STACK_START,
|
|
621
|
+
'section.stack-center': SECTION_STACK_CENTER,
|
|
622
|
+
'section.stack-end': SECTION_STACK_END,
|
|
623
|
+
'section.sidebar-left': SECTION_SIDEBAR_LEFT,
|
|
624
|
+
'section.sidebar-right': SECTION_SIDEBAR_RIGHT,
|
|
625
|
+
'section.container': SECTION_CONTAINER,
|
|
626
|
+
};
|
|
627
|
+
// ============================================================================
|
|
628
|
+
// Utility Functions
|
|
629
|
+
// ============================================================================
|
|
630
|
+
/**
|
|
631
|
+
* Get a section pattern token by its ID
|
|
632
|
+
*
|
|
633
|
+
* @param patternId - Section pattern token ID (e.g., "section.grid-3")
|
|
634
|
+
* @returns SectionPatternToken if found, undefined otherwise
|
|
635
|
+
*
|
|
636
|
+
* @example
|
|
637
|
+
* ```typescript
|
|
638
|
+
* const grid3 = getSectionPatternToken('section.grid-3');
|
|
639
|
+
* if (grid3) {
|
|
640
|
+
* console.log(grid3.description);
|
|
641
|
+
* }
|
|
642
|
+
* ```
|
|
643
|
+
*/
|
|
644
|
+
export function getSectionPatternToken(patternId) {
|
|
645
|
+
return SECTION_PATTERN_TOKENS_MAP[patternId];
|
|
646
|
+
}
|
|
647
|
+
/**
|
|
648
|
+
* Get all available section pattern tokens
|
|
649
|
+
*
|
|
650
|
+
* @returns Array of all SectionPatternTokens
|
|
651
|
+
*
|
|
652
|
+
* @example
|
|
653
|
+
* ```typescript
|
|
654
|
+
* const allSections = getAllSectionPatternTokens();
|
|
655
|
+
* console.log(`Available sections: ${allSections.length}`);
|
|
656
|
+
* ```
|
|
657
|
+
*/
|
|
658
|
+
export function getAllSectionPatternTokens() {
|
|
659
|
+
return Object.values(SECTION_PATTERN_TOKENS_MAP);
|
|
660
|
+
}
|
|
661
|
+
/**
|
|
662
|
+
* Get section pattern tokens filtered by type
|
|
663
|
+
*
|
|
664
|
+
* @param type - Section type ('grid', 'flex', 'split', 'stack', or 'container')
|
|
665
|
+
* @returns Array of SectionPatternTokens with the specified type
|
|
666
|
+
*
|
|
667
|
+
* @example
|
|
668
|
+
* ```typescript
|
|
669
|
+
* const gridSections = getSectionsByType('grid');
|
|
670
|
+
* console.log(`Grid sections: ${gridSections.length}`);
|
|
671
|
+
* ```
|
|
672
|
+
*/
|
|
673
|
+
export function getSectionsByType(type) {
|
|
674
|
+
return getAllSectionPatternTokens().filter(section => section.type === type);
|
|
675
|
+
}
|
|
676
|
+
/**
|
|
677
|
+
* Get section CSS configuration by pattern ID
|
|
678
|
+
*
|
|
679
|
+
* @param patternId - Section pattern token ID (e.g., "section.grid-4")
|
|
680
|
+
* @returns SectionCSS if found, undefined otherwise
|
|
681
|
+
*
|
|
682
|
+
* @example
|
|
683
|
+
* ```typescript
|
|
684
|
+
* const css = getSectionCSS('section.grid-4');
|
|
685
|
+
* if (css) {
|
|
686
|
+
* console.log(`Display: ${css.display}`);
|
|
687
|
+
* }
|
|
688
|
+
* ```
|
|
689
|
+
*/
|
|
690
|
+
export function getSectionCSS(patternId) {
|
|
691
|
+
const pattern = getSectionPatternToken(patternId);
|
|
692
|
+
return pattern?.css;
|
|
693
|
+
}
|
|
694
|
+
//# sourceMappingURL=sections.js.map
|