@flipdish/ui-library 0.29.0 → 0.30.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/dist/components/atoms/Input/index.cjs +3 -1
- package/dist/components/atoms/Input/index.cjs.map +1 -1
- package/dist/components/atoms/Input/index.d.ts +5 -1
- package/dist/components/atoms/Input/index.d.ts.map +1 -1
- package/dist/components/atoms/Input/index.js +3 -1
- package/dist/components/atoms/Input/index.js.map +1 -1
- package/dist/components/molecules/Select/components/combobox.cjs +3 -1
- package/dist/components/molecules/Select/components/combobox.cjs.map +1 -1
- package/dist/components/molecules/Select/components/combobox.d.ts.map +1 -1
- package/dist/components/molecules/Select/components/combobox.js +3 -1
- package/dist/components/molecules/Select/components/combobox.js.map +1 -1
- package/dist/components/organisms/ApplicationHeader/applicationHeader.types.d.ts +12 -5
- package/dist/components/organisms/ApplicationHeader/applicationHeader.types.d.ts.map +1 -1
- package/dist/components/organisms/ApplicationHeader/index.cjs +12 -17
- package/dist/components/organisms/ApplicationHeader/index.cjs.map +1 -1
- package/dist/components/organisms/ApplicationHeader/index.d.ts +9 -5
- package/dist/components/organisms/ApplicationHeader/index.d.ts.map +1 -1
- package/dist/components/organisms/ApplicationHeader/index.js +12 -18
- package/dist/components/organisms/ApplicationHeader/index.js.map +1 -1
- package/dist/components/organisms/Calendar/index.cjs +3 -3
- package/dist/components/organisms/Calendar/index.cjs.map +1 -1
- package/dist/components/organisms/Calendar/index.js +3 -3
- package/dist/components/organisms/Calendar/index.js.map +1 -1
- package/dist/components/organisms/CommandMenu/commandMenu.utils.cjs +0 -21
- package/dist/components/organisms/CommandMenu/commandMenu.utils.cjs.map +1 -1
- package/dist/components/organisms/CommandMenu/commandMenu.utils.d.ts +0 -9
- package/dist/components/organisms/CommandMenu/commandMenu.utils.d.ts.map +1 -1
- package/dist/components/organisms/CommandMenu/commandMenu.utils.js +1 -21
- package/dist/components/organisms/CommandMenu/commandMenu.utils.js.map +1 -1
- package/dist/components/organisms/CommandMenu/components/command-input.cjs +2 -2
- package/dist/components/organisms/CommandMenu/components/command-input.cjs.map +1 -1
- package/dist/components/organisms/CommandMenu/components/command-input.d.ts +3 -2
- package/dist/components/organisms/CommandMenu/components/command-input.d.ts.map +1 -1
- package/dist/components/organisms/CommandMenu/components/command-input.js +2 -2
- package/dist/components/organisms/CommandMenu/components/command-input.js.map +1 -1
- package/dist/components/organisms/CommandMenu/components/command-menu-item.cjs +15 -2
- package/dist/components/organisms/CommandMenu/components/command-menu-item.cjs.map +1 -1
- package/dist/components/organisms/CommandMenu/components/command-menu-item.d.ts +9 -1
- package/dist/components/organisms/CommandMenu/components/command-menu-item.d.ts.map +1 -1
- package/dist/components/organisms/CommandMenu/components/command-menu-item.js +15 -2
- package/dist/components/organisms/CommandMenu/components/command-menu-item.js.map +1 -1
- package/dist/components/organisms/CommandMenu/components/command-shortcut.cjs +2 -2
- package/dist/components/organisms/CommandMenu/components/command-shortcut.cjs.map +1 -1
- package/dist/components/organisms/CommandMenu/components/command-shortcut.d.ts +1 -0
- package/dist/components/organisms/CommandMenu/components/command-shortcut.d.ts.map +1 -1
- package/dist/components/organisms/CommandMenu/components/command-shortcut.js +2 -2
- package/dist/components/organisms/CommandMenu/components/command-shortcut.js.map +1 -1
- package/dist/components/organisms/CommandMenu/index.cjs +65 -29
- package/dist/components/organisms/CommandMenu/index.cjs.map +1 -1
- package/dist/components/organisms/CommandMenu/index.d.ts +29 -2
- package/dist/components/organisms/CommandMenu/index.d.ts.map +1 -1
- package/dist/components/organisms/CommandMenu/index.js +69 -33
- package/dist/components/organisms/CommandMenu/index.js.map +1 -1
- package/dist/components/organisms/CommandMenu/providers/command-menu-link-context.cjs +9 -0
- package/dist/components/organisms/CommandMenu/providers/command-menu-link-context.cjs.map +1 -0
- package/dist/components/organisms/CommandMenu/providers/command-menu-link-context.d.ts +3 -0
- package/dist/components/organisms/CommandMenu/providers/command-menu-link-context.d.ts.map +1 -0
- package/dist/components/organisms/CommandMenu/providers/command-menu-link-context.js +7 -0
- package/dist/components/organisms/CommandMenu/providers/command-menu-link-context.js.map +1 -0
- package/dist/components/organisms/DatePicker/components/input-date.cjs +3 -1
- package/dist/components/organisms/DatePicker/components/input-date.cjs.map +1 -1
- package/dist/components/organisms/DatePicker/components/input-date.d.ts +5 -1
- package/dist/components/organisms/DatePicker/components/input-date.d.ts.map +1 -1
- package/dist/components/organisms/DatePicker/components/input-date.js +3 -1
- package/dist/components/organisms/DatePicker/components/input-date.js.map +1 -1
- package/dist/components/organisms/HeaderNavigation/components/nav-account-card.cjs +3 -1
- package/dist/components/organisms/HeaderNavigation/components/nav-account-card.cjs.map +1 -1
- package/dist/components/organisms/HeaderNavigation/components/nav-account-card.d.ts +1 -1
- package/dist/components/organisms/HeaderNavigation/components/nav-account-card.d.ts.map +1 -1
- package/dist/components/organisms/HeaderNavigation/components/nav-account-card.js +3 -1
- package/dist/components/organisms/HeaderNavigation/components/nav-account-card.js.map +1 -1
- package/dist/components/organisms/SidebarNavigation/components/nav-account-card.cjs +3 -1
- package/dist/components/organisms/SidebarNavigation/components/nav-account-card.cjs.map +1 -1
- package/dist/components/organisms/SidebarNavigation/components/nav-account-card.d.ts +1 -1
- package/dist/components/organisms/SidebarNavigation/components/nav-account-card.d.ts.map +1 -1
- package/dist/components/organisms/SidebarNavigation/components/nav-account-card.js +3 -1
- package/dist/components/organisms/SidebarNavigation/components/nav-account-card.js.map +1 -1
- package/dist/components/organisms/SidebarNavigation/index.cjs +15 -5
- package/dist/components/organisms/SidebarNavigation/index.cjs.map +1 -1
- package/dist/components/organisms/SidebarNavigation/index.d.ts +3 -2
- package/dist/components/organisms/SidebarNavigation/index.d.ts.map +1 -1
- package/dist/components/organisms/SidebarNavigation/index.js +15 -5
- package/dist/components/organisms/SidebarNavigation/index.js.map +1 -1
- package/dist/components/organisms/TextEditor/components/text-editor-extensions.cjs +9 -4
- package/dist/components/organisms/TextEditor/components/text-editor-extensions.cjs.map +1 -1
- package/dist/components/organisms/TextEditor/components/text-editor-extensions.d.ts.map +1 -1
- package/dist/components/organisms/TextEditor/components/text-editor-extensions.js +10 -5
- package/dist/components/organisms/TextEditor/components/text-editor-extensions.js.map +1 -1
- package/dist/components/organisms/TextEditor/components/text-editor-toolbar.cjs +8 -2
- package/dist/components/organisms/TextEditor/components/text-editor-toolbar.cjs.map +1 -1
- package/dist/components/organisms/TextEditor/components/text-editor-toolbar.d.ts.map +1 -1
- package/dist/components/organisms/TextEditor/components/text-editor-toolbar.js +8 -2
- package/dist/components/organisms/TextEditor/components/text-editor-toolbar.js.map +1 -1
- package/dist/components/organisms/TextEditor/textEditor.utils.cjs +3 -0
- package/dist/components/organisms/TextEditor/textEditor.utils.cjs.map +1 -1
- package/dist/components/organisms/TextEditor/textEditor.utils.d.ts +4 -0
- package/dist/components/organisms/TextEditor/textEditor.utils.d.ts.map +1 -1
- package/dist/components/organisms/TextEditor/textEditor.utils.js +3 -1
- package/dist/components/organisms/TextEditor/textEditor.utils.js.map +1 -1
- package/dist/hooks/__internal__/useHotkeyHint/useHotkeyHint.cjs +24 -0
- package/dist/hooks/__internal__/useHotkeyHint/useHotkeyHint.cjs.map +1 -0
- package/dist/hooks/__internal__/useHotkeyHint/useHotkeyHint.d.ts +22 -0
- package/dist/hooks/__internal__/useHotkeyHint/useHotkeyHint.d.ts.map +1 -0
- package/dist/hooks/__internal__/useHotkeyHint/useHotkeyHint.js +22 -0
- package/dist/hooks/__internal__/useHotkeyHint/useHotkeyHint.js.map +1 -0
- package/dist/hooks/__internal__/useKeySequences/useKeySequences.cjs +54 -0
- package/dist/hooks/__internal__/useKeySequences/useKeySequences.cjs.map +1 -0
- package/dist/hooks/__internal__/useKeySequences/useKeySequences.d.ts +11 -0
- package/dist/hooks/__internal__/useKeySequences/useKeySequences.d.ts.map +1 -0
- package/dist/hooks/__internal__/useKeySequences/useKeySequences.js +52 -0
- package/dist/hooks/__internal__/useKeySequences/useKeySequences.js.map +1 -0
- package/dist/hooks/usePlatform/index.cjs +22 -0
- package/dist/hooks/usePlatform/index.cjs.map +1 -0
- package/dist/hooks/usePlatform/index.d.ts +22 -0
- package/dist/hooks/usePlatform/index.d.ts.map +1 -0
- package/dist/hooks/usePlatform/index.js +20 -0
- package/dist/hooks/usePlatform/index.js.map +1 -0
- package/dist/native/hooks/usePlatform/index.d.ts +12 -0
- package/dist/utilities/__internal__/hotkeysUtils/hotkeys.utils.cjs +222 -15
- package/dist/utilities/__internal__/hotkeysUtils/hotkeys.utils.cjs.map +1 -1
- package/dist/utilities/__internal__/hotkeysUtils/hotkeys.utils.d.ts +60 -5
- package/dist/utilities/__internal__/hotkeysUtils/hotkeys.utils.d.ts.map +1 -1
- package/dist/utilities/__internal__/hotkeysUtils/hotkeys.utils.js +215 -15
- package/dist/utilities/__internal__/hotkeysUtils/hotkeys.utils.js.map +1 -1
- package/dist/utilities/__internal__/platformUtils/platform.utils.cjs +26 -0
- package/dist/utilities/__internal__/platformUtils/platform.utils.cjs.map +1 -0
- package/dist/utilities/__internal__/platformUtils/platform.utils.d.ts +10 -0
- package/dist/utilities/__internal__/platformUtils/platform.utils.d.ts.map +1 -0
- package/dist/utilities/__internal__/platformUtils/platform.utils.js +23 -0
- package/dist/utilities/__internal__/platformUtils/platform.utils.js.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../src/components/organisms/Calendar/index.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","useLocale","useMemo","getLocalTimeZone","useDateFormatter","useState","today","now","useEffect","parseAbsoluteToLocal","startOfWeek","_jsx","TestIdProvider","_jsxs","cx","CalendarHeader","MonthView","_Fragment","DayView","WeekView"],"mappings":";;;;;;;;;;;;;AAuBA,MAAM,WAAW,GAAiB;
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../src/components/organisms/Calendar/index.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","useLocale","useMemo","getLocalTimeZone","useDateFormatter","useState","today","now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E,eAAe,EAChC,qBAAqB,EAAE,qBAAqB,EAC5C,aAAa,EAAE,aAAa,EAC5B,iBAAiB,EAAE,iBAAiB,EACpC,IAAI,EAAE,IAAI,EACV,SAAS,EAAC,WAAW,EAAA,CACrB,EAEFP,cAAA,CAACQ,yBAAQ,IACP,gBAAgB,EAAE,gBAAgB,EAClC,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE,eAAe,EAChC,qBAAqB,EAAE,qBAAqB,EAC5C,aAAa,EAAE,aAAa,EAC5B,iBAAiB,EAAE,iBAAiB,EACpC,IAAI,EAAE,IAAI,EACV,SAAS,EAAC,eAAe,EAAA,CACzB,IACD,CACJ,EACA,IAAI,KAAK,KAAK,KACbR,cAAA,CAACO,uBAAO,IACN,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE,eAAe,EAChC,qBAAqB,EAAE,qBAAqB,EAC5C,aAAa,EAAE,aAAa,EAC5B,iBAAiB,EAAE,iBAAiB,EACpC,IAAI,EAAE,IAAI,GACV,CACH,CAAA,EAAA,CACG,CAAA,EAAA,CACF,EAAA,CACS;AAErB;;;;"}
|
|
@@ -10,9 +10,9 @@ import { MonthView } from './components/calendar-month-view.js';
|
|
|
10
10
|
import { WeekView } from './components/calendar-week-view.js';
|
|
11
11
|
|
|
12
12
|
const viewOptions = [
|
|
13
|
-
{ value: 'day', label: 'Day view'
|
|
14
|
-
{ value: 'week', label: 'Week view'
|
|
15
|
-
{ value: 'month', label: 'Month view'
|
|
13
|
+
{ value: 'day', label: 'Day view' },
|
|
14
|
+
{ value: 'week', label: 'Week view' },
|
|
15
|
+
{ value: 'month', label: 'Month view' },
|
|
16
16
|
];
|
|
17
17
|
/**
|
|
18
18
|
* A scheduling calendar that renders a list of events across month, week, and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/organisms/Calendar/index.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs","_Fragment"],"mappings":";;;;;;;;;;;AAuBA,MAAM,WAAW,GAAiB;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/organisms/Calendar/index.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs","_Fragment"],"mappings":";;;;;;;;;;;AAuBA,MAAM,WAAW,GAAiB;AAChC,IAAA,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE;AACnC,IAAA,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE;AACrC,IAAA,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE;CACxC;AAcD;;;;;;AAMG;MACU,QAAQ,GAAG,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAiB,KAAI;AACvH,IAAA,MAAM,UAAU,GAAG,iBAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;AAEvG,IAAA,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE;AAC9B,IAAA,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,gBAAgB,EAAE,EAAE,EAAE,CAAC;AAEtD,IAAA,MAAM,aAAa,GAAG,gBAAgB,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAC5F,MAAM,qBAAqB,GAAG,gBAAgB,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;IACpE,MAAM,iBAAiB,GAAG,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
|
|
6
|
-
* @param refs - An array of refs which can be mutable ref objects, legacy refs, or undefined/null.
|
|
7
|
-
* @returns A ref callback function that assigns the given value to all provided refs.
|
|
8
|
-
*
|
|
9
|
-
* @typeParam T - The type of the ref value.
|
|
10
|
-
*/
|
|
11
|
-
function mergeRefs(refs) {
|
|
12
|
-
return (value) => {
|
|
13
|
-
refs.forEach((ref) => {
|
|
14
|
-
if (typeof ref === 'function') {
|
|
15
|
-
ref(value);
|
|
16
|
-
}
|
|
17
|
-
else if (ref != null) {
|
|
18
|
-
ref.current = value;
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
3
|
/**
|
|
24
4
|
* Compares two values to determine if they are deeply equal.
|
|
25
5
|
*
|
|
@@ -52,5 +32,4 @@ const isDeepEqual = (obj1, obj2) => {
|
|
|
52
32
|
};
|
|
53
33
|
|
|
54
34
|
exports.isDeepEqual = isDeepEqual;
|
|
55
|
-
exports.mergeRefs = mergeRefs;
|
|
56
35
|
//# sourceMappingURL=commandMenu.utils.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commandMenu.utils.cjs","sources":["../../../../src/components/organisms/CommandMenu/commandMenu.utils.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;;;;;AAOG;
|
|
1
|
+
{"version":3,"file":"commandMenu.utils.cjs","sources":["../../../../src/components/organisms/CommandMenu/commandMenu.utils.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;;;;;AAOG;AACH;MACa,WAAW,GAAG,CAAC,IAAS,EAAE,IAAS,KAAa;;IAE3D,IAAI,IAAI,KAAK,IAAI;AAAE,QAAA,OAAO,IAAI;;AAG9B,IAAA,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE;AAC1F,QAAA,OAAO,KAAK;IACd;;IAGA,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;IAC/B,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;AAC/B,IAAA,IAAI,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM;AAAE,QAAA,OAAO,KAAK;;AAG/C,IAAA,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE;QACvB,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE;AAC9D,YAAA,OAAO,KAAK;QACd;IACF;AAEA,IAAA,OAAO,IAAI;AACb;;;;"}
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Merges multiple React refs into a single ref callback.
|
|
3
|
-
*
|
|
4
|
-
* @param refs - An array of refs which can be mutable ref objects, legacy refs, or undefined/null.
|
|
5
|
-
* @returns A ref callback function that assigns the given value to all provided refs.
|
|
6
|
-
*
|
|
7
|
-
* @typeParam T - The type of the ref value.
|
|
8
|
-
*/
|
|
9
|
-
export declare function mergeRefs<T = unknown>(refs: Array<React.MutableRefObject<T> | React.LegacyRef<T> | undefined | null>): React.RefCallback<T>;
|
|
10
1
|
/**
|
|
11
2
|
* Compares two values to determine if they are deeply equal.
|
|
12
3
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commandMenu.utils.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/CommandMenu/commandMenu.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"commandMenu.utils.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/CommandMenu/commandMenu.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,eAAO,MAAM,WAAW,GAAI,MAAM,GAAG,EAAE,MAAM,GAAG,KAAG,OAsBlD,CAAC"}
|
|
@@ -1,23 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Merges multiple React refs into a single ref callback.
|
|
3
|
-
*
|
|
4
|
-
* @param refs - An array of refs which can be mutable ref objects, legacy refs, or undefined/null.
|
|
5
|
-
* @returns A ref callback function that assigns the given value to all provided refs.
|
|
6
|
-
*
|
|
7
|
-
* @typeParam T - The type of the ref value.
|
|
8
|
-
*/
|
|
9
|
-
function mergeRefs(refs) {
|
|
10
|
-
return (value) => {
|
|
11
|
-
refs.forEach((ref) => {
|
|
12
|
-
if (typeof ref === 'function') {
|
|
13
|
-
ref(value);
|
|
14
|
-
}
|
|
15
|
-
else if (ref != null) {
|
|
16
|
-
ref.current = value;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
1
|
/**
|
|
22
2
|
* Compares two values to determine if they are deeply equal.
|
|
23
3
|
*
|
|
@@ -49,5 +29,5 @@ const isDeepEqual = (obj1, obj2) => {
|
|
|
49
29
|
return true;
|
|
50
30
|
};
|
|
51
31
|
|
|
52
|
-
export { isDeepEqual
|
|
32
|
+
export { isDeepEqual };
|
|
53
33
|
//# sourceMappingURL=commandMenu.utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commandMenu.utils.js","sources":["../../../../src/components/organisms/CommandMenu/commandMenu.utils.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;;;;;;;AAOG;
|
|
1
|
+
{"version":3,"file":"commandMenu.utils.js","sources":["../../../../src/components/organisms/CommandMenu/commandMenu.utils.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;;;;;;;AAOG;AACH;MACa,WAAW,GAAG,CAAC,IAAS,EAAE,IAAS,KAAa;;IAE3D,IAAI,IAAI,KAAK,IAAI;AAAE,QAAA,OAAO,IAAI;;AAG9B,IAAA,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE;AAC1F,QAAA,OAAO,KAAK;IACd;;IAGA,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;IAC/B,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;AAC/B,IAAA,IAAI,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM;AAAE,QAAA,OAAO,KAAK;;AAG/C,IAAA,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE;QACvB,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE;AAC9D,YAAA,OAAO,KAAK;QACd;IACF;AAEA,IAAA,OAAO,IAAI;AACb;;;;"}
|
|
@@ -7,8 +7,8 @@ var cx = require('@flipdish/ui-library/utilities/cx');
|
|
|
7
7
|
var reactAriaComponents = require('react-aria-components');
|
|
8
8
|
var commandShortcut = require('./command-shortcut.cjs');
|
|
9
9
|
|
|
10
|
-
const CommandInput = ({ placeholder,
|
|
11
|
-
return (jsxRuntime.jsxs(reactAriaComponents.Group, { className: ({ isFocusWithin }) => cx.cx('flex items-center gap-x-2 rounded-xl bg-primary p-4', isFocusWithin && 'outline-2 outline-focus-ring', className), children: [jsxRuntime.jsx("div", { className: "pointer-events-none absolute", children: jsxRuntime.jsx(uiIcons.SearchLg, { className: "size-5 text-fg-quaternary" }) }), jsxRuntime.jsx(reactAriaComponents.Input, { placeholder: placeholder, className: "m-0 w-full bg-transparent pl-7 text-md text-primary ring-0 outline-hidden placeholder:text-placeholder autofill:rounded-lg autofill:text-primary", ...props }), tooltip && (jsxRuntime.jsx(Tooltip.Tooltip, { title: tooltip, placement: "top", children: jsxRuntime.jsx(Tooltip.TooltipTrigger, { className: "cursor-pointer text-fg-quaternary transition duration-200 hover:text-fg-quaternary_hover focus:text-fg-quaternary_hover", children: jsxRuntime.jsx(uiIcons.HelpCircle, { className: "size-4 stroke-[2.25px]" }) }) })),
|
|
10
|
+
const CommandInput = ({ placeholder, shortcutHint, tooltip, className, ...props }) => {
|
|
11
|
+
return (jsxRuntime.jsxs(reactAriaComponents.Group, { className: ({ isFocusWithin }) => cx.cx('flex items-center gap-x-2 rounded-xl bg-primary p-4', isFocusWithin && 'outline-2 outline-focus-ring', className), children: [jsxRuntime.jsx("div", { className: "pointer-events-none absolute", children: jsxRuntime.jsx(uiIcons.SearchLg, { className: "size-5 text-fg-quaternary" }) }), jsxRuntime.jsx(reactAriaComponents.Input, { placeholder: placeholder, className: "m-0 w-full bg-transparent pl-7 text-md text-primary ring-0 outline-hidden placeholder:text-placeholder autofill:rounded-lg autofill:text-primary", ...props }), tooltip && (jsxRuntime.jsx(Tooltip.Tooltip, { title: tooltip, placement: "top", children: jsxRuntime.jsx(Tooltip.TooltipTrigger, { className: "cursor-pointer text-fg-quaternary transition duration-200 hover:text-fg-quaternary_hover focus:text-fg-quaternary_hover", children: jsxRuntime.jsx(uiIcons.HelpCircle, { className: "size-4 stroke-[2.25px]" }) }) })), shortcutHint && jsxRuntime.jsx(commandShortcut.CommandShortcut, { keys: [shortcutHint] })] }));
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
exports.CommandInput = CommandInput;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-input.cjs","sources":["../../../../../src/components/organisms/CommandMenu/components/command-input.tsx"],"sourcesContent":[null],"names":["_jsxs","AriaGroup","cx","_jsx","SearchLg","AriaInput","Tooltip","TooltipTrigger","HelpCircle","CommandShortcut"],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"command-input.cjs","sources":["../../../../../src/components/organisms/CommandMenu/components/command-input.tsx"],"sourcesContent":[null],"names":["_jsxs","AriaGroup","cx","_jsx","SearchLg","AriaInput","Tooltip","TooltipTrigger","HelpCircle","CommandShortcut"],"mappings":";;;;;;;;;AAmBO,MAAM,YAAY,GAAG,CAAC,EAAE,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,KAAK,EAAqB,KAAI;IAC7G,QACEA,gBAACC,yBAAS,EAAA,EACR,SAAS,EAAE,CAAC,EAAE,aAAa,EAAE,KAC3BC,KAAE,CAAC,qDAAqD,EAAE,aAAa,IAAI,8BAA8B,EAAE,SAAS,CAAC,aAGvHC,cAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,8BAA8B,EAAA,QAAA,EAC3CA,eAACC,gBAAQ,EAAA,EAAC,SAAS,EAAC,2BAA2B,GAAG,EAAA,CAC9C,EAEND,eAACE,yBAAS,EAAA,EACR,WAAW,EAAE,WAAW,EACxB,SAAS,EAAC,kJAAkJ,KACxJ,KAAK,EAAA,CACT,EAED,OAAO,KACNF,cAAA,CAACG,eAAO,IAAC,KAAK,EAAE,OAAO,EAAE,SAAS,EAAC,KAAK,EAAA,QAAA,EACtCH,eAACI,sBAAc,EAAA,EAAC,SAAS,EAAC,yHAAyH,EAAA,QAAA,EACjJJ,eAACK,kBAAU,EAAA,EAAC,SAAS,EAAC,wBAAwB,GAAG,EAAA,CAClC,EAAA,CACT,CACX,EAEA,YAAY,IAAIL,eAACM,+BAAe,EAAA,EAAC,IAAI,EAAE,CAAC,YAAY,CAAC,EAAA,CAAI,CAAA,EAAA,CAChD;AAEhB;;;;"}
|
|
@@ -2,10 +2,11 @@ import type { ComponentPropsWithRef, ReactNode } from 'react';
|
|
|
2
2
|
import type { InputProps as AriaInputProps } from 'react-aria-components';
|
|
3
3
|
type CommandInputProps = AriaInputProps & ComponentPropsWithRef<'input'> & {
|
|
4
4
|
placeholder?: string;
|
|
5
|
-
|
|
5
|
+
/** Formatted shortcut shown as a single key cap, e.g. `⌘K` or `Ctrl K`. */
|
|
6
|
+
shortcutHint?: string;
|
|
6
7
|
tooltip?: ReactNode;
|
|
7
8
|
className?: string;
|
|
8
9
|
};
|
|
9
|
-
export declare const CommandInput: ({ placeholder,
|
|
10
|
+
export declare const CommandInput: ({ placeholder, shortcutHint, tooltip, className, ...props }: CommandInputProps) => import("react").JSX.Element;
|
|
10
11
|
export {};
|
|
11
12
|
//# sourceMappingURL=command-input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-input.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/CommandMenu/components/command-input.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAI1E,KAAK,iBAAiB,GAAG,cAAc,GACrC,qBAAqB,CAAC,OAAO,CAAC,GAAG;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"command-input.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/CommandMenu/components/command-input.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAI1E,KAAK,iBAAiB,GAAG,cAAc,GACrC,qBAAqB,CAAC,OAAO,CAAC,GAAG;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2EAA2E;IAC3E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEJ,eAAO,MAAM,YAAY,GAAI,6DAA6D,iBAAiB,gCA4B1G,CAAC"}
|
|
@@ -5,8 +5,8 @@ import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
|
5
5
|
import { Group, Input } from 'react-aria-components';
|
|
6
6
|
import { CommandShortcut } from './command-shortcut.js';
|
|
7
7
|
|
|
8
|
-
const CommandInput = ({ placeholder,
|
|
9
|
-
return (jsxs(Group, { className: ({ isFocusWithin }) => cx('flex items-center gap-x-2 rounded-xl bg-primary p-4', isFocusWithin && 'outline-2 outline-focus-ring', className), children: [jsx("div", { className: "pointer-events-none absolute", children: jsx(SearchLg, { className: "size-5 text-fg-quaternary" }) }), jsx(Input, { placeholder: placeholder, className: "m-0 w-full bg-transparent pl-7 text-md text-primary ring-0 outline-hidden placeholder:text-placeholder autofill:rounded-lg autofill:text-primary", ...props }), tooltip && (jsx(Tooltip, { title: tooltip, placement: "top", children: jsx(TooltipTrigger, { className: "cursor-pointer text-fg-quaternary transition duration-200 hover:text-fg-quaternary_hover focus:text-fg-quaternary_hover", children: jsx(HelpCircle, { className: "size-4 stroke-[2.25px]" }) }) })),
|
|
8
|
+
const CommandInput = ({ placeholder, shortcutHint, tooltip, className, ...props }) => {
|
|
9
|
+
return (jsxs(Group, { className: ({ isFocusWithin }) => cx('flex items-center gap-x-2 rounded-xl bg-primary p-4', isFocusWithin && 'outline-2 outline-focus-ring', className), children: [jsx("div", { className: "pointer-events-none absolute", children: jsx(SearchLg, { className: "size-5 text-fg-quaternary" }) }), jsx(Input, { placeholder: placeholder, className: "m-0 w-full bg-transparent pl-7 text-md text-primary ring-0 outline-hidden placeholder:text-placeholder autofill:rounded-lg autofill:text-primary", ...props }), tooltip && (jsx(Tooltip, { title: tooltip, placement: "top", children: jsx(TooltipTrigger, { className: "cursor-pointer text-fg-quaternary transition duration-200 hover:text-fg-quaternary_hover focus:text-fg-quaternary_hover", children: jsx(HelpCircle, { className: "size-4 stroke-[2.25px]" }) }) })), shortcutHint && jsx(CommandShortcut, { keys: [shortcutHint] })] }));
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
export { CommandInput };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-input.js","sources":["../../../../../src/components/organisms/CommandMenu/components/command-input.tsx"],"sourcesContent":[null],"names":["_jsxs","AriaGroup","_jsx","AriaInput"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"command-input.js","sources":["../../../../../src/components/organisms/CommandMenu/components/command-input.tsx"],"sourcesContent":[null],"names":["_jsxs","AriaGroup","_jsx","AriaInput"],"mappings":";;;;;;;AAmBO,MAAM,YAAY,GAAG,CAAC,EAAE,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,KAAK,EAAqB,KAAI;IAC7G,QACEA,KAACC,KAAS,EAAA,EACR,SAAS,EAAE,CAAC,EAAE,aAAa,EAAE,KAC3B,EAAE,CAAC,qDAAqD,EAAE,aAAa,IAAI,8BAA8B,EAAE,SAAS,CAAC,aAGvHC,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,8BAA8B,EAAA,QAAA,EAC3CA,IAAC,QAAQ,EAAA,EAAC,SAAS,EAAC,2BAA2B,GAAG,EAAA,CAC9C,EAENA,IAACC,KAAS,EAAA,EACR,WAAW,EAAE,WAAW,EACxB,SAAS,EAAC,kJAAkJ,KACxJ,KAAK,EAAA,CACT,EAED,OAAO,KACND,GAAA,CAAC,OAAO,IAAC,KAAK,EAAE,OAAO,EAAE,SAAS,EAAC,KAAK,EAAA,QAAA,EACtCA,IAAC,cAAc,EAAA,EAAC,SAAS,EAAC,yHAAyH,EAAA,QAAA,EACjJA,IAAC,UAAU,EAAA,EAAC,SAAS,EAAC,wBAAwB,GAAG,EAAA,CAClC,EAAA,CACT,CACX,EAEA,YAAY,IAAIA,IAAC,eAAe,EAAA,EAAC,IAAI,EAAE,CAAC,YAAY,CAAC,EAAA,CAAI,CAAA,EAAA,CAChD;AAEhB;;;;"}
|
|
@@ -3,9 +3,13 @@
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var Avatar = require('@flipdish/ui-library/components/atoms/Avatar');
|
|
5
5
|
var FeaturedIcon = require('@flipdish/ui-library/components/atoms/FeaturedIcon');
|
|
6
|
+
var usePlatform = require('@flipdish/ui-library/hooks/usePlatform');
|
|
6
7
|
var cx = require('@flipdish/ui-library/utilities/cx');
|
|
7
8
|
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
9
|
+
var React = require('react');
|
|
8
10
|
var reactAriaComponents = require('react-aria-components');
|
|
11
|
+
var hotkeys_utils = require('../../../../utilities/__internal__/hotkeysUtils/hotkeys.utils.cjs');
|
|
12
|
+
var commandMenuLinkContext = require('../providers/command-menu-link-context.cjs');
|
|
9
13
|
var commandShortcut = require('./command-shortcut.cjs');
|
|
10
14
|
|
|
11
15
|
// Omit keys from an object
|
|
@@ -15,11 +19,20 @@ function omit(obj, keys) {
|
|
|
15
19
|
}
|
|
16
20
|
const CommandDropdownMenuItem = ({ label, children, description, stacked, shortcutKeys, className, ...props }) => {
|
|
17
21
|
const prefix = testIdUtils.useTestIdPrefix();
|
|
22
|
+
const onLinkActivate = React.useContext(commandMenuLinkContext.CommandMenuLinkContext);
|
|
23
|
+
const { isMac } = usePlatform.usePlatform();
|
|
18
24
|
const explicitTestId = props['data-testid'];
|
|
19
25
|
const itemTestId = explicitTestId ?? (prefix && props.id !== undefined ? testIdUtils.joinTestId(prefix, `item-${testIdUtils.slugifyTestId(String(props.id))}`) : undefined);
|
|
20
|
-
return (jsxRuntime.jsx(reactAriaComponents.ListBoxItem, { ...omit(props, ['type', 'icon', 'alt', 'src']),
|
|
26
|
+
return (jsxRuntime.jsx(reactAriaComponents.ListBoxItem, { ...omit(props, ['type', 'icon', 'alt', 'src']),
|
|
27
|
+
// Link items navigate without firing a selection, so this is the menu's only signal that one was activated.
|
|
28
|
+
onAction: props.href && onLinkActivate
|
|
29
|
+
? () => {
|
|
30
|
+
props.onAction?.();
|
|
31
|
+
onLinkActivate();
|
|
32
|
+
}
|
|
33
|
+
: props.onAction, "data-testid": itemTestId, textValue: label, className: (state) => cx.cx('group block cursor-pointer px-2 py-0.5 outline-hidden', typeof className === 'function' ? className(state) : className), children: (state) => (jsxRuntime.jsxs("div", { className: cx.cx('relative flex min-h-10 items-center justify-between rounded-lg px-2.5 py-2 pl-2.5 outline-focus-ring transition duration-100 ease-linear hover:bg-primary_hover', state.isSelected && 'bg-primary_hover', state.isFocusVisible && 'outline-2 outline-offset-2', stacked && 'items-start p-2.5 pl-3.5'), children: [props.type === 'icon' && !stacked && jsxRuntime.jsx(props.icon, { className: "mr-2 size-5 text-fg-quaternary" }), props.type === 'icon' && stacked && jsxRuntime.jsx(FeaturedIcon.FeaturedIcon, { color: "gray", size: "md", theme: "modern", icon: props.icon, className: "mr-2" }), props.type === 'avatar' && jsxRuntime.jsx(Avatar.Avatar, { alt: props.alt, src: props.src, size: stacked ? 'md' : 'xs', className: "mr-2" }), props.type === 'dot' && (
|
|
21
34
|
// biome-ignore lint/a11y/noSvgWithoutTitle: svg has no title
|
|
22
|
-
jsxRuntime.jsx("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", className: cx.cx('mr-2 shrink-0 text-fg-success-secondary', stacked && 'mt-2 self-start'), children: jsxRuntime.jsx("circle", { cx: "5", cy: "5", r: "4", fill: "currentColor" }) })), jsxRuntime.jsxs("div", { className: cx.cx('flex flex-1 gap-x-1.5', stacked && 'flex-col'), children: [jsxRuntime.jsx(reactAriaComponents.Text, { slot: "label", className: "text-sm font-medium text-primary", children: typeof children === 'function' ? children(state) : children || label }), description && (jsxRuntime.jsx(reactAriaComponents.Text, { slot: "description", className: "text-sm text-tertiary", children: description }))] }), shortcutKeys && jsxRuntime.jsx(commandShortcut.CommandShortcut, { keys: shortcutKeys })] })) }));
|
|
35
|
+
jsxRuntime.jsx("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", className: cx.cx('mr-2 shrink-0 text-fg-success-secondary', stacked && 'mt-2 self-start'), children: jsxRuntime.jsx("circle", { cx: "5", cy: "5", r: "4", fill: "currentColor" }) })), jsxRuntime.jsxs("div", { className: cx.cx('flex flex-1 gap-x-1.5', stacked && 'flex-col'), children: [jsxRuntime.jsx(reactAriaComponents.Text, { slot: "label", className: "text-sm font-medium text-primary", children: typeof children === 'function' ? children(state) : children || label }), description && (jsxRuntime.jsx(reactAriaComponents.Text, { slot: "description", className: "text-sm text-tertiary", children: description }))] }), shortcutKeys && jsxRuntime.jsx(commandShortcut.CommandShortcut, { keys: hotkeys_utils.toHotkeySteps(shortcutKeys, { forDisplay: true }).map((step) => hotkeys_utils.formatHotkeyHint(step, isMac)) })] })) }));
|
|
23
36
|
};
|
|
24
37
|
|
|
25
38
|
exports.CommandDropdownMenuItem = CommandDropdownMenuItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-menu-item.cjs","sources":["../../../../../src/components/organisms/CommandMenu/components/command-menu-item.tsx"],"sourcesContent":[null],"names":["useTestIdPrefix","joinTestId","slugifyTestId","_jsx","ListBoxItem","cx","_jsxs","FeaturedIcon","Avatar","AriaText","CommandShortcut"],"mappings":"
|
|
1
|
+
{"version":3,"file":"command-menu-item.cjs","sources":["../../../../../src/components/organisms/CommandMenu/components/command-menu-item.tsx"],"sourcesContent":[null],"names":["useTestIdPrefix","useContext","CommandMenuLinkContext","usePlatform","joinTestId","slugifyTestId","_jsx","ListBoxItem","cx","_jsxs","FeaturedIcon","Avatar","AriaText","CommandShortcut","toHotkeySteps","formatHotkeyHint"],"mappings":";;;;;;;;;;;;;;AAyDA;AACA,SAAS,IAAI,CAAC,GAAW,EAAE,IAAc,EAAA;AACvC,IAAA,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC;AAChC,IAAA,OAAO,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;AACxF;MAIa,uBAAuB,GAAG,CAAC,EACtC,KAAK,EACL,QAAQ,EACR,WAAW,EACX,OAAO,EACP,YAAY,EACZ,SAAS,EACT,GAAG,KAAK,EACqB,KAAI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,aAAa,EAAC,SAAS,EAAC,uBAAuB,EAAA,QAAA,EAC3D,WAAW,EAAA,CACH,CACZ,IACG,EAEL,YAAY,IAAIN,cAAA,CAACO,+BAAe,EAAA,EAAC,IAAI,EAAEC,2BAAa,CAAC,YAAY,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,KAAKC,8BAAgB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,EAAA,CAAI,CAAA,EAAA,CACtI,CACP,EAAA,CACW;AAElB;;;;"}
|
|
@@ -1,10 +1,18 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type FC } from 'react';
|
|
2
2
|
import { type ListBoxItemProps } from 'react-aria-components';
|
|
3
3
|
interface CommandMenuItemBaseType {
|
|
4
4
|
id: string;
|
|
5
5
|
label: string;
|
|
6
6
|
description?: string;
|
|
7
7
|
stacked?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Keyboard shortcut that selects this item, shown at the end of its row. Each entry is one step:
|
|
10
|
+
* `['⌘e']` is a combination and `['g', 'p']` is G then P. `⌘` means ⌘ on macOS and Ctrl elsewhere.
|
|
11
|
+
* Combinations held with ⌘/Ctrl/Alt work everywhere, including while typing in the menu. Anything
|
|
12
|
+
* typing could produce (`['?']`, `['g', 'p']`, `['⇧a']`) is ignored while focus is in a field. A
|
|
13
|
+
* sequence cannot contain a modifier: `['⌘k', 'p']` is drawn but cannot be triggered. The shortcut
|
|
14
|
+
* reports the item through `onSelectionChange`; it does not follow `href`.
|
|
15
|
+
*/
|
|
8
16
|
shortcutKeys?: string[];
|
|
9
17
|
/** Overrides the derived `data-testid` for this item (default `<root>--item-<id>`). */
|
|
10
18
|
'data-testid'?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-menu-item.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/CommandMenu/components/command-menu-item.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"command-menu-item.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/CommandMenu/components/command-menu-item.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,EAAE,EAAc,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAiC,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAK7F,UAAU,uBAAuB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,uFAAuF;IACvF,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,kCAAmC,SAAQ,uBAAuB;IAC1E,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,UAAU,+BAAgC,SAAQ,uBAAuB;IACvE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,EAAE,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAClC;AAED,UAAU,iCAAkC,SAAQ,uBAAuB;IACzE,IAAI,EAAE,QAAQ,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb;AAED,UAAU,8BAA+B,SAAQ,uBAAuB;IACtE,IAAI,EAAE,KAAK,CAAC;IACZ,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,MAAM,2BAA2B,GACnC,kCAAkC,GAClC,+BAA+B,GAC/B,iCAAiC,GACjC,8BAA8B,CAAC;AAQnC,MAAM,MAAM,4BAA4B,GAAG,2BAA2B,GAAG,gBAAgB,CAAC;AAE1F,eAAO,MAAM,uBAAuB,GAAI,8EAQrC,4BAA4B,gCAoE9B,CAAC"}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { Avatar } from '@flipdish/ui-library/components/atoms/Avatar';
|
|
3
3
|
import { FeaturedIcon } from '@flipdish/ui-library/components/atoms/FeaturedIcon';
|
|
4
|
+
import { usePlatform } from '@flipdish/ui-library/hooks/usePlatform';
|
|
4
5
|
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
5
6
|
import { useTestIdPrefix, joinTestId, slugifyTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
7
|
+
import { useContext } from 'react';
|
|
6
8
|
import { ListBoxItem, Text } from 'react-aria-components';
|
|
9
|
+
import { toHotkeySteps, formatHotkeyHint } from '../../../../utilities/__internal__/hotkeysUtils/hotkeys.utils.js';
|
|
10
|
+
import { CommandMenuLinkContext } from '../providers/command-menu-link-context.js';
|
|
7
11
|
import { CommandShortcut } from './command-shortcut.js';
|
|
8
12
|
|
|
9
13
|
// Omit keys from an object
|
|
@@ -13,11 +17,20 @@ function omit(obj, keys) {
|
|
|
13
17
|
}
|
|
14
18
|
const CommandDropdownMenuItem = ({ label, children, description, stacked, shortcutKeys, className, ...props }) => {
|
|
15
19
|
const prefix = useTestIdPrefix();
|
|
20
|
+
const onLinkActivate = useContext(CommandMenuLinkContext);
|
|
21
|
+
const { isMac } = usePlatform();
|
|
16
22
|
const explicitTestId = props['data-testid'];
|
|
17
23
|
const itemTestId = explicitTestId ?? (prefix && props.id !== undefined ? joinTestId(prefix, `item-${slugifyTestId(String(props.id))}`) : undefined);
|
|
18
|
-
return (jsx(ListBoxItem, { ...omit(props, ['type', 'icon', 'alt', 'src']),
|
|
24
|
+
return (jsx(ListBoxItem, { ...omit(props, ['type', 'icon', 'alt', 'src']),
|
|
25
|
+
// Link items navigate without firing a selection, so this is the menu's only signal that one was activated.
|
|
26
|
+
onAction: props.href && onLinkActivate
|
|
27
|
+
? () => {
|
|
28
|
+
props.onAction?.();
|
|
29
|
+
onLinkActivate();
|
|
30
|
+
}
|
|
31
|
+
: props.onAction, "data-testid": itemTestId, textValue: label, className: (state) => cx('group block cursor-pointer px-2 py-0.5 outline-hidden', typeof className === 'function' ? className(state) : className), children: (state) => (jsxs("div", { className: cx('relative flex min-h-10 items-center justify-between rounded-lg px-2.5 py-2 pl-2.5 outline-focus-ring transition duration-100 ease-linear hover:bg-primary_hover', state.isSelected && 'bg-primary_hover', state.isFocusVisible && 'outline-2 outline-offset-2', stacked && 'items-start p-2.5 pl-3.5'), children: [props.type === 'icon' && !stacked && jsx(props.icon, { className: "mr-2 size-5 text-fg-quaternary" }), props.type === 'icon' && stacked && jsx(FeaturedIcon, { color: "gray", size: "md", theme: "modern", icon: props.icon, className: "mr-2" }), props.type === 'avatar' && jsx(Avatar, { alt: props.alt, src: props.src, size: stacked ? 'md' : 'xs', className: "mr-2" }), props.type === 'dot' && (
|
|
19
32
|
// biome-ignore lint/a11y/noSvgWithoutTitle: svg has no title
|
|
20
|
-
jsx("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", className: cx('mr-2 shrink-0 text-fg-success-secondary', stacked && 'mt-2 self-start'), children: jsx("circle", { cx: "5", cy: "5", r: "4", fill: "currentColor" }) })), jsxs("div", { className: cx('flex flex-1 gap-x-1.5', stacked && 'flex-col'), children: [jsx(Text, { slot: "label", className: "text-sm font-medium text-primary", children: typeof children === 'function' ? children(state) : children || label }), description && (jsx(Text, { slot: "description", className: "text-sm text-tertiary", children: description }))] }), shortcutKeys && jsx(CommandShortcut, { keys: shortcutKeys })] })) }));
|
|
33
|
+
jsx("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", className: cx('mr-2 shrink-0 text-fg-success-secondary', stacked && 'mt-2 self-start'), children: jsx("circle", { cx: "5", cy: "5", r: "4", fill: "currentColor" }) })), jsxs("div", { className: cx('flex flex-1 gap-x-1.5', stacked && 'flex-col'), children: [jsx(Text, { slot: "label", className: "text-sm font-medium text-primary", children: typeof children === 'function' ? children(state) : children || label }), description && (jsx(Text, { slot: "description", className: "text-sm text-tertiary", children: description }))] }), shortcutKeys && jsx(CommandShortcut, { keys: toHotkeySteps(shortcutKeys, { forDisplay: true }).map((step) => formatHotkeyHint(step, isMac)) })] })) }));
|
|
21
34
|
};
|
|
22
35
|
|
|
23
36
|
export { CommandDropdownMenuItem };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-menu-item.js","sources":["../../../../../src/components/organisms/CommandMenu/components/command-menu-item.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs","AriaText"],"mappings":"
|
|
1
|
+
{"version":3,"file":"command-menu-item.js","sources":["../../../../../src/components/organisms/CommandMenu/components/command-menu-item.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs","AriaText"],"mappings":";;;;;;;;;;;;AAyDA;AACA,SAAS,IAAI,CAAC,GAAW,EAAE,IAAc,EAAA;AACvC,IAAA,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC;AAChC,IAAA,OAAO,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;AACxF;MAIa,uBAAuB,GAAG,CAAC,EACtC,KAAK,EACL,QAAQ,EACR,WAAW,EACX,OAAO,EACP,YAAY,EACZ,SAAS,EACT,GAAG,KAAK,EACqB,KAAI;AACjC,IAAA,MAAM,MAAM,GAAG,eAAe,EAAE;AAChC,IAAA,MAAM,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;AACzD,IAAA,MAAM,EAAE,KAAK,EAAE,GAAG,WAAW,EAAE;AAC/B,IAAA,MAAM,cAAc,GAAI,KAAoC,CAAC,aAAa,CAAC;AAC3E,IAAA,MAAM,UAAU,GAAG,cAAc,KAAK,MAAM,IAAI,KAAK,CAAC,EAAE,KAAK,SAAS,GAAG,UAAU,CAAC,MAAM,EAAE,CAAA,KAAA,EAAQ,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC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require('react');
|
|
7
7
|
|
|
8
8
|
const CommandShortcut = ({ keys, withThen, className }) => {
|
|
9
|
-
return (jsxRuntime.jsx("div", { className: cx.cx('flex items-center gap-x-1', className), children: keys.map((key, index) => (
|
|
9
|
+
return (jsxRuntime.jsx("div", { className: cx.cx('flex shrink-0 items-center gap-x-1', className), children: keys.map((key, index) => (
|
|
10
10
|
// biome-ignore lint/suspicious/noArrayIndexKey: keys are static shortcut strings with no reordering or removal, so index is a stable identity
|
|
11
|
-
jsxRuntime.jsxs(React.Fragment, { children: [index !== 0 && (jsxRuntime.jsxs("div", { className: "flex items-center gap-x-1 text-quaternary", children: [withThen && jsxRuntime.jsx("span", { className: "text-sm font-medium", children: "then" }), jsxRuntime.jsx(uiIcons.ArrowRight, { size: 16, strokeWidth: 2.2 })] })), jsxRuntime.jsx("
|
|
11
|
+
jsxRuntime.jsxs(React.Fragment, { children: [index !== 0 && (jsxRuntime.jsxs("div", { className: "flex items-center gap-x-1 text-quaternary", children: [withThen && jsxRuntime.jsx("span", { className: "text-sm font-medium", children: "then" }), jsxRuntime.jsx(uiIcons.ArrowRight, { size: 16, strokeWidth: 2.2 })] })), jsxRuntime.jsx("kbd", { className: "min-w-6 rounded-[4px] bg-secondary_alt px-1 py-0.5 text-center font-body text-sm font-medium whitespace-nowrap text-tertiary ring-1 ring-secondary ring-inset", children: key })] }, index))) }));
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
exports.CommandShortcut = CommandShortcut;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-shortcut.cjs","sources":["../../../../../src/components/organisms/CommandMenu/components/command-shortcut.tsx"],"sourcesContent":[null],"names":["_jsx","cx","_jsxs","Fragment","ArrowRight"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"command-shortcut.cjs","sources":["../../../../../src/components/organisms/CommandMenu/components/command-shortcut.tsx"],"sourcesContent":[null],"names":["_jsx","cx","_jsxs","Fragment","ArrowRight"],"mappings":";;;;;;;AAaO,MAAM,eAAe,GAAG,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAwB,KAAI;IACrF,QACEA,wBAAK,SAAS,EAAEC,KAAE,CAAC,oCAAoC,EAAE,SAAS,CAAC,YAChE,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK;;QAEnBC,eAAA,CAACC,cAAQ,eACN,KAAK,KAAK,CAAC,KACVD,eAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,2CAA2C,aACvD,QAAQ,IAAIF,yBAAM,SAAS,EAAC,qBAAqB,EAAA,QAAA,EAAA,MAAA,EAAA,CAAY,EAC9DA,cAAA,CAACI,kBAAU,EAAA,EAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAE,GAAG,GAAI,CAAA,EAAA,CACtC,CACP,EACDJ,cAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,+JAA+J,EAAA,QAAA,EAC3K,GAAG,GACA,CAAA,EAAA,EATO,KAAK,CAUT,CACZ,CAAC,EAAA,CACE;AAEV;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-shortcut.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/CommandMenu/components/command-shortcut.tsx"],"names":[],"mappings":"AAMA,UAAU,oBAAoB;IAC5B,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,eAAe,GAAI,+BAA+B,oBAAoB,gCAmBlF,CAAC"}
|
|
1
|
+
{"version":3,"file":"command-shortcut.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/CommandMenu/components/command-shortcut.tsx"],"names":[],"mappings":"AAMA,UAAU,oBAAoB;IAC5B,kFAAkF;IAClF,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,eAAe,GAAI,+BAA+B,oBAAoB,gCAmBlF,CAAC"}
|
|
@@ -4,9 +4,9 @@ import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
|
4
4
|
import { Fragment } from 'react';
|
|
5
5
|
|
|
6
6
|
const CommandShortcut = ({ keys, withThen, className }) => {
|
|
7
|
-
return (jsx("div", { className: cx('flex items-center gap-x-1', className), children: keys.map((key, index) => (
|
|
7
|
+
return (jsx("div", { className: cx('flex shrink-0 items-center gap-x-1', className), children: keys.map((key, index) => (
|
|
8
8
|
// biome-ignore lint/suspicious/noArrayIndexKey: keys are static shortcut strings with no reordering or removal, so index is a stable identity
|
|
9
|
-
jsxs(Fragment, { children: [index !== 0 && (jsxs("div", { className: "flex items-center gap-x-1 text-quaternary", children: [withThen && jsx("span", { className: "text-sm font-medium", children: "then" }), jsx(ArrowRight, { size: 16, strokeWidth: 2.2 })] })), jsx("
|
|
9
|
+
jsxs(Fragment, { children: [index !== 0 && (jsxs("div", { className: "flex items-center gap-x-1 text-quaternary", children: [withThen && jsx("span", { className: "text-sm font-medium", children: "then" }), jsx(ArrowRight, { size: 16, strokeWidth: 2.2 })] })), jsx("kbd", { className: "min-w-6 rounded-[4px] bg-secondary_alt px-1 py-0.5 text-center font-body text-sm font-medium whitespace-nowrap text-tertiary ring-1 ring-secondary ring-inset", children: key })] }, index))) }));
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
export { CommandShortcut };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-shortcut.js","sources":["../../../../../src/components/organisms/CommandMenu/components/command-shortcut.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"command-shortcut.js","sources":["../../../../../src/components/organisms/CommandMenu/components/command-shortcut.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs"],"mappings":";;;;;AAaO,MAAM,eAAe,GAAG,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAwB,KAAI;IACrF,QACEA,aAAK,SAAS,EAAE,EAAE,CAAC,oCAAoC,EAAE,SAAS,CAAC,YAChE,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK;;QAEnBC,IAAA,CAAC,QAAQ,eACN,KAAK,KAAK,CAAC,KACVA,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,2CAA2C,aACvD,QAAQ,IAAID,cAAM,SAAS,EAAC,qBAAqB,EAAA,QAAA,EAAA,MAAA,EAAA,CAAY,EAC9DA,GAAA,CAAC,UAAU,EAAA,EAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAE,GAAG,GAAI,CAAA,EAAA,CACtC,CACP,EACDA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,+JAA+J,EAAA,QAAA,EAC3K,GAAG,GACA,CAAA,EAAA,EATO,KAAK,CAUT,CACZ,CAAC,EAAA,CACE;AAEV;;;;"}
|