@mittwald/flow-react-components 0.2.0-alpha.713 → 0.2.0-alpha.715

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/assets/doc-properties.json +783 -603
  3. package/dist/css/all.css +1 -1
  4. package/dist/js/_virtual/_.locale.json@df7be47291f95407e99e7159090958cc.mjs +10 -0
  5. package/dist/js/_virtual/_.locale.json@df7be47291f95407e99e7159090958cc.mjs.map +1 -0
  6. package/dist/js/components/src/components/Kbd/Kbd.mjs +51 -0
  7. package/dist/js/components/src/components/Kbd/Kbd.mjs.map +1 -0
  8. package/dist/js/components/src/components/Kbd/Kbd.module.scss.mjs +15 -0
  9. package/dist/js/components/src/components/Kbd/Kbd.module.scss.mjs.map +1 -0
  10. package/dist/js/components/src/components/MenuItem/MenuItem.module.scss.mjs +4 -2
  11. package/dist/js/components/src/components/MenuItem/MenuItem.module.scss.mjs.map +1 -1
  12. package/dist/js/components/src/components/MenuItem/components/MenuItemContent/MenuItemContent.mjs +3 -0
  13. package/dist/js/components/src/components/MenuItem/components/MenuItemContent/MenuItemContent.mjs.map +1 -1
  14. package/dist/js/components/src/components/SearchField/SearchField.mjs +36 -24
  15. package/dist/js/components/src/components/SearchField/SearchField.mjs.map +1 -1
  16. package/dist/js/components/src/components/SearchField/SearchField.module.scss.mjs +3 -1
  17. package/dist/js/components/src/components/SearchField/SearchField.module.scss.mjs.map +1 -1
  18. package/dist/js/components/src/components/Text/Text.mjs +2 -1
  19. package/dist/js/components/src/components/Text/Text.mjs.map +1 -1
  20. package/dist/js/components/src/components/propTypes/index.mjs +1 -0
  21. package/dist/js/components/src/components/propTypes/index.mjs.map +1 -1
  22. package/dist/js/components/src/integrations/react-hook-form/components/Form/Form.mjs +1 -1
  23. package/dist/js/components/src/integrations/react-hook-form/components/Form/Form.mjs.map +1 -1
  24. package/dist/js/components/src/integrations/react-hook-form/components/FormSettingsProvider/FormSettingsProvider.mjs.map +1 -1
  25. package/dist/js/default.mjs +1 -0
  26. package/dist/js/default.mjs.map +1 -1
  27. package/dist/js/flr-universal.mjs +1 -0
  28. package/dist/js/flr-universal.mjs.map +1 -1
  29. package/dist/types/components/Kbd/Kbd.d.ts +14 -0
  30. package/dist/types/components/Kbd/Kbd.d.ts.map +1 -0
  31. package/dist/types/components/Kbd/index.d.ts +2 -0
  32. package/dist/types/components/Kbd/index.d.ts.map +1 -0
  33. package/dist/types/components/Kbd/stories/Default.stories.d.ts +8 -0
  34. package/dist/types/components/Kbd/stories/Default.stories.d.ts.map +1 -0
  35. package/dist/types/components/Kbd/view.d.ts +8 -0
  36. package/dist/types/components/Kbd/view.d.ts.map +1 -0
  37. package/dist/types/components/MenuItem/components/MenuItemContent/MenuItemContent.d.ts.map +1 -1
  38. package/dist/types/components/SearchField/SearchField.d.ts.map +1 -1
  39. package/dist/types/components/SearchField/stories/Default.stories.d.ts +1 -0
  40. package/dist/types/components/SearchField/stories/Default.stories.d.ts.map +1 -1
  41. package/dist/types/components/Text/Text.d.ts.map +1 -1
  42. package/dist/types/components/propTypes/index.d.ts +2 -0
  43. package/dist/types/components/propTypes/index.d.ts.map +1 -1
  44. package/dist/types/components/public.d.ts +1 -0
  45. package/dist/types/components/public.d.ts.map +1 -1
  46. package/dist/types/integrations/react-hook-form/components/Form/Form.d.ts +2 -2
  47. package/dist/types/integrations/react-hook-form/components/Form/Form.d.ts.map +1 -1
  48. package/dist/types/integrations/react-hook-form/components/FormSettingsProvider/FormSettingsProvider.d.ts +5 -2
  49. package/dist/types/integrations/react-hook-form/components/FormSettingsProvider/FormSettingsProvider.d.ts.map +1 -1
  50. package/dist/types/integrations/react-hook-form/index.d.ts +1 -1
  51. package/dist/types/integrations/react-hook-form/index.d.ts.map +1 -1
  52. package/dist/types/views/KbdView.d.ts +5 -0
  53. package/dist/types/views/KbdView.d.ts.map +1 -0
  54. package/package.json +4 -4
@@ -0,0 +1,10 @@
1
+ "use client"
2
+ /* */
3
+ const locales = {"de-DE": { "kbd.alt": `Alt`,
4
+ "kbd.mod": `Strg`,
5
+ },"en-US": { "kbd.alt": `Alt`,
6
+ "kbd.mod": `Ctrl`,
7
+ }};
8
+
9
+ export { locales as default };
10
+ //# sourceMappingURL=_.locale.json@df7be47291f95407e99e7159090958cc.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_.locale.json@df7be47291f95407e99e7159090958cc.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -0,0 +1,51 @@
1
+ "use client"
2
+ /* */
3
+ import { jsx, jsxs } from 'react/jsx-runtime';
4
+ import { useLocalizedStringFormatter } from 'react-aria';
5
+ import locales from '../../../../_virtual/_.locale.json@df7be47291f95407e99e7159090958cc.mjs';
6
+ import clsx from 'clsx';
7
+ import styles from './Kbd.module.scss.mjs';
8
+ import { flowComponent } from '../../lib/componentFactory/flowComponent.mjs';
9
+ import { Fragment } from 'react';
10
+ import { isAppleDevice } from '@react-aria/utils';
11
+
12
+ const Kbd = flowComponent("Kbd", (props) => {
13
+ const {
14
+ keys,
15
+ className,
16
+ isDisabled,
17
+ children,
18
+ variant = "plain",
19
+ ...rest
20
+ } = props;
21
+ const rootClassName = clsx(
22
+ styles.kbd,
23
+ isDisabled && styles.disabled,
24
+ className,
25
+ styles[variant]
26
+ );
27
+ const stringFormatter = useLocalizedStringFormatter(locales);
28
+ const joinedKeys = keys?.map((key, index) => {
29
+ let formattedKey = key;
30
+ if (key === "mod") {
31
+ formattedKey = isAppleDevice() ? "⌘" : stringFormatter.format("kbd.mod");
32
+ }
33
+ if (key === "alt") {
34
+ formattedKey = isAppleDevice() ? "⌥" : stringFormatter.format("kbd.alt");
35
+ }
36
+ if (key === "shift") {
37
+ formattedKey = "⇧";
38
+ }
39
+ if (keys?.length === 1) {
40
+ return /* @__PURE__ */ jsx(Fragment, { children: formattedKey }, index);
41
+ }
42
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
43
+ /* @__PURE__ */ jsx("kbd", { children: formattedKey }),
44
+ index < keys.length - 1 && " + "
45
+ ] }, index);
46
+ });
47
+ return /* @__PURE__ */ jsx("kbd", { className: rootClassName, ...rest, children: joinedKeys ?? children });
48
+ });
49
+
50
+ export { Kbd };
51
+ //# sourceMappingURL=Kbd.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Kbd.mjs","sources":["../../../../../../src/components/Kbd/Kbd.tsx"],"sourcesContent":["import { useLocalizedStringFormatter } from \"react-aria\";\nimport locales from \"./locales/*.locale.json\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport styles from \"./Kbd.module.scss\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { Fragment, type PropsWithChildren } from \"react\";\nimport { isAppleDevice } from \"@react-aria/utils\";\n\nexport interface KbdProps\n extends PropsWithClassName, FlowComponentProps, PropsWithChildren {\n /** Array of keys to be joined */\n keys?: (string | \"mod\" | \"alt\" | \"shift\")[];\n /** Whether the component is displayed as disabled */\n isDisabled?: boolean;\n /** The visual variant @default \"plain\" */\n variant?: \"plain\" | \"soft\";\n}\n\n/** @flr-generate all */\nexport const Kbd = flowComponent(\"Kbd\", (props) => {\n const {\n keys,\n className,\n isDisabled,\n children,\n variant = \"plain\",\n ...rest\n } = props;\n\n const rootClassName = clsx(\n styles.kbd,\n isDisabled && styles.disabled,\n className,\n styles[variant],\n );\n\n const stringFormatter = useLocalizedStringFormatter(locales);\n\n const joinedKeys = keys?.map((key, index) => {\n let formattedKey = key;\n\n if (key === \"mod\") {\n formattedKey = isAppleDevice() ? \"⌘\" : stringFormatter.format(\"kbd.mod\");\n }\n if (key === \"alt\") {\n formattedKey = isAppleDevice() ? \"⌥\" : stringFormatter.format(\"kbd.alt\");\n }\n if (key === \"shift\") {\n formattedKey = \"⇧\";\n }\n\n if (keys?.length === 1) {\n return <Fragment key={index}>{formattedKey}</Fragment>;\n }\n\n return (\n <Fragment key={index}>\n <kbd>{formattedKey}</kbd>\n {index < keys.length - 1 && \" + \"}\n </Fragment>\n );\n });\n\n return (\n <kbd className={rootClassName} {...rest}>\n {joinedKeys ?? children}\n </kbd>\n );\n});\n"],"names":[],"mappings":";;;;;;;;;AAuBO,MAAM,GAAA,GAAM,aAAA,CAAc,KAAA,EAAO,CAAC,KAAA,KAAU;AACjD,EAAA,MAAM;AAAA,IACJ,IAAA;AAAA,IACA,SAAA;AAAA,IACA,UAAA;AAAA,IACA,QAAA;AAAA,IACA,OAAA,GAAU,OAAA;AAAA,IACV,GAAG;AAAA,GACL,GAAI,KAAA;AAEJ,EAAA,MAAM,aAAA,GAAgB,IAAA;AAAA,IACpB,MAAA,CAAO,GAAA;AAAA,IACP,cAAc,MAAA,CAAO,QAAA;AAAA,IACrB,SAAA;AAAA,IACA,OAAO,OAAO;AAAA,GAChB;AAEA,EAAA,MAAM,eAAA,GAAkB,4BAA4B,OAAO,CAAA;AAE3D,EAAA,MAAM,UAAA,GAAa,IAAA,EAAM,GAAA,CAAI,CAAC,KAAK,KAAA,KAAU;AAC3C,IAAA,IAAI,YAAA,GAAe,GAAA;AAEnB,IAAA,IAAI,QAAQ,KAAA,EAAO;AACjB,MAAA,YAAA,GAAe,aAAA,EAAc,GAAI,GAAA,GAAM,eAAA,CAAgB,OAAO,SAAS,CAAA;AAAA,IACzE;AACA,IAAA,IAAI,QAAQ,KAAA,EAAO;AACjB,MAAA,YAAA,GAAe,aAAA,EAAc,GAAI,GAAA,GAAM,eAAA,CAAgB,OAAO,SAAS,CAAA;AAAA,IACzE;AACA,IAAA,IAAI,QAAQ,OAAA,EAAS;AACnB,MAAA,YAAA,GAAe,GAAA;AAAA,IACjB;AAEA,IAAA,IAAI,IAAA,EAAM,WAAW,CAAA,EAAG;AACtB,MAAA,uBAAO,GAAA,CAAC,QAAA,EAAA,EAAsB,QAAA,EAAA,YAAA,EAAA,EAAR,KAAqB,CAAA;AAAA,IAC7C;AAEA,IAAA,4BACG,QAAA,EAAA,EACC,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,SAAK,QAAA,EAAA,YAAA,EAAa,CAAA;AAAA,MAClB,KAAA,GAAQ,IAAA,CAAK,MAAA,GAAS,CAAA,IAAK;AAAA,KAAA,EAAA,EAFf,KAGf,CAAA;AAAA,EAEJ,CAAC,CAAA;AAED,EAAA,2BACG,KAAA,EAAA,EAAI,SAAA,EAAW,eAAgB,GAAG,IAAA,EAChC,wBAAc,QAAA,EACjB,CAAA;AAEJ,CAAC;;;;"}
@@ -0,0 +1,15 @@
1
+ "use client"
2
+ /* */
3
+ const kbd = "flow--kbd";
4
+ const soft = "flow--kbd--soft";
5
+ const plain = "flow--kbd--plain";
6
+ const disabled = "flow--kbd--disabled";
7
+ const styles = {
8
+ kbd: kbd,
9
+ soft: soft,
10
+ plain: plain,
11
+ disabled: disabled
12
+ };
13
+
14
+ export { styles as default, disabled, kbd, plain, soft };
15
+ //# sourceMappingURL=Kbd.module.scss.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Kbd.module.scss.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
@@ -6,6 +6,7 @@ const controlIcon = "flow--menu-item--control-icon";
6
6
  const ariaDisabled = "flow--menu-item--aria-disabled";
7
7
  const avatar = "flow--menu-item--avatar";
8
8
  const stateIcon = "flow--menu-item--state-icon";
9
+ const kbd = "flow--menu-item--kbd";
9
10
  const styles = {
10
11
  menuItem: menuItem,
11
12
  "switch": "flow--menu-item--switch",
@@ -13,8 +14,9 @@ const styles = {
13
14
  controlIcon: controlIcon,
14
15
  ariaDisabled: ariaDisabled,
15
16
  avatar: avatar,
16
- stateIcon: stateIcon
17
+ stateIcon: stateIcon,
18
+ kbd: kbd
17
19
  };
18
20
 
19
- export { ariaDisabled, avatar, controlIcon, styles as default, icon, menuItem, stateIcon };
21
+ export { ariaDisabled, avatar, controlIcon, styles as default, icon, kbd, menuItem, stateIcon };
20
22
  //# sourceMappingURL=MenuItem.module.scss.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"MenuItem.module.scss.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"MenuItem.module.scss.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;"}
@@ -28,6 +28,9 @@ const MenuItemContent = (props) => {
28
28
  },
29
29
  Avatar: {
30
30
  className: styles.avatar
31
+ },
32
+ Kbd: {
33
+ className: styles.kbd
31
34
  }
32
35
  };
33
36
  const controlIconPropsContext = {
@@ -1 +1 @@
1
- {"version":3,"file":"MenuItemContent.mjs","sources":["../../../../../../../../src/components/MenuItem/components/MenuItemContent/MenuItemContent.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport type * as Aria from \"react-aria-components\";\nimport styles from \"../../MenuItem.module.scss\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport {\n IconCheckboxChecked,\n IconCheckboxEmpty,\n IconRadioOff,\n IconRadioOn,\n} from \"@/components/Icon/components/icons\";\nimport clsx from \"clsx\";\nimport { Switch } from \"@/components/Switch\";\n\ninterface Props extends Aria.MenuItemRenderProps, PropsWithChildren {\n selectionVariant?: \"control\" | \"navigation\" | \"switch\";\n}\n\nexport const MenuItemContent: FC<Props> = (props) => {\n const {\n selectionMode,\n isSelected,\n selectionVariant = \"control\",\n children,\n } = props;\n\n const propsContext: PropsContext = {\n Icon: {\n className: styles.icon,\n },\n Avatar: {\n className: styles.avatar,\n },\n };\n\n const controlIconPropsContext: PropsContext = {\n Icon: {\n className: clsx(styles.controlIcon, styles.icon),\n },\n Switch: {\n className: clsx(styles.controlIcon, styles.switch),\n },\n };\n\n const selectionIcon =\n selectionMode === \"none\" ||\n selectionVariant === \"navigation\" ? null : selectionVariant === \"switch\" ? (\n <Switch isReadOnly isSelected={isSelected} />\n ) : selectionMode === \"single\" && isSelected ? (\n <IconRadioOn />\n ) : selectionMode === \"single\" && !isSelected ? (\n <IconRadioOff />\n ) : selectionMode === \"multiple\" && isSelected ? (\n <IconCheckboxChecked />\n ) : (\n <IconCheckboxEmpty />\n );\n\n return (\n <>\n <PropsContextProvider props={controlIconPropsContext}>\n {selectionIcon}\n </PropsContextProvider>\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAkBO,MAAM,eAAA,GAA6B,CAAC,KAAA,KAAU;AACnD,EAAA,MAAM;AAAA,IACJ,aAAA;AAAA,IACA,UAAA;AAAA,IACA,gBAAA,GAAmB,SAAA;AAAA,IACnB;AAAA,GACF,GAAI,KAAA;AAEJ,EAAA,MAAM,YAAA,GAA6B;AAAA,IACjC,IAAA,EAAM;AAAA,MACJ,WAAW,MAAA,CAAO;AAAA,KACpB;AAAA,IACA,MAAA,EAAQ;AAAA,MACN,WAAW,MAAA,CAAO;AAAA;AACpB,GACF;AAEA,EAAA,MAAM,uBAAA,GAAwC;AAAA,IAC5C,IAAA,EAAM;AAAA,MACJ,SAAA,EAAW,IAAA,CAAK,MAAA,CAAO,WAAA,EAAa,OAAO,IAAI;AAAA,KACjD;AAAA,IACA,MAAA,EAAQ;AAAA,MACN,SAAA,EAAW,IAAA,CAAK,MAAA,CAAO,WAAA,EAAa,OAAO,MAAM;AAAA;AACnD,GACF;AAEA,EAAA,MAAM,aAAA,GACJ,aAAA,KAAkB,MAAA,IAClB,gBAAA,KAAqB,eAAe,IAAA,GAAO,gBAAA,KAAqB,QAAA,mBAC9D,GAAA,CAAC,UAAO,UAAA,EAAU,IAAA,EAAC,UAAA,EAAwB,CAAA,GACzC,kBAAkB,QAAA,IAAY,UAAA,mBAChC,GAAA,CAAC,WAAA,EAAA,EAAY,CAAA,GACX,aAAA,KAAkB,QAAA,IAAY,CAAC,6BACjC,GAAA,CAAC,YAAA,EAAA,EAAa,CAAA,GACZ,aAAA,KAAkB,cAAc,UAAA,mBAClC,GAAA,CAAC,mBAAA,EAAA,EAAoB,CAAA,uBAEpB,iBAAA,EAAA,EAAkB,CAAA;AAGvB,EAAA,uBACE,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,oBAAA,EAAA,EAAqB,KAAA,EAAO,uBAAA,EAC1B,QAAA,EAAA,aAAA,EACH,CAAA;AAAA,oBACA,GAAA,CAAC,oBAAA,EAAA,EAAqB,KAAA,EAAO,YAAA,EAC1B,QAAA,EACH;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"MenuItemContent.mjs","sources":["../../../../../../../../src/components/MenuItem/components/MenuItemContent/MenuItemContent.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport type * as Aria from \"react-aria-components\";\nimport styles from \"../../MenuItem.module.scss\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport {\n IconCheckboxChecked,\n IconCheckboxEmpty,\n IconRadioOff,\n IconRadioOn,\n} from \"@/components/Icon/components/icons\";\nimport clsx from \"clsx\";\nimport { Switch } from \"@/components/Switch\";\n\ninterface Props extends Aria.MenuItemRenderProps, PropsWithChildren {\n selectionVariant?: \"control\" | \"navigation\" | \"switch\";\n}\n\nexport const MenuItemContent: FC<Props> = (props) => {\n const {\n selectionMode,\n isSelected,\n selectionVariant = \"control\",\n children,\n } = props;\n\n const propsContext: PropsContext = {\n Icon: {\n className: styles.icon,\n },\n Avatar: {\n className: styles.avatar,\n },\n Kbd: {\n className: styles.kbd,\n },\n };\n\n const controlIconPropsContext: PropsContext = {\n Icon: {\n className: clsx(styles.controlIcon, styles.icon),\n },\n Switch: {\n className: clsx(styles.controlIcon, styles.switch),\n },\n };\n\n const selectionIcon =\n selectionMode === \"none\" ||\n selectionVariant === \"navigation\" ? null : selectionVariant === \"switch\" ? (\n <Switch isReadOnly isSelected={isSelected} />\n ) : selectionMode === \"single\" && isSelected ? (\n <IconRadioOn />\n ) : selectionMode === \"single\" && !isSelected ? (\n <IconRadioOff />\n ) : selectionMode === \"multiple\" && isSelected ? (\n <IconCheckboxChecked />\n ) : (\n <IconCheckboxEmpty />\n );\n\n return (\n <>\n <PropsContextProvider props={controlIconPropsContext}>\n {selectionIcon}\n </PropsContextProvider>\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAkBO,MAAM,eAAA,GAA6B,CAAC,KAAA,KAAU;AACnD,EAAA,MAAM;AAAA,IACJ,aAAA;AAAA,IACA,UAAA;AAAA,IACA,gBAAA,GAAmB,SAAA;AAAA,IACnB;AAAA,GACF,GAAI,KAAA;AAEJ,EAAA,MAAM,YAAA,GAA6B;AAAA,IACjC,IAAA,EAAM;AAAA,MACJ,WAAW,MAAA,CAAO;AAAA,KACpB;AAAA,IACA,MAAA,EAAQ;AAAA,MACN,WAAW,MAAA,CAAO;AAAA,KACpB;AAAA,IACA,GAAA,EAAK;AAAA,MACH,WAAW,MAAA,CAAO;AAAA;AACpB,GACF;AAEA,EAAA,MAAM,uBAAA,GAAwC;AAAA,IAC5C,IAAA,EAAM;AAAA,MACJ,SAAA,EAAW,IAAA,CAAK,MAAA,CAAO,WAAA,EAAa,OAAO,IAAI;AAAA,KACjD;AAAA,IACA,MAAA,EAAQ;AAAA,MACN,SAAA,EAAW,IAAA,CAAK,MAAA,CAAO,WAAA,EAAa,OAAO,MAAM;AAAA;AACnD,GACF;AAEA,EAAA,MAAM,aAAA,GACJ,aAAA,KAAkB,MAAA,IAClB,gBAAA,KAAqB,eAAe,IAAA,GAAO,gBAAA,KAAqB,QAAA,mBAC9D,GAAA,CAAC,UAAO,UAAA,EAAU,IAAA,EAAC,UAAA,EAAwB,CAAA,GACzC,kBAAkB,QAAA,IAAY,UAAA,mBAChC,GAAA,CAAC,WAAA,EAAA,EAAY,CAAA,GACX,aAAA,KAAkB,QAAA,IAAY,CAAC,6BACjC,GAAA,CAAC,YAAA,EAAA,EAAa,CAAA,GACZ,aAAA,KAAkB,cAAc,UAAA,mBAClC,GAAA,CAAC,mBAAA,EAAA,EAAoB,CAAA,uBAEpB,iBAAA,EAAA,EAAkB,CAAA;AAGvB,EAAA,uBACE,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,oBAAA,EAAA,EAAqB,KAAA,EAAO,uBAAA,EAC1B,QAAA,EAAA,aAAA,EACH,CAAA;AAAA,oBACA,GAAA,CAAC,oBAAA,EAAA,EAAqB,KAAA,EAAO,YAAA,EAC1B,QAAA,EACH;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
@@ -1,6 +1,6 @@
1
1
  "use client"
2
2
  /* */
3
- import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import { jsx, jsxs } from 'react/jsx-runtime';
4
4
  import * as Aria from 'react-aria-components';
5
5
  import formFieldStyles from '../FormField/FormField.module.scss.mjs';
6
6
  import styles from './SearchField.module.scss.mjs';
@@ -19,6 +19,7 @@ import locales from '../../../../_virtual/_.locale.json@e940efc6da10fdf09417eb07
19
19
  import { useLocalizedStringFormatter } from 'react-aria';
20
20
  import { useFieldComponent } from '../../lib/hooks/useFieldComponent.mjs';
21
21
  import { useControlledHostValueProps } from '../../lib/remote/useControlledHostValueProps.mjs';
22
+ import { TunnelProvider, TunnelExit } from '@mittwald/react-tunnel';
22
23
 
23
24
  const SearchField = flowComponent("SearchField", (props) => {
24
25
  const { children, className, ref, ...rest } = useControlledHostValueProps(props);
@@ -35,37 +36,48 @@ const SearchField = flowComponent("SearchField", (props) => {
35
36
  );
36
37
  const stringFormatter = useLocalizedStringFormatter(locales);
37
38
  const searchText = stringFormatter.format(`searchField.search`);
38
- return /* @__PURE__ */ jsxs(
39
+ const propsContext = {
40
+ Kbd: {
41
+ isDisabled: props.isDisabled,
42
+ tunnelId: "kbd",
43
+ className: styles.kbd
44
+ },
45
+ ...fieldPropsContext
46
+ };
47
+ return /* @__PURE__ */ jsx(
39
48
  Aria.SearchField,
40
49
  {
41
50
  ...rest,
42
51
  ...fieldProps,
43
52
  "aria-label": searchText,
44
53
  className: clsx(rootClassName, fieldProps.className),
45
- children: [
46
- /* @__PURE__ */ jsx(PropsContextProvider, { props: fieldPropsContext, children: /* @__PURE__ */ jsx(FieldErrorCaptureContext, { children }) }),
47
- /* @__PURE__ */ jsxs("div", { className: styles.inputContainer, children: [
48
- /* @__PURE__ */ jsx(IconSearch, { className: styles.searchIcon }),
49
- /* @__PURE__ */ jsx(
50
- Aria.Input,
51
- {
52
- placeholder: searchText,
53
- className: styles.input,
54
- ref
55
- }
56
- ),
57
- /* @__PURE__ */ jsx(
58
- Button,
59
- {
60
- className: styles.clearButton,
61
- variant: "plain",
62
- color: "secondary",
63
- children: /* @__PURE__ */ jsx(IconClose, {})
64
- }
65
- )
54
+ children: /* @__PURE__ */ jsxs(TunnelProvider, { children: [
55
+ /* @__PURE__ */ jsxs(PropsContextProvider, { props: propsContext, children: [
56
+ /* @__PURE__ */ jsx(FieldErrorCaptureContext, { children }),
57
+ /* @__PURE__ */ jsxs("div", { className: styles.inputContainer, children: [
58
+ /* @__PURE__ */ jsx(IconSearch, { className: styles.searchIcon }),
59
+ /* @__PURE__ */ jsx(
60
+ Aria.Input,
61
+ {
62
+ placeholder: searchText,
63
+ className: styles.input,
64
+ ref
65
+ }
66
+ ),
67
+ /* @__PURE__ */ jsx(TunnelExit, { id: "kbd" }),
68
+ /* @__PURE__ */ jsx(
69
+ Button,
70
+ {
71
+ className: styles.clearButton,
72
+ variant: "plain",
73
+ color: "secondary",
74
+ children: /* @__PURE__ */ jsx(IconClose, {})
75
+ }
76
+ )
77
+ ] })
66
78
  ] }),
67
79
  /* @__PURE__ */ jsx(FieldErrorView, {})
68
- ]
80
+ ] })
69
81
  }
70
82
  );
71
83
  });
@@ -1 +1 @@
1
- {"version":3,"file":"SearchField.mjs","sources":["../../../../../../src/components/SearchField/SearchField.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport formFieldStyles from \"../FormField/FormField.module.scss\";\nimport styles from \"./SearchField.module.scss\";\nimport clsx from \"clsx\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { Button } from \"@/components/Button\";\nimport { IconClose, IconSearch } from \"@/components/Icon/components/icons\";\nimport locales from \"./locales/*.locale.json\";\nimport { useLocalizedStringFormatter } from \"react-aria\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\n\nexport interface SearchFieldProps\n extends\n PropsWithChildren<Omit<Aria.SearchFieldProps, \"children\">>,\n FlowComponentProps<HTMLInputElement> {}\n\n/** @flr-generate all */\nexport const SearchField = flowComponent(\"SearchField\", (props) => {\n const { children, className, ref, ...rest } =\n useControlledHostValueProps(props);\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldProps,\n fieldPropsContext,\n } = useFieldComponent(props);\n\n const rootClassName = clsx(\n formFieldStyles.formField,\n styles.searchField,\n className,\n );\n\n const stringFormatter = useLocalizedStringFormatter(locales);\n const searchText = stringFormatter.format(`searchField.search`);\n\n return (\n <Aria.SearchField\n {...rest}\n {...fieldProps}\n aria-label={searchText}\n className={clsx(rootClassName, fieldProps.className)}\n >\n <PropsContextProvider props={fieldPropsContext}>\n <FieldErrorCaptureContext>{children}</FieldErrorCaptureContext>\n </PropsContextProvider>\n <div className={styles.inputContainer}>\n <IconSearch className={styles.searchIcon} />\n <Aria.Input\n placeholder={searchText}\n className={styles.input}\n ref={ref}\n />\n <Button\n className={styles.clearButton}\n variant=\"plain\"\n color=\"secondary\"\n >\n <IconClose />\n </Button>\n </div>\n <FieldErrorView />\n </Aria.SearchField>\n );\n});\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A;AAAA,cACb,WAAW,MAAA,CAAO,KAAA;AAAA,cAClB;AAAA;AAAA,WACF;AAAA,0BACA,GAAA;AAAA,YAAC,MAAA;AAAA,YAAA;AAAA,cACC,WAAW,MAAA,CAAO,WAAA;AAAA,cAClB,OAAA,EAAQ,OAAA;AAAA,cACR,KAAA,EAAM,WAAA;AAAA,cAEN,8BAAC,SAAA,EAAA,EAAU;AAAA;AAAA;AACb,SAAA,EACF,CAAA;AAAA,4BACC,cAAA,EAAA,EAAe;AAAA;AAAA;AAAA,GAClB;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"SearchField.mjs","sources":["../../../../../../src/components/SearchField/SearchField.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport formFieldStyles from \"../FormField/FormField.module.scss\";\nimport styles from \"./SearchField.module.scss\";\nimport clsx from \"clsx\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { Button } from \"@/components/Button\";\nimport { IconClose, IconSearch } from \"@/components/Icon/components/icons\";\nimport locales from \"./locales/*.locale.json\";\nimport { useLocalizedStringFormatter } from \"react-aria\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\nimport { TunnelExit, TunnelProvider } from \"@mittwald/react-tunnel\";\n\nexport interface SearchFieldProps\n extends\n PropsWithChildren<Omit<Aria.SearchFieldProps, \"children\">>,\n FlowComponentProps<HTMLInputElement> {}\n\n/** @flr-generate all */\nexport const SearchField = flowComponent(\"SearchField\", (props) => {\n const { children, className, ref, ...rest } =\n useControlledHostValueProps(props);\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldProps,\n fieldPropsContext,\n } = useFieldComponent(props);\n\n const rootClassName = clsx(\n formFieldStyles.formField,\n styles.searchField,\n className,\n );\n\n const stringFormatter = useLocalizedStringFormatter(locales);\n const searchText = stringFormatter.format(`searchField.search`);\n\n const propsContext: PropsContext = {\n Kbd: {\n isDisabled: props.isDisabled,\n tunnelId: \"kbd\",\n className: styles.kbd,\n },\n ...fieldPropsContext,\n };\n\n return (\n <Aria.SearchField\n {...rest}\n {...fieldProps}\n aria-label={searchText}\n className={clsx(rootClassName, fieldProps.className)}\n >\n <TunnelProvider>\n <PropsContextProvider props={propsContext}>\n <FieldErrorCaptureContext>{children}</FieldErrorCaptureContext>\n\n <div className={styles.inputContainer}>\n <IconSearch className={styles.searchIcon} />\n <Aria.Input\n placeholder={searchText}\n className={styles.input}\n ref={ref}\n />\n <TunnelExit id=\"kbd\" />\n <Button\n className={styles.clearButton}\n variant=\"plain\"\n color=\"secondary\"\n >\n <IconClose />\n </Button>\n </div>\n </PropsContextProvider>\n <FieldErrorView />\n </TunnelProvider>\n </Aria.SearchField>\n );\n});\n\nexport default SearchField;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAsBO,MAAM,WAAA,GAAc,aAAA,CAAc,aAAA,EAAe,CAAC,KAAA,KAAU;AACjE,EAAA,MAAM,EAAE,UAAU,SAAA,EAAW,GAAA,EAAK,GAAG,IAAA,EAAK,GACxC,4BAA4B,KAAK,CAAA;AAEnC,EAAA,MAAM;AAAA,IACJ,cAAA;AAAA,IACA,wBAAA;AAAA,IACA,UAAA;AAAA,IACA;AAAA,GACF,GAAI,kBAAkB,KAAK,CAAA;AAE3B,EAAA,MAAM,aAAA,GAAgB,IAAA;AAAA,IACpB,eAAA,CAAgB,SAAA;AAAA,IAChB,MAAA,CAAO,WAAA;AAAA,IACP;AAAA,GACF;AAEA,EAAA,MAAM,eAAA,GAAkB,4BAA4B,OAAO,CAAA;AAC3D,EAAA,MAAM,UAAA,GAAa,eAAA,CAAgB,MAAA,CAAO,CAAA,kBAAA,CAAoB,CAAA;AAE9D,EAAA,MAAM,YAAA,GAA6B;AAAA,IACjC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;AAAA;AAAA,GACF;AAEJ,CAAC;;;;"}
@@ -3,15 +3,17 @@
3
3
  const searchField = "flow--search-field";
4
4
  const clearButton = "flow--search-field--clear-button";
5
5
  const searchIcon = "flow--search-field--search-icon";
6
+ const kbd = "flow--search-field--kbd";
6
7
  const inputContainer = "flow--search-field--input-container";
7
8
  const input = "flow--search-field--input";
8
9
  const styles = {
9
10
  searchField: searchField,
10
11
  clearButton: clearButton,
11
12
  searchIcon: searchIcon,
13
+ kbd: kbd,
12
14
  inputContainer: inputContainer,
13
15
  input: input
14
16
  };
15
17
 
16
- export { clearButton, styles as default, input, inputContainer, searchField, searchIcon };
18
+ export { clearButton, styles as default, input, inputContainer, kbd, searchField, searchIcon };
17
19
  //# sourceMappingURL=SearchField.module.scss.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"SearchField.module.scss.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"SearchField.module.scss.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
@@ -39,7 +39,8 @@ const Text = flowComponent("Text", (props) => {
39
39
  Link: {
40
40
  inline: true
41
41
  },
42
- Icon: { className: styles.icon }
42
+ Icon: { className: styles.icon },
43
+ Kbd: { variant: "soft" }
43
44
  };
44
45
  const style = { whiteSpace, wordBreak, ...styleFromProps };
45
46
  const childrenElement = /* @__PURE__ */ jsx(PropsContextProvider, { props: propsContext, children: /* @__PURE__ */ jsx(Wrap, { if: emulateBoldWidth, children: /* @__PURE__ */ jsx(EmulatedBoldText, { children }) }) });
@@ -1 +1 @@
1
- {"version":3,"file":"Text.mjs","sources":["../../../../../../src/components/Text/Text.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport React from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport type { PropsWithElementType } from \"@/lib/types/props\";\nimport invariant from \"invariant\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { EmulatedBoldText } from \"@/components/EmulatedBoldText\";\nimport { Wrap } from \"@/components/Wrap\";\nimport clsx from \"clsx\";\nimport styles from \"./Text.module.scss\";\n\nexport interface TextProps\n extends\n PropsWithChildren,\n Omit<Aria.TextProps, \"children\" | \"elementType\">,\n PropsWithElementType<\"span\" | \"div\" | \"p\">,\n FlowComponentProps {\n /* Whether the elements width should match the width it would have with mold text. */\n emulateBoldWidth?: boolean;\n /* The color of the text. */\n color?: \"light\" | \"dark\";\n /* The alignment of the text. @default \"start\" */\n align?: \"start\" | \"end\" | \"center\";\n /* The text-wrap property of the text. @default undefined */\n wrap?: \"wrap\" | \"balance\" | \"pretty\";\n /* The white-space property of the text. @default undefined */\n whiteSpace?: React.CSSProperties[\"whiteSpace\"];\n /* The word-break property of the text. @default undefined */\n wordBreak?: React.CSSProperties[\"wordBreak\"];\n}\n\n/** @flr-generate all */\nexport const Text = flowComponent(\"Text\", (props) => {\n const {\n children,\n className,\n elementType = \"span\",\n emulateBoldWidth,\n ref,\n color,\n align = \"start\",\n wrap,\n style: styleFromProps,\n whiteSpace,\n wordBreak,\n ...rest\n } = props;\n\n const rootClassName = clsx(\n styles.text,\n color && styles[color],\n align && styles[`align-${align}`],\n wrap && styles[`wrap-${wrap}`],\n className,\n );\n\n const textProps = { ...rest, className: rootClassName };\n\n const propsContext: PropsContext = {\n Link: {\n inline: true,\n },\n Icon: { className: styles.icon },\n };\n\n const style = { whiteSpace, wordBreak, ...styleFromProps };\n\n const childrenElement = (\n <PropsContextProvider props={propsContext}>\n <Wrap if={emulateBoldWidth}>\n <EmulatedBoldText>{children}</EmulatedBoldText>\n </Wrap>\n </PropsContextProvider>\n );\n\n if (!props.slot) {\n const Element = elementType;\n return (\n <Element style={style} {...textProps} ref={ref}>\n {childrenElement}\n </Element>\n );\n }\n\n invariant(\n typeof elementType === \"string\",\n \"'elementType' in Text component must be of type string\",\n );\n\n return (\n <Aria.Text style={style} {...textProps} elementType={elementType} ref={ref}>\n {childrenElement}\n </Aria.Text>\n );\n});\n\nexport default Text;\n"],"names":[],"mappings":";;;;;;;;;;;;AAmCO,MAAM,IAAA,GAAO,aAAA,CAAc,MAAA,EAAQ,CAAC,KAAA,KAAU;AACnD,EAAA,MAAM;AAAA,IACJ,QAAA;AAAA,IACA,SAAA;AAAA,IACA,WAAA,GAAc,MAAA;AAAA,IACd,gBAAA;AAAA,IACA,GAAA;AAAA,IACA,KAAA;AAAA,IACA,KAAA,GAAQ,OAAA;AAAA,IACR,IAAA;AAAA,IACA,KAAA,EAAO,cAAA;AAAA,IACP,UAAA;AAAA,IACA,SAAA;AAAA,IACA,GAAG;AAAA,GACL,GAAI,KAAA;AAEJ,EAAA,MAAM,aAAA,GAAgB,IAAA;AAAA,IACpB,MAAA,CAAO,IAAA;AAAA,IACP,KAAA,IAAS,OAAO,KAAK,CAAA;AAAA,IACrB,KAAA,IAAS,MAAA,CAAO,CAAA,MAAA,EAAS,KAAK,CAAA,CAAE,CAAA;AAAA,IAChC,IAAA,IAAQ,MAAA,CAAO,CAAA,KAAA,EAAQ,IAAI,CAAA,CAAE,CAAA;AAAA,IAC7B;AAAA,GACF;AAEA,EAAA,MAAM,SAAA,GAAY,EAAE,GAAG,IAAA,EAAM,WAAW,aAAA,EAAc;AAEtD,EAAA,MAAM,YAAA,GAA6B;AAAA,IACjC,IAAA,EAAM;AAAA,MACJ,MAAA,EAAQ;AAAA,KACV;AAAA,IACA,IAAA,EAAM,EAAE,SAAA,EAAW,MAAA,CAAO,IAAA;AAAK,GACjC;AAEA,EAAA,MAAM,KAAA,GAAQ,EAAE,UAAA,EAAY,SAAA,EAAW,GAAG,cAAA,EAAe;AAEzD,EAAA,MAAM,eAAA,mBACJ,GAAA,CAAC,oBAAA,EAAA,EAAqB,KAAA,EAAO,YAAA,EAC3B,QAAA,kBAAA,GAAA,CAAC,IAAA,EAAA,EAAK,EAAA,EAAI,gBAAA,EACR,QAAA,kBAAA,GAAA,CAAC,gBAAA,EAAA,EAAkB,QAAA,EAAS,GAC9B,CAAA,EACF,CAAA;AAGF,EAAA,IAAI,CAAC,MAAM,IAAA,EAAM;AACf,IAAA,MAAM,OAAA,GAAU,WAAA;AAChB,IAAA,2BACG,OAAA,EAAA,EAAQ,KAAA,EAAe,GAAG,SAAA,EAAW,KACnC,QAAA,EAAA,eAAA,EACH,CAAA;AAAA,EAEJ;AAEA,EAAA,SAAA;AAAA,IACE,OAAO,WAAA,KAAgB,QAAA;AAAA,IACvB;AAAA,GACF;AAEA,EAAA,uBACE,GAAA,CAAC,KAAK,IAAA,EAAL,EAAU,OAAe,GAAG,SAAA,EAAW,WAAA,EAA0B,GAAA,EAC/D,QAAA,EAAA,eAAA,EACH,CAAA;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"Text.mjs","sources":["../../../../../../src/components/Text/Text.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport React from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport type { PropsWithElementType } from \"@/lib/types/props\";\nimport invariant from \"invariant\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { EmulatedBoldText } from \"@/components/EmulatedBoldText\";\nimport { Wrap } from \"@/components/Wrap\";\nimport clsx from \"clsx\";\nimport styles from \"./Text.module.scss\";\n\nexport interface TextProps\n extends\n PropsWithChildren,\n Omit<Aria.TextProps, \"children\" | \"elementType\">,\n PropsWithElementType<\"span\" | \"div\" | \"p\">,\n FlowComponentProps {\n /* Whether the elements width should match the width it would have with mold text. */\n emulateBoldWidth?: boolean;\n /* The color of the text. */\n color?: \"light\" | \"dark\";\n /* The alignment of the text. @default \"start\" */\n align?: \"start\" | \"end\" | \"center\";\n /* The text-wrap property of the text. @default undefined */\n wrap?: \"wrap\" | \"balance\" | \"pretty\";\n /* The white-space property of the text. @default undefined */\n whiteSpace?: React.CSSProperties[\"whiteSpace\"];\n /* The word-break property of the text. @default undefined */\n wordBreak?: React.CSSProperties[\"wordBreak\"];\n}\n\n/** @flr-generate all */\nexport const Text = flowComponent(\"Text\", (props) => {\n const {\n children,\n className,\n elementType = \"span\",\n emulateBoldWidth,\n ref,\n color,\n align = \"start\",\n wrap,\n style: styleFromProps,\n whiteSpace,\n wordBreak,\n ...rest\n } = props;\n\n const rootClassName = clsx(\n styles.text,\n color && styles[color],\n align && styles[`align-${align}`],\n wrap && styles[`wrap-${wrap}`],\n className,\n );\n\n const textProps = { ...rest, className: rootClassName };\n\n const propsContext: PropsContext = {\n Link: {\n inline: true,\n },\n Icon: { className: styles.icon },\n Kbd: { variant: \"soft\" },\n };\n\n const style = { whiteSpace, wordBreak, ...styleFromProps };\n\n const childrenElement = (\n <PropsContextProvider props={propsContext}>\n <Wrap if={emulateBoldWidth}>\n <EmulatedBoldText>{children}</EmulatedBoldText>\n </Wrap>\n </PropsContextProvider>\n );\n\n if (!props.slot) {\n const Element = elementType;\n return (\n <Element style={style} {...textProps} ref={ref}>\n {childrenElement}\n </Element>\n );\n }\n\n invariant(\n typeof elementType === \"string\",\n \"'elementType' in Text component must be of type string\",\n );\n\n return (\n <Aria.Text style={style} {...textProps} elementType={elementType} ref={ref}>\n {childrenElement}\n </Aria.Text>\n );\n});\n\nexport default Text;\n"],"names":[],"mappings":";;;;;;;;;;;;AAmCO,MAAM,IAAA,GAAO,aAAA,CAAc,MAAA,EAAQ,CAAC,KAAA,KAAU;AACnD,EAAA,MAAM;AAAA,IACJ,QAAA;AAAA,IACA,SAAA;AAAA,IACA,WAAA,GAAc,MAAA;AAAA,IACd,gBAAA;AAAA,IACA,GAAA;AAAA,IACA,KAAA;AAAA,IACA,KAAA,GAAQ,OAAA;AAAA,IACR,IAAA;AAAA,IACA,KAAA,E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;AAAA,IACvB;AAAA,GACF;AAEA,EAAA,uBACE,GAAA,CAAC,KAAK,IAAA,EAAL,EAAU,OAAe,GAAG,SAAA,EAAW,WAAA,EAA0B,GAAA,EAC/D,QAAA,EAAA,eAAA,EACH,CAAA;AAEJ,CAAC;;;;"}
@@ -69,6 +69,7 @@ const propsContextSupportingComponentsMap = {
69
69
  Segment: true,
70
70
  SegmentedControl: true,
71
71
  Select: true,
72
+ Kbd: true,
72
73
  Slider: true,
73
74
  Switch: true,
74
75
  Tabs: true,
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../../../src/components/propTypes/index.ts"],"sourcesContent":["import type { TextProps } from \"@/components/Text\";\nimport type { ButtonProps } from \"@/components/Button\";\nimport type { IconProps } from \"@/components/Icon\";\nimport type { LabelProps } from \"@/components/Label\";\nimport type { ContentProps } from \"@/components/Content\";\nimport type { LayoutCardProps } from \"@/components/LayoutCard\";\nimport type { LinkProps } from \"@/components/Link\";\nimport type { LightBoxProps } from \"@/components/LightBox\";\nimport type { FieldErrorProps } from \"@/components/FieldError\";\nimport type { FieldDescriptionProps } from \"@/components/FieldDescription\";\nimport type { AlertProps } from \"@/components/Alert\";\nimport type { HeadingProps } from \"@/components/Heading\";\nimport type { InitialsProps } from \"@/components/Initials\";\nimport type { ImageProps } from \"@/components/Image\";\nimport type { CopyButtonProps } from \"@/components/CopyButton\";\nimport type { HeaderProps } from \"@/components/Header/\";\nimport type { SwitchProps } from \"@/components/Switch\";\nimport type { AlertBadgeProps } from \"@/components/AlertBadge\";\nimport type { ActionGroupProps } from \"@/components/ActionGroup\";\nimport type { AvatarProps } from \"@/components/Avatar\";\nimport type { ActionProps } from \"@/components/Action\";\nimport type {\n ContextMenuProps,\n ContextMenuTriggerProps,\n MenuItemProps,\n} from \"@/components/ContextMenu\";\nimport type { SelectProps } from \"@/components/Select\";\nimport type {\n RadioButtonProps,\n RadioGroupProps,\n RadioProps,\n} from \"@/components/RadioGroup\";\nimport type { TextFieldProps } from \"@/components/TextField\";\nimport type { NumberFieldProps } from \"@/components/NumberField\";\nimport type { TextAreaProps } from \"@/components/TextArea\";\nimport type { CheckboxGroupProps } from \"@/components/CheckboxGroup\";\nimport type { CheckboxProps } from \"@/components/Checkbox\";\nimport type { CheckboxButtonProps } from \"@/components/CheckboxButton\";\nimport type { TabsProps } from \"@/components/Tabs\";\nimport type { ModalProps } from \"@/components/Modal\";\nimport type { SectionProps } from \"@/components/Section\";\nimport type { SliderProps } from \"@/components/Slider\";\nimport type { CounterBadgeProps } from \"@/components/CounterBadge\";\nimport type { FlowComponentName } from \"@/components/propTypes/types\";\nimport type {\n ContextualHelpProps,\n ContextualHelpTriggerProps,\n} from \"@/components/ContextualHelp\";\nimport type { PopoverProps, PopoverTriggerProps } from \"@/components/Popover\";\nimport type { ContextMenuSectionProps } from \"@/components/ContextMenu/components/ContextMenuSection\";\nimport type { ListProps } from \"@/components/List\";\nimport type { PasswordCreationFieldProps } from \"@/components/PasswordCreationField\";\nimport type { SearchFieldProps } from \"@/components/SearchField\";\nimport type { BadgeProps } from \"@/components/Badge\";\nimport type { DatePickerProps } from \"@/components/DatePicker\";\nimport type * as Aria from \"react-aria-components\";\nimport type { DateRangePickerProps } from \"@/components/DateRangePicker\";\nimport type { TimeFieldProps } from \"@/components/TimeField\";\nimport type { AlertIconProps } from \"@/components/AlertIcon\";\nimport type { ListSummaryProps } from \"@/components/List/components/ListSummary/ListSummary\";\nimport type { SegmentedControlProps } from \"@/components/SegmentedControl\";\nimport type { SegmentProps } from \"@/components/SegmentedControl/components/Segment\";\nimport type { FileCardProps } from \"@/components/FileCard\";\nimport type { FileFieldProps } from \"@/components/FileField\";\nimport type { AlignProps } from \"@/components/Align\";\nimport type { CountryOptionsProps } from \"src/components/CountryOptions\";\nimport type { ComboBoxProps } from \"@/components/ComboBox\";\nimport type { OptionProps } from \"@/components/Option\";\nimport type { MessageProps } from \"@/components/Message\";\nimport type { MessageThreadProps } from \"@/components/MessageThread\";\nimport type { FileCardListProps } from \"@/components/FileCardList\";\nimport type { AccentBoxProps } from \"@/components/AccentBox\";\nimport type { ColumnLayoutProps } from \"@/components/ColumnLayout\";\nimport type { MenuTriggerProps } from \"@/components/OverlayTrigger\";\nimport type { ProgressBarProps } from \"@/components/ProgressBar\";\nimport type { FileDropZoneProps } from \"@/components/FileDropZone\";\nimport type { NavigationProps } from \"@/components/Navigation\";\nimport type { NavigationGroupProps } from \"@/components/Navigation/components/NavigationGroup\";\nimport type { AutocompleteProps } from \"@/components/Autocomplete/Autocomplete\";\nimport type { OptionsProps } from \"@/components/Options/Options\";\nimport type { MarkdownEditorProps } from \"@/components/MarkdownEditor\";\nimport type { AlertTextProps } from \"@/components/AlertText\";\nimport type { IllustratedMessageProps } from \"@/components/IllustratedMessage\";\nimport type { RatingProps } from \"@/components/Rating\";\n\nexport * from \"./types\";\n\nexport interface FlowComponentPropsTypes {\n AccentBox: AccentBoxProps;\n Action: ActionProps;\n ActionGroup: ActionGroupProps;\n Alert: AlertProps;\n AlertBadge: AlertBadgeProps;\n AlertIcon: AlertIconProps;\n AlertText: AlertTextProps;\n Align: AlignProps;\n Avatar: AvatarProps;\n Autocomplete: AutocompleteProps;\n Badge: BadgeProps;\n Button: ButtonProps;\n Checkbox: CheckboxProps;\n CheckboxButton: CheckboxButtonProps;\n CheckboxGroup: CheckboxGroupProps;\n ColumnLayout: ColumnLayoutProps;\n ComboBox: ComboBoxProps;\n Content: ContentProps;\n ContextMenu: ContextMenuProps;\n ContextMenuSection: ContextMenuSectionProps;\n ContextMenuTrigger: ContextMenuTriggerProps;\n ContextualHelp: ContextualHelpProps;\n ContextualHelpTrigger: ContextualHelpTriggerProps;\n CopyButton: CopyButtonProps;\n CounterBadge: CounterBadgeProps;\n CountryOptions: CountryOptionsProps;\n DatePicker: DatePickerProps<Aria.DateValue>;\n DateRangePicker: DateRangePickerProps<Aria.DateValue>;\n FieldDescription: FieldDescriptionProps;\n FieldError: FieldErrorProps;\n FileCard: FileCardProps;\n FileCardList: FileCardListProps;\n FileField: FileFieldProps;\n FileDropZone: FileDropZoneProps;\n Header: HeaderProps;\n Heading: HeadingProps;\n Icon: IconProps;\n IllustratedMessage: IllustratedMessageProps;\n Image: ImageProps;\n Initials: InitialsProps;\n Label: LabelProps;\n LayoutCard: LayoutCardProps;\n LightBox: LightBoxProps;\n Link: LinkProps;\n List: ListProps<never>;\n ListSummary: ListSummaryProps;\n MarkdownEditor: MarkdownEditorProps;\n MenuItem: MenuItemProps;\n MenuTrigger: MenuTriggerProps;\n Message: MessageProps;\n MessageThread: MessageThreadProps;\n Modal: ModalProps;\n Navigation: NavigationProps;\n NavigationGroup: NavigationGroupProps;\n NumberField: NumberFieldProps;\n Option: OptionProps;\n Options: OptionsProps;\n Popover: PopoverProps;\n PopoverTrigger: PopoverTriggerProps;\n PasswordCreationField: PasswordCreationFieldProps;\n ProgressBar: ProgressBarProps;\n Radio: RadioProps;\n RadioButton: RadioButtonProps;\n RadioGroup: RadioGroupProps;\n Rating: RatingProps;\n SearchField: SearchFieldProps;\n Section: SectionProps;\n Segment: SegmentProps;\n SegmentedControl: SegmentedControlProps;\n Select: SelectProps;\n Slider: SliderProps;\n Switch: SwitchProps;\n Tabs: TabsProps;\n TabTitle: TabsProps;\n Text: TextProps;\n TextArea: TextAreaProps;\n TextField: TextFieldProps;\n TimeField: TimeFieldProps;\n}\n\nconst propsContextSupportingComponentsMap: Record<\n keyof FlowComponentPropsTypes,\n true\n> = {\n AccentBox: true,\n Action: true,\n ActionGroup: true,\n Avatar: true,\n Autocomplete: true,\n Alert: true,\n AlertBadge: true,\n AlertIcon: true,\n AlertText: true,\n Align: true,\n Badge: true,\n Button: true,\n Checkbox: true,\n CheckboxButton: true,\n CheckboxGroup: true,\n ColumnLayout: true,\n ComboBox: true,\n Content: true,\n ContextMenu: true,\n ContextMenuSection: true,\n ContextMenuTrigger: true,\n ContextualHelp: true,\n ContextualHelpTrigger: true,\n CopyButton: true,\n CounterBadge: true,\n CountryOptions: true,\n DatePicker: true,\n DateRangePicker: true,\n FieldDescription: true,\n FieldError: true,\n FileCard: true,\n FileCardList: true,\n FileField: true,\n FileDropZone: true,\n Header: true,\n Heading: true,\n Icon: true,\n IllustratedMessage: true,\n Image: true,\n Initials: true,\n Label: true,\n LayoutCard: true,\n LightBox: true,\n Link: true,\n List: true,\n ListSummary: true,\n MarkdownEditor: true,\n MenuItem: true,\n MenuTrigger: true,\n Message: true,\n MessageThread: true,\n Modal: true,\n Navigation: true,\n NavigationGroup: true,\n NumberField: true,\n Radio: true,\n Option: true,\n Options: true,\n Popover: true,\n PopoverTrigger: true,\n PasswordCreationField: true,\n ProgressBar: true,\n RadioButton: true,\n RadioGroup: true,\n Rating: true,\n SearchField: true,\n Section: true,\n Segment: true,\n SegmentedControl: true,\n Select: true,\n Slider: true,\n Switch: true,\n Tabs: true,\n TabTitle: true,\n TestComponent: true,\n Text: true,\n TextArea: true,\n TextField: true,\n TimeField: true,\n};\n\nexport const propsContextSupportingComponents = Object.keys(\n propsContextSupportingComponentsMap,\n) as FlowComponentName[];\n"],"names":[],"mappings":"AAwKA,MAAM,mCAAA,GAGF;AAAA,EACF,SAAA,EAAW,IAAA;AAAA,EACX,MAAA,EAAQ,IAAA;AAAA,EACR,WAAA,EAAa,IAAA;AAAA,EACb,MAAA,EAAQ,IAAA;AAAA,EACR,YAAA,EAAc,IAAA;AAAA,EACd,KAAA,EAAO,IAAA;AAAA,EACP,UAAA,EAAY,IAAA;AAAA,EACZ,SAAA,EAAW,IAAA;AAAA,EACX,SAAA,EAAW,IAAA;AAAA,EACX,KAAA,EAAO,IAAA;AAAA,EACP,KAAA,EAAO,IAAA;AAAA,EACP,MAAA,EAAQ,IAAA;AAAA,EACR,QAAA,EAAU,IAAA;AAAA,EACV,cAAA,EAAgB,IAAA;AAAA,EAChB,aAAA,EAAe,IAAA;AAAA,EACf,YAAA,EAAc,IAAA;AAAA,EACd,QAAA,EAAU,IAAA;AAAA,EACV,OAAA,EAAS,IAAA;AAAA,EAC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AAgB,IAAA;AAAA,EAChB,qBAAA,EAAuB,IAAA;AAAA,EACvB,WAAA,EAAa,IAAA;AAAA,EACb,WAAA,EAAa,IAAA;AAAA,EACb,UAAA,EAAY,IAAA;AAAA,EACZ,MAAA,EAAQ,IAAA;AAAA,EACR,WAAA,EAAa,IAAA;AAAA,EACb,OAAA,EAAS,IAAA;AAAA,EACT,OAAA,EAAS,IAAA;AAAA,EACT,gBAAA,EAAkB,IAAA;AAAA,EAClB,MAAA,EAAQ,IAAA;AAAA,EACR,MAAA,EAAQ,IAAA;AAAA,EACR,MAAA,EAAQ,IAAA;AAAA,EACR,IAAA,EAAM,IAAA;AAAA,EACN,QAAA,EAAU,IAAA;AAAA,EACV,aAAA,EAAe,IAAA;AAAA,EACf,IAAA,EAAM,IAAA;AAAA,EACN,QAAA,EAAU,IAAA;AAAA,EACV,SAAA,EAAW,IAAA;AAAA,EACX,SAAA,EAAW;AACb,CAAA;AAEO,MAAM,mCAAmC,MAAA,CAAO,IAAA;AAAA,EACrD;AACF;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../../src/components/propTypes/index.ts"],"sourcesContent":["import type { TextProps } from \"@/components/Text\";\nimport type { ButtonProps } from \"@/components/Button\";\nimport type { IconProps } from \"@/components/Icon\";\nimport type { LabelProps } from \"@/components/Label\";\nimport type { ContentProps } from \"@/components/Content\";\nimport type { LayoutCardProps } from \"@/components/LayoutCard\";\nimport type { LinkProps } from \"@/components/Link\";\nimport type { LightBoxProps } from \"@/components/LightBox\";\nimport type { FieldErrorProps } from \"@/components/FieldError\";\nimport type { FieldDescriptionProps } from \"@/components/FieldDescription\";\nimport type { AlertProps } from \"@/components/Alert\";\nimport type { HeadingProps } from \"@/components/Heading\";\nimport type { InitialsProps } from \"@/components/Initials\";\nimport type { ImageProps } from \"@/components/Image\";\nimport type { CopyButtonProps } from \"@/components/CopyButton\";\nimport type { HeaderProps } from \"@/components/Header/\";\nimport type { SwitchProps } from \"@/components/Switch\";\nimport type { AlertBadgeProps } from \"@/components/AlertBadge\";\nimport type { ActionGroupProps } from \"@/components/ActionGroup\";\nimport type { AvatarProps } from \"@/components/Avatar\";\nimport type { ActionProps } from \"@/components/Action\";\nimport type {\n ContextMenuProps,\n ContextMenuTriggerProps,\n MenuItemProps,\n} from \"@/components/ContextMenu\";\nimport type { SelectProps } from \"@/components/Select\";\nimport type {\n RadioButtonProps,\n RadioGroupProps,\n RadioProps,\n} from \"@/components/RadioGroup\";\nimport type { TextFieldProps } from \"@/components/TextField\";\nimport type { NumberFieldProps } from \"@/components/NumberField\";\nimport type { TextAreaProps } from \"@/components/TextArea\";\nimport type { CheckboxGroupProps } from \"@/components/CheckboxGroup\";\nimport type { CheckboxProps } from \"@/components/Checkbox\";\nimport type { CheckboxButtonProps } from \"@/components/CheckboxButton\";\nimport type { TabsProps } from \"@/components/Tabs\";\nimport type { ModalProps } from \"@/components/Modal\";\nimport type { SectionProps } from \"@/components/Section\";\nimport type { SliderProps } from \"@/components/Slider\";\nimport type { CounterBadgeProps } from \"@/components/CounterBadge\";\nimport type { FlowComponentName } from \"@/components/propTypes/types\";\nimport type {\n ContextualHelpProps,\n ContextualHelpTriggerProps,\n} from \"@/components/ContextualHelp\";\nimport type { PopoverProps, PopoverTriggerProps } from \"@/components/Popover\";\nimport type { ContextMenuSectionProps } from \"@/components/ContextMenu/components/ContextMenuSection\";\nimport type { ListProps } from \"@/components/List\";\nimport type { PasswordCreationFieldProps } from \"@/components/PasswordCreationField\";\nimport type { SearchFieldProps } from \"@/components/SearchField\";\nimport type { BadgeProps } from \"@/components/Badge\";\nimport type { DatePickerProps } from \"@/components/DatePicker\";\nimport type * as Aria from \"react-aria-components\";\nimport type { DateRangePickerProps } from \"@/components/DateRangePicker\";\nimport type { TimeFieldProps } from \"@/components/TimeField\";\nimport type { AlertIconProps } from \"@/components/AlertIcon\";\nimport type { ListSummaryProps } from \"@/components/List/components/ListSummary/ListSummary\";\nimport type { SegmentedControlProps } from \"@/components/SegmentedControl\";\nimport type { SegmentProps } from \"@/components/SegmentedControl/components/Segment\";\nimport type { FileCardProps } from \"@/components/FileCard\";\nimport type { FileFieldProps } from \"@/components/FileField\";\nimport type { AlignProps } from \"@/components/Align\";\nimport type { CountryOptionsProps } from \"src/components/CountryOptions\";\nimport type { ComboBoxProps } from \"@/components/ComboBox\";\nimport type { OptionProps } from \"@/components/Option\";\nimport type { MessageProps } from \"@/components/Message\";\nimport type { MessageThreadProps } from \"@/components/MessageThread\";\nimport type { FileCardListProps } from \"@/components/FileCardList\";\nimport type { AccentBoxProps } from \"@/components/AccentBox\";\nimport type { ColumnLayoutProps } from \"@/components/ColumnLayout\";\nimport type { MenuTriggerProps } from \"@/components/OverlayTrigger\";\nimport type { ProgressBarProps } from \"@/components/ProgressBar\";\nimport type { FileDropZoneProps } from \"@/components/FileDropZone\";\nimport type { NavigationProps } from \"@/components/Navigation\";\nimport type { NavigationGroupProps } from \"@/components/Navigation/components/NavigationGroup\";\nimport type { AutocompleteProps } from \"@/components/Autocomplete/Autocomplete\";\nimport type { OptionsProps } from \"@/components/Options/Options\";\nimport type { MarkdownEditorProps } from \"@/components/MarkdownEditor\";\nimport type { AlertTextProps } from \"@/components/AlertText\";\nimport type { IllustratedMessageProps } from \"@/components/IllustratedMessage\";\nimport type { RatingProps } from \"@/components/Rating\";\nimport type { KbdProps } from \"@/components/Kbd/Kbd\";\n\nexport * from \"./types\";\n\nexport interface FlowComponentPropsTypes {\n AccentBox: AccentBoxProps;\n Action: ActionProps;\n ActionGroup: ActionGroupProps;\n Alert: AlertProps;\n AlertBadge: AlertBadgeProps;\n AlertIcon: AlertIconProps;\n AlertText: AlertTextProps;\n Align: AlignProps;\n Avatar: AvatarProps;\n Autocomplete: AutocompleteProps;\n Badge: BadgeProps;\n Button: ButtonProps;\n Checkbox: CheckboxProps;\n CheckboxButton: CheckboxButtonProps;\n CheckboxGroup: CheckboxGroupProps;\n ColumnLayout: ColumnLayoutProps;\n ComboBox: ComboBoxProps;\n Content: ContentProps;\n ContextMenu: ContextMenuProps;\n ContextMenuSection: ContextMenuSectionProps;\n ContextMenuTrigger: ContextMenuTriggerProps;\n ContextualHelp: ContextualHelpProps;\n ContextualHelpTrigger: ContextualHelpTriggerProps;\n CopyButton: CopyButtonProps;\n CounterBadge: CounterBadgeProps;\n CountryOptions: CountryOptionsProps;\n DatePicker: DatePickerProps<Aria.DateValue>;\n DateRangePicker: DateRangePickerProps<Aria.DateValue>;\n FieldDescription: FieldDescriptionProps;\n FieldError: FieldErrorProps;\n FileCard: FileCardProps;\n FileCardList: FileCardListProps;\n FileField: FileFieldProps;\n FileDropZone: FileDropZoneProps;\n Header: HeaderProps;\n Heading: HeadingProps;\n Icon: IconProps;\n IllustratedMessage: IllustratedMessageProps;\n Image: ImageProps;\n Initials: InitialsProps;\n Label: LabelProps;\n LayoutCard: LayoutCardProps;\n LightBox: LightBoxProps;\n Link: LinkProps;\n List: ListProps<never>;\n ListSummary: ListSummaryProps;\n MarkdownEditor: MarkdownEditorProps;\n MenuItem: MenuItemProps;\n MenuTrigger: MenuTriggerProps;\n Message: MessageProps;\n MessageThread: MessageThreadProps;\n Modal: ModalProps;\n Navigation: NavigationProps;\n NavigationGroup: NavigationGroupProps;\n NumberField: NumberFieldProps;\n Option: OptionProps;\n Options: OptionsProps;\n Popover: PopoverProps;\n PopoverTrigger: PopoverTriggerProps;\n PasswordCreationField: PasswordCreationFieldProps;\n ProgressBar: ProgressBarProps;\n Radio: RadioProps;\n RadioButton: RadioButtonProps;\n RadioGroup: RadioGroupProps;\n Rating: RatingProps;\n SearchField: SearchFieldProps;\n Section: SectionProps;\n Segment: SegmentProps;\n SegmentedControl: SegmentedControlProps;\n Select: SelectProps;\n Kbd: KbdProps;\n Slider: SliderProps;\n Switch: SwitchProps;\n Tabs: TabsProps;\n TabTitle: TabsProps;\n Text: TextProps;\n TextArea: TextAreaProps;\n TextField: TextFieldProps;\n TimeField: TimeFieldProps;\n}\n\nconst propsContextSupportingComponentsMap: Record<\n keyof FlowComponentPropsTypes,\n true\n> = {\n AccentBox: true,\n Action: true,\n ActionGroup: true,\n Avatar: true,\n Autocomplete: true,\n Alert: true,\n AlertBadge: true,\n AlertIcon: true,\n AlertText: true,\n Align: true,\n Badge: true,\n Button: true,\n Checkbox: true,\n CheckboxButton: true,\n CheckboxGroup: true,\n ColumnLayout: true,\n ComboBox: true,\n Content: true,\n ContextMenu: true,\n ContextMenuSection: true,\n ContextMenuTrigger: true,\n ContextualHelp: true,\n ContextualHelpTrigger: true,\n CopyButton: true,\n CounterBadge: true,\n CountryOptions: true,\n DatePicker: true,\n DateRangePicker: true,\n FieldDescription: true,\n FieldError: true,\n FileCard: true,\n FileCardList: true,\n FileField: true,\n FileDropZone: true,\n Header: true,\n Heading: true,\n Icon: true,\n IllustratedMessage: true,\n Image: true,\n Initials: true,\n Label: true,\n LayoutCard: true,\n LightBox: true,\n Link: true,\n List: true,\n ListSummary: true,\n MarkdownEditor: true,\n MenuItem: true,\n MenuTrigger: true,\n Message: true,\n MessageThread: true,\n Modal: true,\n Navigation: true,\n NavigationGroup: true,\n NumberField: true,\n Radio: true,\n Option: true,\n Options: true,\n Popover: true,\n PopoverTrigger: true,\n PasswordCreationField: true,\n ProgressBar: true,\n RadioButton: true,\n RadioGroup: true,\n Rating: true,\n SearchField: true,\n Section: true,\n Segment: true,\n SegmentedControl: true,\n Select: true,\n Kbd: true,\n Slider: true,\n Switch: true,\n Tabs: true,\n TabTitle: true,\n TestComponent: true,\n Text: true,\n TextArea: true,\n TextField: true,\n TimeField: true,\n};\n\nexport const propsContextSupportingComponents = Object.keys(\n propsContextSupportingComponentsMap,\n) as FlowComponentName[];\n"],"names":[],"mappings":"AA0KA,MAAM,mCAAA,GAGF;AAAA,EACF,SAAA,EAAW,IAAA;AAAA,EACX,MAAA,EAAQ,IAAA;AAAA,EACR,WAAA,EAAa,IAAA;AAAA,EACb,MAAA,EAAQ,IAAA;AAAA,EACR,YAAA,EAAc,IAAA;AAAA,EACd,KAAA,EAAO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A,EAChB,QAAA,EAAU,IAAA;AAAA,EACV,WAAA,EAAa,IAAA;AAAA,EACb,OAAA,EAAS,IAAA;AAAA,EACT,aAAA,EAAe,IAAA;AAAA,EACf,KAAA,EAAO,IAAA;AAAA,EACP,UAAA,EAAY,IAAA;AAAA,EACZ,eAAA,EAAiB,IAAA;AAAA,EACjB,WAAA,EAAa,IAAA;AAAA,EACb,KAAA,EAAO,IAAA;AAAA,EACP,MAAA,EAAQ,IAAA;AAAA,EACR,OAAA,EAAS,IAAA;AAAA,EACT,OAAA,EAAS,IAAA;AAAA,EACT,cAAA,EAAgB,IAAA;AAAA,EAChB,qBAAA,EAAuB,IAAA;AAAA,EACvB,WAAA,EAAa,IAAA;AAAA,EACb,WAAA,EAAa,IAAA;AAAA,EACb,UAAA,EAAY,IAAA;AAAA,EACZ,MAAA,EAAQ,IAAA;AAAA,EACR,WAAA,EAAa,IAAA;AAAA,EACb,OAAA,EAAS,IAAA;AAAA,EACT,OAAA,EAAS,IAAA;AAAA,EACT,gBAAA,EAAkB,IAAA;AAAA,EAClB,MAAA,EAAQ,IAAA;AAAA,EACR,GAAA,EAAK,IAAA;AAAA,EACL,MAAA,EAAQ,IAAA;AAAA,EACR,MAAA,EAAQ,IAAA;AAAA,EACR,IAAA,EAAM,IAAA;AAAA,EACN,QAAA,EAAU,IAAA;AAAA,EACV,aAAA,EAAe,IAAA;AAAA,EACf,IAAA,EAAM,IAAA;AAAA,EACN,QAAA,EAAU,IAAA;AAAA,EACV,SAAA,EAAW,IAAA;AAAA,EACX,SAAA,EAAW;AACb,CAAA;AAEO,MAAM,mCAAmC,MAAA,CAAO,IAAA;AAAA,EACrD;AACF;;;;"}
@@ -44,7 +44,7 @@ function Form(props) {
44
44
  }
45
45
  });
46
46
  const { submitInterceptor } = useFormSettings();
47
- const onSubmit = submitInterceptor ? (values) => submitInterceptor(onSubmitProp, values) : onSubmitProp;
47
+ const onSubmit = submitInterceptor ? (values) => submitInterceptor(onSubmitProp, values, { form }) : onSubmitProp;
48
48
  const handleSubmitResult = (result) => {
49
49
  if (typeof result === "function") {
50
50
  afterSubmitCallback.current = result;
@@ -1 +1 @@
1
- {"version":3,"file":"Form.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/Form/Form.tsx"],"sourcesContent":["import ConfirmUnsavedChangesModal from \"@/components/Modal/components/ConfirmUnsavedChangesModal\";\nimport { useHotkeySubmit } from \"@/integrations/react-hook-form/components/Form/useHotkeySubmit\";\nimport { FormContextProvider } from \"@/integrations/react-hook-form/components/FormContextProvider/FormContextProvider\";\nimport { flags } from \"@/integrations/react-hook-form/flags\";\nimport { useModalController } from \"@/lib/controller\";\nimport {\n type BaseSyntheticEvent,\n type ComponentProps,\n type FC,\n type FormEventHandler,\n type PropsWithChildren,\n type Ref,\n useId,\n useMemo,\n useRef,\n} from \"react\";\nimport type {\n FieldValues,\n Path,\n SubmitHandler,\n UseFormReturn,\n} from \"react-hook-form\";\nimport { FormProvider as RhfFormContextProvider } from \"react-hook-form\";\nimport { useFormRootErrorController } from \"../FormRootError/useFormRootErrorController\";\nimport { FormRootError } from \"../../lib/FormRootError\";\nimport { useFormSettings } from \"../FormSettingsProvider/FormSettingsProvider\";\n\nexport type FormOnSubmitHandler<F extends FieldValues> = SubmitHandler<F>;\n\nexport type AfterFormSubmitCallback = (...unknownArgs: unknown[]) => unknown;\n\nexport interface FormAutoResetOptions {\n onAfterModalClose?: boolean;\n}\n\ntype FormComponentType = FC<\n PropsWithChildren<{\n id: string;\n onSubmit?: FormEventHandler | FormOnSubmitHandler<never>;\n ref?: Ref<HTMLFormElement>;\n }>\n>;\n\nexport interface FormProps<F extends FieldValues>\n extends Omit<ComponentProps<\"form\">, \"onSubmit\">, PropsWithChildren {\n form: UseFormReturn<F>;\n onSubmit: FormOnSubmitHandler<F>;\n formComponent?: FC<Omit<FormComponentType, \"ref\">>;\n isReadOnly?: boolean;\n autoReset?: FormAutoResetOptions | boolean;\n}\n\nconst DefaultFormComponent: FormComponentType = (p) => <form {...p} />;\n\nexport function Form<F extends FieldValues>(props: FormProps<F>) {\n const {\n form,\n children,\n onSubmit: onSubmitProp,\n formComponent = DefaultFormComponent,\n isReadOnly,\n ref,\n id: idProp,\n autoReset = true,\n ...formProps\n } = props;\n\n const newFormId = useId();\n const formId = idProp ?? newFormId;\n const FormComponent = useMemo(() => formComponent, [formId]);\n const afterSubmitCallback = useRef<AfterFormSubmitCallback>(undefined);\n const { isSubmitting, isValidating, isDirty } = form.formState;\n const rootErrorController = useFormRootErrorController();\n\n const autoResetOptions =\n typeof autoReset === \"boolean\"\n ? { onAfterModalClose: autoReset }\n : autoReset;\n\n const modalController = useModalController();\n modalController.useUpdateOptions({\n confirmOnClose:\n flags.requireCloseModalConfirmationOnUnsavedChanges && isDirty,\n onClose: () => {\n if (autoResetOptions?.onAfterModalClose) {\n form.reset();\n }\n },\n });\n\n const { submitInterceptor } = useFormSettings();\n const onSubmit = submitInterceptor\n ? (values: F) => submitInterceptor<F>(onSubmitProp, values)\n : onSubmitProp;\n\n const handleSubmitResult = (result: unknown) => {\n if (typeof result === \"function\") {\n afterSubmitCallback.current = result as AfterFormSubmitCallback;\n }\n const rootError = form.getFieldState(\"root\" as Path<F>)?.error;\n if (rootError && !rootErrorController.errorComponentMounted) {\n throw new FormRootError(rootError);\n }\n };\n\n const handleSubmit = (e?: BaseSyntheticEvent | F) => {\n const formEvent =\n e && \"nativeEvent\" in e ? (e as BaseSyntheticEvent) : undefined;\n\n formEvent?.stopPropagation();\n\n if (isSubmitting || isValidating) {\n return;\n }\n\n modalController.confirmClose();\n\n return form.handleSubmit((values, event) => {\n const submitResult = onSubmit(values, event);\n if (submitResult instanceof Promise) {\n return submitResult.then(handleSubmitResult);\n }\n handleSubmitResult(submitResult);\n })(formEvent);\n };\n\n const onAfterSuccessFeedback = () => {\n afterSubmitCallback.current?.();\n };\n\n const refWithHotkeySubmit = useHotkeySubmit({\n ref,\n handleSubmit,\n });\n\n return (\n <RhfFormContextProvider {...form}>\n <FormContextProvider\n form={form as UseFormReturn}\n isReadOnly={isReadOnly}\n id={formId}\n onAfterSuccessFeedback={onAfterSuccessFeedback}\n rootErrorController={rootErrorController}\n >\n <FormComponent\n {...formProps}\n ref={refWithHotkeySubmit}\n id={formId}\n onSubmit={handleSubmit}\n >\n {children}\n </FormComponent>\n </FormContextProvider>\n <ConfirmUnsavedChangesModal />\n </RhfFormContextProvider>\n );\n}\n\nexport default Form;\n"],"names":["RhfFormContextProvider"],"mappings":";;;;;;;;;;;;;;AAoDA,MAAM,uBAA0C,CAAC,CAAA,qBAAM,GAAA,CAAC,MAAA,EAAA,EAAM,GAAG,CAAA,EAAG,CAAA;AAE7D,SAAS,KAA4B,KAAA,EAAqB;AAC/D,EAAA,MAAM;AAAA,IACJ,IAAA;AAAA,IACA,QAAA;AAAA,IACA,QAAA,EAAU,YAAA;AAAA,IACV,aAAA,GAAgB,oBAAA;AAAA,IAChB,UAAA;AAAA,IACA,GAAA;AAAA,IACA,EAAA,EAAI,MAAA;AAAA,IACJ,SAAA,GAAY,IAAA;AAAA,IACZ,GAAG;AAAA,GACL,GAAI,KAAA;AAEJ,EAAA,MAAM,YAAY,KAAA,EAAM;AACxB,EAAA,MAAM,SAAS,MAAA,IAAU,SAAA;AACzB,EAAA,MAAM,gBAAgB,OAAA,CAAQ,MAAM,aAAA,EAAe,CAAC,MAAM,CAAC,CAAA;AAC3D,EAAA,MAAM,mBAAA,GAAsB,OAAgC,MAAS,CAAA;AACrE,EAAA,MAAM,EAAE,YAAA,EAAc,YAAA,EAAc,OAAA,KAAY,IAAA,CAAK,SAAA;AACrD,EAAA,MAAM,sBAAsB,0BAAA,EAA2B;AAEvD,EAAA,MAAM,mBACJ,OAAO,SAAA,KAAc,YACjB,EAAE,iBAAA,EAAmB,WAAU,GAC/B,SAAA;AAEN,EAAA,MAAM,kBAAkB,kBAAA,EAAmB;AAC3C,EAAA,eAAA,CAAgB,gBAAA,CAAiB;AAAA,IAC/B,cAAA,EACE,MAAM,6CAAA,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;AAAA,IACjC,CAAC,EAAE,SAAS,CAAA;AAAA,EACd,CAAA;AAEA,EAAA,MAAM,yBAAyB,MAAM;AACnC,IAAA,mBAAA,CAAoB,OAAA,IAAU;AAAA,EAChC,CAAA;AAEA,EAAA,MAAM,sBAAsB,eAAA,CAAgB;AAAA,IAC1C,GAAA;AAAA,IACA;AAAA,GACD,CAAA;AAED,EAAA,uBACE,IAAA,CAACA,YAAA,EAAA,EAAwB,GAAG,IAAA,EAC1B,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,mBAAA;AAAA,MAAA;AAAA,QACC,IAAA;AAAA,QACA,UAAA;AAAA,QACA,EAAA,EAAI,MAAA;AAAA,QACJ,sBAAA;AAAA,QACA,mBAAA;AAAA,QAEA,QAAA,kBAAA,GAAA;AAAA,UAAC,aAAA;AAAA,UAAA;AAAA,YACE,GAAG,SAAA;AAAA,YACJ,GAAA,EAAK,mBAAA;AAAA,YACL,EAAA,EAAI,MAAA;AAAA,YACJ,QAAA,EAAU,YAAA;AAAA,YAET;AAAA;AAAA;AACH;AAAA,KACF;AAAA,wBACC,0BAAA,EAAA,EAA2B;AAAA,GAAA,EAC9B,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"Form.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/Form/Form.tsx"],"sourcesContent":["import ConfirmUnsavedChangesModal from \"@/components/Modal/components/ConfirmUnsavedChangesModal\";\nimport { useHotkeySubmit } from \"@/integrations/react-hook-form/components/Form/useHotkeySubmit\";\nimport { FormContextProvider } from \"@/integrations/react-hook-form/components/FormContextProvider/FormContextProvider\";\nimport { flags } from \"@/integrations/react-hook-form/flags\";\nimport { useModalController } from \"@/lib/controller\";\nimport {\n type BaseSyntheticEvent,\n type ComponentProps,\n type FC,\n type PropsWithChildren,\n type Ref,\n type SubmitEventHandler,\n useId,\n useMemo,\n useRef,\n} from \"react\";\nimport type {\n FieldValues,\n Path,\n SubmitHandler,\n UseFormReturn,\n} from \"react-hook-form\";\nimport { FormProvider as RhfFormContextProvider } from \"react-hook-form\";\nimport { useFormRootErrorController } from \"../FormRootError/useFormRootErrorController\";\nimport { FormRootError } from \"../../lib/FormRootError\";\nimport { useFormSettings } from \"../FormSettingsProvider/FormSettingsProvider\";\n\nexport type FormOnSubmitHandler<F extends FieldValues> = SubmitHandler<F>;\n\nexport type AfterFormSubmitCallback = (...unknownArgs: unknown[]) => unknown;\n\nexport interface FormAutoResetOptions {\n onAfterModalClose?: boolean;\n}\n\ntype FormComponentType = FC<\n PropsWithChildren<{\n id: string;\n onSubmit?: SubmitEventHandler | FormOnSubmitHandler<never>;\n ref?: Ref<HTMLFormElement>;\n }>\n>;\n\nexport interface FormProps<F extends FieldValues>\n extends Omit<ComponentProps<\"form\">, \"onSubmit\">, PropsWithChildren {\n form: UseFormReturn<F>;\n onSubmit: FormOnSubmitHandler<F>;\n formComponent?: FC<Omit<FormComponentType, \"ref\">>;\n isReadOnly?: boolean;\n autoReset?: FormAutoResetOptions | boolean;\n}\n\nconst DefaultFormComponent: FormComponentType = (p) => <form {...p} />;\n\nexport function Form<F extends FieldValues>(props: FormProps<F>) {\n const {\n form,\n children,\n onSubmit: onSubmitProp,\n formComponent = DefaultFormComponent,\n isReadOnly,\n ref,\n id: idProp,\n autoReset = true,\n ...formProps\n } = props;\n\n const newFormId = useId();\n const formId = idProp ?? newFormId;\n const FormComponent = useMemo(() => formComponent, [formId]);\n const afterSubmitCallback = useRef<AfterFormSubmitCallback>(undefined);\n const { isSubmitting, isValidating, isDirty } = form.formState;\n const rootErrorController = useFormRootErrorController();\n\n const autoResetOptions =\n typeof autoReset === \"boolean\"\n ? { onAfterModalClose: autoReset }\n : autoReset;\n\n const modalController = useModalController();\n modalController.useUpdateOptions({\n confirmOnClose:\n flags.requireCloseModalConfirmationOnUnsavedChanges && isDirty,\n onClose: () => {\n if (autoResetOptions?.onAfterModalClose) {\n form.reset();\n }\n },\n });\n\n const { submitInterceptor } = useFormSettings();\n const onSubmit = submitInterceptor\n ? (values: F) => submitInterceptor<F>(onSubmitProp, values, { form })\n : onSubmitProp;\n\n const handleSubmitResult = (result: unknown) => {\n if (typeof result === \"function\") {\n afterSubmitCallback.current = result as AfterFormSubmitCallback;\n }\n const rootError = form.getFieldState(\"root\" as Path<F>)?.error;\n if (rootError && !rootErrorController.errorComponentMounted) {\n throw new FormRootError(rootError);\n }\n };\n\n const handleSubmit = (e?: BaseSyntheticEvent | F) => {\n const formEvent =\n e && \"nativeEvent\" in e ? (e as BaseSyntheticEvent) : undefined;\n\n formEvent?.stopPropagation();\n\n if (isSubmitting || isValidating) {\n return;\n }\n\n modalController.confirmClose();\n\n return form.handleSubmit((values, event) => {\n const submitResult = onSubmit(values, event);\n if (submitResult instanceof Promise) {\n return submitResult.then(handleSubmitResult);\n }\n handleSubmitResult(submitResult);\n })(formEvent);\n };\n\n const onAfterSuccessFeedback = () => {\n afterSubmitCallback.current?.();\n };\n\n const refWithHotkeySubmit = useHotkeySubmit({\n ref,\n handleSubmit,\n });\n\n return (\n <RhfFormContextProvider {...form}>\n <FormContextProvider\n form={form as UseFormReturn}\n isReadOnly={isReadOnly}\n id={formId}\n onAfterSuccessFeedback={onAfterSuccessFeedback}\n rootErrorController={rootErrorController}\n >\n <FormComponent\n {...formProps}\n ref={refWithHotkeySubmit}\n id={formId}\n onSubmit={handleSubmit}\n >\n {children}\n </FormComponent>\n </FormContextProvider>\n <ConfirmUnsavedChangesModal />\n </RhfFormContextProvider>\n );\n}\n\nexport default Form;\n"],"names":["RhfFormContextProvider"],"mappings":";;;;;;;;;;;;;;AAoDA,MAAM,uBAA0C,CAAC,CAAA,qBAAM,GAAA,CAAC,MAAA,EAAA,EAAM,GAAG,CAAA,EAAG,CAAA;AAE7D,SAAS,KAA4B,KAAA,EAAqB;AAC/D,EAAA,MAAM;AAAA,IACJ,IAAA;AAAA,IACA,QAAA;AAAA,IACA,QAAA,EAAU,YAAA;AAAA,IACV,aAAA,GAAgB,oBAAA;AAAA,IAChB,UAAA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AA;AAAA,YACJ,GAAA,EAAK,mBAAA;AAAA,YACL,EAAA,EAAI,MAAA;AAAA,YACJ,QAAA,EAAU,YAAA;AAAA,YAET;AAAA;AAAA;AACH;AAAA,KACF;AAAA,wBACC,0BAAA,EAAA,EAA2B;AAAA,GAAA,EAC9B,CAAA;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"FormSettingsProvider.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/FormSettingsProvider/FormSettingsProvider.tsx"],"sourcesContent":["import { createContext, useContext, type PropsWithChildren } from \"react\";\nimport type { FieldValues } from \"react-hook-form\";\nimport type { FormOnSubmitHandler } from \"../Form/Form\";\n\ntype SubmitInterceptor = <F extends FieldValues = FieldValues>(\n submit: FormOnSubmitHandler<F>,\n values: F,\n) => ReturnType<FormOnSubmitHandler<F>>;\n\ninterface Context {\n submitInterceptor?: SubmitInterceptor;\n}\n\nconst context = createContext<Context>({});\n\nexport type FormSettingsProviderProps = Context & PropsWithChildren;\n\nexport function FormSettingsProvider(props: FormSettingsProviderProps) {\n return (\n <context.Provider value={props as Context}>\n {props.children}\n </context.Provider>\n );\n}\n\nexport const useFormSettings = () => useContext(context);\n"],"names":[],"mappings":";;;AAaA,MAAM,OAAA,GAAU,aAAA,CAAuB,EAAE,CAAA;AAIlC,SAAS,qBAAqB,KAAA,EAAkC;AACrE,EAAA,2BACG,OAAA,CAAQ,QAAA,EAAR,EAAiB,KAAA,EAAO,KAAA,EACtB,gBAAM,QAAA,EACT,CAAA;AAEJ;AAEO,MAAM,eAAA,GAAkB,MAAM,UAAA,CAAW,OAAO;;;;"}
1
+ {"version":3,"file":"FormSettingsProvider.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/FormSettingsProvider/FormSettingsProvider.tsx"],"sourcesContent":["import { createContext, useContext, type PropsWithChildren } from \"react\";\nimport type { FieldValues, UseFormReturn } from \"react-hook-form\";\nimport type { FormOnSubmitHandler } from \"../Form/Form\";\n\nexport interface SubmitInterceptorContext<F extends FieldValues = FieldValues> {\n form: UseFormReturn<F>;\n}\n\nexport type SubmitInterceptor = <F extends FieldValues = FieldValues>(\n submit: FormOnSubmitHandler<F>,\n values: F,\n context: SubmitInterceptorContext<F>,\n) => ReturnType<FormOnSubmitHandler<F>>;\n\ninterface Context {\n submitInterceptor?: SubmitInterceptor;\n}\n\nconst context = createContext<Context>({});\n\nexport type FormSettingsProviderProps = Context & PropsWithChildren;\n\nexport function FormSettingsProvider(props: FormSettingsProviderProps) {\n return (\n <context.Provider value={props as Context}>\n {props.children}\n </context.Provider>\n );\n}\n\nexport const useFormSettings = () => useContext(context);\n"],"names":[],"mappings":";;;AAkBA,MAAM,OAAA,GAAU,aAAA,CAAuB,EAAE,CAAA;AAIlC,SAAS,qBAAqB,KAAA,EAAkC;AACrE,EAAA,2BACG,OAAA,CAAQ,QAAA,EAAR,EAAiB,KAAA,EAAO,KAAA,EACtB,gBAAM,QAAA,EACT,CAAA;AAEJ;AAEO,MAAM,eAAA,GAAkB,MAAM,UAAA,CAAW,OAAO;;;;"}
@@ -255,6 +255,7 @@ export { Segment } from './components/src/components/SegmentedControl/components
255
255
  export { Select } from './components/src/components/Select/Select.mjs';
256
256
  export { Separator } from './components/src/components/Separator/Separator.mjs';
257
257
  export { SettingsProvider } from './components/src/components/SettingsProvider/SettingsProvider.mjs';
258
+ export { Kbd } from './components/src/components/Kbd/Kbd.mjs';
258
259
  export { Skeleton } from './components/src/components/Skeleton/Skeleton.mjs';
259
260
  export { SkeletonText } from './components/src/components/SkeletonText/SkeletonText.mjs';
260
261
  export { Slider } from './components/src/components/Slider/Slider.mjs';
@@ -1 +1 @@
1
- {"version":3,"file":"default.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"default.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -232,6 +232,7 @@ import './components/src/components/SegmentedControl/SegmentedControl.mjs';
232
232
  import './components/src/components/SegmentedControl/components/Segment/Segment.mjs';
233
233
  import './components/src/components/Select/Select.mjs';
234
234
  export { SettingsProvider } from './components/src/components/SettingsProvider/SettingsProvider.mjs';
235
+ import './components/src/components/Kbd/Kbd.mjs';
235
236
  import './components/src/components/Slider/Slider.mjs';
236
237
  import './components/src/components/SuspenseTrigger/SuspenseTrigger.mjs';
237
238
  import './components/src/components/Switch/Switch.mjs';
@@ -1 +1 @@
1
- {"version":3,"file":"flr-universal.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"flr-universal.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,14 @@
1
+ import { PropsWithClassName } from '../../lib/types/props';
2
+ import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
3
+ import { PropsWithChildren } from 'react';
4
+ export interface KbdProps extends PropsWithClassName, FlowComponentProps, PropsWithChildren {
5
+ /** Array of keys to be joined */
6
+ keys?: (string | "mod" | "alt" | "shift")[];
7
+ /** Whether the component is displayed as disabled */
8
+ isDisabled?: boolean;
9
+ /** The visual variant @default "plain" */
10
+ variant?: "plain" | "soft";
11
+ }
12
+ /** @flr-generate all */
13
+ export declare const Kbd: import('react').FunctionComponent<KbdProps & import('react').RefAttributes<HTMLDivElement>>;
14
+ //# sourceMappingURL=Kbd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Kbd.d.ts","sourceRoot":"","sources":["../../../../src/components/Kbd/Kbd.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAG5D,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAY,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAGzD,MAAM,WAAW,QACf,SAAQ,kBAAkB,EAAE,kBAAkB,EAAE,iBAAiB;IACjE,iCAAiC;IACjC,IAAI,CAAC,EAAE,CAAC,MAAM,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,CAAC,EAAE,CAAC;IAC5C,qDAAqD;IACrD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAC5B;AAED,wBAAwB;AACxB,eAAO,MAAM,GAAG,6FAiDd,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Kbd, type KbdProps } from './Kbd';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Kbd/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,KAAK,QAAQ,EAAE,MAAM,OAAO,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { Kbd } from '..';
3
+ declare const meta: Meta<typeof Kbd>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Kbd>;
6
+ export declare const Default: Story;
7
+ export declare const WithChildren: Story;
8
+ //# sourceMappingURL=Default.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Default.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Kbd/stories/Default.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAEvC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,GAAG,CAqB1B,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,GAAG,CAAC,CAAC;AAElC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,YAAY,EAAE,KAe1B,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { Kbd } from './Kbd';
2
+ import { ViewComponent } from '../../lib/viewComponentContext';
3
+ declare global {
4
+ interface FlowViewComponents {
5
+ Kbd: ViewComponent<typeof Kbd>;
6
+ }
7
+ }
8
+ //# sourceMappingURL=view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../../src/components/Kbd/view.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAEhE,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,kBAAkB;QAC1B,GAAG,EAAE,aAAa,CAAC,OAAO,GAAG,CAAC,CAAC;KAChC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"MenuItemContent.d.ts","sourceRoot":"","sources":["../../../../../../src/components/MenuItem/components/MenuItemContent/MenuItemContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,KAAK,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAanD,UAAU,KAAM,SAAQ,IAAI,CAAC,mBAAmB,EAAE,iBAAiB;IACjE,gBAAgB,CAAC,EAAE,SAAS,GAAG,YAAY,GAAG,QAAQ,CAAC;CACxD;AAED,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,KAAK,CAkDrC,CAAC"}
1
+ {"version":3,"file":"MenuItemContent.d.ts","sourceRoot":"","sources":["../../../../../../src/components/MenuItem/components/MenuItemContent/MenuItemContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,KAAK,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAanD,UAAU,KAAM,SAAQ,IAAI,CAAC,mBAAmB,EAAE,iBAAiB;IACjE,gBAAgB,CAAC,EAAE,SAAS,GAAG,YAAY,GAAG,QAAQ,CAAC;CACxD;AAED,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,KAAK,CAqDrC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SearchField.d.ts","sourceRoot":"","sources":["../../../../src/components/SearchField/SearchField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAK9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAS/E,MAAM,WAAW,gBACf,SACE,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAC,EAC1D,kBAAkB,CAAC,gBAAgB,CAAC;CAAG;AAE3C,wBAAwB;AACxB,eAAO,MAAM,WAAW,uGAgDtB,CAAC;AAEH,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"SearchField.d.ts","sourceRoot":"","sources":["../../../../src/components/SearchField/SearchField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAK9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAU/E,MAAM,WAAW,gBACf,SACE,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAC,EAC1D,kBAAkB,CAAC,gBAAgB,CAAC;CAAG;AAE3C,wBAAwB;AACxB,eAAO,MAAM,WAAW,uGA6DtB,CAAC;AAEH,eAAe,WAAW,CAAC"}
@@ -9,4 +9,5 @@ export declare const ReadOnly: Story;
9
9
  export declare const WithFieldDescription: Story;
10
10
  export declare const WithLabel: Story;
11
11
  export declare const WithFieldError: Story;
12
+ export declare const WithKbd: Story;
12
13
  //# sourceMappingURL=Default.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Default.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/SearchField/stories/Default.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAOvC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CAIlC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,WAAW,CAAC,CAAC;AAE1C,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,QAAQ,EAAE,KAAsC,CAAC;AAE9D,eAAO,MAAM,QAAQ,EAAE,KAAsC,CAAC;AAE9D,eAAO,MAAM,oBAAoB,EAAE,KAMlC,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAMvB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAM5B,CAAC"}
1
+ {"version":3,"file":"Default.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/SearchField/stories/Default.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAQvC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CAIlC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,WAAW,CAAC,CAAC;AAE1C,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,QAAQ,EAAE,KAAsC,CAAC;AAE9D,eAAO,MAAM,QAAQ,EAAE,KAAsC,CAAC;AAE9D,eAAO,MAAM,oBAAoB,EAAE,KAMlC,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAMvB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAM5B,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../../src/components/Text/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAG9C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAO/E,MAAM,WAAW,SACf,SACE,iBAAiB,EACjB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,GAAG,aAAa,CAAC,EAChD,oBAAoB,CAAC,MAAM,GAAG,KAAK,GAAG,GAAG,CAAC,EAC1C,kBAAkB;IAEpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAEzB,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;IAEnC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;IAErC,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;IAE/C,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;CAC9C;AAED,wBAAwB;AACxB,eAAO,MAAM,IAAI,0EA8Df,CAAC;AAEH,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../../src/components/Text/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,IAAI,MAA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