@mittwald/flow-react-components 0.2.0-alpha.381 → 0.2.0-alpha.383

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.
@@ -46,8 +46,9 @@ const NumberField = flowComponent("NumberField", (props) => {
46
46
  return /* @__PURE__ */ jsx(ClearPropsContext, { children: /* @__PURE__ */ jsxs(
47
47
  Aria.NumberField,
48
48
  {
49
- isWheelDisabled,
50
49
  ...rest,
50
+ isWheelDisabled,
51
+ defaultValue,
51
52
  className: rootClassName,
52
53
  children: [
53
54
  /* @__PURE__ */ jsxs(Aria.Group, { className: styles.group, children: [
@@ -70,14 +71,7 @@ const NumberField = flowComponent("NumberField", (props) => {
70
71
  {
71
72
  inputContext: Aria.InputContext,
72
73
  props,
73
- children: /* @__PURE__ */ jsx(
74
- Aria.Input,
75
- {
76
- className: styles.input,
77
- ref,
78
- defaultValue
79
- }
80
- )
74
+ children: /* @__PURE__ */ jsx(Aria.Input, { className: styles.input, ref })
81
75
  }
82
76
  ),
83
77
  /* @__PURE__ */ jsxs(
@@ -1 +1 @@
1
- {"version":3,"file":"NumberField.mjs","sources":["../../../../../../src/components/NumberField/NumberField.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport formFieldStyles from \"../FormField/FormField.module.scss\";\nimport styles from \"./NumberField.module.scss\";\nimport clsx from \"clsx\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport ClearPropsContext from \"@/components/ClearPropsContext/ClearPropsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { FieldError } from \"@/components/FieldError\";\nimport { Button } from \"@/components/Button\";\nimport {\n IconChevronDown,\n IconChevronUp,\n IconMinus,\n IconPlus,\n} from \"@/components/Icon/components/icons\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { ReactAriaControlledValueFix } from \"@/lib/react/ReactAriaControlledValueFix\";\n\nexport interface NumberFieldProps\n extends PropsWithChildren<Omit<Aria.NumberFieldProps, \"children\">>,\n FlowComponentProps<HTMLInputElement> {}\n\n/**\n * @flr-generate all\n * @flr-clear-props-context\n */\nexport const NumberField = flowComponent(\"NumberField\", (props) => {\n const {\n children,\n className,\n ref,\n defaultValue,\n isWheelDisabled = true,\n ...rest\n } = props;\n\n const rootClassName = clsx(formFieldStyles.formField, className);\n\n const propsContext: PropsContext = {\n Label: {\n className: formFieldStyles.label,\n optional: !props.isRequired,\n },\n FieldDescription: {\n className: formFieldStyles.fieldDescription,\n },\n FieldError: {\n className: formFieldStyles.customFieldError,\n },\n };\n\n return (\n <ClearPropsContext>\n <Aria.NumberField\n isWheelDisabled={isWheelDisabled}\n {...rest}\n className={rootClassName}\n >\n <Aria.Group className={styles.group}>\n <Button\n ariaSlot=\"decrement\"\n className={styles.decrementButton}\n size=\"s\"\n variant=\"plain\"\n color=\"secondary\"\n >\n <IconChevronDown />\n <IconMinus className={styles.coarsePointerIcon} />\n </Button>\n <ReactAriaControlledValueFix\n inputContext={Aria.InputContext}\n props={props}\n >\n <Aria.Input\n className={styles.input}\n ref={ref}\n defaultValue={defaultValue}\n />\n </ReactAriaControlledValueFix>\n <Button\n ariaSlot=\"increment\"\n className={styles.incrementButton}\n size=\"s\"\n variant=\"plain\"\n color=\"secondary\"\n >\n <IconChevronUp />\n <IconPlus className={styles.coarsePointerIcon} />\n </Button>\n </Aria.Group>\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n <FieldError className={formFieldStyles.fieldError} />\n </Aria.NumberField>\n </ClearPropsContext>\n );\n});\n\nexport default NumberField;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AA4BO,MAAM,WAAc,GAAA,aAAA,CAAc,aAAe,EAAA,CAAC,KAAU,KAAA;AACjE,EAAM,MAAA;AAAA,IACJ,QAAA;AAAA,IACA,SAAA;AAAA,IACA,GAAA;AAAA,IACA,YAAA;A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,kBAAA,GAAA;AAAA,gBAAC,IAAK,CAAA,KAAA;AAAA,gBAAL;AAAA,kBACC,WAAW,MAAO,CAAA,KAAA;AAAA,kBAClB,GAAA;AAAA,kBACA;AAAA;AAAA;AACF;AAAA,WACF;AAAA,0BACA,IAAA;AAAA,YAAC,MAAA;AAAA,YAAA;AAAA,cACC,QAAS,EAAA,WAAA;AAAA,cACT,WAAW,MAAO,CAAA,eAAA;AAAA,cAClB,IAAK,EAAA,GAAA;AAAA,cACL,OAAQ,EAAA,OAAA;AAAA,cACR,KAAM,EAAA,WAAA;AAAA,cAEN,QAAA,EAAA;AAAA,gCAAA,GAAA,CAAC,aAAc,EAAA,EAAA,CAAA;AAAA,gCACd,GAAA,CAAA,QAAA,EAAA,EAAS,SAAW,EAAA,MAAA,CAAO,iBAAmB,EAAA;AAAA;AAAA;AAAA;AACjD,SACF,EAAA,CAAA;AAAA,wBACC,GAAA,CAAA,oBAAA,EAAA,EAAqB,KAAO,EAAA,YAAA,EAC1B,QACH,EAAA,CAAA;AAAA,wBACC,GAAA,CAAA,UAAA,EAAA,EAAW,SAAW,EAAA,eAAA,CAAgB,UAAY,EAAA;AAAA;AAAA;AAAA,GAEvD,EAAA,CAAA;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"NumberField.mjs","sources":["../../../../../../src/components/NumberField/NumberField.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport formFieldStyles from \"../FormField/FormField.module.scss\";\nimport styles from \"./NumberField.module.scss\";\nimport clsx from \"clsx\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport ClearPropsContext from \"@/components/ClearPropsContext/ClearPropsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { FieldError } from \"@/components/FieldError\";\nimport { Button } from \"@/components/Button\";\nimport {\n IconChevronDown,\n IconChevronUp,\n IconMinus,\n IconPlus,\n} from \"@/components/Icon/components/icons\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { ReactAriaControlledValueFix } from \"@/lib/react/ReactAriaControlledValueFix\";\n\nexport interface NumberFieldProps\n extends PropsWithChildren<Omit<Aria.NumberFieldProps, \"children\">>,\n FlowComponentProps<HTMLInputElement> {}\n\n/**\n * @flr-generate all\n * @flr-clear-props-context\n */\nexport const NumberField = flowComponent(\"NumberField\", (props) => {\n const {\n children,\n className,\n ref,\n defaultValue,\n isWheelDisabled = true,\n ...rest\n } = props;\n\n const rootClassName = clsx(formFieldStyles.formField, className);\n\n const propsContext: PropsContext = {\n Label: {\n className: formFieldStyles.label,\n optional: !props.isRequired,\n },\n FieldDescription: {\n className: formFieldStyles.fieldDescription,\n },\n FieldError: {\n className: formFieldStyles.customFieldError,\n },\n };\n\n return (\n <ClearPropsContext>\n <Aria.NumberField\n {...rest}\n isWheelDisabled={isWheelDisabled}\n defaultValue={defaultValue}\n className={rootClassName}\n >\n <Aria.Group className={styles.group}>\n <Button\n ariaSlot=\"decrement\"\n className={styles.decrementButton}\n size=\"s\"\n variant=\"plain\"\n color=\"secondary\"\n >\n <IconChevronDown />\n <IconMinus className={styles.coarsePointerIcon} />\n </Button>\n <ReactAriaControlledValueFix\n inputContext={Aria.InputContext}\n props={props}\n >\n <Aria.Input className={styles.input} ref={ref} />\n </ReactAriaControlledValueFix>\n <Button\n ariaSlot=\"increment\"\n className={styles.incrementButton}\n size=\"s\"\n variant=\"plain\"\n color=\"secondary\"\n >\n <IconChevronUp />\n <IconPlus className={styles.coarsePointerIcon} />\n </Button>\n </Aria.Group>\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n <FieldError className={formFieldStyles.fieldError} />\n </Aria.NumberField>\n </ClearPropsContext>\n );\n});\n\nexport default NumberField;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AA4BO,MAAM,WAAc,GAAA,aAAA,CAAc,aAAe,EAAA,CAAC,KAAU,KAAA;AACj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G;AACH,eAAO,MAAM,WAAW,uGAuEtB,CAAC;AAEH,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"NumberField.d.ts","sourceRoot":"","sources":["../../../../src/components/NumberField/NumberField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAe9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAI/E,MAAM,WAAW,gBACf,SAAQ,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAC,EAChE,kBAAkB,CAAC,gBAAgB,CAAC;CAAG;AAE3C;;;GAGG;AACH,eAAO,MAAM,WAAW,uGAoEtB,CAAC;AAEH,eAAe,WAAW,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"NumberField.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/integrations/react-hook-form/components/Field/stories/NumberField.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAKvD,OAAO,EAAE,KAAK,EAAoB,MAAM,gCAAgC,CAAC;AAUzE,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CAmE5B,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,KAAK,CAAC,CAAC;AAEpC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
1
+ {"version":3,"file":"NumberField.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/integrations/react-hook-form/components/Field/stories/NumberField.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAKvD,OAAO,EAAE,KAAK,EAAoB,MAAM,gCAAgC,CAAC;AAUzE,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CAoE5B,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,KAAK,CAAC,CAAC;AAEpC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/flow-react-components",
3
- "version": "0.2.0-alpha.381",
3
+ "version": "0.2.0-alpha.383",
4
4
  "type": "module",
5
5
  "description": "A React implementation of Flow, mittwald’s design system",
6
6
  "homepage": "https://mittwald.github.io/flow",
@@ -58,7 +58,7 @@
58
58
  "@chakra-ui/live-region": "^2.1.0",
59
59
  "@internationalized/string-compiler": "^3.2.6",
60
60
  "@mittwald/password-tools-js": "3.0.0-alpha.12",
61
- "@mittwald/react-tunnel": "0.2.0-alpha.381",
61
+ "@mittwald/react-tunnel": "0.2.0-alpha.383",
62
62
  "@mittwald/react-use-promise": "^3.0.4",
63
63
  "@react-aria/form": "^3.1.0",
64
64
  "@react-aria/utils": "^3.30.0",
@@ -99,7 +99,7 @@
99
99
  "@faker-js/faker": "^9.9.0",
100
100
  "@internationalized/date": "^3.8.2",
101
101
  "@mittwald/flow-core": "",
102
- "@mittwald/flow-design-tokens": "0.2.0-alpha.381",
102
+ "@mittwald/flow-design-tokens": "0.2.0-alpha.383",
103
103
  "@mittwald/react-use-promise": "^3.0.4",
104
104
  "@mittwald/remote-dom-react": "1.2.2-mittwald.3",
105
105
  "@mittwald/typescript-config": "",
@@ -172,5 +172,5 @@
172
172
  "optional": true
173
173
  }
174
174
  },
175
- "gitHead": "00146f4f94dffa2be9c4c852df3c6aebfb236b3b"
175
+ "gitHead": "29a402faadad4748748bb509fdeaaffcf18157cf"
176
176
  }