@purestack/ts-components 1.1.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.
Files changed (106) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +10 -0
  3. package/dist/ts-components.d.mts +1662 -0
  4. package/dist/ts-components.d.mts.map +1 -0
  5. package/dist/ts-components.mjs +9200 -0
  6. package/dist/ts-components.mjs.map +1 -0
  7. package/package.json +130 -0
  8. package/src/defineComponents.ts +87 -0
  9. package/src/index.ts +270 -0
  10. package/src/registerStyles.ts +63 -0
  11. package/src/standard/alertBox/alertBox.ts +64 -0
  12. package/src/standard/autoId.ts +25 -0
  13. package/src/standard/badge/badge.ts +41 -0
  14. package/src/standard/badge/badgeStyle.ts +21 -0
  15. package/src/standard/barChart/barChart.ts +338 -0
  16. package/src/standard/barChart/barChartStyle.ts +81 -0
  17. package/src/standard/btn/btn.ts +191 -0
  18. package/src/standard/btn/btnStyle.ts +59 -0
  19. package/src/standard/btnGroup/btnGroup.ts +208 -0
  20. package/src/standard/btnGroup/btnGroupStyle.ts +85 -0
  21. package/src/standard/chart/cartesianChart.ts +99 -0
  22. package/src/standard/chart/chartDefaults.ts +25 -0
  23. package/src/standard/chart/chartUtils.ts +84 -0
  24. package/src/standard/classicLogo/classicLogo.ts +429 -0
  25. package/src/standard/classicLogo/classicLogoStyle.ts +292 -0
  26. package/src/standard/componentVariant.ts +153 -0
  27. package/src/standard/composer/composer.ts +1035 -0
  28. package/src/standard/composer/composerCanvasInitialStyle.ts +225 -0
  29. package/src/standard/composer/composerCanvasRevertStyle.ts +14 -0
  30. package/src/standard/composer/composerCanvasSharedStyle.ts +60 -0
  31. package/src/standard/composer/composerCanvasStyleTypes.ts +8 -0
  32. package/src/standard/composer/composerCanvasThemeStyle.ts +53 -0
  33. package/src/standard/composer/composerStyle.ts +156 -0
  34. package/src/standard/composer/emailHtmlPolicy.ts +474 -0
  35. package/src/standard/consent/consent.ts +173 -0
  36. package/src/standard/consent/consentStyle.ts +44 -0
  37. package/src/standard/contactForm/contactForm.ts +135 -0
  38. package/src/standard/contactForm/contactFormStyle.ts +116 -0
  39. package/src/standard/doughnutChart/doughnutChart.ts +527 -0
  40. package/src/standard/doughnutChart/doughnutChartStyle.ts +64 -0
  41. package/src/standard/dropFiles/dropFiles.ts +480 -0
  42. package/src/standard/dropFiles/dropFilesStyle.ts +171 -0
  43. package/src/standard/expandablePanel/expandablePanel.ts +106 -0
  44. package/src/standard/expandablePanel/expandablePanelStyle.ts +56 -0
  45. package/src/standard/flex/flex.ts +269 -0
  46. package/src/standard/flex/flexStyle.ts +556 -0
  47. package/src/standard/footer/footer.ts +93 -0
  48. package/src/standard/footer/footerStyle.ts +39 -0
  49. package/src/standard/form/autoCompleteInput.ts +567 -0
  50. package/src/standard/form/form.ts +205 -0
  51. package/src/standard/form/formCheck.ts +96 -0
  52. package/src/standard/form/formInputField.ts +184 -0
  53. package/src/standard/form/formSelectField.ts +152 -0
  54. package/src/standard/form/formStyle.ts +585 -0
  55. package/src/standard/form/multiAutoCompleteInput.ts +880 -0
  56. package/src/standard/grid/grid.ts +177 -0
  57. package/src/standard/grid/gridStyle.ts +56 -0
  58. package/src/standard/icon/icon.ts +96 -0
  59. package/src/standard/icon/iconStyle.ts +50 -0
  60. package/src/standard/landing/codeShowcase.ts +54 -0
  61. package/src/standard/landing/comparisonColumn.ts +30 -0
  62. package/src/standard/landing/comparisonFeature.ts +22 -0
  63. package/src/standard/landing/comparisonTable.ts +38 -0
  64. package/src/standard/landing/ctaSection.ts +59 -0
  65. package/src/standard/landing/featureCard.ts +41 -0
  66. package/src/standard/landing/landing.ts +52 -0
  67. package/src/standard/landing/landingBand.ts +217 -0
  68. package/src/standard/landing/landingSection.ts +43 -0
  69. package/src/standard/landing/landingTypes.ts +141 -0
  70. package/src/standard/landing/metricItem.ts +25 -0
  71. package/src/standard/landing/metricStrip.ts +20 -0
  72. package/src/standard/lineChart/lineChart.ts +462 -0
  73. package/src/standard/lineChart/lineChartStyle.ts +91 -0
  74. package/src/standard/logo/logo.ts +192 -0
  75. package/src/standard/logo/logoStyle.ts +164 -0
  76. package/src/standard/modal/modal.ts +171 -0
  77. package/src/standard/modal/modalStore.ts +154 -0
  78. package/src/standard/modal/modalStyle.ts +190 -0
  79. package/src/standard/navMenu/navMenu.ts +278 -0
  80. package/src/standard/navMenu/navMenuStyle.ts +323 -0
  81. package/src/standard/pageLinks/pageLinks.ts +90 -0
  82. package/src/standard/pageScript/pageScript.ts +155 -0
  83. package/src/standard/pageToc/pageToc.ts +154 -0
  84. package/src/standard/pageToc/pageTocStyle.ts +372 -0
  85. package/src/standard/panel/panel.ts +55 -0
  86. package/src/standard/panel/panelStyle.ts +15 -0
  87. package/src/standard/pricing/pricing.ts +146 -0
  88. package/src/standard/searchBox/searchBox.ts +54 -0
  89. package/src/standard/searchBox/searchBoxStyle.ts +180 -0
  90. package/src/standard/sectionHeader/sectionHeader.ts +99 -0
  91. package/src/standard/signIn/signIn.ts +167 -0
  92. package/src/standard/signIn/signInStyle.ts +70 -0
  93. package/src/standard/tabs/tabs.ts +193 -0
  94. package/src/standard/tabs/tabsStyle.ts +231 -0
  95. package/src/standard/themeToggle/themeToggle.ts +33 -0
  96. package/src/standard/themeToggle/themeToggleStyle.ts +88 -0
  97. package/src/standard/toast/toastHost.ts +42 -0
  98. package/src/standard/toast/toastStore.ts +50 -0
  99. package/src/standard/topBar/topBar.ts +101 -0
  100. package/src/standard/topBar/topBarStyle.ts +169 -0
  101. package/src/standard/virtualList/variableVirtualTable.ts +371 -0
  102. package/src/standard/virtualList/virtualList.ts +423 -0
  103. package/src/standard/virtualList/virtualListStyle.ts +34 -0
  104. package/src/standard/virtualList/virtualTable.ts +179 -0
  105. package/src/standard/virtualList/virtualTableStyle.ts +24 -0
  106. package/tsconfig.json +23 -0
package/package.json ADDED
@@ -0,0 +1,130 @@
1
+ {
2
+ "name": "@purestack/ts-components",
3
+ "version": "1.1.0",
4
+ "packageManager": "yarn@4.9.2",
5
+ "module": "./dist/ts-components.mjs",
6
+ "types": "./dist/ts-components.d.mts",
7
+ "type": "module",
8
+ "sideEffects": false,
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/PureStackStudio/PureStack.git",
12
+ "directory": "packages/ts-components"
13
+ },
14
+ "homepage": "https://purestack.studio",
15
+ "bugs": {
16
+ "url": "https://github.com/PureStackStudio/PureStack/issues"
17
+ },
18
+ "publishConfig": {
19
+ "access": "public"
20
+ },
21
+ "exports": {
22
+ ".": {
23
+ "types": "./dist/ts-components.d.mts",
24
+ "source": "./src/index.ts",
25
+ "import": "./dist/ts-components.mjs"
26
+ }
27
+ },
28
+ "license": "MIT",
29
+ "files": [
30
+ "dist/*.mjs",
31
+ "dist/*.mjs.map",
32
+ "dist/*.d.mts",
33
+ "dist/*.d.mts.map",
34
+ "src/**/*.ts",
35
+ "!src/test/**",
36
+ "!src/**/*.test.ts",
37
+ "!src/**/*.spec.ts",
38
+ "tsconfig.json",
39
+ "README.md",
40
+ "LICENSE"
41
+ ],
42
+ "scripts": {
43
+ "build": "tsc",
44
+ "regor-components": "yarn tsx ../../scripts/regor-components.ts",
45
+ "lint": "biome check ./src --formatter-enabled=false --write",
46
+ "test": "vitest"
47
+ },
48
+ "devDependencies": {
49
+ "@purestack/ts-minidom": "^1.1.0",
50
+ "@purestack/ts-render": "^1.1.0"
51
+ },
52
+ "dependencies": {
53
+ "@purestack/ts-common": "^1.1.0",
54
+ "@purestack/ts-css": "^1.1.0",
55
+ "@purestack/ts-page-scripts": "^1.1.0",
56
+ "@purestack/ts-style": "^1.1.0",
57
+ "@purestack/ts-util": "^1.1.0",
58
+ "regor": "^1.7.3"
59
+ },
60
+ "regorComponents": [
61
+ "AlertBox",
62
+ "AppForm",
63
+ "AutoCompleteInput",
64
+ "AutoCompleteOptionRow",
65
+ "Badge",
66
+ "BarChart",
67
+ "Btn",
68
+ "BtnGroup",
69
+ "BtnGroupDropDown",
70
+ "BtnLink",
71
+ "CodeShowcase",
72
+ "ComparisonColumn",
73
+ "ComparisonFeature",
74
+ "ComparisonTable",
75
+ "Composer",
76
+ "Consent",
77
+ "ContactForm",
78
+ "CtaSection",
79
+ "DoughnutChart",
80
+ "DropFiles",
81
+ "ExpandablePanel",
82
+ "FeatureCard",
83
+ "Flex",
84
+ "FormAssistLink",
85
+ "FormCheck",
86
+ "FormDivider",
87
+ "FormInputField",
88
+ "FormMeta",
89
+ "FormSelectField",
90
+ "FormStatus",
91
+ "FormSubmit",
92
+ "Grid",
93
+ "Icon",
94
+ "IconFrame",
95
+ "LandingBand",
96
+ "LandingSection",
97
+ "LineChart",
98
+ "MetricItem",
99
+ "MetricStrip",
100
+ "Modal",
101
+ "ModalStore",
102
+ "ModalTrigger",
103
+ "MultiAutoCompleteDefaultOptionRow",
104
+ "MultiAutoCompleteInput",
105
+ "NavList",
106
+ "NavMenu",
107
+ "PageLinks",
108
+ "PageScript",
109
+ "PageToc",
110
+ "Panel",
111
+ "PricingFeature",
112
+ "PricingPlan",
113
+ "PricingTable",
114
+ "RegorApp",
115
+ "SearchBox",
116
+ "SectionHeader",
117
+ "SignIn",
118
+ "SiteFooter",
119
+ "SiteLogo",
120
+ "TabPane",
121
+ "Tabs",
122
+ "ThemeToggle",
123
+ "ToastHost",
124
+ "TopBar",
125
+ "VariableVirtualList",
126
+ "VariableVirtualTable",
127
+ "VirtualList",
128
+ "VirtualTable"
129
+ ]
130
+ }
@@ -0,0 +1,87 @@
1
+ import { defineAlertComponents } from './standard/alertBox/alertBox'
2
+ import { defineBadgeComponents } from './standard/badge/badge'
3
+ import { defineBarChartComponents } from './standard/barChart/barChart'
4
+ import { defineButtonComponents } from './standard/btn/btn'
5
+ import { defineBtnGroupComponents } from './standard/btnGroup/btnGroup'
6
+ import { defineClassicLogoComponents } from './standard/classicLogo/classicLogo'
7
+ import { defineComposerComponents } from './standard/composer/composer'
8
+ import { defineConsentComponents } from './standard/consent/consent'
9
+ import { defineContactFormComponents } from './standard/contactForm/contactForm'
10
+ import { defineDoughnutChartComponents } from './standard/doughnutChart/doughnutChart'
11
+ import { defineDropFilesComponents } from './standard/dropFiles/dropFiles'
12
+ import { defineExpandablePanelComponents } from './standard/expandablePanel/expandablePanel'
13
+ import { defineFlexComponents } from './standard/flex/flex'
14
+ import { defineFooterComponents } from './standard/footer/footer'
15
+ import { defineAutoCompleteInputComponents } from './standard/form/autoCompleteInput'
16
+ import { defineFormComponents } from './standard/form/form'
17
+ import { defineFormInputField } from './standard/form/formInputField'
18
+ import { defineFormSelectField } from './standard/form/formSelectField'
19
+ import { defineMultiAutoCompleteInputComponents } from './standard/form/multiAutoCompleteInput'
20
+ import { defineGridComponents } from './standard/grid/grid'
21
+ import { defineIconComponents, type GetSvgIcon } from './standard/icon/icon'
22
+ import { defineLandingComponents } from './standard/landing/landing'
23
+ import { defineLineChartComponents } from './standard/lineChart/lineChart'
24
+ import { defineLogoComponents } from './standard/logo/logo'
25
+ import { defineModalComponents } from './standard/modal/modal'
26
+ import { defineNavigationComponents } from './standard/navMenu/navMenu'
27
+ import { definePageLinksComponents } from './standard/pageLinks/pageLinks'
28
+ import { defineScriptComponents } from './standard/pageScript/pageScript'
29
+ import { definePageTocComponents } from './standard/pageToc/pageToc'
30
+ import { definePanelComponents } from './standard/panel/panel'
31
+ import { definePricingComponents } from './standard/pricing/pricing'
32
+ import { defineSearchComponents } from './standard/searchBox/searchBox'
33
+ import { defineSectionHeaderComponents } from './standard/sectionHeader/sectionHeader'
34
+ import { defineSignInComponents } from './standard/signIn/signIn'
35
+ import { defineTabsComponents } from './standard/tabs/tabs'
36
+ import { defineThemeToggleComponents } from './standard/themeToggle/themeToggle'
37
+ import { defineToastComponents } from './standard/toast/toastHost'
38
+ import { defineTopBarComponents } from './standard/topBar/topBar'
39
+ import { defineVariableVirtualTableComponents } from './standard/virtualList/variableVirtualTable'
40
+ import { defineVirtualListComponents } from './standard/virtualList/virtualList'
41
+ import { defineVirtualTableComponents } from './standard/virtualList/virtualTable'
42
+
43
+ export function defineComponents(getSvgIcon: GetSvgIcon) {
44
+ return {
45
+ ...defineAlertComponents(),
46
+ ...defineBarChartComponents(),
47
+ ...defineBadgeComponents(),
48
+ ...defineButtonComponents(),
49
+ ...defineBtnGroupComponents(),
50
+ ...defineConsentComponents(),
51
+ ...defineContactFormComponents(),
52
+ ...defineComposerComponents(),
53
+ ...defineDoughnutChartComponents(),
54
+ ...defineDropFilesComponents(),
55
+ ...defineExpandablePanelComponents(),
56
+ ...defineFlexComponents(),
57
+ ...defineFooterComponents(),
58
+ ...defineAutoCompleteInputComponents(),
59
+ ...defineFormComponents(),
60
+ ...defineFormInputField(),
61
+ ...defineFormSelectField(),
62
+ ...defineMultiAutoCompleteInputComponents(),
63
+ ...defineGridComponents(),
64
+ ...defineIconComponents(getSvgIcon),
65
+ ...defineLandingComponents(),
66
+ ...defineLineChartComponents(),
67
+ ...defineLogoComponents(),
68
+ ...defineClassicLogoComponents(),
69
+ ...defineModalComponents(),
70
+ ...defineTopBarComponents(),
71
+ ...defineThemeToggleComponents(),
72
+ ...defineToastComponents(),
73
+ ...defineVirtualListComponents(),
74
+ ...defineVirtualTableComponents(),
75
+ ...defineVariableVirtualTableComponents(),
76
+ ...defineNavigationComponents(),
77
+ ...definePanelComponents(),
78
+ ...definePageLinksComponents(),
79
+ ...definePageTocComponents(),
80
+ ...definePricingComponents(),
81
+ ...defineSearchComponents(),
82
+ ...defineSectionHeaderComponents(),
83
+ ...defineSignInComponents(),
84
+ ...defineTabsComponents(),
85
+ ...defineScriptComponents(),
86
+ }
87
+ }
package/src/index.ts ADDED
@@ -0,0 +1,270 @@
1
+ export type {
2
+ ClassicLogoConfig,
3
+ LogoAppearance,
4
+ LogoConfig,
5
+ LogoLayout,
6
+ LogoMarkStyle,
7
+ LogoShape,
8
+ LogoSize,
9
+ LogoWordmarkStyle,
10
+ SiteLogoConfig,
11
+ } from '@purestack/ts-common'
12
+ export type {
13
+ TsSsgMenusApi,
14
+ TsSsgModalApi,
15
+ TsSsgTabsApi,
16
+ } from '@purestack/ts-page-scripts'
17
+ export { defineComponents } from './defineComponents'
18
+ export { registerStyles } from './registerStyles'
19
+ export type { AlertBox } from './standard/alertBox/alertBox'
20
+ export { defineAlertComponents } from './standard/alertBox/alertBox'
21
+ export type { Badge } from './standard/badge/badge'
22
+ export { defineBadgeComponents } from './standard/badge/badge'
23
+ export { registerBadgeStyles } from './standard/badge/badgeStyle'
24
+ export type {
25
+ BarChart,
26
+ BarChartItem,
27
+ ResolvedBarChartGridLine,
28
+ ResolvedBarChartItem,
29
+ } from './standard/barChart/barChart'
30
+ export { defineBarChartComponents } from './standard/barChart/barChart'
31
+ export { registerBarChartStyles } from './standard/barChart/barChartStyle'
32
+ export type {
33
+ Btn,
34
+ BtnIconPosition,
35
+ BtnLink,
36
+ BtnSize,
37
+ BtnType,
38
+ } from './standard/btn/btn'
39
+ export { defineButtonComponents } from './standard/btn/btn'
40
+ export { registerButtonStyles } from './standard/btn/btnStyle'
41
+ export type {
42
+ BtnGroup,
43
+ BtnGroupAlign,
44
+ BtnGroupDropDown,
45
+ BtnGroupDropDownAlign,
46
+ } from './standard/btnGroup/btnGroup'
47
+ export { defineBtnGroupComponents } from './standard/btnGroup/btnGroup'
48
+ export { registerBtnGroupStyles } from './standard/btnGroup/btnGroupStyle'
49
+ export type { ClassicLogo } from './standard/classicLogo/classicLogo'
50
+ export { defineClassicLogoComponents } from './standard/classicLogo/classicLogo'
51
+ export { registerClassicLogoStyles } from './standard/classicLogo/classicLogoStyle'
52
+ export type {
53
+ ComponentVariant,
54
+ ComponentVariantMode,
55
+ } from './standard/componentVariant'
56
+ export type { Composer, ComposerCommand } from './standard/composer/composer'
57
+ export {
58
+ COMPOSER_BODY_STYLE,
59
+ createComposerBodyHtml,
60
+ defineComposerComponents,
61
+ } from './standard/composer/composer'
62
+ export { registerComposerStyles } from './standard/composer/composerStyle'
63
+ export type { EmailHtmlPolicyOptions } from './standard/composer/emailHtmlPolicy'
64
+ export {
65
+ applySafeEmailStyles,
66
+ copySafeEmailStyles,
67
+ GMAIL_COMPATIBLE_EMAIL_TAGS,
68
+ GMAIL_SUPPORTED_CSS_PROPERTIES,
69
+ normalizeEmailCidUrl,
70
+ normalizeEmailContentId,
71
+ sanitizeEmailStyleValue,
72
+ sanitizePlainAttribute,
73
+ toSafeEmailImageUrl,
74
+ } from './standard/composer/emailHtmlPolicy'
75
+ export type { Consent, ConsentCategoryState } from './standard/consent/consent'
76
+ export { defineConsentComponents } from './standard/consent/consent'
77
+ export { registerConsentStyles } from './standard/consent/consentStyle'
78
+ export type { ContactForm } from './standard/contactForm/contactForm'
79
+ export { defineContactFormComponents } from './standard/contactForm/contactForm'
80
+ export { registerContactFormStyles } from './standard/contactForm/contactFormStyle'
81
+ export type {
82
+ DoughnutChart,
83
+ DoughnutChartSegment,
84
+ ResolvedDoughnutChartSegment,
85
+ } from './standard/doughnutChart/doughnutChart'
86
+ export { defineDoughnutChartComponents } from './standard/doughnutChart/doughnutChart'
87
+ export { registerDoughnutChartStyles } from './standard/doughnutChart/doughnutChartStyle'
88
+ export type {
89
+ DropFileItem,
90
+ DropFiles,
91
+ DropFilesAddOptions,
92
+ DropFilesAddResult,
93
+ DropFilesIconMap,
94
+ } from './standard/dropFiles/dropFiles'
95
+ export {
96
+ addDropFiles,
97
+ defineDropFilesComponents,
98
+ } from './standard/dropFiles/dropFiles'
99
+ export { registerDropFilesStyles } from './standard/dropFiles/dropFilesStyle'
100
+ export type { ExpandablePanel } from './standard/expandablePanel/expandablePanel'
101
+ export { defineExpandablePanelComponents } from './standard/expandablePanel/expandablePanel'
102
+ export { registerExpandablePanelStyles } from './standard/expandablePanel/expandablePanelStyle'
103
+ export type {
104
+ Flex,
105
+ FlexAlign,
106
+ FlexDirection,
107
+ FlexJustify,
108
+ FlexWrap,
109
+ } from './standard/flex/flex'
110
+ export { defineFlexComponents } from './standard/flex/flex'
111
+ export { registerFlexStyles } from './standard/flex/flexStyle'
112
+ export type { SiteFooter } from './standard/footer/footer'
113
+ export { defineFooterComponents } from './standard/footer/footer'
114
+ export { registerFooterStyles } from './standard/footer/footerStyle'
115
+ export type {
116
+ AutoCompleteInput,
117
+ AutoCompleteOption,
118
+ AutoCompleteOptionRow,
119
+ AutoCompleteRow,
120
+ AutoCompleteValue,
121
+ ResolvedAutoCompleteOption,
122
+ } from './standard/form/autoCompleteInput'
123
+ export { defineAutoCompleteInputComponents } from './standard/form/autoCompleteInput'
124
+ export type {
125
+ AppForm,
126
+ FormAssistLink,
127
+ FormDivider,
128
+ FormMeta,
129
+ FormStatus,
130
+ FormSubmit,
131
+ } from './standard/form/form'
132
+ export { defineFormComponents } from './standard/form/form'
133
+ export type { FormCheck } from './standard/form/formCheck'
134
+ export { defineFormCheckComponent } from './standard/form/formCheck'
135
+ export type { FormInputField } from './standard/form/formInputField'
136
+ export { defineFormInputField } from './standard/form/formInputField'
137
+ export type {
138
+ FormSelectField,
139
+ FormSelectOption,
140
+ FormSelectValue,
141
+ } from './standard/form/formSelectField'
142
+ export { defineFormSelectField } from './standard/form/formSelectField'
143
+ export { registerFormStyles } from './standard/form/formStyle'
144
+ export type {
145
+ MultiAutoCompleteCreateItem,
146
+ MultiAutoCompleteDefaultOptionRow,
147
+ MultiAutoCompleteInput,
148
+ MultiAutoCompleteItem,
149
+ MultiAutoCompleteItemsChange,
150
+ MultiAutoCompleteOptionRow,
151
+ MultiAutoCompleteOptionToItem,
152
+ MultiAutoCompleteSearch,
153
+ MultiAutoCompleteSelect,
154
+ MultiAutoCompleteSelectedRow,
155
+ MultiAutoCompleteSplitInput,
156
+ ResolvedMultiAutoCompleteItem,
157
+ } from './standard/form/multiAutoCompleteInput'
158
+ export { defineMultiAutoCompleteInputComponents } from './standard/form/multiAutoCompleteInput'
159
+ export type { Grid } from './standard/grid/grid'
160
+ export { defineGridComponents } from './standard/grid/grid'
161
+ export { registerGridStyles } from './standard/grid/gridStyle'
162
+ export type {
163
+ GetSvgIcon,
164
+ Icon,
165
+ IconFrame,
166
+ IconFrameSize,
167
+ } from './standard/icon/icon'
168
+ export { defineIconComponents } from './standard/icon/icon'
169
+ export { registerIconStyles } from './standard/icon/iconStyle'
170
+ export { defineCodeShowcaseComponent } from './standard/landing/codeShowcase'
171
+ export { defineComparisonColumnComponent } from './standard/landing/comparisonColumn'
172
+ export { defineComparisonFeatureComponent } from './standard/landing/comparisonFeature'
173
+ export { defineComparisonTableComponent } from './standard/landing/comparisonTable'
174
+ export { defineCtaSectionComponent } from './standard/landing/ctaSection'
175
+ export { defineFeatureCardComponent } from './standard/landing/featureCard'
176
+ export { defineLandingComponents } from './standard/landing/landing'
177
+ export { defineLandingBandComponent } from './standard/landing/landingBand'
178
+ export { defineLandingSectionComponent } from './standard/landing/landingSection'
179
+ export type {
180
+ CodeShowcase,
181
+ ComparisonColumn,
182
+ ComparisonFeature,
183
+ ComparisonTable,
184
+ CtaSection,
185
+ FeatureCard,
186
+ LandingBand,
187
+ LandingBandEdge,
188
+ LandingBandImageFit,
189
+ LandingSection,
190
+ LandingTitleTag,
191
+ MetricItem,
192
+ MetricStrip,
193
+ } from './standard/landing/landingTypes'
194
+ export { defineMetricItemComponent } from './standard/landing/metricItem'
195
+ export { defineMetricStripComponent } from './standard/landing/metricStrip'
196
+ export type {
197
+ LineChart,
198
+ LineChartCurve,
199
+ LineChartPoint,
200
+ LineChartSeries,
201
+ } from './standard/lineChart/lineChart'
202
+ export { defineLineChartComponents } from './standard/lineChart/lineChart'
203
+ export { registerLineChartStyles } from './standard/lineChart/lineChartStyle'
204
+ export type { SiteLogo } from './standard/logo/logo'
205
+ export { defineLogoComponents } from './standard/logo/logo'
206
+ export { registerLogoStyles } from './standard/logo/logoStyle'
207
+ export type {
208
+ Modal,
209
+ ModalSize,
210
+ ModalSlideFrom,
211
+ ModalTrigger,
212
+ } from './standard/modal/modal'
213
+ export { defineModalComponents } from './standard/modal/modal'
214
+ export type {
215
+ ModalActionContract,
216
+ ModalContract,
217
+ ModalStore,
218
+ } from './standard/modal/modalStore'
219
+ export { useModalStore } from './standard/modal/modalStore'
220
+ export { registerModalStyles } from './standard/modal/modalStyle'
221
+ export type { NavItemState, NavList, NavMenu } from './standard/navMenu/navMenu'
222
+ export { defineNavigationComponents } from './standard/navMenu/navMenu'
223
+ export { registerNavStyles } from './standard/navMenu/navMenuStyle'
224
+ export type { PageLinks } from './standard/pageLinks/pageLinks'
225
+ export { definePageLinksComponents } from './standard/pageLinks/pageLinks'
226
+ export type { PageToc, PageTocItem } from './standard/pageToc/pageToc'
227
+ export { definePageTocComponents } from './standard/pageToc/pageToc'
228
+ export { registerPageTocStyles } from './standard/pageToc/pageTocStyle'
229
+ export type { Panel } from './standard/panel/panel'
230
+ export { definePanelComponents } from './standard/panel/panel'
231
+ export { registerPanelStyles } from './standard/panel/panelStyle'
232
+ export type {
233
+ PricingFeature,
234
+ PricingPlan,
235
+ PricingTable,
236
+ } from './standard/pricing/pricing'
237
+ export { definePricingComponents } from './standard/pricing/pricing'
238
+ export type { SearchBox } from './standard/searchBox/searchBox'
239
+ export { defineSearchComponents } from './standard/searchBox/searchBox'
240
+ export { registerSearchBoxStyles } from './standard/searchBox/searchBoxStyle'
241
+ export type { SectionHeader } from './standard/sectionHeader/sectionHeader'
242
+ export { defineSectionHeaderComponents } from './standard/sectionHeader/sectionHeader'
243
+ export type { SignIn } from './standard/signIn/signIn'
244
+ export { defineSignInComponents } from './standard/signIn/signIn'
245
+ export { registerSignInStyles } from './standard/signIn/signInStyle'
246
+ export type { TabPane, Tabs } from './standard/tabs/tabs'
247
+ export { defineTabsComponents } from './standard/tabs/tabs'
248
+ export { registerTabsStyles } from './standard/tabs/tabsStyle'
249
+ export type { ThemeToggle } from './standard/themeToggle/themeToggle'
250
+ export { defineThemeToggleComponents } from './standard/themeToggle/themeToggle'
251
+ export { registerThemeToggleStyles } from './standard/themeToggle/themeToggleStyle'
252
+ export type { ToastHost } from './standard/toast/toastHost'
253
+ export { defineToastComponents } from './standard/toast/toastHost'
254
+ export type { ToastItem } from './standard/toast/toastStore'
255
+ export { ToastStore } from './standard/toast/toastStore'
256
+ export type { TopBar } from './standard/topBar/topBar'
257
+ export { defineTopBarComponents } from './standard/topBar/topBar'
258
+ export { registerTopBarStyles } from './standard/topBar/topBarStyle'
259
+ export type { VariableVirtualTable } from './standard/virtualList/variableVirtualTable'
260
+ export { defineVariableVirtualTableComponents } from './standard/virtualList/variableVirtualTable'
261
+ export type {
262
+ VariableVirtualList,
263
+ VirtualList,
264
+ VirtualListRow,
265
+ } from './standard/virtualList/virtualList'
266
+ export { defineVirtualListComponents } from './standard/virtualList/virtualList'
267
+ export { registerVirtualListStyles } from './standard/virtualList/virtualListStyle'
268
+ export type { VirtualTable } from './standard/virtualList/virtualTable'
269
+ export { defineVirtualTableComponents } from './standard/virtualList/virtualTable'
270
+ export { registerVirtualTableStyles } from './standard/virtualList/virtualTableStyle'
@@ -0,0 +1,63 @@
1
+ import { registerUtilityStyles } from '@purestack/ts-style'
2
+ import { registerBadgeStyles } from './standard/badge/badgeStyle'
3
+ import { registerBarChartStyles } from './standard/barChart/barChartStyle'
4
+ import { registerButtonStyles } from './standard/btn/btnStyle'
5
+ import { registerBtnGroupStyles } from './standard/btnGroup/btnGroupStyle'
6
+ import { registerClassicLogoStyles } from './standard/classicLogo/classicLogoStyle'
7
+ import { registerComposerStyles } from './standard/composer/composerStyle'
8
+ import { registerConsentStyles } from './standard/consent/consentStyle'
9
+ import { registerContactFormStyles } from './standard/contactForm/contactFormStyle'
10
+ import { registerDoughnutChartStyles } from './standard/doughnutChart/doughnutChartStyle'
11
+ import { registerDropFilesStyles } from './standard/dropFiles/dropFilesStyle'
12
+ import { registerExpandablePanelStyles } from './standard/expandablePanel/expandablePanelStyle'
13
+ import { registerFlexStyles } from './standard/flex/flexStyle'
14
+ import { registerFooterStyles } from './standard/footer/footerStyle'
15
+ import { registerFormStyles } from './standard/form/formStyle'
16
+ import { registerGridStyles } from './standard/grid/gridStyle'
17
+ import { registerIconStyles } from './standard/icon/iconStyle'
18
+ import { registerLineChartStyles } from './standard/lineChart/lineChartStyle'
19
+ import { registerLogoStyles } from './standard/logo/logoStyle'
20
+ import { registerModalStyles } from './standard/modal/modalStyle'
21
+ import { registerNavStyles } from './standard/navMenu/navMenuStyle'
22
+ import { registerPageTocStyles } from './standard/pageToc/pageTocStyle'
23
+ import { registerPanelStyles } from './standard/panel/panelStyle'
24
+ import { registerSearchBoxStyles } from './standard/searchBox/searchBoxStyle'
25
+ import { registerSignInStyles } from './standard/signIn/signInStyle'
26
+ import { registerTabsStyles } from './standard/tabs/tabsStyle'
27
+ import { registerThemeToggleStyles } from './standard/themeToggle/themeToggleStyle'
28
+ import { registerTopBarStyles } from './standard/topBar/topBarStyle'
29
+ import { registerVirtualListStyles } from './standard/virtualList/virtualListStyle'
30
+ import { registerVirtualTableStyles } from './standard/virtualList/virtualTableStyle'
31
+
32
+ export function registerStyles() {
33
+ registerUtilityStyles()
34
+ registerBarChartStyles()
35
+ registerBadgeStyles()
36
+ registerButtonStyles()
37
+ registerBtnGroupStyles()
38
+ registerComposerStyles()
39
+ registerConsentStyles()
40
+ registerContactFormStyles()
41
+ registerDoughnutChartStyles()
42
+ registerDropFilesStyles()
43
+ registerExpandablePanelStyles()
44
+ registerFlexStyles()
45
+ registerFooterStyles()
46
+ registerFormStyles()
47
+ registerGridStyles()
48
+ registerIconStyles()
49
+ registerLineChartStyles()
50
+ registerLogoStyles()
51
+ registerClassicLogoStyles()
52
+ registerModalStyles()
53
+ registerNavStyles()
54
+ registerPageTocStyles()
55
+ registerPanelStyles()
56
+ registerSearchBoxStyles()
57
+ registerSignInStyles()
58
+ registerTabsStyles()
59
+ registerThemeToggleStyles()
60
+ registerTopBarStyles()
61
+ registerVirtualListStyles()
62
+ registerVirtualTableStyles()
63
+ }
@@ -0,0 +1,64 @@
1
+ import type { SemanticTone } from '@purestack/ts-style'
2
+ import { defineComponent, html, type RefOrValue } from 'regor'
3
+ import type {
4
+ ComponentVariant,
5
+ ComponentVariantMode,
6
+ } from '../componentVariant'
7
+
8
+ export interface AlertBox {
9
+ title?: RefOrValue<string>
10
+ eyebrow?: RefOrValue<string>
11
+ badge?: RefOrValue<string>
12
+ meta?: RefOrValue<string>
13
+ tone?: RefOrValue<SemanticTone>
14
+ variant?: RefOrValue<ComponentVariant>
15
+ variantMode?: RefOrValue<ComponentVariantMode>
16
+ icon?: RefOrValue<string>
17
+ }
18
+
19
+ const alertBoxTemplate = html`<Panel
20
+ :tone="tone || 'info'"
21
+ :variant="variant || 'surface'"
22
+ :variantMode="variantMode || 'stateless'"
23
+ >
24
+ <Flex align="start">
25
+ <IconFrame
26
+ r-if="icon"
27
+ :name="icon"
28
+ :tone="tone || 'info'"
29
+ :variant="variant"/>
30
+ <Flex direction="column" align="start">
31
+ <Flex r-if="title || eyebrow || badge" align="center" wrap="true">
32
+ <span r-if="eyebrow">{{ eyebrow }}</span>
33
+ <strong r-if="title">{{ title }}</strong>
34
+ <Badge :tone="tone || 'info'" r-if="badge">{{ badge }}</Badge>
35
+ </Flex>
36
+ <div><slot></slot></div>
37
+ <Flex align="center" wrap="true">
38
+ <slot name="actions"></slot>
39
+ </Flex>
40
+ <small r-if="meta">{{ meta }}</small>
41
+ </Flex>
42
+ </Flex>
43
+ </Panel>`
44
+
45
+ function defineAlertBoxComponent() {
46
+ return defineComponent<AlertBox>(alertBoxTemplate, {
47
+ props: [
48
+ 'title',
49
+ 'eyebrow',
50
+ 'badge',
51
+ 'meta',
52
+ 'tone',
53
+ 'variant',
54
+ 'variantMode',
55
+ 'icon',
56
+ ],
57
+ })
58
+ }
59
+
60
+ export function defineAlertComponents() {
61
+ return {
62
+ alertBox: defineAlertBoxComponent(),
63
+ }
64
+ }
@@ -0,0 +1,25 @@
1
+ import { type RefOrValue, unref } from 'regor'
2
+
3
+ export function createAutoId(prefix: string) {
4
+ let nextId = 1
5
+ return (value?: RefOrValue<string>) =>
6
+ resolveAutoId(value, () => createGeneratedId(prefix, nextId++))
7
+ }
8
+
9
+ function resolveAutoId(
10
+ value: RefOrValue<string> | undefined,
11
+ createNextId: () => string,
12
+ ) {
13
+ const id = unref(value)?.trim?.()
14
+ return id || createNextId()
15
+ }
16
+
17
+ function createGeneratedId(prefix: string, id: number) {
18
+ return isMinidomDocument(globalThis.document)
19
+ ? `${prefix}-s-${id}`
20
+ : `${prefix}-${id}`
21
+ }
22
+
23
+ function isMinidomDocument(document: Document) {
24
+ return (document as { isMinidom?: unknown })?.isMinidom === true
25
+ }