@flipdish/ui-library 0.4.1 → 0.4.3
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 +9 -47
- package/dist/components/atoms/Avatar/components/avatar-label-group.d.ts +1 -1
- package/dist/components/atoms/Avatar/components/avatar-label-group.d.ts.map +1 -1
- package/dist/components/atoms/RatingBadge/index.d.ts +1 -1
- package/dist/components/atoms/RatingBadge/index.d.ts.map +1 -1
- package/dist/components/molecules/Alert/index.cjs +10 -0
- package/dist/components/molecules/Alert/index.cjs.map +1 -1
- package/dist/components/molecules/Alert/index.d.ts +11 -1
- package/dist/components/molecules/Alert/index.d.ts.map +1 -1
- package/dist/components/molecules/Alert/index.js +10 -0
- package/dist/components/molecules/Alert/index.js.map +1 -1
- package/dist/components/molecules/BadgeGroup/index.cjs +6 -0
- package/dist/components/molecules/BadgeGroup/index.cjs.map +1 -1
- package/dist/components/molecules/BadgeGroup/index.d.ts +7 -1
- package/dist/components/molecules/BadgeGroup/index.d.ts.map +1 -1
- package/dist/components/molecules/BadgeGroup/index.js +6 -0
- package/dist/components/molecules/BadgeGroup/index.js.map +1 -1
- package/dist/components/molecules/Breadcrumbs/index.cjs +6 -0
- package/dist/components/molecules/Breadcrumbs/index.cjs.map +1 -1
- package/dist/components/molecules/Breadcrumbs/index.d.ts +7 -1
- package/dist/components/molecules/Breadcrumbs/index.d.ts.map +1 -1
- package/dist/components/molecules/Breadcrumbs/index.js +6 -0
- package/dist/components/molecules/Breadcrumbs/index.js.map +1 -1
- package/dist/components/molecules/ButtonGroup/index.d.ts +1 -1
- package/dist/components/molecules/ButtonGroup/index.d.ts.map +1 -1
- package/dist/components/molecules/Carousel/index.cjs +16 -2
- package/dist/components/molecules/Carousel/index.cjs.map +1 -1
- package/dist/components/molecules/Carousel/index.d.ts +14 -0
- package/dist/components/molecules/Carousel/index.d.ts.map +1 -1
- package/dist/components/molecules/Carousel/index.js +16 -2
- package/dist/components/molecules/Carousel/index.js.map +1 -1
- package/dist/components/molecules/CodeSnippet/index.cjs +4 -5
- package/dist/components/molecules/CodeSnippet/index.cjs.map +1 -1
- package/dist/components/molecules/CodeSnippet/index.d.ts +2 -3
- package/dist/components/molecules/CodeSnippet/index.d.ts.map +1 -1
- package/dist/components/molecules/CodeSnippet/index.js +4 -5
- package/dist/components/molecules/CodeSnippet/index.js.map +1 -1
- package/dist/components/molecules/ContentDivider/index.cjs +6 -0
- package/dist/components/molecules/ContentDivider/index.cjs.map +1 -1
- package/dist/components/molecules/ContentDivider/index.d.ts +7 -2
- package/dist/components/molecules/ContentDivider/index.d.ts.map +1 -1
- package/dist/components/molecules/ContentDivider/index.js +6 -0
- package/dist/components/molecules/ContentDivider/index.js.map +1 -1
- package/dist/components/molecules/CreditCard/index.cjs +6 -0
- package/dist/components/molecules/CreditCard/index.cjs.map +1 -1
- package/dist/components/molecules/CreditCard/index.d.ts +7 -1
- package/dist/components/molecules/CreditCard/index.d.ts.map +1 -1
- package/dist/components/molecules/CreditCard/index.js +6 -0
- package/dist/components/molecules/CreditCard/index.js.map +1 -1
- package/dist/components/molecules/Dropdown/index.cjs +4 -3
- package/dist/components/molecules/Dropdown/index.cjs.map +1 -1
- package/dist/components/molecules/Dropdown/index.d.ts +5 -4
- package/dist/components/molecules/Dropdown/index.d.ts.map +1 -1
- package/dist/components/molecules/Dropdown/index.js +4 -3
- package/dist/components/molecules/Dropdown/index.js.map +1 -1
- package/dist/components/molecules/EmptyState/index.cjs +13 -1
- package/dist/components/molecules/EmptyState/index.cjs.map +1 -1
- package/dist/components/molecules/EmptyState/index.d.ts +6 -6
- package/dist/components/molecules/EmptyState/index.d.ts.map +1 -1
- package/dist/components/molecules/EmptyState/index.js +13 -1
- package/dist/components/molecules/EmptyState/index.js.map +1 -1
- package/dist/components/molecules/Modal/index.cjs +7 -0
- package/dist/components/molecules/Modal/index.cjs.map +1 -1
- package/dist/components/molecules/Modal/index.d.ts +7 -0
- package/dist/components/molecules/Modal/index.d.ts.map +1 -1
- package/dist/components/molecules/Modal/index.js +7 -0
- package/dist/components/molecules/Modal/index.js.map +1 -1
- package/dist/components/molecules/MultiSelect/index.d.ts +6 -0
- package/dist/components/molecules/MultiSelect/index.d.ts.map +1 -1
- package/dist/components/molecules/Notification/index.cjs +1 -1
- package/dist/components/molecules/Notification/index.cjs.map +1 -1
- package/dist/components/molecules/Notification/index.d.ts +1 -1
- package/dist/components/molecules/Notification/index.d.ts.map +1 -1
- package/dist/components/molecules/Notification/index.js +1 -1
- package/dist/components/molecules/Notification/index.js.map +1 -1
- package/dist/components/molecules/Pagination/index.cjs.map +1 -1
- package/dist/components/molecules/Pagination/index.d.ts +1 -1
- package/dist/components/molecules/Pagination/index.d.ts.map +1 -1
- package/dist/components/molecules/Pagination/index.js.map +1 -1
- package/dist/components/molecules/ProgressSteps/index.cjs +6 -0
- package/dist/components/molecules/ProgressSteps/index.cjs.map +1 -1
- package/dist/components/molecules/ProgressSteps/index.d.ts +6 -0
- package/dist/components/molecules/ProgressSteps/index.d.ts.map +1 -1
- package/dist/components/molecules/ProgressSteps/index.js +6 -0
- package/dist/components/molecules/ProgressSteps/index.js.map +1 -1
- package/dist/components/molecules/RadioGroup/components/radio-group-radio-button.cjs +6 -0
- package/dist/components/molecules/RadioGroup/components/radio-group-radio-button.cjs.map +1 -1
- package/dist/components/molecules/RadioGroup/components/radio-group-radio-button.d.ts +7 -2
- package/dist/components/molecules/RadioGroup/components/radio-group-radio-button.d.ts.map +1 -1
- package/dist/components/molecules/RadioGroup/components/radio-group-radio-button.js +6 -0
- package/dist/components/molecules/RadioGroup/components/radio-group-radio-button.js.map +1 -1
- package/dist/components/molecules/SectionFooter/index.cjs +9 -0
- package/dist/components/molecules/SectionFooter/index.cjs.map +1 -1
- package/dist/components/molecules/SectionFooter/index.d.ts +9 -0
- package/dist/components/molecules/SectionFooter/index.d.ts.map +1 -1
- package/dist/components/molecules/SectionFooter/index.js +9 -0
- package/dist/components/molecules/SectionFooter/index.js.map +1 -1
- package/dist/components/molecules/SectionHeader/index.cjs +6 -0
- package/dist/components/molecules/SectionHeader/index.cjs.map +1 -1
- package/dist/components/molecules/SectionHeader/index.d.ts +6 -0
- package/dist/components/molecules/SectionHeader/index.d.ts.map +1 -1
- package/dist/components/molecules/SectionHeader/index.js +6 -0
- package/dist/components/molecules/SectionHeader/index.js.map +1 -1
- package/dist/components/molecules/Select/components/multi-select.d.ts +4 -4
- package/dist/components/molecules/Select/components/multi-select.d.ts.map +1 -1
- package/dist/components/molecules/Select/index.d.ts +5 -0
- package/dist/components/molecules/Select/index.d.ts.map +1 -1
- package/dist/components/molecules/Tabs/index.cjs +6 -0
- package/dist/components/molecules/Tabs/index.cjs.map +1 -1
- package/dist/components/molecules/Tabs/index.d.ts +8 -2
- package/dist/components/molecules/Tabs/index.d.ts.map +1 -1
- package/dist/components/molecules/Tabs/index.js +6 -0
- package/dist/components/molecules/Tabs/index.js.map +1 -1
- package/dist/components/molecules/Tags/index.cjs +6 -0
- package/dist/components/molecules/Tags/index.cjs.map +1 -1
- package/dist/components/molecules/Tags/index.d.ts +7 -1
- package/dist/components/molecules/Tags/index.d.ts.map +1 -1
- package/dist/components/molecules/Tags/index.js +6 -0
- package/dist/components/molecules/Tags/index.js.map +1 -1
- package/dist/components/molecules/TextArea/index.cjs +6 -0
- package/dist/components/molecules/TextArea/index.cjs.map +1 -1
- package/dist/components/molecules/TextArea/index.d.ts +7 -1
- package/dist/components/molecules/TextArea/index.d.ts.map +1 -1
- package/dist/components/molecules/TextArea/index.js +6 -0
- package/dist/components/molecules/TextArea/index.js.map +1 -1
- package/dist/components/molecules/VerificationCodeInput/index.cjs +4 -4
- package/dist/components/molecules/VerificationCodeInput/index.cjs.map +1 -1
- package/dist/components/molecules/VerificationCodeInput/index.d.ts +1 -1
- package/dist/components/molecules/VerificationCodeInput/index.d.ts.map +1 -1
- package/dist/components/molecules/VerificationCodeInput/index.js +4 -4
- package/dist/components/molecules/VerificationCodeInput/index.js.map +1 -1
- package/dist/providers/UIProvider/index.cjs +29 -0
- package/dist/providers/UIProvider/index.cjs.map +1 -0
- package/dist/providers/UIProvider/index.d.ts +28 -0
- package/dist/providers/UIProvider/index.d.ts.map +1 -0
- package/dist/providers/UIProvider/index.js +27 -0
- package/dist/providers/UIProvider/index.js.map +1 -0
- package/dist/styles.css +125 -0
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@ export declare const TextAreaBase: {
|
|
|
8
8
|
({ className, size, ...props }: TextAreaBaseProps): import("react").JSX.Element;
|
|
9
9
|
displayName: string;
|
|
10
10
|
};
|
|
11
|
-
interface TextFieldProps extends AriaTextFieldProps {
|
|
11
|
+
export interface TextFieldProps extends AriaTextFieldProps {
|
|
12
12
|
/** Label text for the textarea */
|
|
13
13
|
label?: string;
|
|
14
14
|
/** Helper text displayed below the textarea */
|
|
@@ -32,6 +32,12 @@ interface TextFieldProps extends AriaTextFieldProps {
|
|
|
32
32
|
/** Visible width of textarea in columns. */
|
|
33
33
|
cols?: number;
|
|
34
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* A multi-line text field for collecting longer-form user input. Composes a
|
|
37
|
+
* label with optional tooltip, a resizable textarea, and optional hint text.
|
|
38
|
+
*
|
|
39
|
+
* @summary multi-line text field for collecting longer-form user input
|
|
40
|
+
*/
|
|
35
41
|
export declare const TextArea: {
|
|
36
42
|
({ label, hint, tooltip, textAreaRef, hideRequiredIndicator, textAreaClassName, placeholder, className, rows, cols, size, ...props }: TextFieldProps): import("react").JSX.Element;
|
|
37
43
|
displayName: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/TextArea/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAiB,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,IAAI,iBAAiB,EAAE,cAAc,IAAI,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAQt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EAAE,MAAM,CAAC;IACrB,2CAA2C;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,4CAA4C;IAC5C,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;GAKG;AACH,eAAO,MAAM,QAAQ;0IAalB,cAAc;;CA2BhB,CAAC"}
|
|
@@ -16,6 +16,12 @@ const TextAreaBase = ({ className, size = 'md', ...props }) => {
|
|
|
16
16
|
'[&::-webkit-resizer]:bg-(image:--resize-handle-bg) [&::-webkit-resizer]:bg-contain dark:[&::-webkit-resizer]:bg-(image:--resize-handle-bg-dark)', state.isFocused && !state.isDisabled && 'ring-2 ring-brand', state.isDisabled && 'cursor-not-allowed opacity-50', state.isInvalid && 'ring-error_subtle', state.isInvalid && state.isFocused && 'ring-2 ring-error', typeof className === 'function' ? className(state) : className) }));
|
|
17
17
|
};
|
|
18
18
|
TextAreaBase.displayName = 'TextAreaBase';
|
|
19
|
+
/**
|
|
20
|
+
* A multi-line text field for collecting longer-form user input. Composes a
|
|
21
|
+
* label with optional tooltip, a resizable textarea, and optional hint text.
|
|
22
|
+
*
|
|
23
|
+
* @summary multi-line text field for collecting longer-form user input
|
|
24
|
+
*/
|
|
19
25
|
const TextArea = ({ label, hint, tooltip, textAreaRef, hideRequiredIndicator, textAreaClassName, placeholder, className, rows, cols, size = 'md', ...props }) => {
|
|
20
26
|
return (jsx(TextField, { ...props, className: (state) => cx('group flex h-max w-full flex-col items-start justify-start gap-1.5', typeof className === 'function' ? className(state) : className), children: ({ isInvalid, isRequired }) => (jsxs(Fragment, { children: [label && (jsx(Label, { isRequired: hideRequiredIndicator ? !hideRequiredIndicator : isRequired, tooltip: tooltip, children: label })), jsx(TextAreaBase, { placeholder: placeholder, className: textAreaClassName, ref: textAreaRef, rows: rows, cols: cols, size: size }), hint && (jsx(HintText, { isInvalid: isInvalid, size: size, children: hint }))] })) }));
|
|
21
27
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/molecules/TextArea/index.tsx"],"sourcesContent":[null],"names":["_jsx","AriaTextArea","AriaTextField","_jsxs","_Fragment"],"mappings":";;;;;AAQA;AACA,MAAM,iBAAiB,GAAG,CAAC,KAAa,KAAI;IAC1C,OAAO,CAAA,8BAAA,EAAiC,IAAI,CAAC,CAAA,4HAAA,EAA+H,KAAK,0DAA0D,KAAK,CAAA,gCAAA,CAAkC,CAAC,CAAA,CAAA,CAAG;AACxR,CAAC;AAOM,MAAM,YAAY,GAAG,CAAC,EAAE,SAAS,EAAE,IAAI,GAAG,IAAI,EAAE,GAAG,KAAK,EAAqB,KAAI;AACtF,IAAA,QACEA,GAAA,CAACC,UAAY,OACP,KAAK,EACT,KAAK,EACH;AACE,YAAA,oBAAoB,EAAE,iBAAiB,CAAC,SAAS,CAAC;AAClD,YAAA,yBAAyB,EAAE,iBAAiB,CAAC,SAAS,CAAC;SACvC,EAEpB,SAAS,EAAE,CAAC,KAAK,KACf,EAAE,CACA,gOAAgO,EAEhO,IAAI,KAAK,IAAI,IAAI,aAAa,EAC9B,IAAI,KAAK,IAAI,IAAI,qBAAqB;;QAGtC,iJAAiJ,EAEjJ,KAAK,CAAC,SAAS,IAAI,CAAC,KAAK,CAAC,UAAU,IAAI,mBAAmB,EAC3D,KAAK,CAAC,UAAU,IAAI,+BAA+B,EACnD,KAAK,CAAC,SAAS,IAAI,mBAAmB,EACtC,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,SAAS,IAAI,mBAAmB,EAEzD,OAAO,SAAS,KAAK,UAAU,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,SAAS,CAC/D,EAAA,CAEH;AAEN;AAEA,YAAY,CAAC,WAAW,GAAG,cAAc;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/molecules/TextArea/index.tsx"],"sourcesContent":[null],"names":["_jsx","AriaTextArea","AriaTextField","_jsxs","_Fragment"],"mappings":";;;;;AAQA;AACA,MAAM,iBAAiB,GAAG,CAAC,K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,CAAC,oEAAoE,EAAE,OAAO,SAAS,KAAK,UAAU,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,EAAA,QAAA,EAGzI,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,MACzBC,IAAA,CAAAC,QAAA,EAAA,EAAA,QAAA,EAAA,CACG,KAAK,KACJJ,GAAA,CAAC,KAAK,EAAA,EAAC,UAAU,EAAE,qBAAqB,GAAG,CAAC,qBAAqB,GAAG,UAAU,EAAE,OAAO,EAAE,OAAO,EAAA,QAAA,EAC7F,KAAK,EAAA,CACA,CACT,EAEDA,GAAA,CAAC,YAAY,EAAA,EAAC,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,iBAAiB,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAA,CAAI,EAE7H,IAAI,KACHA,GAAA,CAAC,QAAQ,EAAA,EAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAA,QAAA,EACvC,IAAI,EAAA,CACI,CACZ,CAAA,EAAA,CACA,CACJ,EAAA,CACa;AAEpB;AAEA,QAAQ,CAAC,WAAW,GAAG,UAAU;;;;"}
|
|
@@ -34,7 +34,7 @@ const styles = {
|
|
|
34
34
|
};
|
|
35
35
|
const Group = ({ inputClassName, containerClassName, width, maxLength = 4, ...props }) => {
|
|
36
36
|
const { id, size, disabled } = usePinInputContext();
|
|
37
|
-
return (jsxRuntime.jsx(inputOtp.OTPInput, { ...props, size: width, maxLength: maxLength, disabled: disabled, id:
|
|
37
|
+
return (jsxRuntime.jsx(inputOtp.OTPInput, { ...props, size: width, maxLength: maxLength, disabled: disabled, id: `pin-input-${id}`, "aria-label": "Enter your pin", "aria-labelledby": `pin-input-label-${id}`, "aria-describedby": `pin-input-description-${id}`, containerClassName: cx.cx('flex flex-row', styles[size].group, containerClassName), className: cx.cx('disabled:cursor-not-allowed', inputClassName) }));
|
|
38
38
|
};
|
|
39
39
|
Group.displayName = 'Group';
|
|
40
40
|
const Slot = ({ index, className, ...props }) => {
|
|
@@ -43,7 +43,7 @@ const Slot = ({ index, className, ...props }) => {
|
|
|
43
43
|
const slot = slots[index];
|
|
44
44
|
return (
|
|
45
45
|
// biome-ignore lint/a11y/useAriaPropsSupportedByRole: this is a custom component
|
|
46
|
-
jsxRuntime.jsx("div", { ...props, "aria-invalid": invalid, "aria-label":
|
|
46
|
+
jsxRuntime.jsx("div", { ...props, "aria-invalid": invalid, "aria-label": `Enter digit ${index + 1} of ${slots.length}`, className: cx.cx('relative flex items-center justify-center rounded-xl bg-primary text-center text-placeholder/40 shadow-xs ring-1 ring-primary transition-[box-shadow,background-color] duration-100 ease-linear ring-inset', styles[size].slot, isFocused && slot?.isActive && 'ring-2 ring-brand outline-2 outline-offset-2 outline-brand', slot?.char && 'text-brand-tertiary_alt ring-2 ring-brand', disabled && 'opacity-50', invalid && 'text-error-primary ring-error_subtle', className), children: slot?.char ? slot.char : slot?.hasFakeCaret ? jsxRuntime.jsx(FakeCaret, { size: size }) : 0 }));
|
|
47
47
|
};
|
|
48
48
|
Slot.displayName = 'Slot';
|
|
49
49
|
const FakeCaret = ({ size = 'md' }) => {
|
|
@@ -59,13 +59,13 @@ const Separator = (props) => {
|
|
|
59
59
|
Separator.displayName = 'Separator';
|
|
60
60
|
const Label = (props) => {
|
|
61
61
|
const { id } = usePinInputContext();
|
|
62
|
-
return jsxRuntime.jsx(Input.Label, { ...props, htmlFor:
|
|
62
|
+
return jsxRuntime.jsx(Input.Label, { ...props, htmlFor: `pin-input-${id}`, id: `pin-input-label-${id}` });
|
|
63
63
|
};
|
|
64
64
|
Label.displayName = 'Label';
|
|
65
65
|
const Description = (props) => {
|
|
66
66
|
const { id, size } = usePinInputContext();
|
|
67
67
|
// biome-ignore lint/a11y/useValidAriaRole: this is a description
|
|
68
|
-
return jsxRuntime.jsx(Input.HintText, { ...props, id:
|
|
68
|
+
return jsxRuntime.jsx(Input.HintText, { ...props, id: `pin-input-description-${id}`, role: "description", className: cx.cx(size === 'xxxs' && 'text-xs') });
|
|
69
69
|
};
|
|
70
70
|
Description.displayName = 'Description';
|
|
71
71
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../src/components/molecules/VerificationCodeInput/index.tsx"],"sourcesContent":[null],"names":["createContext","useContext","useId","_jsx","cx","OTPInput","OTPInputContext","LabelBase","HintText"],"mappings":";;;;;;;;AAiBA,MAAM,eAAe,GAAGA,mBAAa,CAAsB;AACzD,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,QAAQ,EAAE,KAAK;AACf,IAAA,OAAO,EAAE,KAAK;AACf,CAAA,CAAC;AAEK,MAAM,kBAAkB,GAAG,MAAK;AACrC,IAAA,MAAM,OAAO,GAAGC,gBAAU,CAAC,eAAe,CAAC;IAE3C,IAAI,CAAC,OAAO,EAAE;AACZ,QAAA,MAAM,IAAI,KAAK,CAAC,oEAAoE,CAAC;IACvF;AAEA,IAAA,OAAO,OAAO;AAChB;AAQA,MAAM,IAAI,GAAG,CAAC,EAAE,SAAS,EAAE,IAAI,GAAG,IAAI,EAAE,QAAQ,GAAG,KAAK,EAAE,OAAO,GAAG,KAAK,EAAE,GAAG,KAAK,EAAa,KAAI;AAClG,IAAA,MAAM,EAAE,GAAGC,WAAK,EAAE;AAElB,IAAA,QACEC,cAAA,CAAC,eAAe,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE,EAAA,QAAA,EAE9DA,cAAA,CAAA,KAAA,EAAA,EAAK,IAAI,EAAC,OAAO,EAAC,SAAS,EAAEC,KAAE,CAAC,6BAA6B,EAAE,SAAS,CAAC,EAAA,GAAM,KAAK,EAAA,CAAI,EAAA,CAC/D;AAE/B,CAAC;AACD,IAAI,CAAC,WAAW,GAAG,MAAM;AAEzB,MAAM,MAAM,GAAG;AACb,IAAA,IAAI,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,qEAAqE,EAAE,KAAK,EAAE,qBAAqB,EAAE;AACzI,IAAA,GAAG,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,sEAAsE,EAAE,KAAK,EAAE,qBAAqB,EAAE;AACxI,IAAA,EAAE,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,0EAA0E,EAAE,KAAK,EAAE,qBAAqB,EAAE;AAC3I,IAAA,EAAE,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,iDAAiD,EAAE,KAAK,EAAE,6BAA6B,EAAE;AAC5H,IAAA,EAAE,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,iDAAiD,EAAE,KAAK,EAAE,6BAA6B,EAAE;AAC5H,IAAA,EAAE,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,+CAA+C,EAAE,KAAK,EAAE,6BAA6B,EAAE;CAC3H;AAOD,MAAM,KAAK,GAAG,CAAC,EAAE,cAAc,EAAE,kBAAkB,EAAE,KAAK,EAAE,SAAS,GAAG,CAAC,EAAE,GAAG,KAAK,EAAc,KAAI;IACnG,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,kBAAkB,EAAE;AAEnD,IAAA,QACED,cAAA,CAACE,iBAAQ,EAAA,EAAA,GACH,KAAK,EACT,IAAI,EAAE,KAAK,EACX,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../src/components/molecules/VerificationCodeInput/index.tsx"],"sourcesContent":[null],"names":["createContext","useContext","useId","_jsx","cx","OTPInput","OTPInputContext","LabelBase","HintText"],"mappings":";;;;;;;;AAiBA,MAAM,eAAe,GAAGA,mBAAa,CAAsB;AACzD,IAAA,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AAC,WAAW,GAAG,WAAW;AAEnC,MAAM,KAAK,GAAG,CAAC,KAA8C,KAAI;AAC/D,IAAA,MAAM,EAAE,EAAE,EAAE,GAAG,kBAAkB,EAAE;AAEnC,IAAA,OAAOD,eAACI,WAAS,EAAA,EAAA,GAAK,KAAK,EAAE,OAAO,EAAE,CAAA,UAAA,EAAa,EAAE,CAAA,CAAE,EAAE,EAAE,EAAE,mBAAmB,EAAE,CAAA,CAAE,GAAI;AAC1F,CAAC;AACD,KAAK,CAAC,WAAW,GAAG,OAAO;AAE3B,MAAM,WAAW,GAAG,CAAC,KAA6C,KAAI;IACpE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,kBAAkB,EAAE;;IAGzC,OAAOJ,cAAA,CAACK,cAAQ,EAAA,EAAA,GAAK,KAAK,EAAE,EAAE,EAAE,CAAA,sBAAA,EAAyB,EAAE,CAAA,CAAE,EAAE,IAAI,EAAC,aAAa,EAAC,SAAS,EAAEJ,KAAE,CAAC,IAAI,KAAK,MAAM,IAAI,SAAS,CAAC,EAAA,CAAI;AACnI,CAAC;AACD,WAAW,CAAC,WAAW,GAAG,aAAa;AAEvC;;AAEG;AACH,MAAM,QAAQ,GAAG;AAOjB,QAAQ,CAAC,IAAI,GAAG,IAAI;AACpB,QAAQ,CAAC,KAAK,GAAG,KAAK;AACtB,QAAQ,CAAC,KAAK,GAAG,KAAK;AACtB,QAAQ,CAAC,SAAS,GAAG,SAAS;AAC9B,QAAQ,CAAC,WAAW,GAAG,WAAW;;;;;"}
|
|
@@ -9,7 +9,7 @@ type PinInputContextType = {
|
|
|
9
9
|
invalid: boolean;
|
|
10
10
|
};
|
|
11
11
|
export declare const usePinInputContext: () => PinInputContextType;
|
|
12
|
-
interface RootProps extends ComponentPropsWithRef<'div'> {
|
|
12
|
+
export interface RootProps extends ComponentPropsWithRef<'div'> {
|
|
13
13
|
size?: PinInputSize;
|
|
14
14
|
disabled?: boolean;
|
|
15
15
|
invalid?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/VerificationCodeInput/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,6CAA6C,CAAC;AAE3F,OAAO,EAAE,QAAQ,EAAmB,MAAM,WAAW,CAAC;AACtD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAGnD,KAAK,YAAY,GAAG,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE/D,KAAK,mBAAmB,GAAG;IACzB,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AASF,eAAO,MAAM,kBAAkB,2BAQ9B,CAAC;AAEF,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/VerificationCodeInput/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,6CAA6C,CAAC;AAE3F,OAAO,EAAE,QAAQ,EAAmB,MAAM,WAAW,CAAC;AACtD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAGnD,KAAK,YAAY,GAAG,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE/D,KAAK,mBAAmB,GAAG;IACzB,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AASF,eAAO,MAAM,kBAAkB,2BAQ9B,CAAC;AAEF,MAAM,WAAW,SAAU,SAAQ,qBAAqB,CAAC,KAAK,CAAC;IAC7D,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,QAAA,MAAM,IAAI;uDAA6E,SAAS;;CAS/F,CAAC;AAYF,KAAK,UAAU,GAAG,qBAAqB,CAAC,OAAO,QAAQ,CAAC,GAAG;IACzD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,QAAA,MAAM,KAAK;yEAA4E,UAAU;;CAiBhG,CAAC;AAGF,QAAA,MAAM,IAAI;qCAAoC,qBAAqB,CAAC,KAAK,CAAC,GAAG;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE;;CAyB7F,CAAC;AAOF,QAAA,MAAM,SAAS;YAAW,qBAAqB,CAAC,KAAK,CAAC;;CASrD,CAAC;AAGF,QAAA,MAAM,KAAK;YAAW,qBAAqB,CAAC,OAAO,SAAS,CAAC;;CAI5D,CAAC;AAGF,QAAA,MAAM,WAAW;YAAW,qBAAqB,CAAC,OAAO,QAAQ,CAAC;;CAKjE,CAAC;AAGF;;GAEG;AACH,QAAA,MAAM,QAAQ,EAAW,OAAO,IAAI,GAAG;IACrC,IAAI,EAAE,OAAO,IAAI,CAAC;IAClB,KAAK,EAAE,OAAO,KAAK,CAAC;IACpB,KAAK,EAAE,OAAO,KAAK,CAAC;IACpB,SAAS,EAAE,OAAO,SAAS,CAAC;IAC5B,WAAW,EAAE,OAAO,WAAW,CAAC;CACjC,CAAC;AAOF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -32,7 +32,7 @@ const styles = {
|
|
|
32
32
|
};
|
|
33
33
|
const Group = ({ inputClassName, containerClassName, width, maxLength = 4, ...props }) => {
|
|
34
34
|
const { id, size, disabled } = usePinInputContext();
|
|
35
|
-
return (jsx(OTPInput, { ...props, size: width, maxLength: maxLength, disabled: disabled, id:
|
|
35
|
+
return (jsx(OTPInput, { ...props, size: width, maxLength: maxLength, disabled: disabled, id: `pin-input-${id}`, "aria-label": "Enter your pin", "aria-labelledby": `pin-input-label-${id}`, "aria-describedby": `pin-input-description-${id}`, containerClassName: cx('flex flex-row', styles[size].group, containerClassName), className: cx('disabled:cursor-not-allowed', inputClassName) }));
|
|
36
36
|
};
|
|
37
37
|
Group.displayName = 'Group';
|
|
38
38
|
const Slot = ({ index, className, ...props }) => {
|
|
@@ -41,7 +41,7 @@ const Slot = ({ index, className, ...props }) => {
|
|
|
41
41
|
const slot = slots[index];
|
|
42
42
|
return (
|
|
43
43
|
// biome-ignore lint/a11y/useAriaPropsSupportedByRole: this is a custom component
|
|
44
|
-
jsx("div", { ...props, "aria-invalid": invalid, "aria-label":
|
|
44
|
+
jsx("div", { ...props, "aria-invalid": invalid, "aria-label": `Enter digit ${index + 1} of ${slots.length}`, className: cx('relative flex items-center justify-center rounded-xl bg-primary text-center text-placeholder/40 shadow-xs ring-1 ring-primary transition-[box-shadow,background-color] duration-100 ease-linear ring-inset', styles[size].slot, isFocused && slot?.isActive && 'ring-2 ring-brand outline-2 outline-offset-2 outline-brand', slot?.char && 'text-brand-tertiary_alt ring-2 ring-brand', disabled && 'opacity-50', invalid && 'text-error-primary ring-error_subtle', className), children: slot?.char ? slot.char : slot?.hasFakeCaret ? jsx(FakeCaret, { size: size }) : 0 }));
|
|
45
45
|
};
|
|
46
46
|
Slot.displayName = 'Slot';
|
|
47
47
|
const FakeCaret = ({ size = 'md' }) => {
|
|
@@ -57,13 +57,13 @@ const Separator = (props) => {
|
|
|
57
57
|
Separator.displayName = 'Separator';
|
|
58
58
|
const Label = (props) => {
|
|
59
59
|
const { id } = usePinInputContext();
|
|
60
|
-
return jsx(Label$1, { ...props, htmlFor:
|
|
60
|
+
return jsx(Label$1, { ...props, htmlFor: `pin-input-${id}`, id: `pin-input-label-${id}` });
|
|
61
61
|
};
|
|
62
62
|
Label.displayName = 'Label';
|
|
63
63
|
const Description = (props) => {
|
|
64
64
|
const { id, size } = usePinInputContext();
|
|
65
65
|
// biome-ignore lint/a11y/useValidAriaRole: this is a description
|
|
66
|
-
return jsx(HintText, { ...props, id:
|
|
66
|
+
return jsx(HintText, { ...props, id: `pin-input-description-${id}`, role: "description", className: cx(size === 'xxxs' && 'text-xs') });
|
|
67
67
|
};
|
|
68
68
|
Description.displayName = 'Description';
|
|
69
69
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/molecules/VerificationCodeInput/index.tsx"],"sourcesContent":[null],"names":["_jsx","LabelBase"],"mappings":";;;;;;AAiBA,MAAM,eAAe,GAAG,aAAa,CAAsB;AACzD,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,QAAQ,EAAE,KAAK;AACf,IAAA,OAAO,EAAE,KAAK;AACf,CAAA,CAAC;AAEK,MAAM,kBAAkB,GAAG,MAAK;AACrC,IAAA,MAAM,OAAO,GAAG,UAAU,CAAC,eAAe,CAAC;IAE3C,IAAI,CAAC,OAAO,EAAE;AACZ,QAAA,MAAM,IAAI,KAAK,CAAC,oEAAoE,CAAC;IACvF;AAEA,IAAA,OAAO,OAAO;AAChB;AAQA,MAAM,IAAI,GAAG,CAAC,EAAE,SAAS,EAAE,IAAI,GAAG,IAAI,EAAE,QAAQ,GAAG,KAAK,EAAE,OAAO,GAAG,KAAK,EAAE,GAAG,KAAK,EAAa,KAAI;AAClG,IAAA,MAAM,EAAE,GAAG,KAAK,EAAE;AAElB,IAAA,QACEA,GAAA,CAAC,eAAe,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE,EAAA,QAAA,EAE9DA,GAAA,CAAA,KAAA,EAAA,EAAK,IAAI,EAAC,OAAO,EAAC,SAAS,EAAE,EAAE,CAAC,6BAA6B,EAAE,SAAS,CAAC,EAAA,GAAM,KAAK,EAAA,CAAI,EAAA,CAC/D;AAE/B,CAAC;AACD,IAAI,CAAC,WAAW,GAAG,MAAM;AAEzB,MAAM,MAAM,GAAG;AACb,IAAA,IAAI,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,qEAAqE,EAAE,KAAK,EAAE,qBAAqB,EAAE;AACzI,IAAA,GAAG,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,sEAAsE,EAAE,KAAK,EAAE,qBAAqB,EAAE;AACxI,IAAA,EAAE,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,0EAA0E,EAAE,KAAK,EAAE,qBAAqB,EAAE;AAC3I,IAAA,EAAE,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,iDAAiD,EAAE,KAAK,EAAE,6BAA6B,EAAE;AAC5H,IAAA,EAAE,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,iDAAiD,EAAE,KAAK,EAAE,6BAA6B,EAAE;AAC5H,IAAA,EAAE,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,+CAA+C,EAAE,KAAK,EAAE,6BAA6B,EAAE;CAC3H;AAOD,MAAM,KAAK,GAAG,CAAC,EAAE,cAAc,EAAE,kBAAkB,EAAE,KAAK,EAAE,SAAS,GAAG,CAAC,EAAE,GAAG,KAAK,EAAc,KAAI;IACnG,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,kBAAkB,EAAE;AAEnD,IAAA,QACEA,GAAA,CAAC,QAAQ,EAAA,EAAA,GACH,KAAK,EACT,IAAI,EAAE,KAAK,EACX,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/molecules/VerificationCodeInput/index.tsx"],"sourcesContent":[null],"names":["_jsx","LabelBase"],"mappings":";;;;;;AAiBA,MAAM,eAAe,GAAG,aAAa,CAAsB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AAC,WAAW,GAAG,WAAW;AAEnC,MAAM,KAAK,GAAG,CAAC,KAA8C,KAAI;AAC/D,IAAA,MAAM,EAAE,EAAE,EAAE,GAAG,kBAAkB,EAAE;AAEnC,IAAA,OAAOA,IAACC,OAAS,EAAA,EAAA,GAAK,KAAK,EAAE,OAAO,EAAE,CAAA,UAAA,EAAa,EAAE,CAAA,CAAE,EAAE,EAAE,EAAE,mBAAmB,EAAE,CAAA,CAAE,GAAI;AAC1F,CAAC;AACD,KAAK,CAAC,WAAW,GAAG,OAAO;AAE3B,MAAM,WAAW,GAAG,CAAC,KAA6C,KAAI;IACpE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,kBAAkB,EAAE;;IAGzC,OAAOD,GAAA,CAAC,QAAQ,EAAA,EAAA,GAAK,KAAK,EAAE,EAAE,EAAE,CAAA,sBAAA,EAAyB,EAAE,CAAA,CAAE,EAAE,IAAI,EAAC,aAAa,EAAC,SAAS,EAAE,EAAE,CAAC,IAAI,KAAK,MAAM,IAAI,SAAS,CAAC,EAAA,CAAI;AACnI,CAAC;AACD,WAAW,CAAC,WAAW,GAAG,aAAa;AAEvC;;AAEG;AACH,MAAM,QAAQ,GAAG;AAOjB,QAAQ,CAAC,IAAI,GAAG,IAAI;AACpB,QAAQ,CAAC,KAAK,GAAG,KAAK;AACtB,QAAQ,CAAC,KAAK,GAAG,KAAK;AACtB,QAAQ,CAAC,SAAS,GAAG,SAAS;AAC9B,QAAQ,CAAC,WAAW,GAAG,WAAW;;;;"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var RouteProvider = require('@flipdish/ui-library/providers/RouteProvider');
|
|
5
|
+
var ThemeProvider = require('@flipdish/ui-library/providers/ThemeProvider');
|
|
6
|
+
var reactRouter = require('react-router');
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @summary single entry-point provider that composes the Flipdish UI providers (theme, routing, and — soon — translations)
|
|
10
|
+
*/
|
|
11
|
+
const UIProvider = ({ children, themeModeOverride, withBrowserRouter = true, withRouteProvider = true, }) => {
|
|
12
|
+
let tree = children;
|
|
13
|
+
// RouteProvider must sit inside a router; keep it innermost so it can bind to
|
|
14
|
+
// either our BrowserRouter or a host-owned one.
|
|
15
|
+
if (withRouteProvider) {
|
|
16
|
+
tree = jsxRuntime.jsx(RouteProvider.RouteProvider, { children: tree });
|
|
17
|
+
}
|
|
18
|
+
if (withBrowserRouter) {
|
|
19
|
+
tree = jsxRuntime.jsx(reactRouter.BrowserRouter, { children: tree });
|
|
20
|
+
}
|
|
21
|
+
// TODO(i18n): wrap `tree` in <TranslationProvider> once the translation layer lands.
|
|
22
|
+
// It will likely expose an async `useLoadTranslations(languageOverride)` hook (see
|
|
23
|
+
// FlipdishUI's FlipdishUIProvider) and a `languageOverride` prop forwarded from here.
|
|
24
|
+
// Order: ThemeProvider > [BrowserRouter > RouteProvider] > TranslationProvider > children.
|
|
25
|
+
return jsxRuntime.jsx(ThemeProvider.ThemeProvider, { themeModeOverride: themeModeOverride, children: tree });
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
exports.UIProvider = UIProvider;
|
|
29
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/providers/UIProvider/index.tsx"],"sourcesContent":[null],"names":["_jsx","RouteProvider","BrowserRouter","ThemeProvider"],"mappings":";;;;;;;AA4BA;;AAEG;AACI,MAAM,UAAU,GAAG,CAAC,EACzB,QAAQ,EACR,iBAAiB,EACjB,iBAAiB,GAAG,IAAI,EACxB,iBAAiB,GAAG,IAAI,GACW,KAAI;IACvC,IAAI,IAAI,GAAG,QAAQ;;;IAInB,IAAI,iBAAiB,EAAE;AACrB,QAAA,IAAI,GAAGA,cAAA,CAACC,2BAAa,EAAA,EAAA,QAAA,EAAE,IAAI,GAAiB;IAC9C;IAEA,IAAI,iBAAiB,EAAE;AACrB,QAAA,IAAI,GAAGD,cAAA,CAACE,yBAAa,EAAA,EAAA,QAAA,EAAE,IAAI,GAAiB;IAC9C;;;;;IAMA,OAAOF,cAAA,CAACG,2BAAa,EAAA,EAAC,iBAAiB,EAAE,iBAAiB,EAAA,QAAA,EAAG,IAAI,EAAA,CAAiB;AACpF;;;;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { PropsWithChildren } from 'react';
|
|
2
|
+
export interface UIProviderProps {
|
|
3
|
+
/**
|
|
4
|
+
* Controlled theme override. When set, the tree renders in this mode and theme
|
|
5
|
+
* persistence is skipped. Omit to use ThemeProvider's own light/dark/system logic.
|
|
6
|
+
*/
|
|
7
|
+
themeModeOverride?: 'light' | 'dark';
|
|
8
|
+
/**
|
|
9
|
+
* Render a `BrowserRouter`. Set `false` when a host/parent app already owns a
|
|
10
|
+
* router (e.g. a micro-frontend mounted in a shell, or an app using react-router's
|
|
11
|
+
* data APIs via `createBrowserRouter`) — a second router would fight over the URL.
|
|
12
|
+
* @default true
|
|
13
|
+
*/
|
|
14
|
+
withBrowserRouter?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Wire react-aria-components navigation into react-router (so `<Link>`, etc. use
|
|
17
|
+
* client-side navigation). Keep `true` even when `withBrowserRouter` is `false`, so
|
|
18
|
+
* react-aria routing binds to the host's router. Set `false` only for non-routed
|
|
19
|
+
* surfaces (single-screen apps, some test/Storybook setups).
|
|
20
|
+
* @default true
|
|
21
|
+
*/
|
|
22
|
+
withRouteProvider?: boolean;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @summary single entry-point provider that composes the Flipdish UI providers (theme, routing, and — soon — translations)
|
|
26
|
+
*/
|
|
27
|
+
export declare const UIProvider: ({ children, themeModeOverride, withBrowserRouter, withRouteProvider, }: PropsWithChildren<UIProviderProps>) => import("react").JSX.Element;
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/UIProvider/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG/C,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACrC;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,wEAKxB,iBAAiB,CAAC,eAAe,CAAC,gCAkBpC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { RouteProvider } from '@flipdish/ui-library/providers/RouteProvider';
|
|
3
|
+
import { ThemeProvider } from '@flipdish/ui-library/providers/ThemeProvider';
|
|
4
|
+
import { BrowserRouter } from 'react-router';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @summary single entry-point provider that composes the Flipdish UI providers (theme, routing, and — soon — translations)
|
|
8
|
+
*/
|
|
9
|
+
const UIProvider = ({ children, themeModeOverride, withBrowserRouter = true, withRouteProvider = true, }) => {
|
|
10
|
+
let tree = children;
|
|
11
|
+
// RouteProvider must sit inside a router; keep it innermost so it can bind to
|
|
12
|
+
// either our BrowserRouter or a host-owned one.
|
|
13
|
+
if (withRouteProvider) {
|
|
14
|
+
tree = jsx(RouteProvider, { children: tree });
|
|
15
|
+
}
|
|
16
|
+
if (withBrowserRouter) {
|
|
17
|
+
tree = jsx(BrowserRouter, { children: tree });
|
|
18
|
+
}
|
|
19
|
+
// TODO(i18n): wrap `tree` in <TranslationProvider> once the translation layer lands.
|
|
20
|
+
// It will likely expose an async `useLoadTranslations(languageOverride)` hook (see
|
|
21
|
+
// FlipdishUI's FlipdishUIProvider) and a `languageOverride` prop forwarded from here.
|
|
22
|
+
// Order: ThemeProvider > [BrowserRouter > RouteProvider] > TranslationProvider > children.
|
|
23
|
+
return jsx(ThemeProvider, { themeModeOverride: themeModeOverride, children: tree });
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export { UIProvider };
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/providers/UIProvider/index.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;AA4BA;;AAEG;AACI,MAAM,UAAU,GAAG,CAAC,EACzB,QAAQ,EACR,iBAAiB,EACjB,iBAAiB,GAAG,IAAI,EACxB,iBAAiB,GAAG,IAAI,GACW,KAAI;IACvC,IAAI,IAAI,GAAG,QAAQ;;;IAInB,IAAI,iBAAiB,EAAE;AACrB,QAAA,IAAI,GAAGA,GAAA,CAAC,aAAa,EAAA,EAAA,QAAA,EAAE,IAAI,GAAiB;IAC9C;IAEA,IAAI,iBAAiB,EAAE;AACrB,QAAA,IAAI,GAAGA,GAAA,CAAC,aAAa,EAAA,EAAA,QAAA,EAAE,IAAI,GAAiB;IAC9C;;;;;IAMA,OAAOA,GAAA,CAAC,aAAa,EAAA,EAAC,iBAAiB,EAAE,iBAAiB,EAAA,QAAA,EAAG,IAAI,EAAA,CAAiB;AACpF;;;;"}
|
package/dist/styles.css
CHANGED
|
@@ -99,3 +99,128 @@
|
|
|
99
99
|
-webkit-appearance: none;
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
+
|
|
103
|
+
/* ============================================================
|
|
104
|
+
CodeSnippet — Shiki syntax-highlighting overrides
|
|
105
|
+
============================================================ */
|
|
106
|
+
|
|
107
|
+
.shiki,
|
|
108
|
+
.shiki .line:not(.diff) {
|
|
109
|
+
/* biome-ignore lint/complexity/noImportantStyles: Required to override Shiki's own inline style attributes */
|
|
110
|
+
background-color: var(--color-bg-primary) !important;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/* Dark mode */
|
|
114
|
+
.dark-mode .shiki,
|
|
115
|
+
.dark-mode .shiki span {
|
|
116
|
+
/* biome-ignore lint/complexity/noImportantStyles: Required to override Shiki's own inline style attributes */
|
|
117
|
+
color: var(--shiki-dark) !important;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* Diff line styles */
|
|
121
|
+
.shiki code .line.diff {
|
|
122
|
+
position: relative;
|
|
123
|
+
display: inline-block;
|
|
124
|
+
width: calc(100% + 44px);
|
|
125
|
+
margin: 0 -24px 0 -20px;
|
|
126
|
+
padding: 0 24px 0 20px;
|
|
127
|
+
|
|
128
|
+
&::after {
|
|
129
|
+
left: 6px;
|
|
130
|
+
position: absolute;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
.shiki code .line.diff.remove {
|
|
134
|
+
background-color: var(--color-utility-red-100);
|
|
135
|
+
|
|
136
|
+
&::after {
|
|
137
|
+
content: "-";
|
|
138
|
+
color: var(--color-utility-red-700);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
.shiki code .line.diff.remove .highlighted-word {
|
|
142
|
+
padding: 1px;
|
|
143
|
+
margin: -1px;
|
|
144
|
+
border-radius: 3px;
|
|
145
|
+
background-color: var(--color-utility-red-300);
|
|
146
|
+
/* biome-ignore lint/complexity/noImportantStyles: Required to override Shiki's own inline style attributes */
|
|
147
|
+
color: var(--color-text-primary) !important;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.shiki code .line.diff.add {
|
|
151
|
+
background-color: var(--color-utility-green-100);
|
|
152
|
+
|
|
153
|
+
&::after {
|
|
154
|
+
content: "+";
|
|
155
|
+
color: var(--color-utility-green-700);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
.shiki code .line.diff.add .highlighted-word {
|
|
159
|
+
padding: 1px;
|
|
160
|
+
margin: -1px;
|
|
161
|
+
border-radius: 3px;
|
|
162
|
+
background-color: var(--color-utility-green-300);
|
|
163
|
+
/* biome-ignore lint/complexity/noImportantStyles: Required to override Shiki's own inline style attributes */
|
|
164
|
+
color: var(--color-text-primary) !important;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/* Scrollbar */
|
|
168
|
+
.shiki::-webkit-scrollbar-thumb {
|
|
169
|
+
border-radius: 9999px;
|
|
170
|
+
background: color-mix(in srgb, var(--color-alpha-white), transparent 85%);
|
|
171
|
+
}
|
|
172
|
+
.shiki::-webkit-scrollbar-track {
|
|
173
|
+
border-radius: 9999px;
|
|
174
|
+
background: transparent;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/* Line number styles */
|
|
178
|
+
.line-numbers .shiki {
|
|
179
|
+
padding-left: 0;
|
|
180
|
+
padding-top: 0;
|
|
181
|
+
padding-bottom: 0;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.line-numbers .shiki code {
|
|
185
|
+
counter-reset: step;
|
|
186
|
+
counter-increment: step 0;
|
|
187
|
+
display: flex;
|
|
188
|
+
flex-direction: column;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.line-numbers .shiki code .line::before {
|
|
192
|
+
content: counter(step);
|
|
193
|
+
counter-increment: step;
|
|
194
|
+
display: inline-block;
|
|
195
|
+
position: sticky;
|
|
196
|
+
left: 0;
|
|
197
|
+
color: var(--color-text-quaternary);
|
|
198
|
+
background-color: var(--color-bg-secondary);
|
|
199
|
+
border-right: 1px solid var(--color-border-secondary);
|
|
200
|
+
font-size: 14px;
|
|
201
|
+
font-weight: 700;
|
|
202
|
+
text-align: right;
|
|
203
|
+
width: 48px;
|
|
204
|
+
margin-right: 16px;
|
|
205
|
+
padding-right: 16px;
|
|
206
|
+
}
|
|
207
|
+
.line-numbers .shiki code .line:first-of-type::before {
|
|
208
|
+
padding-top: 16px;
|
|
209
|
+
}
|
|
210
|
+
.line-numbers .shiki code .line:last-of-type::before {
|
|
211
|
+
padding-bottom: 24px;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
@media (min-width: 768px) {
|
|
215
|
+
.line-numbers .shiki code .line::before {
|
|
216
|
+
width: 49px;
|
|
217
|
+
margin-right: 20px;
|
|
218
|
+
padding-right: 16px;
|
|
219
|
+
}
|
|
220
|
+
.line-numbers .shiki code .line:first-of-type::before {
|
|
221
|
+
padding-top: 20px;
|
|
222
|
+
}
|
|
223
|
+
.line-numbers .shiki code .line:last-of-type::before {
|
|
224
|
+
padding-bottom: 20px;
|
|
225
|
+
}
|
|
226
|
+
}
|