@adam-milo/ui 1.0.2
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/LICENSE +23 -0
- package/README.md +341 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index10.cjs +1 -0
- package/dist/index10.js +4 -0
- package/dist/index11.cjs +1 -0
- package/dist/index11.js +9 -0
- package/dist/index12.cjs +1 -0
- package/dist/index12.js +11 -0
- package/dist/index13.cjs +1 -0
- package/dist/index13.js +3 -0
- package/dist/index14.cjs +1 -0
- package/dist/index14.js +5 -0
- package/dist/index15.cjs +1 -0
- package/dist/index15.js +4 -0
- package/dist/index16.cjs +1 -0
- package/dist/index16.js +4 -0
- package/dist/index17.cjs +1 -0
- package/dist/index17.js +8 -0
- package/dist/index18.cjs +1 -0
- package/dist/index18.js +4 -0
- package/dist/index19.cjs +1 -0
- package/dist/index19.js +2 -0
- package/dist/index2.cjs +1 -0
- package/dist/index2.js +2 -0
- package/dist/index20.cjs +1 -0
- package/dist/index20.js +5 -0
- package/dist/index21.cjs +1 -0
- package/dist/index21.js +11 -0
- package/dist/index22.cjs +1 -0
- package/dist/index22.js +2 -0
- package/dist/index23.cjs +1 -0
- package/dist/index23.js +2 -0
- package/dist/index24.cjs +1 -0
- package/dist/index24.js +2 -0
- package/dist/index25.cjs +1 -0
- package/dist/index25.js +7 -0
- package/dist/index26.cjs +1 -0
- package/dist/index26.js +2 -0
- package/dist/index27.cjs +1 -0
- package/dist/index27.js +2 -0
- package/dist/index28.cjs +1 -0
- package/dist/index28.js +2 -0
- package/dist/index29.cjs +1 -0
- package/dist/index29.js +2 -0
- package/dist/index3.cjs +1 -0
- package/dist/index3.js +3 -0
- package/dist/index30.cjs +1 -0
- package/dist/index30.js +10 -0
- package/dist/index31.cjs +1 -0
- package/dist/index31.js +1 -0
- package/dist/index32.cjs +1 -0
- package/dist/index32.js +1 -0
- package/dist/index33.cjs +1 -0
- package/dist/index33.js +15 -0
- package/dist/index34.cjs +1 -0
- package/dist/index34.js +1 -0
- package/dist/index35.cjs +1 -0
- package/dist/index35.js +1 -0
- package/dist/index36.cjs +1 -0
- package/dist/index36.js +1 -0
- package/dist/index37.cjs +1 -0
- package/dist/index37.js +5 -0
- package/dist/index38.cjs +1 -0
- package/dist/index38.js +1 -0
- package/dist/index39.cjs +1 -0
- package/dist/index39.js +1 -0
- package/dist/index4.cjs +1 -0
- package/dist/index4.js +2 -0
- package/dist/index40.cjs +1 -0
- package/dist/index40.js +2 -0
- package/dist/index41.cjs +1 -0
- package/dist/index41.js +1 -0
- package/dist/index42.cjs +1 -0
- package/dist/index42.js +1 -0
- package/dist/index43.cjs +1 -0
- package/dist/index43.js +4 -0
- package/dist/index44.cjs +1 -0
- package/dist/index44.js +1 -0
- package/dist/index45.cjs +1 -0
- package/dist/index45.js +1 -0
- package/dist/index46.cjs +1 -0
- package/dist/index46.js +1 -0
- package/dist/index47.cjs +1 -0
- package/dist/index47.js +3 -0
- package/dist/index48.cjs +1 -0
- package/dist/index48.js +1 -0
- package/dist/index49.cjs +1 -0
- package/dist/index49.js +1 -0
- package/dist/index5.cjs +1 -0
- package/dist/index5.js +2 -0
- package/dist/index50.cjs +1 -0
- package/dist/index50.js +1 -0
- package/dist/index51.cjs +1 -0
- package/dist/index51.js +1 -0
- package/dist/index52.cjs +1 -0
- package/dist/index52.js +1 -0
- package/dist/index53.cjs +1 -0
- package/dist/index53.js +1 -0
- package/dist/index54.cjs +1 -0
- package/dist/index54.js +2 -0
- package/dist/index55.cjs +1 -0
- package/dist/index55.js +1 -0
- package/dist/index56.cjs +1 -0
- package/dist/index56.js +1 -0
- package/dist/index57.cjs +1 -0
- package/dist/index57.js +1 -0
- package/dist/index58.cjs +1 -0
- package/dist/index58.js +1 -0
- package/dist/index59.cjs +1 -0
- package/dist/index59.js +1 -0
- package/dist/index6.cjs +1 -0
- package/dist/index6.js +1 -0
- package/dist/index7.cjs +1 -0
- package/dist/index7.js +2 -0
- package/dist/index8.cjs +1 -0
- package/dist/index8.js +2 -0
- package/dist/index9.cjs +1 -0
- package/dist/index9.js +4 -0
- package/dist/src/components/core/button/Button.component.d.ts +36 -0
- package/dist/src/components/core/button/Button.component.d.ts.map +1 -0
- package/dist/src/components/core/icon/Icon.component.d.ts +6 -0
- package/dist/src/components/core/icon/Icon.component.d.ts.map +1 -0
- package/dist/src/components/core/icon-button/IconButton.component.d.ts +36 -0
- package/dist/src/components/core/icon-button/IconButton.component.d.ts.map +1 -0
- package/dist/src/components/core/menu-icon-button/MenuIconButton.component.d.ts +34 -0
- package/dist/src/components/core/menu-icon-button/MenuIconButton.component.d.ts.map +1 -0
- package/dist/src/components/data-display/card/Card.component.d.ts +42 -0
- package/dist/src/components/data-display/card/Card.component.d.ts.map +1 -0
- package/dist/src/components/data-display/chip/Chip.component.d.ts +36 -0
- package/dist/src/components/data-display/chip/Chip.component.d.ts.map +1 -0
- package/dist/src/components/data-display/chip-group/ChipGroup.component.d.ts +72 -0
- package/dist/src/components/data-display/chip-group/ChipGroup.component.d.ts.map +1 -0
- package/dist/src/components/data-display/datatable/DataTable.component.d.ts +25 -0
- package/dist/src/components/data-display/datatable/DataTable.component.d.ts.map +1 -0
- package/dist/src/components/feedback/alert/Alert.component.d.ts +19 -0
- package/dist/src/components/feedback/alert/Alert.component.d.ts.map +1 -0
- package/dist/src/components/feedback/spinner/Spinner.component.d.ts +17 -0
- package/dist/src/components/feedback/spinner/Spinner.component.d.ts.map +1 -0
- package/dist/src/components/forms/alphanumeric-input/AlphanumericInput.component.d.ts +47 -0
- package/dist/src/components/forms/alphanumeric-input/AlphanumericInput.component.d.ts.map +1 -0
- package/dist/src/components/forms/checkbox/Checkbox.component.d.ts +18 -0
- package/dist/src/components/forms/checkbox/Checkbox.component.d.ts.map +1 -0
- package/dist/src/components/forms/email-input/EmailInput.component.d.ts +31 -0
- package/dist/src/components/forms/email-input/EmailInput.component.d.ts.map +1 -0
- package/dist/src/components/forms/input/Input.component.d.ts +28 -0
- package/dist/src/components/forms/input/Input.component.d.ts.map +1 -0
- package/dist/src/components/forms/numeric-input/NumericInput.component.d.ts +44 -0
- package/dist/src/components/forms/numeric-input/NumericInput.component.d.ts.map +1 -0
- package/dist/src/components/forms/otp-input/OTPInput.component.d.ts +81 -0
- package/dist/src/components/forms/otp-input/OTPInput.component.d.ts.map +1 -0
- package/dist/src/components/forms/password-input/PasswordInput.component.d.ts +28 -0
- package/dist/src/components/forms/password-input/PasswordInput.component.d.ts.map +1 -0
- package/dist/src/components/forms/phone-input/PhoneInput.component.d.ts +96 -0
- package/dist/src/components/forms/phone-input/PhoneInput.component.d.ts.map +1 -0
- package/dist/src/components/forms/phone-input/countries.d.ts +93 -0
- package/dist/src/components/forms/phone-input/countries.d.ts.map +1 -0
- package/dist/src/components/forms/radio/Radio.component.d.ts +17 -0
- package/dist/src/components/forms/radio/Radio.component.d.ts.map +1 -0
- package/dist/src/components/forms/select/Select.component.d.ts +108 -0
- package/dist/src/components/forms/select/Select.component.d.ts.map +1 -0
- package/dist/src/components/forms/toggle/Toggle.component.d.ts +80 -0
- package/dist/src/components/forms/toggle/Toggle.component.d.ts.map +1 -0
- package/dist/src/components/layout/auth-layout/AuthLayout.component.d.ts +87 -0
- package/dist/src/components/layout/auth-layout/AuthLayout.component.d.ts.map +1 -0
- package/dist/src/components/layout/container/Container.component.d.ts +26 -0
- package/dist/src/components/layout/container/Container.component.d.ts.map +1 -0
- package/dist/src/components/layout/divider/Divider.component.d.ts +12 -0
- package/dist/src/components/layout/divider/Divider.component.d.ts.map +1 -0
- package/dist/src/components/layout/grid/Grid.component.d.ts +53 -0
- package/dist/src/components/layout/grid/Grid.component.d.ts.map +1 -0
- package/dist/src/components/layout/stack/Stack.component.d.ts +13 -0
- package/dist/src/components/layout/stack/Stack.component.d.ts.map +1 -0
- package/dist/src/components/navigation/tabs/Tabs.component.d.ts +46 -0
- package/dist/src/components/navigation/tabs/Tabs.component.d.ts.map +1 -0
- package/dist/src/components/overlays/dialog/Dialog.component.d.ts +83 -0
- package/dist/src/components/overlays/dialog/Dialog.component.d.ts.map +1 -0
- package/dist/src/components/typography/heading/Heading.component.d.ts +20 -0
- package/dist/src/components/typography/heading/Heading.component.d.ts.map +1 -0
- package/dist/src/components/typography/link/Link.component.d.ts +61 -0
- package/dist/src/components/typography/link/Link.component.d.ts.map +1 -0
- package/dist/src/components/typography/text/Text.component.d.ts +21 -0
- package/dist/src/components/typography/text/Text.component.d.ts.map +1 -0
- package/dist/src/index.d.ts +61 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/lib/debounce.d.ts +12 -0
- package/dist/src/lib/debounce.d.ts.map +1 -0
- package/dist/src/lib/debounce.spec.d.ts +2 -0
- package/dist/src/lib/debounce.spec.d.ts.map +1 -0
- package/dist/src/lib/dev-utils.d.ts +41 -0
- package/dist/src/lib/dev-utils.d.ts.map +1 -0
- package/dist/src/lib/index.d.ts +19 -0
- package/dist/src/lib/index.d.ts.map +1 -0
- package/dist/src/lib/useMergedRef.d.ts +19 -0
- package/dist/src/lib/useMergedRef.d.ts.map +1 -0
- package/package.json +92 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from 'react';
|
|
2
|
+
import { Country } from './countries';
|
|
3
|
+
|
|
4
|
+
export type { Country, PhoneMask } from './countries';
|
|
5
|
+
export { allCountries, commonCountries, defaultCountries, getCountryByCode, getCountryByDialCode, getCountriesByDialCode, searchCountries, phoneMasks, defaultPhoneMask, getPhoneMask, formatPhoneNumber, getPhoneDigits, isValidPhoneLength, } from './countries';
|
|
6
|
+
export interface PhoneInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'value' | 'onChange'> {
|
|
7
|
+
/**
|
|
8
|
+
* Label text for the input
|
|
9
|
+
*/
|
|
10
|
+
label?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Error message to display below the input
|
|
13
|
+
*/
|
|
14
|
+
error?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Helper text to display below the input (only shown when no error)
|
|
17
|
+
*/
|
|
18
|
+
helperText?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Whether the input should take full width
|
|
21
|
+
* @default true
|
|
22
|
+
*/
|
|
23
|
+
fullWidth?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* The phone number value (without country code)
|
|
26
|
+
*/
|
|
27
|
+
value?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Callback when the phone number changes
|
|
30
|
+
*/
|
|
31
|
+
onChange?: (value: string) => void;
|
|
32
|
+
/**
|
|
33
|
+
* The selected country code (ISO 3166-1 alpha-2)
|
|
34
|
+
* @default "US"
|
|
35
|
+
*/
|
|
36
|
+
countryCode?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Callback when the country selection changes
|
|
39
|
+
*/
|
|
40
|
+
onCountryChange?: (country: Country) => void;
|
|
41
|
+
/**
|
|
42
|
+
* List of available countries
|
|
43
|
+
* @default commonCountries
|
|
44
|
+
*/
|
|
45
|
+
countries?: Country[];
|
|
46
|
+
/**
|
|
47
|
+
* Enable phone number formatting based on country mask
|
|
48
|
+
* When enabled, the phone number will be formatted as the user types
|
|
49
|
+
* @default true
|
|
50
|
+
*/
|
|
51
|
+
enableFormatting?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Callback when validation state changes
|
|
54
|
+
* Called with true when phone number length matches country mask
|
|
55
|
+
*/
|
|
56
|
+
onValidationChange?: (isValid: boolean) => void;
|
|
57
|
+
/**
|
|
58
|
+
* Custom data-cy attribute for Cypress testing
|
|
59
|
+
* @default "phone-input"
|
|
60
|
+
*/
|
|
61
|
+
'data-cy'?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Custom data-testid attribute for unit testing
|
|
64
|
+
* @default "phone-input"
|
|
65
|
+
*/
|
|
66
|
+
'data-testid'?: string;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* PhoneInput - Phone number input with country selector
|
|
70
|
+
*
|
|
71
|
+
* A form input component for phone numbers featuring:
|
|
72
|
+
* - Country selector dropdown with flags
|
|
73
|
+
* - Automatic dial code display
|
|
74
|
+
* - Phone number validation (numeric only)
|
|
75
|
+
* - Full keyboard accessibility
|
|
76
|
+
* - RTL support
|
|
77
|
+
*
|
|
78
|
+
* Design from Figma: node-id=40268-12095
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```tsx
|
|
82
|
+
* const [phone, setPhone] = useState('');
|
|
83
|
+
* const [country, setCountry] = useState('US');
|
|
84
|
+
*
|
|
85
|
+
* <PhoneInput
|
|
86
|
+
* label="Mobile No."
|
|
87
|
+
* value={phone}
|
|
88
|
+
* onChange={setPhone}
|
|
89
|
+
* countryCode={country}
|
|
90
|
+
* onCountryChange={(c) => setCountry(c.code)}
|
|
91
|
+
* required
|
|
92
|
+
* />
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
export declare const PhoneInput: import('react').ForwardRefExoticComponent<PhoneInputProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
96
|
+
//# sourceMappingURL=PhoneInput.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PhoneInput.component.d.ts","sourceRoot":"","sources":["../../../../../src/components/forms/phone-input/PhoneInput.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,mBAAmB,EAEpB,MAAM,OAAO,CAAC;AAGf,OAAO,EACL,OAAO,EAKR,MAAM,aAAa,CAAC;AAGrB,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EACL,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,sBAAsB,EACtB,eAAe,EACf,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAErB,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAC3C,mBAAmB,CAAC,gBAAgB,CAAC,EACrC,MAAM,GAAG,OAAO,GAAG,UAAU,CAC9B;IACC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAEnC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAE7C;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,EAAE,CAAC;IAEtB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAEhD;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,UAAU,8GAgWtB,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Country data for PhoneInput component
|
|
3
|
+
*
|
|
4
|
+
* Contains country codes, names, dial codes, and flag emojis.
|
|
5
|
+
* Countries are sorted alphabetically by name.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Country data structure
|
|
9
|
+
*/
|
|
10
|
+
export interface Country {
|
|
11
|
+
/** ISO 3166-1 alpha-2 country code (e.g., "US", "IL") */
|
|
12
|
+
code: string;
|
|
13
|
+
/** Country name in English */
|
|
14
|
+
name: string;
|
|
15
|
+
/** International dial code with + prefix (e.g., "+1", "+972") */
|
|
16
|
+
dialCode: string;
|
|
17
|
+
/** Flag emoji */
|
|
18
|
+
flag: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Comprehensive list of countries with dial codes
|
|
22
|
+
* Sorted alphabetically by country name
|
|
23
|
+
*/
|
|
24
|
+
export declare const allCountries: Country[];
|
|
25
|
+
/**
|
|
26
|
+
* Common countries - a subset of frequently used countries
|
|
27
|
+
* Good for default/priority display in dropdowns
|
|
28
|
+
*/
|
|
29
|
+
export declare const commonCountries: Country[];
|
|
30
|
+
/**
|
|
31
|
+
* Default countries for backward compatibility
|
|
32
|
+
* @deprecated Use `commonCountries` or `allCountries` instead
|
|
33
|
+
*/
|
|
34
|
+
export declare const defaultCountries: Country[];
|
|
35
|
+
/**
|
|
36
|
+
* Find a country by its ISO code
|
|
37
|
+
*/
|
|
38
|
+
export declare function getCountryByCode(code: string): Country | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Find a country by its dial code
|
|
41
|
+
* Note: Some dial codes are shared (e.g., +1 for US, CA, etc.)
|
|
42
|
+
* Returns the first match
|
|
43
|
+
*/
|
|
44
|
+
export declare function getCountryByDialCode(dialCode: string): Country | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Get all countries that share a dial code
|
|
47
|
+
* Useful for +1 (US, Canada, etc.)
|
|
48
|
+
*/
|
|
49
|
+
export declare function getCountriesByDialCode(dialCode: string): Country[];
|
|
50
|
+
/**
|
|
51
|
+
* Search countries by name (case-insensitive)
|
|
52
|
+
*/
|
|
53
|
+
export declare function searchCountries(query: string): Country[];
|
|
54
|
+
/**
|
|
55
|
+
* Phone number mask configuration
|
|
56
|
+
* - mask: Pattern where # represents a digit
|
|
57
|
+
* - placeholder: Visual placeholder for the mask
|
|
58
|
+
* - maxLength: Maximum number of digits (without formatting)
|
|
59
|
+
*/
|
|
60
|
+
export interface PhoneMask {
|
|
61
|
+
mask: string;
|
|
62
|
+
placeholder: string;
|
|
63
|
+
maxLength: number;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Phone masks by country code
|
|
67
|
+
* Format: # = digit
|
|
68
|
+
*/
|
|
69
|
+
export declare const phoneMasks: Record<string, PhoneMask>;
|
|
70
|
+
/**
|
|
71
|
+
* Default phone mask for countries without specific masks
|
|
72
|
+
*/
|
|
73
|
+
export declare const defaultPhoneMask: PhoneMask;
|
|
74
|
+
/**
|
|
75
|
+
* Get phone mask for a country
|
|
76
|
+
*/
|
|
77
|
+
export declare function getPhoneMask(countryCode: string): PhoneMask;
|
|
78
|
+
/**
|
|
79
|
+
* Format a phone number according to the country mask
|
|
80
|
+
* @param value - Raw phone number (digits only)
|
|
81
|
+
* @param countryCode - ISO country code
|
|
82
|
+
* @returns Formatted phone number
|
|
83
|
+
*/
|
|
84
|
+
export declare function formatPhoneNumber(value: string, countryCode: string): string;
|
|
85
|
+
/**
|
|
86
|
+
* Get raw digits from a formatted phone number
|
|
87
|
+
*/
|
|
88
|
+
export declare function getPhoneDigits(formattedValue: string): string;
|
|
89
|
+
/**
|
|
90
|
+
* Validate phone number length for a country
|
|
91
|
+
*/
|
|
92
|
+
export declare function isValidPhoneLength(value: string, countryCode: string): boolean;
|
|
93
|
+
//# sourceMappingURL=countries.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"countries.d.ts","sourceRoot":"","sources":["../../../../../src/components/forms/phone-input/countries.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,yDAAyD;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,8BAA8B;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,OAAO,EAgLj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Attributes<HTMLInputElement>, 'type'> {
|
|
4
|
+
label?: string;
|
|
5
|
+
error?: string;
|
|
6
|
+
helperText?: string;
|
|
7
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
8
|
+
onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
9
|
+
onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
10
|
+
onClick?: (event: React.MouseEvent<HTMLInputElement>) => void;
|
|
11
|
+
onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
12
|
+
onKeyUp?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
13
|
+
'data-cy'?: string;
|
|
14
|
+
'data-testid'?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const Radio: import('react').ForwardRefExoticComponent<RadioProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
17
|
+
//# sourceMappingURL=Radio.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Radio.component.d.ts","sourceRoot":"","sources":["../../../../../src/components/forms/radio/Radio.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,mBAAmB,EAA8B,MAAM,OAAO,CAAC;AAGpF,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACrF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAChE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC7D,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC9D,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC9D,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IACnE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AA6BD,eAAO,MAAM,KAAK,yGAmGjB,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, HTMLAttributes } from 'react';
|
|
2
|
+
|
|
3
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
4
|
+
export declare const Select: import('react').FC<SelectPrimitive.SelectProps>;
|
|
5
|
+
export interface SelectTriggerProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
6
|
+
/**
|
|
7
|
+
* The label text for the select field
|
|
8
|
+
*/
|
|
9
|
+
label?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Error message to display
|
|
12
|
+
*/
|
|
13
|
+
error?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Helper text to display below the select
|
|
16
|
+
*/
|
|
17
|
+
helperText?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Whether the select should take full width
|
|
20
|
+
* @default false
|
|
21
|
+
*/
|
|
22
|
+
fullWidth?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Whether the select has a value selected
|
|
25
|
+
*/
|
|
26
|
+
hasValue?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Placeholder text when no value is selected
|
|
29
|
+
*/
|
|
30
|
+
placeholder?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Whether the select is required for form validation
|
|
33
|
+
* Note: Sets aria-required for accessibility. For actual form validation,
|
|
34
|
+
* use HTML form validation or a form library.
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
required?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Custom data-cy attribute for Cypress testing
|
|
40
|
+
* @default "select-trigger"
|
|
41
|
+
*/
|
|
42
|
+
'data-cy'?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Custom data-testid attribute for unit testing
|
|
45
|
+
* @default "select-trigger"
|
|
46
|
+
*/
|
|
47
|
+
'data-testid'?: string;
|
|
48
|
+
}
|
|
49
|
+
export declare const SelectTrigger: import('react').ForwardRefExoticComponent<SelectTriggerProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
50
|
+
export declare const SelectValue: import('react').ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & import('react').RefAttributes<HTMLSpanElement>>;
|
|
51
|
+
export interface SelectContentProps extends HTMLAttributes<HTMLDivElement> {
|
|
52
|
+
position?: 'item-aligned' | 'popper';
|
|
53
|
+
/**
|
|
54
|
+
* Custom data-cy attribute for Cypress testing
|
|
55
|
+
* @default "select-content"
|
|
56
|
+
*/
|
|
57
|
+
'data-cy'?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Custom data-testid attribute for unit testing
|
|
60
|
+
* @default "select-content"
|
|
61
|
+
*/
|
|
62
|
+
'data-testid'?: string;
|
|
63
|
+
}
|
|
64
|
+
export declare const SelectContent: import('react').ForwardRefExoticComponent<SelectContentProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
65
|
+
export interface SelectItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
66
|
+
value: string;
|
|
67
|
+
disabled?: boolean;
|
|
68
|
+
textValue?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Custom data-cy attribute for Cypress testing
|
|
71
|
+
* Auto-generates as "select-item-{value}" if not provided
|
|
72
|
+
*/
|
|
73
|
+
'data-cy'?: string;
|
|
74
|
+
/**
|
|
75
|
+
* Custom data-testid attribute for unit testing
|
|
76
|
+
* Auto-generates as "select-item-{value}" if not provided
|
|
77
|
+
*/
|
|
78
|
+
'data-testid'?: string;
|
|
79
|
+
}
|
|
80
|
+
export declare const SelectItem: import('react').ForwardRefExoticComponent<SelectItemProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
81
|
+
export declare const SelectGroup: import('react').ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
82
|
+
export interface SelectLabelProps extends HTMLAttributes<HTMLDivElement> {
|
|
83
|
+
/**
|
|
84
|
+
* Custom data-cy attribute for Cypress testing
|
|
85
|
+
* @default "select-label"
|
|
86
|
+
*/
|
|
87
|
+
'data-cy'?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Custom data-testid attribute for unit testing
|
|
90
|
+
* @default "select-label"
|
|
91
|
+
*/
|
|
92
|
+
'data-testid'?: string;
|
|
93
|
+
}
|
|
94
|
+
export declare const SelectLabel: import('react').ForwardRefExoticComponent<SelectLabelProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
95
|
+
export interface SelectSeparatorProps extends HTMLAttributes<HTMLDivElement> {
|
|
96
|
+
/**
|
|
97
|
+
* Custom data-cy attribute for Cypress testing
|
|
98
|
+
* @default "select-separator"
|
|
99
|
+
*/
|
|
100
|
+
'data-cy'?: string;
|
|
101
|
+
/**
|
|
102
|
+
* Custom data-testid attribute for unit testing
|
|
103
|
+
* @default "select-separator"
|
|
104
|
+
*/
|
|
105
|
+
'data-testid'?: string;
|
|
106
|
+
}
|
|
107
|
+
export declare const SelectSeparator: import('react').ForwardRefExoticComponent<SelectSeparatorProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
108
|
+
//# sourceMappingURL=Select.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.component.d.ts","sourceRoot":"","sources":["../../../../../src/components/forms/select/Select.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiC,oBAAoB,EAAE,cAAc,EAAE,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M,UAAU,4GAyBtB,CAAC;AAOF,eAAO,MAAM,WAAW,6HAAwB,CAAC;AAMjD,MAAM,WAAW,gBAAiB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACtE;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,WAAW,6GAevB,CAAC;AAOF,MAAM,WAAW,oBAAqB,SAAQ,cAAc,CAAC,cAAc,CAAC;IAC1E;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,eAAe,iHAgB1B,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface ToggleProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {
|
|
4
|
+
/**
|
|
5
|
+
* Label text for the toggle
|
|
6
|
+
*/
|
|
7
|
+
label?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Position of the label relative to the toggle
|
|
10
|
+
* @default 'end'
|
|
11
|
+
*/
|
|
12
|
+
labelPosition?: 'start' | 'end';
|
|
13
|
+
/**
|
|
14
|
+
* Helper text to display below the toggle
|
|
15
|
+
*/
|
|
16
|
+
helperText?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Size of the toggle
|
|
19
|
+
* @default 'md'
|
|
20
|
+
*/
|
|
21
|
+
size?: 'sm' | 'md' | 'lg';
|
|
22
|
+
/**
|
|
23
|
+
* Callback fired when the toggle state changes
|
|
24
|
+
* @param event - The change event from the input element
|
|
25
|
+
*/
|
|
26
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
27
|
+
/**
|
|
28
|
+
* Callback fired when the toggle loses focus
|
|
29
|
+
* @param event - The blur event from the input element
|
|
30
|
+
*/
|
|
31
|
+
onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
32
|
+
/**
|
|
33
|
+
* Callback fired when the toggle gains focus
|
|
34
|
+
* @param event - The focus event from the input element
|
|
35
|
+
*/
|
|
36
|
+
onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
37
|
+
/**
|
|
38
|
+
* Custom data-cy attribute for Cypress testing
|
|
39
|
+
* Auto-generates as "toggle" if not provided
|
|
40
|
+
*/
|
|
41
|
+
'data-cy'?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Custom data-testid attribute for unit testing
|
|
44
|
+
* Auto-generates as "toggle" if not provided
|
|
45
|
+
*/
|
|
46
|
+
'data-testid'?: string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Toggle - Accessible toggle/switch component for the Adam Milo Design System
|
|
50
|
+
*
|
|
51
|
+
* A fully accessible toggle component that supports:
|
|
52
|
+
* - Standard on/off states
|
|
53
|
+
* - Hover and focus states
|
|
54
|
+
* - Disabled state
|
|
55
|
+
* - Label positioning
|
|
56
|
+
* - Helper text
|
|
57
|
+
* - Full keyboard accessibility
|
|
58
|
+
* - RTL support
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```tsx
|
|
62
|
+
* // Simple toggle
|
|
63
|
+
* <Toggle label="Enable notifications" />
|
|
64
|
+
*
|
|
65
|
+
* // Controlled toggle
|
|
66
|
+
* <Toggle
|
|
67
|
+
* label="Dark mode"
|
|
68
|
+
* checked={isDarkMode}
|
|
69
|
+
* onChange={(e) => setIsDarkMode(e.target.checked)}
|
|
70
|
+
* />
|
|
71
|
+
*
|
|
72
|
+
* // With label on the left
|
|
73
|
+
* <Toggle label="Auto-save" labelPosition="start" />
|
|
74
|
+
*
|
|
75
|
+
* // Disabled toggle
|
|
76
|
+
* <Toggle label="Feature flag" disabled />
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
export declare const Toggle: import('react').ForwardRefExoticComponent<ToggleProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
80
|
+
//# sourceMappingURL=Toggle.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toggle.component.d.ts","sourceRoot":"","sources":["../../../../../src/components/forms/toggle/Toggle.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,mBAAmB,EAAwC,MAAM,OAAO,CAAC;AAe9F,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/F;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IAEhC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAE1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAEhE;;;OAGG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAE7D;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAE9D;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,MAAM,0GA8JlB,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { ReactNode, HTMLAttributes } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface AuthLayoutProps extends Omit<HTMLAttributes<HTMLDivElement>, 'style' | 'className'> {
|
|
4
|
+
/**
|
|
5
|
+
* The content to render inside the card
|
|
6
|
+
*/
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Card size variant
|
|
10
|
+
* - sm: Small card (400px width)
|
|
11
|
+
* - md: Medium card (500px width)
|
|
12
|
+
* - lg: Large card (600px width) - default
|
|
13
|
+
* - xl: Extra large card (700px width)
|
|
14
|
+
* - 2xl: Extra wide card (896px width) – for forms with side illustrations
|
|
15
|
+
* - auto: Card width adjusts to content
|
|
16
|
+
*/
|
|
17
|
+
cardSize?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'auto';
|
|
18
|
+
/**
|
|
19
|
+
* Logo element to display in the header
|
|
20
|
+
* Can be an image, SVG, or custom component
|
|
21
|
+
*/
|
|
22
|
+
logo?: ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* Whether to show the settings menu button
|
|
25
|
+
* @default true
|
|
26
|
+
*/
|
|
27
|
+
showSettings?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Whether to show the user menu button
|
|
30
|
+
* @default true
|
|
31
|
+
*/
|
|
32
|
+
showUserMenu?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* User initials for the user menu button (for existing users)
|
|
35
|
+
* If provided, shows initials instead of user icon
|
|
36
|
+
*/
|
|
37
|
+
userInitials?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Callback when settings button is clicked
|
|
40
|
+
*/
|
|
41
|
+
onSettingsClick?: () => void;
|
|
42
|
+
/**
|
|
43
|
+
* Callback when user menu button is clicked
|
|
44
|
+
*/
|
|
45
|
+
onUserMenuClick?: () => void;
|
|
46
|
+
/**
|
|
47
|
+
* Which menu button is currently selected/active
|
|
48
|
+
*/
|
|
49
|
+
activeMenu?: 'settings' | 'user' | null;
|
|
50
|
+
/**
|
|
51
|
+
* An ID for testing purposes, used by Vitest/React Testing Library.
|
|
52
|
+
*/
|
|
53
|
+
'data-testid'?: string;
|
|
54
|
+
/**
|
|
55
|
+
* An ID for Cypress E2E testing purposes.
|
|
56
|
+
*/
|
|
57
|
+
'data-cy'?: string;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* AuthLayout - Pre-authentication page layout
|
|
61
|
+
*
|
|
62
|
+
* Based on Figma designs:
|
|
63
|
+
* - Desktop: node-id=40001-29832
|
|
64
|
+
* - Mobile: node-id=40362-11823
|
|
65
|
+
*
|
|
66
|
+
* A full-page layout for authentication pages (login, signup, password reset, etc.)
|
|
67
|
+
* featuring:
|
|
68
|
+
* - Gradient background
|
|
69
|
+
* - Fixed header with logo and menu buttons
|
|
70
|
+
* - Centered card container for form content
|
|
71
|
+
* - Responsive design (desktop/mobile)
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```tsx
|
|
75
|
+
* <AuthLayout
|
|
76
|
+
* logo={<img src="/logo.svg" alt="Company Logo" />}
|
|
77
|
+
* cardSize="lg"
|
|
78
|
+
* onSettingsClick={() => openSettings()}
|
|
79
|
+
* onUserMenuClick={() => openUserMenu()}
|
|
80
|
+
* >
|
|
81
|
+
* <h1>Welcome</h1>
|
|
82
|
+
* <form>...</form>
|
|
83
|
+
* </AuthLayout>
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
export declare const AuthLayout: import('react').ForwardRefExoticComponent<AuthLayoutProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
87
|
+
//# sourceMappingURL=AuthLayout.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthLayout.component.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/auth-layout/AuthLayout.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAc,cAAc,EAAE,MAAM,OAAO,CAAC;AAI9D,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAC3C,cAAc,CAAC,cAAc,CAAC,EAC9B,OAAO,GAAG,WAAW,CACtB;IACC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC;IAEtD;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAE7B;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAE7B;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI,CAAC;IAExC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAWD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,UAAU,4GAyItB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface ContainerProps extends ComponentPropsWithoutRef<'div'> {
|
|
4
|
+
/**
|
|
5
|
+
* Maximum width of the container
|
|
6
|
+
* @default "lg"
|
|
7
|
+
*/
|
|
8
|
+
maxWidth?: 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
9
|
+
/**
|
|
10
|
+
* Horizontal padding size
|
|
11
|
+
* @default "md"
|
|
12
|
+
*/
|
|
13
|
+
padding?: 'none' | 'sm' | 'md' | 'lg' | 'xl';
|
|
14
|
+
/**
|
|
15
|
+
* Custom data-cy attribute for Cypress testing
|
|
16
|
+
* @default "container"
|
|
17
|
+
*/
|
|
18
|
+
'data-cy'?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Custom data-testid attribute for unit testing
|
|
21
|
+
* @default "container"
|
|
22
|
+
*/
|
|
23
|
+
'data-testid'?: string;
|
|
24
|
+
}
|
|
25
|
+
export declare const Container: import('react').ForwardRefExoticComponent<ContainerProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
26
|
+
//# sourceMappingURL=Container.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Container.component.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/container/Container.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,wBAAwB,EAAc,MAAM,OAAO,CAAC;AAuBzE,MAAM,WAAW,cAAe,SAAQ,wBAAwB,CAAC,KAAK,CAAC;IACrE;;;OAGG;IACH,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;IAE9C;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAE7C;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,SAAS,2GAiCrB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface DividerProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
orientation?: 'horizontal' | 'vertical';
|
|
5
|
+
decorative?: boolean;
|
|
6
|
+
spacing?: '0' | '1' | '2' | '3' | '4' | '5' | '6' | '8' | '10' | '12';
|
|
7
|
+
color?: string;
|
|
8
|
+
'data-cy'?: string;
|
|
9
|
+
'data-testid'?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const Divider: import('react').ForwardRefExoticComponent<DividerProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
12
|
+
//# sourceMappingURL=Divider.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Divider.component.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/divider/Divider.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA0B,cAAc,EAAE,MAAM,OAAO,CAAC;AAI/D,MAAM,WAAW,YAAa,SAAQ,cAAc,CAAC,cAAc,CAAC;IAClE,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,CAAC;IACtE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAsBD,eAAO,MAAM,OAAO,yGAuCnB,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface GridProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/**
|
|
5
|
+
* Number of columns in the grid (1-12) or 'auto' for auto-fit behavior
|
|
6
|
+
* @default 3
|
|
7
|
+
*/
|
|
8
|
+
columns?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 'auto';
|
|
9
|
+
/**
|
|
10
|
+
* Number of rows in the grid (1-12) or 'auto' for auto rows
|
|
11
|
+
*/
|
|
12
|
+
rows?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 'auto';
|
|
13
|
+
/**
|
|
14
|
+
* Uniform gap between grid items (uses CSS custom properties)
|
|
15
|
+
* @default '4'
|
|
16
|
+
*/
|
|
17
|
+
gap?: '0' | '1' | '2' | '3' | '4' | '5' | '6' | '8' | '10' | '12';
|
|
18
|
+
/**
|
|
19
|
+
* Vertical gap between grid items (overrides gap)
|
|
20
|
+
*/
|
|
21
|
+
rowGap?: '0' | '1' | '2' | '3' | '4' | '5' | '6' | '8' | '10' | '12';
|
|
22
|
+
/**
|
|
23
|
+
* Horizontal gap between grid items (overrides gap)
|
|
24
|
+
*/
|
|
25
|
+
columnGap?: '0' | '1' | '2' | '3' | '4' | '5' | '6' | '8' | '10' | '12';
|
|
26
|
+
/**
|
|
27
|
+
* Alignment of items on the block axis (vertical)
|
|
28
|
+
* @default 'stretch'
|
|
29
|
+
*/
|
|
30
|
+
align?: 'start' | 'center' | 'end' | 'stretch';
|
|
31
|
+
/**
|
|
32
|
+
* Justification of items on the inline axis (horizontal)
|
|
33
|
+
* @default 'stretch'
|
|
34
|
+
*/
|
|
35
|
+
justify?: 'start' | 'center' | 'end' | 'stretch';
|
|
36
|
+
/**
|
|
37
|
+
* Minimum width for auto-fit columns (when columns='auto')
|
|
38
|
+
* @default '15rem'
|
|
39
|
+
*/
|
|
40
|
+
autoFitMinWidth?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Custom data-cy attribute for Cypress testing
|
|
43
|
+
* Auto-generates as "grid-{columns}col" if not provided
|
|
44
|
+
*/
|
|
45
|
+
'data-cy'?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Custom data-testid attribute for unit testing
|
|
48
|
+
* Auto-generates as "grid-{columns}col" if not provided
|
|
49
|
+
*/
|
|
50
|
+
'data-testid'?: string;
|
|
51
|
+
}
|
|
52
|
+
export declare const Grid: import('react').ForwardRefExoticComponent<GridProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
53
|
+
//# sourceMappingURL=Grid.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Grid.component.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/grid/Grid.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAA6B,MAAM,OAAO,CAAC;AAwFlE,M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C;CACxB;AAED,eAAO,MAAM,IAAI,sGA0DhB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface StackProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
direction?: 'horizontal' | 'vertical';
|
|
5
|
+
spacing?: '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '10' | '12' | '14';
|
|
6
|
+
align?: 'start' | 'center' | 'end' | 'stretch';
|
|
7
|
+
justify?: 'start' | 'center' | 'end' | 'between' | 'around';
|
|
8
|
+
wrap?: boolean;
|
|
9
|
+
'data-cy'?: string;
|
|
10
|
+
'data-testid'?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const Stack: import('react').ForwardRefExoticComponent<StackProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
13
|
+
//# sourceMappingURL=Stack.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stack.component.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/stack/Stack.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAc,MAAM,OAAO,CAAC;AAGnD,MAAM,WAAW,UAAW,SAAQ,cAAc,CAAC,cAAc,CAAC;IAChE,SAAS,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACtC,OAAO,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACnF,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;IAC/C,OAAO,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,GAAG,QAAQ,CAAC;IAC5D,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAqCD,eAAO,MAAM,KAAK,uGAuCjB,CAAC"}
|