@flipdish/ui-library 0.63.0 → 0.64.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -11
- package/dist/components/__internal__/listOption/listOption.styles.cjs +20 -0
- package/dist/components/__internal__/listOption/listOption.styles.cjs.map +1 -0
- package/dist/components/__internal__/listOption/listOption.styles.d.ts +16 -0
- package/dist/components/__internal__/listOption/listOption.styles.d.ts.map +1 -0
- package/dist/components/__internal__/listOption/listOption.styles.js +18 -0
- package/dist/components/__internal__/listOption/listOption.styles.js.map +1 -0
- package/dist/components/atoms/PhoneInput/components/PhoneInputCountrySelect.cjs +35 -0
- package/dist/components/atoms/PhoneInput/components/PhoneInputCountrySelect.cjs.map +1 -0
- package/dist/components/atoms/PhoneInput/components/PhoneInputCountrySelect.d.ts +24 -0
- package/dist/components/atoms/PhoneInput/components/PhoneInputCountrySelect.d.ts.map +1 -0
- package/dist/components/atoms/PhoneInput/components/PhoneInputCountrySelect.js +33 -0
- package/dist/components/atoms/PhoneInput/components/PhoneInputCountrySelect.js.map +1 -0
- package/dist/components/atoms/PhoneInput/hooks/usePhoneEntry.cjs +100 -0
- package/dist/components/atoms/PhoneInput/hooks/usePhoneEntry.cjs.map +1 -0
- package/dist/components/atoms/PhoneInput/hooks/usePhoneEntry.d.ts +35 -0
- package/dist/components/atoms/PhoneInput/hooks/usePhoneEntry.d.ts.map +1 -0
- package/dist/components/atoms/PhoneInput/hooks/usePhoneEntry.js +98 -0
- package/dist/components/atoms/PhoneInput/hooks/usePhoneEntry.js.map +1 -0
- package/dist/components/atoms/PhoneInput/index.cjs +79 -0
- package/dist/components/atoms/PhoneInput/index.cjs.map +1 -0
- package/dist/components/atoms/PhoneInput/index.d.ts +48 -0
- package/dist/components/atoms/PhoneInput/index.d.ts.map +1 -0
- package/dist/components/atoms/PhoneInput/index.js +77 -0
- package/dist/components/atoms/PhoneInput/index.js.map +1 -0
- package/dist/components/atoms/PhoneInput/phoneInput.types.d.ts +17 -0
- package/dist/components/atoms/PhoneInput/phoneInput.types.d.ts.map +1 -0
- package/dist/components/atoms/PhoneInput/utilities/phoneInput.utils.cjs +304 -0
- package/dist/components/atoms/PhoneInput/utilities/phoneInput.utils.cjs.map +1 -0
- package/dist/components/atoms/PhoneInput/utilities/phoneInput.utils.d.ts +147 -0
- package/dist/components/atoms/PhoneInput/utilities/phoneInput.utils.d.ts.map +1 -0
- package/dist/components/atoms/PhoneInput/utilities/phoneInput.utils.js +288 -0
- package/dist/components/atoms/PhoneInput/utilities/phoneInput.utils.js.map +1 -0
- package/dist/components/forms/__internal__/formField/hooks/useFocusThroughSubmit.cjs +10 -1
- package/dist/components/forms/__internal__/formField/hooks/useFocusThroughSubmit.cjs.map +1 -1
- package/dist/components/forms/__internal__/formField/hooks/useFocusThroughSubmit.d.ts.map +1 -1
- package/dist/components/forms/__internal__/formField/hooks/useFocusThroughSubmit.js +10 -1
- package/dist/components/forms/__internal__/formField/hooks/useFocusThroughSubmit.js.map +1 -1
- package/dist/components/forms/fields/FormPhoneInput/index.cjs +36 -0
- package/dist/components/forms/fields/FormPhoneInput/index.cjs.map +1 -0
- package/dist/components/forms/fields/FormPhoneInput/index.d.ts +19 -0
- package/dist/components/forms/fields/FormPhoneInput/index.d.ts.map +1 -0
- package/dist/components/forms/fields/FormPhoneInput/index.js +34 -0
- package/dist/components/forms/fields/FormPhoneInput/index.js.map +1 -0
- package/dist/components/forms/validation/index.cjs +25 -56
- package/dist/components/forms/validation/index.cjs.map +1 -1
- package/dist/components/forms/validation/index.d.ts +2 -12
- package/dist/components/forms/validation/index.d.ts.map +1 -1
- package/dist/components/forms/validation/index.js +1 -32
- package/dist/components/forms/validation/index.js.map +1 -1
- package/dist/components/forms/validation/phoneNumber/index.cjs +20 -0
- package/dist/components/forms/validation/phoneNumber/index.cjs.map +1 -0
- package/dist/components/forms/validation/phoneNumber/index.d.ts +14 -0
- package/dist/components/forms/validation/phoneNumber/index.d.ts.map +1 -0
- package/dist/components/forms/validation/phoneNumber/index.js +18 -0
- package/dist/components/forms/validation/phoneNumber/index.js.map +1 -0
- package/dist/components/forms/validation/utilities/validation.utils.cjs +34 -0
- package/dist/components/forms/validation/utilities/validation.utils.cjs.map +1 -1
- package/dist/components/forms/validation/utilities/validation.utils.d.ts +29 -1
- package/dist/components/forms/validation/utilities/validation.utils.d.ts.map +1 -1
- package/dist/components/forms/validation/utilities/validation.utils.js +33 -2
- package/dist/components/forms/validation/utilities/validation.utils.js.map +1 -1
- package/dist/components/forms/validation/validation.types.d.ts +10 -0
- package/dist/components/forms/validation/validation.types.d.ts.map +1 -1
- package/dist/components/molecules/Selects/Select/components/Popover.cjs +2 -3
- package/dist/components/molecules/Selects/Select/components/Popover.cjs.map +1 -1
- package/dist/components/molecules/Selects/Select/components/Popover.d.ts.map +1 -1
- package/dist/components/molecules/Selects/Select/components/Popover.js +2 -3
- package/dist/components/molecules/Selects/Select/components/Popover.js.map +1 -1
- package/dist/components/molecules/Selects/components/SelectItem.cjs +2 -1
- package/dist/components/molecules/Selects/components/SelectItem.cjs.map +1 -1
- package/dist/components/molecules/Selects/components/SelectItem.d.ts.map +1 -1
- package/dist/components/molecules/Selects/components/SelectItem.js +2 -1
- package/dist/components/molecules/Selects/components/SelectItem.js.map +1 -1
- package/dist/native/components/atoms/PhoneInput/index.d.ts +12 -0
- package/dist/native/components/forms/fields/FormPhoneInput/index.d.ts +12 -0
- package/dist/native/components/forms/validation/phoneNumber/index.d.ts +12 -0
- package/package.json +6 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.utils.d.ts","sourceRoot":"","sources":["../../../../../src/components/forms/validation/utilities/validation.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"validation.utils.d.ts","sourceRoot":"","sources":["../../../../../src/components/forms/validation/utilities/validation.utils.ts"],"names":[],"mappings":"AAAA,OAAO,K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extIdOf, builtInText, fillPlaceholders } from '../../../../utilities/__internal__/builtInTextUtils/builtInText.utils.js';
|
|
2
|
+
import { builtInTextTemplate, builtInTextIdOf, builtInText, fillPlaceholders } from '../../../../utilities/__internal__/builtInTextUtils/builtInText.utils.js';
|
|
3
3
|
|
|
4
4
|
// Kept by the check zod makes for a rule, never by the schema: zod copies a schema on each call, such as `.refine()`, and carries its checks over.
|
|
5
5
|
const rulesByCheck = new WeakMap();
|
|
@@ -62,6 +62,37 @@ const messageText = (translate) => (message, values) => {
|
|
|
62
62
|
return message;
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
|
+
/**
|
|
66
|
+
* Reads a rule's limit and the message for breaking it.
|
|
67
|
+
*
|
|
68
|
+
* @param rule The limit, alone or with its message.
|
|
69
|
+
* @param defaultId The library message shown when the rule names none.
|
|
70
|
+
* @returns The limit and the message to show.
|
|
71
|
+
*/
|
|
72
|
+
const limitOf = (rule, defaultId) => Array.isArray(rule) ? rule : [rule, builtInTextTemplate(defaultId)];
|
|
73
|
+
/**
|
|
74
|
+
* Reads the message for an empty field.
|
|
75
|
+
*
|
|
76
|
+
* @param required The field's `required` rule.
|
|
77
|
+
* @param defaultId The library message shown when the rule names none.
|
|
78
|
+
* @returns The message to show, or `undefined` for an optional field.
|
|
79
|
+
*/
|
|
80
|
+
const requiredMessage = (required, defaultId = 'This_field_is_required') => {
|
|
81
|
+
if (typeof required === 'string')
|
|
82
|
+
return required || undefined;
|
|
83
|
+
return required ? builtInTextTemplate(defaultId) : undefined;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Adds a rule that an empty value passes: an empty value is `required`'s to report, so the field shows one message and
|
|
87
|
+
* an optional field may stay empty.
|
|
88
|
+
*
|
|
89
|
+
* @param schema The string schema to add the rule to.
|
|
90
|
+
* @param isValid Whether a value that is not empty is acceptable.
|
|
91
|
+
* @param message The message for one that is not.
|
|
92
|
+
* @param params The values the message's placeholders may use.
|
|
93
|
+
* @returns The schema with the rule added.
|
|
94
|
+
*/
|
|
95
|
+
const unlessEmpty = (schema, isValid, message, params) => schema.refine((value) => value === '' || isValid(value), { message, params });
|
|
65
96
|
|
|
66
|
-
export { crossFieldDependentsOf, messageText, noteCrossFieldRule, valuesOf };
|
|
97
|
+
export { crossFieldDependentsOf, limitOf, messageText, noteCrossFieldRule, requiredMessage, unlessEmpty, valuesOf };
|
|
67
98
|
//# sourceMappingURL=validation.utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.utils.js","sources":["../../../../../src/components/forms/validation/utilities/validation.utils.ts"],"sourcesContent":[null],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"validation.utils.js","sources":["../../../../../src/components/forms/validation/utilities/validation.utils.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAQA;AACA,MAAM,YAAY,GAAG,IAAI,OAAO,EAA2D;AAE3F;;;;;;AAMG;AACI,MAAM,kBAAkB,GAAG,CAAC,OAAkB,EAAE,KAAwB,EAAE,SAAiB,KAAU;;IAE1G,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,IAAI,EAAE;IAC7C,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;AACvC,IAAA,IAAI,KAAK;QAAE,YAAY,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;AAC1D;AAEA;;;;;;AAMG;AACI,MAAM,sBAAsB,GAAG,CAAC,MAAiB,KACtD,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,IAAI,EAAE,EAAE,MAAM,CAAkB,CAAC,UAAU,EAAE,KAAK,KAAI;IAC5E,MAAM,IAAI,GAAG,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC;IACpC,OAAO,IAAI,GAAG,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,GA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QAAE,OAAO,QAAQ,IAAI,SAAS;AAC9D,IAAA,OAAO,QAAQ,GAAG,mBAAmB,CAAC,SAAS,CAAC,GAAG,SAAS;AAC9D;AAEA;;;;;;;;;AASG;AACI,MAAM,WAAW,GAAG,CAAC,MAAmB,EAAE,OAAmC,EAAE,OAAe,EAAE,MAAsB,KAC3H,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,KAAK,KAAK,KAAK,EAAE,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;;"}
|
|
@@ -5,4 +5,14 @@ export type MessageValues = Record<string, string | number>;
|
|
|
5
5
|
* placeholders, it returns the text to show.
|
|
6
6
|
*/
|
|
7
7
|
export type Translate = (key: string, values?: MessageValues) => string;
|
|
8
|
+
/**
|
|
9
|
+
* A rule's limit: the limit alone, which shows the library's default message, or the limit with the message to show, a
|
|
10
|
+
* translation key or the text itself. A message may name the limit with a placeholder, `{min}` or `{max}`.
|
|
11
|
+
*/
|
|
12
|
+
export type RuleLimit<TLimit> = TLimit | readonly [limit: TLimit, message: string];
|
|
13
|
+
/**
|
|
14
|
+
* Whether a field must be filled: `true` shows the library's default message for an empty one, and a string is the
|
|
15
|
+
* message to show, a translation key or the text itself. Without it the field is optional.
|
|
16
|
+
*/
|
|
17
|
+
export type RequiredRule = boolean | string;
|
|
8
18
|
//# sourceMappingURL=validation.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.types.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/validation/validation.types.ts"],"names":[],"mappings":"AAAA,uHAAuH;AACvH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AAE5D;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,aAAa,KAAK,MAAM,CAAC"}
|
|
1
|
+
{"version":3,"file":"validation.types.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/validation/validation.types.ts"],"names":[],"mappings":"AAAA,uHAAuH;AACvH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AAE5D;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,aAAa,KAAK,MAAM,CAAC;AAExE;;;GAGG;AACH,MAAM,MAAM,SAAS,CAAC,MAAM,IAAI,MAAM,GAAG,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AAEnF;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,MAAM,CAAC"}
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var cx = require('@flipdish/ui-library/utilities/cx');
|
|
5
|
+
var listOption_styles = require('../../../../__internal__/listOption/listOption.styles.cjs');
|
|
5
6
|
var ScrollClosingPopover = require('../../../../__internal__/popover/ScrollClosingPopover.cjs');
|
|
6
7
|
|
|
7
8
|
const Popover = (props) => {
|
|
8
|
-
return (jsxRuntime.jsx(ScrollClosingPopover.ScrollClosingPopover, { placement: "bottom", containerPadding: 0, offset: 4, ...props, className: (state) => cx.cx('w-(--trigger-width)
|
|
9
|
-
'duration-150 ease-out animate-in fade-in placement-right:slide-in-from-left-0.5 placement-top:slide-in-from-bottom-0.5 placement-bottom:slide-in-from-top-0.5', state.isExiting &&
|
|
10
|
-
'duration-100 ease-in animate-out fade-out placement-right:slide-out-to-left-0.5 placement-top:slide-out-to-bottom-0.5 placement-bottom:slide-out-to-top-0.5', props.size === 'sm' && 'max-h-56!', props.size === 'md' && 'max-h-64!', props.size === 'lg' && 'max-h-80!', typeof props.className === 'function' ? props.className(state) : props.className) }));
|
|
9
|
+
return (jsxRuntime.jsx(ScrollClosingPopover.ScrollClosingPopover, { placement: "bottom", containerPadding: 0, offset: 4, ...props, className: (state) => cx.cx('w-(--trigger-width)', listOption_styles.listOptionStyles.popover, state.isEntering && listOption_styles.listOptionStyles.popoverEntering, state.isExiting && listOption_styles.listOptionStyles.popoverExiting, props.size === 'sm' && 'max-h-56!', props.size === 'md' && 'max-h-64!', props.size === 'lg' && 'max-h-80!', typeof props.className === 'function' ? props.className(state) : props.className) }));
|
|
11
10
|
};
|
|
12
11
|
|
|
13
12
|
exports.Popover = Popover;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.cjs","sources":["../../../../../../src/components/molecules/Selects/Select/components/Popover.tsx"],"sourcesContent":[null],"names":["_jsx","ScrollClosingPopover","cx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Popover.cjs","sources":["../../../../../../src/components/molecules/Selects/Select/components/Popover.tsx"],"sourcesContent":[null],"names":["_jsx","ScrollClosingPopover","cx","listOptionStyles"],"mappings":";;;;;;;AAYO,MAAM,OAAO,GAAG,CAAC,KAAmB,KAAI;IAC7C,QACEA,eAACC,yCAAoB,EAAA,EACnB,SAAS,EAAC,QAAQ,EAClB,gBAAgB,EAAE,CAAC,EACnB,MAAM,EAAE,CAAC,EAAA,GACL,KAAK,EACT,SAAS,EAAE,CAAC,KAAK,KACfC,KAAE,CACA,qBAAqB,EACrBC,kCAAgB,CAAC,OAAO,EAExB,KAAK,CAAC,UAAU,IAAIA,kCAAgB,CAAC,eAAe,EACpD,KAAK,CAAC,SAAS,IAAIA,kCAAgB,CAAC,cAAc,EAElD,KAAK,CAAC,IAAI,KAAK,IAAI,IAAI,WAAW,EAClC,KAAK,CAAC,IAAI,KAAK,IAAI,IAAI,WAAW,EAClC,KAAK,CAAC,IAAI,KAAK,IAAI,IAAI,WAAW,EAElC,OAAO,KAAK,CAAC,SAAS,KAAK,UAAU,GAAG,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,SAAS,CACjF,EAAA,CAEH;AAEN;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../../../../src/components/molecules/Selects/Select/components/Popover.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../../../../src/components/molecules/Selects/Select/components/Popover.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAI9E,UAAU,YAAa,SAAQ,gBAAgB,EAAE,aAAa,CAAC,WAAW,CAAC;IACzE,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC1B;AAED,eAAO,MAAM,OAAO,GAAI,OAAO,YAAY,gCAwB1C,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
3
|
+
import { listOptionStyles } from '../../../../__internal__/listOption/listOption.styles.js';
|
|
3
4
|
import { ScrollClosingPopover } from '../../../../__internal__/popover/ScrollClosingPopover.js';
|
|
4
5
|
|
|
5
6
|
const Popover = (props) => {
|
|
6
|
-
return (jsx(ScrollClosingPopover, { placement: "bottom", containerPadding: 0, offset: 4, ...props, className: (state) => cx('w-(--trigger-width)
|
|
7
|
-
'duration-150 ease-out animate-in fade-in placement-right:slide-in-from-left-0.5 placement-top:slide-in-from-bottom-0.5 placement-bottom:slide-in-from-top-0.5', state.isExiting &&
|
|
8
|
-
'duration-100 ease-in animate-out fade-out placement-right:slide-out-to-left-0.5 placement-top:slide-out-to-bottom-0.5 placement-bottom:slide-out-to-top-0.5', props.size === 'sm' && 'max-h-56!', props.size === 'md' && 'max-h-64!', props.size === 'lg' && 'max-h-80!', typeof props.className === 'function' ? props.className(state) : props.className) }));
|
|
7
|
+
return (jsx(ScrollClosingPopover, { placement: "bottom", containerPadding: 0, offset: 4, ...props, className: (state) => cx('w-(--trigger-width)', listOptionStyles.popover, state.isEntering && listOptionStyles.popoverEntering, state.isExiting && listOptionStyles.popoverExiting, props.size === 'sm' && 'max-h-56!', props.size === 'md' && 'max-h-64!', props.size === 'lg' && 'max-h-80!', typeof props.className === 'function' ? props.className(state) : props.className) }));
|
|
9
8
|
};
|
|
10
9
|
|
|
11
10
|
export { Popover };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.js","sources":["../../../../../../src/components/molecules/Selects/Select/components/Popover.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Popover.js","sources":["../../../../../../src/components/molecules/Selects/Select/components/Popover.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;AAYO,MAAM,OAAO,GAAG,CAAC,KAAmB,KAAI;IAC7C,QACEA,IAAC,oBAAoB,EAAA,EACnB,SAAS,EAAC,QAAQ,EAClB,gBAAgB,EAAE,CAAC,EACnB,MAAM,EAAE,CAAC,EAAA,GACL,KAAK,EACT,SAAS,EAAE,CAAC,KAAK,KACf,EAAE,CACA,qBAAqB,EACrB,gBAAgB,CAAC,OAAO,EAExB,KAAK,CAAC,UAAU,IAAI,gBAAgB,CAAC,eAAe,EACpD,KAAK,CAAC,SAAS,IAAI,gBAAgB,CAAC,cAAc,EAElD,KAAK,CAAC,IAAI,KAAK,IAAI,IAAI,WAAW,EAClC,KAAK,CAAC,IAAI,KAAK,IAAI,IAAI,WAAW,EAClC,KAAK,CAAC,IAAI,KAAK,IAAI,IAAI,WAAW,EAElC,OAAO,KAAK,CAAC,SAAS,KAAK,UAAU,GAAG,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,SAAS,CACjF,EAAA,CAEH;AAEN;;"}
|
|
@@ -8,6 +8,7 @@ var cx = require('@flipdish/ui-library/utilities/cx');
|
|
|
8
8
|
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
9
9
|
var React = require('react');
|
|
10
10
|
var reactAriaComponents = require('react-aria-components');
|
|
11
|
+
var listOption_styles = require('../../../__internal__/listOption/listOption.styles.cjs');
|
|
11
12
|
var componentGuard_utils = require('../../../../utilities/__internal__/componentGuardUtils/componentGuard.utils.cjs');
|
|
12
13
|
var Select_context = require('../providers/Select.context.cjs');
|
|
13
14
|
|
|
@@ -64,7 +65,7 @@ const SelectItem = ({ label, id, value, avatarUrl, supportingText, isDisabled, i
|
|
|
64
65
|
supportingText,
|
|
65
66
|
isDisabled,
|
|
66
67
|
icon: Icon,
|
|
67
|
-
}, textValue: textValue, isDisabled: isDisabled, ...props, className: (state) => cx.cx(
|
|
68
|
+
}, textValue: textValue, isDisabled: isDisabled, ...props, className: (state) => cx.cx(listOption_styles.listOptionStyles.item, size === 'sm' ? 'px-1' : 'px-1.5', typeof className === 'function' ? className(state) : className), children: (state) => (jsxRuntime.jsxs("div", { className: cx.cx(listOption_styles.listOptionStyles.row, (state.isFocused || state.isHovered || (state.isSelected && selectionIndicator !== 'checkbox')) && listOption_styles.listOptionStyles.rowActive, state.isDisabled && listOption_styles.listOptionStyles.rowDisabled, state.isFocusVisible && listOption_styles.listOptionStyles.rowFocusVisible,
|
|
68
69
|
// Icon styles
|
|
69
70
|
'*:data-icon:shrink-0 *:data-icon:text-fg-quaternary', sizes[size].root), children: [isLeft && selectionIndicator === 'checkbox' && (jsxRuntime.jsx(Checkboxes.CheckboxBase, { size: sizes[size].checkbox, isSelected: state.isSelected, isDisabled: state.isDisabled })), renderLeading(), jsxRuntime.jsxs("div", { className: cx.cx('flex w-full min-w-0 flex-1 flex-wrap', sizes[size].textContainer), children: [jsxRuntime.jsx(reactAriaComponents.Text, { slot: "label", className: cx.cx('truncate font-medium whitespace-nowrap text-primary', sizes[size].text), children: label || (typeof children === 'function' ? children(state) : children) }), supportingText && (jsxRuntime.jsx(reactAriaComponents.Text, { slot: "description", className: cx.cx('whitespace-nowrap text-tertiary', sizes[size].text), children: supportingText }))] }), state.isSelected && selectionIndicator === 'checkmark' && (jsxRuntime.jsx(uiIcons.Check, { "aria-hidden": "true", className: cx.cx('ml-auto text-fg-brand-primary', sizes[size].check) })), !isLeft && selectionIndicator === 'checkbox' && (jsxRuntime.jsx(Checkboxes.CheckboxBase, { size: sizes[size].checkbox, isSelected: state.isSelected, isDisabled: state.isDisabled, className: "ml-auto" }))] })) }));
|
|
70
71
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectItem.cjs","sources":["../../../../../src/components/molecules/Selects/components/SelectItem.tsx"],"sourcesContent":[null],"names":["_jsx","useContext","SelectContext","joinTestId","slugifyTestId","Avatar","cx","isReactComponent","isValidElement","AriaListBoxItem","_jsxs","CheckboxBase","AriaText","Check"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SelectItem.cjs","sources":["../../../../../src/components/molecules/Selects/components/SelectItem.tsx"],"sourcesContent":[null],"names":["_jsx","useContext","SelectContext","joinTestId","slugifyTestId","Avatar","cx","isReactComponent","isValidElement","AriaListBoxItem","listOptionStyles","_jsxs","CheckboxBase","AriaText","Check"],"mappings":";;;;;;;;;;;;;;AAeA,MAAM,KAAK,GAAG;AACZ,IAAA,EAAE,EAAE;AACF,QAAA,IAAI,EAAE,iEAAiE;AACvE,QAAA,IAAI,EAAE,SAAS;AACf,QAAA,aAAa,EAAE,WAAW;AAC1B,QAAA,KAAK,EAAE,wBAAwB;AAC/B,QAAA,QAAQ,EAAE,IAAa;AACxB,KAAA;AACD,IAAA,EAAE,EAAE;AACF,QAAA,IAAI,EAAE,qCAAqC;AAC3C,QAAA,IAAI,EAAE,SAAS;AACf,QAAA,aAAa,EAAE,SAAS;AACxB,QAAA,KAA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AK,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,SAAS,EAAC,SAAS,EAAA,CAAG,CAC7H,CAAA,EAAA,CACG,CACP,EAAA,CACe;AAEtB;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Selects/components/SelectItem.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,gBAAgB,IAAI,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"SelectItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Selects/components/SelectItem.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,gBAAgB,IAAI,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAKtF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AA0BvD,UAAU,eAAgB,SAAQ,IAAI,CAAC,oBAAoB,CAAC,cAAc,CAAC,EAAE,IAAI,CAAC,EAAE,cAAc;IAChG,2DAA2D;IAC3D,kBAAkB,CAAC,EAAE,WAAW,GAAG,UAAU,GAAG,MAAM,CAAC;IACvD,gDAAgD;IAChD,uBAAuB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3C,4FAA4F;IAC5F,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAAI,MAAM,cAAc,gCAA6B,CAAC;AAEnF,eAAO,MAAM,UAAU,GAAI,gLAcxB,eAAe,gCAmFjB,CAAC"}
|
|
@@ -6,6 +6,7 @@ import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
|
6
6
|
import { joinTestId, slugifyTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
7
7
|
import { useContext, isValidElement } from 'react';
|
|
8
8
|
import { ListBoxItem, Text } from 'react-aria-components';
|
|
9
|
+
import { listOptionStyles } from '../../../__internal__/listOption/listOption.styles.js';
|
|
9
10
|
import { isReactComponent } from '../../../../utilities/__internal__/componentGuardUtils/componentGuard.utils.js';
|
|
10
11
|
import { SelectContext } from '../providers/Select.context.js';
|
|
11
12
|
|
|
@@ -62,7 +63,7 @@ const SelectItem = ({ label, id, value, avatarUrl, supportingText, isDisabled, i
|
|
|
62
63
|
supportingText,
|
|
63
64
|
isDisabled,
|
|
64
65
|
icon: Icon,
|
|
65
|
-
}, textValue: textValue, isDisabled: isDisabled, ...props, className: (state) => cx(
|
|
66
|
+
}, textValue: textValue, isDisabled: isDisabled, ...props, className: (state) => cx(listOptionStyles.item, size === 'sm' ? 'px-1' : 'px-1.5', typeof className === 'function' ? className(state) : className), children: (state) => (jsxs("div", { className: cx(listOptionStyles.row, (state.isFocused || state.isHovered || (state.isSelected && selectionIndicator !== 'checkbox')) && listOptionStyles.rowActive, state.isDisabled && listOptionStyles.rowDisabled, state.isFocusVisible && listOptionStyles.rowFocusVisible,
|
|
66
67
|
// Icon styles
|
|
67
68
|
'*:data-icon:shrink-0 *:data-icon:text-fg-quaternary', sizes[size].root), children: [isLeft && selectionIndicator === 'checkbox' && (jsx(CheckboxBase, { size: sizes[size].checkbox, isSelected: state.isSelected, isDisabled: state.isDisabled })), renderLeading(), jsxs("div", { className: cx('flex w-full min-w-0 flex-1 flex-wrap', sizes[size].textContainer), children: [jsx(Text, { slot: "label", className: cx('truncate font-medium whitespace-nowrap text-primary', sizes[size].text), children: label || (typeof children === 'function' ? children(state) : children) }), supportingText && (jsx(Text, { slot: "description", className: cx('whitespace-nowrap text-tertiary', sizes[size].text), children: supportingText }))] }), state.isSelected && selectionIndicator === 'checkmark' && (jsx(Check, { "aria-hidden": "true", className: cx('ml-auto text-fg-brand-primary', sizes[size].check) })), !isLeft && selectionIndicator === 'checkbox' && (jsx(CheckboxBase, { size: sizes[size].checkbox, isSelected: state.isSelected, isDisabled: state.isDisabled, className: "ml-auto" }))] })) }));
|
|
68
69
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectItem.js","sources":["../../../../../src/components/molecules/Selects/components/SelectItem.tsx"],"sourcesContent":[null],"names":["_jsx","AriaListBoxItem","_jsxs","AriaText"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SelectItem.js","sources":["../../../../../src/components/molecules/Selects/components/SelectItem.tsx"],"sourcesContent":[null],"names":["_jsx","AriaListBoxItem","_jsxs","AriaText"],"mappings":";;;;;;;;;;;;AAeA,MAAM,KAAK,GAAG;AACZ,IAAA,EAAE,EAAE;AACF,QAAA,IAAI,EAAE,iEAAiE;AACvE,QAAA,IAAI,EAAE,SAAS;AACf,QAAA,aAAa,EAAE,WAAW;AAC1B,QAAA,KAAK,EAAE,wBAAwB;AAC/B,QAAA,QAAQ,EAAE,IAAa;AACxB,KAAA;AACD,IAAA,EAAE,EAAE;AACF,QAAA,IAAI,EAAE,qCAAqC;AAC3C,QAAA,IAAI,EAAE,SAAS;AACf,QAAA,aAAa,EAAE,SAAS;AACxB,QAAA,KAAK,EAAE,QAAQ;AACf,QAAA,QAAQ,EAAE,IAAa;AACxB,KAAA;AACD,IAAA,EAAE,EAAE;AACF,QAAA,IAAI,EAAE,qCAAqC;AAC3C,QAAA,IAAI,EAAE,SAAS;AACf,QAAA,aAAa,EAAE,SAAS;AACxB,QAAA,KAAK,EAAE,QAAQ;AACf,QAAA,QAAQ,EAAE,IAAa;AACxB,KAAA;CACF;AAWD;;;;;AAKG;AACI,MAAM,gBAAgB,GAAG,CAAC,IAAoB,KAAKA,GAAA,CAAC,UAAU,EAAA,EAAA,GAAK,IAAI;AAEvE,MAAM,UAAU,GAAG,CAAC,EACzB,KAAK,EACL,EAAE,EACF,KAAK,EACL,SAAS,EACT,cAAc,EACd,UAAU,EACV,IAAI,EAAE,IAAI,EACV,SAAS,EACT,QAAQ,EACR,kBAAkB,GAAG,WAAW,EAChC,uBAAuB,G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,CAAC,qDAAqD,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAA,QAAA,EAC1G,KAAK,KAAK,OAAO,QAAQ,KAAK,UAAU,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,EAAA,CAC9D,EAEV,cAAc,KACbH,GAAA,CAACG,IAAQ,IAAC,IAAI,EAAC,aAAa,EAAC,SAAS,EAAE,EAAE,CAAC,iCAAiC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAA,QAAA,EAC5F,cAAc,EAAA,CACN,CACZ,IACG,EAEL,KAAK,CAAC,UAAU,IAAI,kBAAkB,KAAK,WAAW,KACrDH,GAAA,CAAC,KAAK,mBAAa,MAAM,EAAC,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAI,CAChG,EAEA,CAAC,MAAM,IAAI,kBAAkB,KAAK,UAAU,KAC3CA,GAAA,CAAC,YAAY,IAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,SAAS,EAAC,SAAS,EAAA,CAAG,CAC7H,CAAA,EAAA,CACG,CACP,EAAA,CACe;AAEtB;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `PhoneInput` has no React Native implementation.
|
|
3
|
+
*
|
|
4
|
+
* This is a generated types-only stub (scripts/emit-native-stubs.mjs). It exists so
|
|
5
|
+
* that importing `@flipdish/ui-library/components/atoms/PhoneInput` from React Native fails at
|
|
6
|
+
* compile time rather than resolving to the web build's types. There is no
|
|
7
|
+
* matching `index.js`, so Metro cannot bundle this module either.
|
|
8
|
+
*
|
|
9
|
+
* To make `PhoneInput` available on React Native, add an `index.native.tsx` beside
|
|
10
|
+
* its `index.tsx` — the build picks it up automatically and this stub disappears.
|
|
11
|
+
*/
|
|
12
|
+
export declare const __NO_REACT_NATIVE_IMPLEMENTATION__: never;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `FormPhoneInput` has no React Native implementation.
|
|
3
|
+
*
|
|
4
|
+
* This is a generated types-only stub (scripts/emit-native-stubs.mjs). It exists so
|
|
5
|
+
* that importing `@flipdish/ui-library/components/forms/fields/FormPhoneInput` from React Native fails at
|
|
6
|
+
* compile time rather than resolving to the web build's types. There is no
|
|
7
|
+
* matching `index.js`, so Metro cannot bundle this module either.
|
|
8
|
+
*
|
|
9
|
+
* To make `FormPhoneInput` available on React Native, add an `index.native.tsx` beside
|
|
10
|
+
* its `index.tsx` — the build picks it up automatically and this stub disappears.
|
|
11
|
+
*/
|
|
12
|
+
export declare const __NO_REACT_NATIVE_IMPLEMENTATION__: never;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `phoneNumber` has no React Native implementation.
|
|
3
|
+
*
|
|
4
|
+
* This is a generated types-only stub (scripts/emit-native-stubs.mjs). It exists so
|
|
5
|
+
* that importing `@flipdish/ui-library/components/forms/validation/phoneNumber` from React Native fails at
|
|
6
|
+
* compile time rather than resolving to the web build's types. There is no
|
|
7
|
+
* matching `index.js`, so Metro cannot bundle this module either.
|
|
8
|
+
*
|
|
9
|
+
* To make `phoneNumber` available on React Native, add an `index.native.tsx` beside
|
|
10
|
+
* its `index.tsx` — the build picks it up automatically and this stub disappears.
|
|
11
|
+
*/
|
|
12
|
+
export declare const __NO_REACT_NATIVE_IMPLEMENTATION__: never;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flipdish/ui-library",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.64.0",
|
|
4
4
|
"description": "Flipdish Design System — atomic-design component library (Tailwind v4 + UntitledUI + React Aria).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"imports": {
|
|
@@ -147,6 +147,7 @@
|
|
|
147
147
|
"embla-carousel-react": "^8.6.0",
|
|
148
148
|
"hast-util-to-jsx-runtime": "^2.3.6",
|
|
149
149
|
"input-otp": "^1.4.2",
|
|
150
|
+
"libphonenumber-js": "^1.13.0",
|
|
150
151
|
"lightningcss": ">=1.27.0 <1.33.1",
|
|
151
152
|
"motion": "^12.40.0",
|
|
152
153
|
"nativewind": "^5.0.0-rc.0",
|
|
@@ -213,6 +214,9 @@
|
|
|
213
214
|
"input-otp": {
|
|
214
215
|
"optional": true
|
|
215
216
|
},
|
|
217
|
+
"libphonenumber-js": {
|
|
218
|
+
"optional": true
|
|
219
|
+
},
|
|
216
220
|
"lightningcss": {
|
|
217
221
|
"optional": true
|
|
218
222
|
},
|
|
@@ -296,6 +300,7 @@
|
|
|
296
300
|
"embla-carousel-react": "^8.6.0",
|
|
297
301
|
"hast-util-to-jsx-runtime": "^2.3.6",
|
|
298
302
|
"input-otp": "^1.4.2",
|
|
303
|
+
"libphonenumber-js": "^1.13.17",
|
|
299
304
|
"jsdom": "^29.1.1",
|
|
300
305
|
"motion": "^12.40.0",
|
|
301
306
|
"nativewind": "^5.0.0-rc.0",
|