@designcrowd/fe-shared-lib 1.5.20-ast-icons-1 → 1.5.20-dts-upgrades

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 (34) hide show
  1. package/.claude/settings.local.json +33 -0
  2. package/.npm-publish-token +1 -0
  3. package/MODERNIZATION_ROADMAP.md +264 -0
  4. package/docs/plans/2026-01-19-typescript-declarations-design.md +114 -0
  5. package/docs/plans/2026-01-19-typescript-declarations-tdd-plan.md +953 -0
  6. package/index.d.ts +309 -0
  7. package/package.json +2 -1
  8. package/src/atoms/components/Icon/Icon.stories.js +0 -2
  9. package/src/atoms/components/Icon/Icon.vue +0 -4
  10. package/src/useSharedLibTranslate.js +2 -0
  11. package/types-test/all-components.test.ts +81 -0
  12. package/types-test/basic-imports.test.ts +16 -0
  13. package/types-test/button-props.test.ts +63 -0
  14. package/types-test/checkbox-toggle-props.test.ts +78 -0
  15. package/types-test/dropdown-props.test.ts +36 -0
  16. package/types-test/icon-props.test.ts +42 -0
  17. package/types-test/loader-props.test.ts +7 -0
  18. package/types-test/modal-props.test.ts +39 -0
  19. package/types-test/select-props.test.ts +97 -0
  20. package/types-test/text-input-props.test.ts +80 -0
  21. package/types-test/textarea-props.test.ts +72 -0
  22. package/types-test/tsconfig.json +12 -0
  23. package/dist/css/tailwind-brandCrowd.css +0 -2496
  24. package/dist/css/tailwind-brandPage.css +0 -2180
  25. package/dist/css/tailwind-crazyDomains.css +0 -2496
  26. package/dist/css/tailwind-designCom.css +0 -2496
  27. package/dist/css/tailwind-designCrowd.css +0 -2496
  28. package/public/css/tailwind-brandCrowd.css +0 -2504
  29. package/public/css/tailwind-brandPage.css +0 -2184
  30. package/public/css/tailwind-crazyDomains.css +0 -2504
  31. package/public/css/tailwind-designCom.css +0 -2504
  32. package/public/css/tailwind-designCrowd.css +0 -2504
  33. package/src/atoms/components/Icon/icons/digital-business-card-filled.vue +0 -8
  34. package/src/atoms/components/Icon/icons/link-in-bio-filled.vue +0 -8
package/index.d.ts ADDED
@@ -0,0 +1,309 @@
1
+ // index.d.ts
2
+ import { DefineComponent } from 'vue';
3
+
4
+ // ============ Utility Functions ============
5
+ export function setSharedLibLocaleAsync(locale?: string): Promise<void>;
6
+ export function tr(key: string, params?: Record<string, unknown>): string;
7
+
8
+ // ============ API Clients ============
9
+ export const brandPageApiClient: unknown;
10
+ export const brandCrowdApiClient: unknown;
11
+
12
+ // ============ Constants ============
13
+ export const WEBSITE_UPGRADE_CONTEXT_TYPES: Record<string, string>;
14
+
15
+ // ============ Experience Components (Stubs) ============
16
+ export const UploadYourLogoDropzone: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
17
+ export const UploadYourLogoApplication: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
18
+ export const UploadedLogoSearchResultCard: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
19
+ export const SignUpModal: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
20
+ export const SignUp: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
21
+ export const SignIn: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
22
+ export const ForgotPasswordModal: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
23
+ export const ForgotPassword: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
24
+ export const ResetPasswordModal: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
25
+ export const ResetPassword: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
26
+ export const ResetPasswordSuccessModal: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
27
+ export const PaymentConfigList: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
28
+ export const PaymentConfigDropdown: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
29
+ export const SellDomainNameListModal: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
30
+ export const SellDomainNameList: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
31
+ export const SellDomainNameWidget: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
32
+ export const PublishBrandPageModal: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
33
+ export const PublishBrandPageCard: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
34
+ export const WebsiteContextualUpgradeModal: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
35
+
36
+ // ============ Detailed Component Types ============
37
+
38
+ export interface ButtonProps {
39
+ attrs?: Record<string, unknown>;
40
+ label?: string;
41
+ url?: string | null;
42
+ theme?: 'brandCrowd' | 'crazyDomains' | string | null;
43
+ variant?: 'primary' | 'secondary' | 'success' | 'outline' | 'outline-primary' | 'outline-success' | 'outline-no-hover' | 'warning' | 'info' | 'info-filled' | 'gray' | 'no-border' | 'flat' | 'pill' | 'dark-mode-pill' | 'ai' | 'primary-with-icon' | string | null;
44
+ size?: 'small' | 'small-wide' | 'small-medium' | 'medium' | 'large' | string | null;
45
+ iconSize?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | string;
46
+ icon?: string | null;
47
+ iconViewBox?: string | null;
48
+ iconLeft?: string;
49
+ iconLeftSize?: string;
50
+ iconRight?: string;
51
+ iconRightSize?: string;
52
+ iconTop?: string;
53
+ iconTopSize?: string;
54
+ iconColor?: string;
55
+ fullWidth?: boolean;
56
+ fullHeight?: boolean;
57
+ classes?: string | Record<string, boolean>;
58
+ containerClasses?: string;
59
+ greyOutLeft?: boolean;
60
+ white?: boolean;
61
+ rounded?: boolean;
62
+ roundedLeft?: boolean;
63
+ roundedRight?: boolean;
64
+ disabled?: boolean;
65
+ isBusy?: boolean;
66
+ isBusyLabel?: string;
67
+ download?: string;
68
+ active?: boolean;
69
+ target?: '_self' | '_blank' | '_parent' | '_top' | string;
70
+ justify?: 'center' | 'between' | string;
71
+ type?: 'button' | 'submit' | 'reset' | string;
72
+ showLabel?: boolean;
73
+ dataAttribute?: string;
74
+ altText?: string | null;
75
+ }
76
+
77
+ export interface ButtonEmits {
78
+ 'on-click': [event: Event];
79
+ }
80
+
81
+ export interface ModalProps {
82
+ simple?: boolean;
83
+ removeHorizontalMargin?: boolean;
84
+ removeHorizontalPadding?: boolean;
85
+ visible?: boolean;
86
+ mandatory?: boolean;
87
+ mode?: 'image' | string;
88
+ classes?: string | Record<string, boolean>;
89
+ contentClasses?: string[];
90
+ size?: 'md' | 'xl' | string;
91
+ fullScreenBreakpoint?: 'sm' | string;
92
+ closeOnEsc?: boolean;
93
+ hideScrollbar?: boolean;
94
+ showModalBackgroundImage?: boolean;
95
+ disableBodyScrollOnVisible?: boolean;
96
+ darkOverlay?: boolean;
97
+ transparentModal?: boolean;
98
+ }
99
+
100
+ export interface ModalEmits {
101
+ 'close-modal': [event?: Event];
102
+ }
103
+
104
+ export interface IconProps {
105
+ viewBox?: string;
106
+ name: string; // required
107
+ altText?: string | null;
108
+ color?: string;
109
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | 'full' | 'button-icon' | string;
110
+ classes?: string;
111
+ }
112
+
113
+ export interface TextInputProps {
114
+ // From FormControlMixin
115
+ attrs?: Record<string, unknown>;
116
+ modelValue?: string | number;
117
+ id?: string;
118
+ placeholder?: string;
119
+ size?: 'sm' | string;
120
+ label?: string;
121
+ showLabelScreenReaderOnly?: boolean;
122
+ icon?: string;
123
+ required?: boolean;
124
+ error?: boolean;
125
+ warning?: boolean;
126
+ success?: boolean;
127
+ disabled?: boolean;
128
+ readonly?: boolean;
129
+ name?: string;
130
+ maxlength?: number;
131
+ minlength?: number;
132
+ isSpaceDisabled?: boolean;
133
+ requiredMessage?: string;
134
+ // TextInput-specific
135
+ type?: 'text' | 'password' | 'email' | 'number' | 'tel' | 'url' | string;
136
+ enableClear?: boolean;
137
+ enableClearConfirmation?: boolean;
138
+ borderLeft?: boolean;
139
+ borderRight?: boolean;
140
+ prefixText?: string;
141
+ elementClasses?: string;
142
+ }
143
+
144
+ export interface TextInputEmits {
145
+ 'update:modelValue': [value: string | number];
146
+ 'input': [value: string | number];
147
+ 'keyup': [value: string | number];
148
+ 'keydown': [value: string | number];
149
+ 'focus': [value: string | number];
150
+ 'blur': [value: string | number];
151
+ 'enter-key-up': [value: string | number];
152
+ 'on-clear': [];
153
+ 'on-clear-confirmation': [];
154
+ }
155
+
156
+ export interface TextareaProps {
157
+ // Same as TextInput mixin props
158
+ attrs?: Record<string, unknown>;
159
+ modelValue?: string | number;
160
+ id?: string;
161
+ placeholder?: string;
162
+ size?: 'sm' | 'md' | 'lg' | string;
163
+ label?: string;
164
+ showLabelScreenReaderOnly?: boolean;
165
+ icon?: string;
166
+ required?: boolean;
167
+ error?: boolean;
168
+ warning?: boolean;
169
+ success?: boolean;
170
+ disabled?: boolean;
171
+ readonly?: boolean;
172
+ name?: string;
173
+ maxlength?: number;
174
+ minlength?: number;
175
+ isSpaceDisabled?: boolean;
176
+ requiredMessage?: string;
177
+ // Textarea-specific
178
+ resize?: boolean;
179
+ shouldAutoFitContent?: boolean;
180
+ elementClasses?: string;
181
+ }
182
+
183
+ export interface CheckboxProps {
184
+ modelValue: boolean; // required
185
+ id: string; // required
186
+ label?: string;
187
+ showLabelScreenReaderOnly?: boolean;
188
+ inline?: boolean;
189
+ required?: boolean;
190
+ disabled?: boolean;
191
+ color?: 'success' | 'info' | 'error' | 'warning' | 'primary' | string;
192
+ size?: 'sm' | 'md' | string;
193
+ showBorder?: boolean;
194
+ classes?: string | Record<string, boolean>;
195
+ }
196
+
197
+ export interface CheckboxEmits {
198
+ 'update:modelValue': [value: boolean];
199
+ }
200
+
201
+ export interface DropdownProps {
202
+ menuAlign?: 'left' | 'right' | string;
203
+ title?: string;
204
+ elementClasses?: string;
205
+ menuElementClasses?: string;
206
+ disabled?: boolean;
207
+ show?: boolean;
208
+ iconSize?: 'xs' | 'sm' | 'md' | 'lg' | string;
209
+ tooltip?: string;
210
+ }
211
+
212
+ export interface DropdownEmits {
213
+ 'update:show': [value: boolean];
214
+ }
215
+
216
+ export interface SelectOption {
217
+ $isDisabled?: boolean;
218
+ isCustom?: boolean;
219
+ label?: string;
220
+ [key: string]: unknown;
221
+ }
222
+
223
+ export interface SelectProps {
224
+ // From selectMixin
225
+ isInternalSearch?: boolean;
226
+ options: SelectOption[] | string[]; // required
227
+ modelValue?: string | SelectOption | null;
228
+ trackBy?: string | null;
229
+ label?: string;
230
+ imageUrlField?: string | null;
231
+ isSearchable?: boolean;
232
+ shouldHideSelected?: boolean;
233
+ placeholder?: string;
234
+ shouldAllowEmpty?: boolean;
235
+ shouldResetAfter?: boolean;
236
+ shouldCloseOnSelect?: boolean;
237
+ customLabel?: (option: SelectOption | string, label?: string) => string;
238
+ shouldAllowCustom?: boolean;
239
+ customPlaceholder?: string;
240
+ customPosition?: 'top' | 'bottom' | string;
241
+ id?: string | null;
242
+ optionsLimit?: number;
243
+ shouldPreserveSearch?: boolean;
244
+ shouldPreselectFirst?: boolean;
245
+ shouldPreventAutofocus?: boolean;
246
+ isDisabled?: boolean;
247
+ // From Select.vue
248
+ name?: string;
249
+ selectLabel?: string;
250
+ selectedLabel?: string;
251
+ deselectLabel?: string;
252
+ shouldShowLabels?: boolean;
253
+ maxHeight?: number;
254
+ isLoading?: boolean;
255
+ openDirection?: 'above' | 'below' | 'top' | 'bottom' | string;
256
+ shouldShowNoResults?: boolean;
257
+ tabindex?: number;
258
+ shouldSelectExactMatchOnBlur?: boolean;
259
+ isInvalid?: boolean;
260
+ }
261
+
262
+ export interface SelectEmits {
263
+ 'update:modelValue': [option: SelectOption | string | null, id?: string | null];
264
+ 'search-change': [search: string, id?: string | null];
265
+ 'remove': [option: SelectOption | string, id?: string | null];
266
+ 'open': [id?: string | null];
267
+ 'close': [value: SelectOption | string | null, id?: string | null];
268
+ 'custom': [label: string, id?: string | null];
269
+ }
270
+
271
+ // Loader has no props - it's a simple SVG spinner
272
+ export interface LoaderProps {}
273
+
274
+ // ============ Atom Components (Stubs) ============
275
+ export const Button: DefineComponent<ButtonProps, Record<string, unknown>, unknown, Record<string, unknown>, Record<string, unknown>, Record<string, unknown>, Record<string, unknown>, ButtonEmits>;
276
+ export const ButtonGroup: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
277
+ export const Dropdown: DefineComponent<DropdownProps, Record<string, unknown>, unknown, Record<string, unknown>, Record<string, unknown>, Record<string, unknown>, Record<string, unknown>, DropdownEmits>;
278
+ export const DropdownItem: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
279
+ export const Icon: DefineComponent<IconProps, Record<string, unknown>, unknown>;
280
+ export const DcomIcon: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
281
+ export const Modal: DefineComponent<ModalProps, Record<string, unknown>, unknown, Record<string, unknown>, Record<string, unknown>, Record<string, unknown>, Record<string, unknown>, ModalEmits>;
282
+ export const Loader: DefineComponent<LoaderProps>;
283
+ export const Tooltip: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
284
+ export const Picture: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
285
+ export const HelloBar: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
286
+ export const PromoCard: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
287
+ export const SearchBar: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
288
+ export const StarRating: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
289
+ export const TabMenu: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
290
+ export const TextInput: DefineComponent<TextInputProps, Record<string, unknown>, unknown, Record<string, unknown>, Record<string, unknown>, Record<string, unknown>, Record<string, unknown>, TextInputEmits>;
291
+ export const TextCopyField: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
292
+ export const Textarea: DefineComponent<TextareaProps, Record<string, unknown>, unknown, Record<string, unknown>, Record<string, unknown>, Record<string, unknown>, Record<string, unknown>, TextInputEmits>;
293
+ export const Toggle: DefineComponent<CheckboxProps, Record<string, unknown>, unknown, Record<string, unknown>, Record<string, unknown>, Record<string, unknown>, Record<string, unknown>, CheckboxEmits>;
294
+ export const Checkbox: DefineComponent<CheckboxProps, Record<string, unknown>, unknown, Record<string, unknown>, Record<string, unknown>, Record<string, unknown>, Record<string, unknown>, CheckboxEmits>;
295
+ export const ColorPicker: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
296
+ export const Carousel: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
297
+ export const Checktile: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
298
+ export const Pill: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
299
+ export const PillBar: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
300
+ export const Notice: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
301
+ export const Masonry: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
302
+ export const CollapsiblePanel: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
303
+ export const Slider: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
304
+ export const Price: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
305
+ export const HashRouteModal: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
306
+ export const Select: DefineComponent<SelectProps, Record<string, unknown>, unknown, Record<string, unknown>, Record<string, unknown>, Record<string, unknown>, Record<string, unknown>, SelectEmits>;
307
+ export const NumberStepper: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
308
+ export const CopyToClipboardText: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
309
+ export const SparkleIcon: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@designcrowd/fe-shared-lib",
3
- "version": "1.5.20-ast-icons-1",
3
+ "version": "1.5.20-dts-upgrades",
4
4
  "scripts": {
5
5
  "start": "run-p storybook watch:translation",
6
6
  "build": "npm run build:css --production",
@@ -99,6 +99,7 @@
99
99
  },
100
100
  "exports": {
101
101
  ".": {
102
+ "types": "./index.d.ts",
102
103
  "require": "./index.cjs",
103
104
  "import": "./index.js"
104
105
  },
@@ -261,8 +261,6 @@ export const IconSample = () => {
261
261
  { name: 'watchlist-filled' },
262
262
  { name: 'watchlist-hollow' },
263
263
  { name: 'watchlist-hollow-alt' },
264
- { name: 'link-in-bio-filled' },
265
- { name: 'digital-business-card-filled' },
266
264
  { name: 'website-filled' },
267
265
  { name: 'website' },
268
266
  { name: 'wholesale' },
@@ -304,8 +304,6 @@ import IconWatchlistFilled from './icons/watchlist-filled.vue';
304
304
  import IconWatchlistHollowAlt from './icons/watchlist-hollow-alt.vue';
305
305
  import IconWatchlistHollow from './icons/watchlist-hollow.vue';
306
306
  import IconWebsiteFilled from './icons/website-filled.vue';
307
- import IconDigitalBusinessCardFilled from './icons/digital-business-card-filled.vue';
308
- import IconLinkInBioFilled from './icons/link-in-bio-filled.vue';
309
307
  import IconWebsite from './icons/website.vue';
310
308
  import IconWholesale from './icons/wholesale.vue';
311
309
  import IconZoomIn from './icons/zoom-in.vue';
@@ -685,8 +683,6 @@ export default {
685
683
  IconWatchlistHollow,
686
684
  IconWatchlistHollowAlt,
687
685
  IconWebsite,
688
- IconDigitalBusinessCardFilled,
689
- IconLinkInBioFilled,
690
686
  IconWebsiteFilled,
691
687
  IconWholesale,
692
688
  IconZoom,
@@ -7,8 +7,10 @@ const relativePathsToTranslationFiles = {
7
7
  'en-US': () => import('./bundles/bundled-translations.json'),
8
8
  'de-DE': () => import('./bundles/bundled-translations.de-DE.json'),
9
9
  'fr-FR': () => import('./bundles/bundled-translations.fr-FR.json'),
10
+ 'fr-CA': () => import('./bundles/bundled-translations.fr-CA.json'),
10
11
  'es-ES': () => import('./bundles/bundled-translations.es-ES.json'),
11
12
  'pt-PT': () => import('./bundles/bundled-translations.pt-PT.json'),
13
+ 'pt-BR': () => import('./bundles/bundled-translations.pt-BR.json'),
12
14
  };
13
15
 
14
16
  const setSharedLibLocaleAsync = async (locale = 'en-US') => {
@@ -0,0 +1,81 @@
1
+ // types-test/all-components.test.ts
2
+ import {
3
+ // Experiences
4
+ UploadYourLogoDropzone,
5
+ UploadYourLogoApplication,
6
+ UploadedLogoSearchResultCard,
7
+ SignUpModal,
8
+ SignUp,
9
+ SignIn,
10
+ ForgotPasswordModal,
11
+ ForgotPassword,
12
+ ResetPasswordModal,
13
+ ResetPassword,
14
+ ResetPasswordSuccessModal,
15
+ PaymentConfigList,
16
+ PaymentConfigDropdown,
17
+ SellDomainNameListModal,
18
+ SellDomainNameList,
19
+ SellDomainNameWidget,
20
+ PublishBrandPageModal,
21
+ PublishBrandPageCard,
22
+ WebsiteContextualUpgradeModal,
23
+ // Atoms
24
+ Button,
25
+ ButtonGroup,
26
+ Dropdown,
27
+ DropdownItem,
28
+ Icon,
29
+ DcomIcon,
30
+ Modal,
31
+ Loader,
32
+ Tooltip,
33
+ Picture,
34
+ HelloBar,
35
+ PromoCard,
36
+ SearchBar,
37
+ StarRating,
38
+ TabMenu,
39
+ TextInput,
40
+ TextCopyField,
41
+ Textarea,
42
+ Toggle,
43
+ Checkbox,
44
+ ColorPicker,
45
+ Carousel,
46
+ Checktile,
47
+ Pill,
48
+ PillBar,
49
+ Notice,
50
+ Masonry,
51
+ CollapsiblePanel,
52
+ Slider,
53
+ Price,
54
+ HashRouteModal,
55
+ Select,
56
+ NumberStepper,
57
+ CopyToClipboardText,
58
+ SparkleIcon,
59
+ // Utilities
60
+ setSharedLibLocaleAsync,
61
+ tr,
62
+ brandPageApiClient,
63
+ brandCrowdApiClient,
64
+ WEBSITE_UPGRADE_CONTEXT_TYPES,
65
+ } from '..';
66
+
67
+ // All imports should be defined
68
+ const components = [
69
+ UploadYourLogoDropzone, UploadYourLogoApplication, UploadedLogoSearchResultCard,
70
+ SignUpModal, SignUp, SignIn, ForgotPasswordModal, ForgotPassword,
71
+ ResetPasswordModal, ResetPassword, ResetPasswordSuccessModal,
72
+ PaymentConfigList, PaymentConfigDropdown, SellDomainNameListModal,
73
+ SellDomainNameList, SellDomainNameWidget, PublishBrandPageModal,
74
+ PublishBrandPageCard, WebsiteContextualUpgradeModal,
75
+ Button, ButtonGroup, Dropdown, DropdownItem, Icon, DcomIcon, Modal,
76
+ Loader, Tooltip, Picture, HelloBar, PromoCard, SearchBar, StarRating,
77
+ TabMenu, TextInput, TextCopyField, Textarea, Toggle, Checkbox,
78
+ ColorPicker, Carousel, Checktile, Pill, PillBar, Notice, Masonry,
79
+ CollapsiblePanel, Slider, Price, HashRouteModal, Select, NumberStepper,
80
+ CopyToClipboardText, SparkleIcon,
81
+ ];
@@ -0,0 +1,16 @@
1
+ // types-test/basic-imports.test.ts
2
+ // This file tests that basic imports work - compilation = pass
3
+
4
+ import { Button, Modal, Icon, setSharedLibLocaleAsync, tr } from '..';
5
+
6
+ // If this file compiles, the basic exports are typed
7
+ const _button: typeof Button = Button;
8
+ const _modal: typeof Modal = Modal;
9
+ const _icon: typeof Icon = Icon;
10
+
11
+ // Test utility function types
12
+ async function testUtils() {
13
+ await setSharedLibLocaleAsync('en-US');
14
+ const translated: string = tr('key');
15
+ const translatedWithParams: string = tr('key', { name: 'test' });
16
+ }
@@ -0,0 +1,63 @@
1
+ // types-test/button-props.test.ts
2
+ // This file tests that ButtonProps interface is properly exported and typed
3
+
4
+ import { Button, type ButtonProps } from '..';
5
+
6
+ // Test that ButtonProps can be used as a type
7
+ const props: ButtonProps = {
8
+ label: 'Click me',
9
+ variant: 'primary',
10
+ disabled: false,
11
+ };
12
+
13
+ // Test that props have specific types (these should compile without errors)
14
+ const label: ButtonProps['label'] = 'test';
15
+ const variant: ButtonProps['variant'] = 'primary';
16
+ const disabled: ButtonProps['disabled'] = true;
17
+ const size: ButtonProps['size'] = 'medium';
18
+ const theme: ButtonProps['theme'] = 'brandCrowd';
19
+ const fullWidth: ButtonProps['fullWidth'] = true;
20
+ const iconLeft: ButtonProps['iconLeft'] = 'chevron-left';
21
+ const iconRight: ButtonProps['iconRight'] = 'chevron-right';
22
+ const isBusy: ButtonProps['isBusy'] = false;
23
+ const target: ButtonProps['target'] = '_blank';
24
+ const type: ButtonProps['type'] = 'submit';
25
+
26
+ // Test that Button component is typed
27
+ const _button: typeof Button = Button;
28
+
29
+ // Test that all known variants are accepted
30
+ const variantProps: ButtonProps = {
31
+ variant: 'outline-primary',
32
+ };
33
+
34
+ const variantProps2: ButtonProps = {
35
+ variant: 'success',
36
+ };
37
+
38
+ const variantProps3: ButtonProps = {
39
+ variant: 'warning',
40
+ };
41
+
42
+ // Test size values
43
+ const sizeProps: ButtonProps = {
44
+ size: 'small',
45
+ };
46
+
47
+ const sizeProps2: ButtonProps = {
48
+ size: 'large',
49
+ };
50
+
51
+ // Test classes can be string or object
52
+ const classesString: ButtonProps = {
53
+ classes: 'custom-class',
54
+ };
55
+
56
+ const classesObject: ButtonProps = {
57
+ classes: { 'custom-class': true },
58
+ };
59
+
60
+ // Test that attrs accepts Record<string, unknown>
61
+ const attrsProps: ButtonProps = {
62
+ attrs: { 'data-testid': 'button-test' },
63
+ };
@@ -0,0 +1,78 @@
1
+ // types-test/checkbox-toggle-props.test.ts
2
+ // This file tests that CheckboxProps and CheckboxEmits interfaces are properly exported and typed
3
+
4
+ import { Checkbox, Toggle, type CheckboxProps, type CheckboxEmits } from '..';
5
+
6
+ // Test that CheckboxProps can be used as a type
7
+ const props: CheckboxProps = {
8
+ modelValue: true,
9
+ id: 'checkbox-1',
10
+ label: 'Accept terms',
11
+ };
12
+
13
+ // Test required props
14
+ const modelValue: CheckboxProps['modelValue'] = true;
15
+ const id: CheckboxProps['id'] = 'checkbox-id';
16
+
17
+ // Test optional props
18
+ const label: CheckboxProps['label'] = 'Remember me';
19
+ const showLabelScreenReaderOnly: CheckboxProps['showLabelScreenReaderOnly'] = true;
20
+ const inline: CheckboxProps['inline'] = true;
21
+ const required: CheckboxProps['required'] = true;
22
+ const disabled: CheckboxProps['disabled'] = false;
23
+ const showBorder: CheckboxProps['showBorder'] = true;
24
+
25
+ // Test color variants
26
+ const colorSuccess: CheckboxProps = { modelValue: true, id: 'cb', color: 'success' };
27
+ const colorInfo: CheckboxProps = { modelValue: true, id: 'cb', color: 'info' };
28
+ const colorError: CheckboxProps = { modelValue: true, id: 'cb', color: 'error' };
29
+ const colorWarning: CheckboxProps = { modelValue: true, id: 'cb', color: 'warning' };
30
+ const colorPrimary: CheckboxProps = { modelValue: true, id: 'cb', color: 'primary' };
31
+
32
+ // Test size variants
33
+ const sizeSm: CheckboxProps = { modelValue: true, id: 'cb', size: 'sm' };
34
+ const sizeMd: CheckboxProps = { modelValue: true, id: 'cb', size: 'md' };
35
+
36
+ // Test classes can be string or object
37
+ const classesString: CheckboxProps = {
38
+ modelValue: true,
39
+ id: 'cb',
40
+ classes: 'custom-class',
41
+ };
42
+
43
+ const classesObject: CheckboxProps = {
44
+ modelValue: true,
45
+ id: 'cb',
46
+ classes: { 'custom-class': true },
47
+ };
48
+
49
+ // Test that Checkbox component is typed
50
+ const _checkbox: typeof Checkbox = Checkbox;
51
+
52
+ // Test that Toggle component uses same props
53
+ const _toggle: typeof Toggle = Toggle;
54
+
55
+ // Toggle with same props as Checkbox
56
+ const toggleProps: CheckboxProps = {
57
+ modelValue: false,
58
+ id: 'toggle-1',
59
+ label: 'Dark mode',
60
+ color: 'primary',
61
+ size: 'md',
62
+ inline: true,
63
+ };
64
+
65
+ // Test complete props object
66
+ const fullProps: CheckboxProps = {
67
+ modelValue: true,
68
+ id: 'terms-checkbox',
69
+ label: 'I accept the terms and conditions',
70
+ showLabelScreenReaderOnly: false,
71
+ inline: false,
72
+ required: true,
73
+ disabled: false,
74
+ color: 'success',
75
+ size: 'md',
76
+ showBorder: true,
77
+ classes: 'my-checkbox',
78
+ };
@@ -0,0 +1,36 @@
1
+ import { Dropdown, type DropdownProps, type DropdownEmits } from '..';
2
+
3
+ // Test DropdownProps interface
4
+ const dropdownProps: DropdownProps = {
5
+ menuAlign: 'right',
6
+ title: 'Select an option',
7
+ elementClasses: 'tw-custom-class',
8
+ menuElementClasses: 'tw-menu-class',
9
+ disabled: false,
10
+ show: false,
11
+ iconSize: 'sm',
12
+ tooltip: 'Click to open',
13
+ };
14
+
15
+ // Test with minimal props
16
+ const minimalProps: DropdownProps = {};
17
+
18
+ // Test menu alignment options
19
+ const leftAligned: DropdownProps = { menuAlign: 'left' };
20
+ const rightAligned: DropdownProps = { menuAlign: 'right' };
21
+ const customAlign: DropdownProps = { menuAlign: 'center' }; // string allows custom values
22
+
23
+ // Test icon sizes
24
+ const xsIcon: DropdownProps = { iconSize: 'xs' };
25
+ const smIcon: DropdownProps = { iconSize: 'sm' };
26
+ const mdIcon: DropdownProps = { iconSize: 'md' };
27
+ const lgIcon: DropdownProps = { iconSize: 'lg' };
28
+
29
+ // Test disabled state
30
+ const disabledDropdown: DropdownProps = { disabled: true };
31
+
32
+ // Test show state (v-model:show)
33
+ const visibleDropdown: DropdownProps = { show: true };
34
+
35
+ // Verify component type includes props and emits
36
+ type DropdownComponent = typeof Dropdown;