@canonical/react-ds-global-form 0.29.1 → 0.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/density.css +234 -0
- package/dist/esm/docs/examples/density-examples.css +20 -0
- package/dist/esm/index.css +66 -6
- package/dist/esm/lib/_work_in_progress/DensityTestbed/Testbed.js +77 -0
- package/dist/esm/lib/_work_in_progress/DensityTestbed/Testbed.js.map +1 -0
- package/dist/esm/lib/_work_in_progress/DensityTestbed/baseline-system.css +81 -0
- package/dist/esm/lib/_work_in_progress/DensityTestbed/density.testbed.css +153 -0
- package/dist/esm/lib/_work_in_progress/DensityTestbed/mocks.js +23 -0
- package/dist/esm/lib/_work_in_progress/DensityTestbed/mocks.js.map +1 -0
- package/dist/esm/lib/common/Wrapper/ToggleWrapper.css +35 -0
- package/dist/esm/lib/common/Wrapper/ToggleWrapper.js +52 -0
- package/dist/esm/lib/common/Wrapper/ToggleWrapper.js.map +1 -0
- package/dist/esm/lib/common/Wrapper/Wrapper.js +2 -2
- package/dist/esm/lib/common/Wrapper/Wrapper.js.map +1 -1
- package/dist/esm/lib/common/Wrapper/hooks/useFieldWrapper.js +1 -1
- package/dist/esm/lib/common/Wrapper/hooks/useFieldWrapper.js.map +1 -1
- package/dist/esm/lib/common/Wrapper/index.js +2 -0
- package/dist/esm/lib/common/Wrapper/index.js.map +1 -1
- package/dist/esm/lib/common/Wrapper/styles.css +3 -1
- package/dist/esm/lib/common/Wrapper/withToggleWrapper.js +14 -0
- package/dist/esm/lib/common/Wrapper/withToggleWrapper.js.map +1 -0
- package/dist/esm/lib/common/bindField/bindField.js +15 -8
- package/dist/esm/lib/common/bindField/bindField.js.map +1 -1
- package/dist/esm/lib/component/CheckboxField/CheckboxField.js +8 -6
- package/dist/esm/lib/component/CheckboxField/CheckboxField.js.map +1 -1
- package/dist/esm/lib/component/ChoicesField/ChoicesField.js +2 -2
- package/dist/esm/lib/component/ChoicesField/ChoicesField.js.map +1 -1
- package/dist/esm/lib/component/ChoicesField/common/Option/Option.js +2 -2
- package/dist/esm/lib/component/ChoicesField/common/Option/Option.js.map +1 -1
- package/dist/esm/lib/component/ChoicesField/styles.css +55 -15
- package/dist/esm/lib/component/ColorField/ColorField.js +3 -3
- package/dist/esm/lib/component/ColorField/ColorField.js.map +1 -1
- package/dist/esm/lib/component/ComboboxField/ComboboxField.js +3 -3
- package/dist/esm/lib/component/ComboboxField/ComboboxField.js.map +1 -1
- package/dist/esm/lib/component/DateField/DateField.js +22 -4
- package/dist/esm/lib/component/DateField/DateField.js.map +1 -1
- package/dist/esm/lib/component/DateTimeField/DateTimeField.js +3 -3
- package/dist/esm/lib/component/DateTimeField/DateTimeField.js.map +1 -1
- package/dist/esm/lib/component/FileUploadField/FileUploadField.js +43 -6
- package/dist/esm/lib/component/FileUploadField/FileUploadField.js.map +1 -1
- package/dist/esm/lib/component/HiddenField/HiddenField.js +3 -3
- package/dist/esm/lib/component/HiddenField/HiddenField.js.map +1 -1
- package/dist/esm/lib/component/NumberField/NumberField.js +4 -4
- package/dist/esm/lib/component/NumberField/NumberField.js.map +1 -1
- package/dist/esm/lib/component/PasswordField/PasswordField.js +3 -3
- package/dist/esm/lib/component/PasswordField/PasswordField.js.map +1 -1
- package/dist/esm/lib/component/PhoneField/PhoneField.js +3 -3
- package/dist/esm/lib/component/PhoneField/PhoneField.js.map +1 -1
- package/dist/esm/lib/component/RangeField/RangeField.js +3 -3
- package/dist/esm/lib/component/RangeField/RangeField.js.map +1 -1
- package/dist/esm/lib/component/RangeField/common/RangeControl/RangeControl.js +1 -1
- package/dist/esm/lib/component/RangeField/common/RangeControl/RangeControl.js.map +1 -1
- package/dist/esm/lib/component/RatingField/RatingField.js +12 -0
- package/dist/esm/lib/component/RatingField/RatingField.js.map +1 -0
- package/dist/esm/lib/component/RatingField/index.js +2 -0
- package/dist/esm/lib/component/RatingField/index.js.map +1 -0
- package/dist/esm/lib/component/RatingField/types.js +2 -0
- package/dist/esm/lib/component/RatingField/types.js.map +1 -0
- package/dist/esm/lib/component/RichChoicesField/RichChoicesField.js +2 -2
- package/dist/esm/lib/component/RichChoicesField/RichChoicesField.js.map +1 -1
- package/dist/esm/lib/component/RichChoicesField/common/Option/Option.js +1 -1
- package/dist/esm/lib/component/RichChoicesField/common/Option/Option.js.map +1 -1
- package/dist/esm/lib/component/RichChoicesField/styles.css +6 -0
- package/dist/esm/lib/component/SelectField/SelectField.js +3 -3
- package/dist/esm/lib/component/SelectField/SelectField.js.map +1 -1
- package/dist/esm/lib/component/SwitchField/SwitchField.js +13 -0
- package/dist/esm/lib/component/SwitchField/SwitchField.js.map +1 -0
- package/dist/esm/lib/component/SwitchField/index.js +2 -0
- package/dist/esm/lib/component/SwitchField/index.js.map +1 -0
- package/dist/esm/lib/component/SwitchField/types.js +2 -0
- package/dist/esm/lib/component/SwitchField/types.js.map +1 -0
- package/dist/esm/lib/component/TextField/TextField.js +3 -3
- package/dist/esm/lib/component/TextField/TextField.js.map +1 -1
- package/dist/esm/lib/component/TextareaField/TextareaField.js +3 -3
- package/dist/esm/lib/component/TextareaField/TextareaField.js.map +1 -1
- package/dist/esm/lib/component/TimeField/TimeField.js +3 -3
- package/dist/esm/lib/component/TimeField/TimeField.js.map +1 -1
- package/dist/esm/lib/component/index.js +2 -0
- package/dist/esm/lib/component/index.js.map +1 -1
- package/dist/esm/lib/index.js +2 -1
- package/dist/esm/lib/index.js.map +1 -1
- package/dist/esm/lib/pattern/Field/Field.js +23 -17
- package/dist/esm/lib/pattern/Field/Field.js.map +1 -1
- package/dist/esm/lib/subcomponent/CheckboxInput/styles.css +45 -16
- package/dist/esm/lib/subcomponent/ComboboxInput/MultipleCombobox.js +14 -8
- package/dist/esm/lib/subcomponent/ComboboxInput/MultipleCombobox.js.map +1 -1
- package/dist/esm/lib/subcomponent/DateInput/styles.css +12 -0
- package/dist/esm/lib/subcomponent/DateTimeInput/styles.css +13 -0
- package/dist/esm/lib/subcomponent/Field/Label/Label.js +1 -3
- package/dist/esm/lib/subcomponent/Field/Label/Label.js.map +1 -1
- package/dist/esm/lib/subcomponent/Field/Label/styles.css +2 -3
- package/dist/esm/lib/subcomponent/FileUploadInput/FileUploadInput.js +11 -21
- package/dist/esm/lib/subcomponent/FileUploadInput/FileUploadInput.js.map +1 -1
- package/dist/esm/lib/subcomponent/FileUploadInput/styles.css +6 -3
- package/dist/esm/lib/subcomponent/PasswordInput/styles.css +5 -6
- package/dist/esm/lib/subcomponent/PhoneInput/PhoneInput.js +1 -1
- package/dist/esm/lib/subcomponent/PhoneInput/PhoneInput.js.map +1 -1
- package/dist/esm/lib/subcomponent/RadioInput/styles.css +36 -7
- package/dist/esm/lib/subcomponent/RangeInput/styles.css +10 -9
- package/dist/esm/lib/subcomponent/RatingInput/RatingInput.js +48 -0
- package/dist/esm/lib/subcomponent/RatingInput/RatingInput.js.map +1 -0
- package/dist/esm/lib/subcomponent/RatingInput/index.js +2 -0
- package/dist/esm/lib/subcomponent/RatingInput/index.js.map +1 -0
- package/dist/esm/lib/subcomponent/RatingInput/styles.css +159 -0
- package/dist/esm/lib/subcomponent/RatingInput/types.js +2 -0
- package/dist/esm/lib/subcomponent/RatingInput/types.js.map +1 -0
- package/dist/esm/lib/subcomponent/SwitchInput/SwitchInput.js +26 -0
- package/dist/esm/lib/subcomponent/SwitchInput/SwitchInput.js.map +1 -0
- package/dist/esm/lib/subcomponent/SwitchInput/index.js +2 -0
- package/dist/esm/lib/subcomponent/SwitchInput/index.js.map +1 -0
- package/dist/esm/lib/subcomponent/SwitchInput/styles.css +105 -0
- package/dist/esm/lib/subcomponent/SwitchInput/types.js +2 -0
- package/dist/esm/lib/subcomponent/SwitchInput/types.js.map +1 -0
- package/dist/esm/lib/subcomponent/TextInput/TextInput.js +1 -1
- package/dist/esm/lib/subcomponent/TextInput/TextInput.js.map +1 -1
- package/dist/esm/lib/subcomponent/TextareaInput/TextareaInput.js +1 -3
- package/dist/esm/lib/subcomponent/TextareaInput/TextareaInput.js.map +1 -1
- package/dist/esm/lib/subcomponent/TextareaInput/styles.css +4 -9
- package/dist/esm/lib/subcomponent/TimeInput/styles.css +8 -0
- package/dist/esm/lib/subcomponent/index.js +2 -0
- package/dist/esm/lib/subcomponent/index.js.map +1 -1
- package/dist/esm/lib/utils/countries/countries.js +1 -1
- package/dist/esm/lib/utils/countries/countries.js.map +1 -1
- package/dist/esm/lib/utils/hooks/useFieldError.js +21 -24
- package/dist/esm/lib/utils/hooks/useFieldError.js.map +1 -1
- package/dist/types/lib/_work_in_progress/DensityTestbed/Testbed.d.ts +42 -0
- package/dist/types/lib/_work_in_progress/DensityTestbed/Testbed.d.ts.map +1 -0
- package/dist/types/lib/_work_in_progress/DensityTestbed/mocks.d.ts +26 -0
- package/dist/types/lib/_work_in_progress/DensityTestbed/mocks.d.ts.map +1 -0
- package/dist/types/lib/common/Wrapper/ToggleWrapper.d.ts +24 -0
- package/dist/types/lib/common/Wrapper/ToggleWrapper.d.ts.map +1 -0
- package/dist/types/lib/common/Wrapper/index.d.ts +2 -0
- package/dist/types/lib/common/Wrapper/index.d.ts.map +1 -1
- package/dist/types/lib/common/Wrapper/withToggleWrapper.d.ts +20 -0
- package/dist/types/lib/common/Wrapper/withToggleWrapper.d.ts.map +1 -0
- package/dist/types/lib/common/Wrapper/withWrapper.d.ts +1 -1
- package/dist/types/lib/common/Wrapper/withWrapper.d.ts.map +1 -1
- package/dist/types/lib/common/bindField/bindField.d.ts.map +1 -1
- package/dist/types/lib/common/bindField/types.d.ts +14 -5
- package/dist/types/lib/common/bindField/types.d.ts.map +1 -1
- package/dist/types/lib/common/types.d.ts +24 -2
- package/dist/types/lib/common/types.d.ts.map +1 -1
- package/dist/types/lib/component/CheckboxField/CheckboxField.d.ts +8 -332
- package/dist/types/lib/component/CheckboxField/CheckboxField.d.ts.map +1 -1
- package/dist/types/lib/component/CheckboxField/types.d.ts +7 -4
- package/dist/types/lib/component/CheckboxField/types.d.ts.map +1 -1
- package/dist/types/lib/component/ChoicesField/ChoicesField.d.ts +1 -0
- package/dist/types/lib/component/ChoicesField/ChoicesField.d.ts.map +1 -1
- package/dist/types/lib/component/ChoicesField/common/Option/types.d.ts +1 -1
- package/dist/types/lib/component/ChoicesField/common/Option/types.d.ts.map +1 -1
- package/dist/types/lib/component/ChoicesField/types.d.ts +2 -2
- package/dist/types/lib/component/ChoicesField/types.d.ts.map +1 -1
- package/dist/types/lib/component/ColorField/ColorField.d.ts +2 -1
- package/dist/types/lib/component/ColorField/ColorField.d.ts.map +1 -1
- package/dist/types/lib/component/ColorField/types.d.ts +2 -2
- package/dist/types/lib/component/ColorField/types.d.ts.map +1 -1
- package/dist/types/lib/component/ComboboxField/ComboboxField.d.ts +1 -0
- package/dist/types/lib/component/ComboboxField/ComboboxField.d.ts.map +1 -1
- package/dist/types/lib/component/ComboboxField/types.d.ts +2 -2
- package/dist/types/lib/component/ComboboxField/types.d.ts.map +1 -1
- package/dist/types/lib/component/DateField/DateField.d.ts +4 -2
- package/dist/types/lib/component/DateField/DateField.d.ts.map +1 -1
- package/dist/types/lib/component/DateField/types.d.ts +2 -2
- package/dist/types/lib/component/DateField/types.d.ts.map +1 -1
- package/dist/types/lib/component/DateTimeField/DateTimeField.d.ts +1 -0
- package/dist/types/lib/component/DateTimeField/DateTimeField.d.ts.map +1 -1
- package/dist/types/lib/component/DateTimeField/types.d.ts +2 -2
- package/dist/types/lib/component/DateTimeField/types.d.ts.map +1 -1
- package/dist/types/lib/component/FileUploadField/FileUploadField.d.ts +9 -5
- package/dist/types/lib/component/FileUploadField/FileUploadField.d.ts.map +1 -1
- package/dist/types/lib/component/FileUploadField/types.d.ts +2 -2
- package/dist/types/lib/component/FileUploadField/types.d.ts.map +1 -1
- package/dist/types/lib/component/HiddenField/HiddenField.d.ts +1 -0
- package/dist/types/lib/component/HiddenField/HiddenField.d.ts.map +1 -1
- package/dist/types/lib/component/HiddenField/types.d.ts +2 -2
- package/dist/types/lib/component/HiddenField/types.d.ts.map +1 -1
- package/dist/types/lib/component/NumberField/NumberField.d.ts +1 -0
- package/dist/types/lib/component/NumberField/NumberField.d.ts.map +1 -1
- package/dist/types/lib/component/NumberField/types.d.ts +2 -2
- package/dist/types/lib/component/NumberField/types.d.ts.map +1 -1
- package/dist/types/lib/component/PasswordField/PasswordField.d.ts +1 -0
- package/dist/types/lib/component/PasswordField/PasswordField.d.ts.map +1 -1
- package/dist/types/lib/component/PasswordField/types.d.ts +2 -2
- package/dist/types/lib/component/PasswordField/types.d.ts.map +1 -1
- package/dist/types/lib/component/PhoneField/PhoneField.d.ts +3 -2
- package/dist/types/lib/component/PhoneField/PhoneField.d.ts.map +1 -1
- package/dist/types/lib/component/PhoneField/index.d.ts +1 -1
- package/dist/types/lib/component/PhoneField/index.d.ts.map +1 -1
- package/dist/types/lib/component/PhoneField/types.d.ts +2 -2
- package/dist/types/lib/component/PhoneField/types.d.ts.map +1 -1
- package/dist/types/lib/component/RangeField/RangeField.d.ts +1 -0
- package/dist/types/lib/component/RangeField/RangeField.d.ts.map +1 -1
- package/dist/types/lib/component/RangeField/types.d.ts +1 -1
- package/dist/types/lib/component/RangeField/types.d.ts.map +1 -1
- package/dist/types/lib/component/RatingField/RatingField.d.ts +46 -0
- package/dist/types/lib/component/RatingField/RatingField.d.ts.map +1 -0
- package/dist/types/lib/component/RatingField/index.d.ts +3 -0
- package/dist/types/lib/component/RatingField/index.d.ts.map +1 -0
- package/dist/types/lib/component/RatingField/types.d.ts +9 -0
- package/dist/types/lib/component/RatingField/types.d.ts.map +1 -0
- package/dist/types/lib/component/RichChoicesField/RichChoicesField.d.ts +1 -0
- package/dist/types/lib/component/RichChoicesField/RichChoicesField.d.ts.map +1 -1
- package/dist/types/lib/component/RichChoicesField/types.d.ts +2 -2
- package/dist/types/lib/component/RichChoicesField/types.d.ts.map +1 -1
- package/dist/types/lib/component/SelectField/SelectField.d.ts +1 -0
- package/dist/types/lib/component/SelectField/SelectField.d.ts.map +1 -1
- package/dist/types/lib/component/SelectField/types.d.ts +2 -2
- package/dist/types/lib/component/SelectField/types.d.ts.map +1 -1
- package/dist/types/lib/component/SwitchField/SwitchField.d.ts +14 -0
- package/dist/types/lib/component/SwitchField/SwitchField.d.ts.map +1 -0
- package/dist/types/lib/component/SwitchField/index.d.ts +3 -0
- package/dist/types/lib/component/SwitchField/index.d.ts.map +1 -0
- package/dist/types/lib/component/SwitchField/types.d.ts +8 -0
- package/dist/types/lib/component/SwitchField/types.d.ts.map +1 -0
- package/dist/types/lib/component/TextField/TextField.d.ts +2 -1
- package/dist/types/lib/component/TextField/TextField.d.ts.map +1 -1
- package/dist/types/lib/component/TextField/types.d.ts +2 -2
- package/dist/types/lib/component/TextField/types.d.ts.map +1 -1
- package/dist/types/lib/component/TextareaField/TextareaField.d.ts +1 -0
- package/dist/types/lib/component/TextareaField/TextareaField.d.ts.map +1 -1
- package/dist/types/lib/component/TextareaField/types.d.ts +2 -2
- package/dist/types/lib/component/TextareaField/types.d.ts.map +1 -1
- package/dist/types/lib/component/TimeField/TimeField.d.ts +1 -0
- package/dist/types/lib/component/TimeField/TimeField.d.ts.map +1 -1
- package/dist/types/lib/component/TimeField/types.d.ts +2 -2
- package/dist/types/lib/component/TimeField/types.d.ts.map +1 -1
- package/dist/types/lib/component/index.d.ts +2 -0
- package/dist/types/lib/component/index.d.ts.map +1 -1
- package/dist/types/lib/index.d.ts +2 -0
- package/dist/types/lib/index.d.ts.map +1 -1
- package/dist/types/lib/pattern/Field/Field.d.ts.map +1 -1
- package/dist/types/lib/pattern/Field/types.d.ts +27 -21
- package/dist/types/lib/pattern/Field/types.d.ts.map +1 -1
- package/dist/types/lib/subcomponent/ComboboxInput/MultipleCombobox.d.ts.map +1 -1
- package/dist/types/lib/subcomponent/Field/Label/Label.d.ts.map +1 -1
- package/dist/types/lib/subcomponent/FileUploadInput/FileUploadInput.d.ts.map +1 -1
- package/dist/types/lib/subcomponent/PhoneInput/types.d.ts +2 -2
- package/dist/types/lib/subcomponent/PhoneInput/types.d.ts.map +1 -1
- package/dist/types/lib/subcomponent/RatingInput/RatingInput.d.ts +23 -0
- package/dist/types/lib/subcomponent/RatingInput/RatingInput.d.ts.map +1 -0
- package/dist/types/lib/subcomponent/RatingInput/index.d.ts +3 -0
- package/dist/types/lib/subcomponent/RatingInput/index.d.ts.map +1 -0
- package/dist/types/lib/subcomponent/RatingInput/types.d.ts +52 -0
- package/dist/types/lib/subcomponent/RatingInput/types.d.ts.map +1 -0
- package/dist/types/lib/subcomponent/SwitchInput/SwitchInput.d.ts +16 -0
- package/dist/types/lib/subcomponent/SwitchInput/SwitchInput.d.ts.map +1 -0
- package/dist/types/lib/subcomponent/SwitchInput/index.d.ts +3 -0
- package/dist/types/lib/subcomponent/SwitchInput/index.d.ts.map +1 -0
- package/dist/types/lib/subcomponent/SwitchInput/types.d.ts +8 -0
- package/dist/types/lib/subcomponent/SwitchInput/types.d.ts.map +1 -0
- package/dist/types/lib/subcomponent/TextareaInput/TextareaInput.d.ts.map +1 -1
- package/dist/types/lib/subcomponent/index.d.ts +4 -0
- package/dist/types/lib/subcomponent/index.d.ts.map +1 -1
- package/dist/types/lib/utils/hooks/useFieldError.d.ts +14 -0
- package/dist/types/lib/utils/hooks/useFieldError.d.ts.map +1 -1
- package/dist/types/lib/utils/middleware/addRESTOptions.d.ts +2 -2
- package/dist/types/lib/utils/middleware/addRESTOptions.d.ts.map +1 -1
- package/dist/types/lib/utils/middleware/addRESTValidation.d.ts +1 -1
- package/dist/types/lib/utils/middleware/addRESTValidation.d.ts.map +1 -1
- package/package.json +14 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorField.js","sourceRoot":"","sources":["../../../../../src/lib/component/ColorField/ColorField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"ColorField.js","sourceRoot":"","sources":["../../../../../src/lib/component/ColorField/ColorField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iCAAiC,CAAC;AACxD,OAAO,WAAW,MAAM,qCAAqC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAGpE;;;;GAIG;AACH,eAAe,WAAW,CACxB,SAAS,CAAkB,UAAU,EAAE,YAAY,EAAE;IACnD,YAAY,EAAE,SAAS;CACxB,CAAC,CACH,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import bindField from "
|
|
2
|
-
import withWrapper from "
|
|
3
|
-
import { ComboboxInput } from "
|
|
1
|
+
import bindField from "../../common/bindField/index.js";
|
|
2
|
+
import withWrapper from "../../common/Wrapper/withWrapper.js";
|
|
3
|
+
import { ComboboxInput } from "../../subcomponent/ComboboxInput/index.js";
|
|
4
4
|
/**
|
|
5
5
|
* ComboboxInput bound to react-hook-form (controlled), wrapped with field chrome.
|
|
6
6
|
* The single composite value is owned by the field; the presentational
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboboxField.js","sourceRoot":"","sources":["../../../../../src/lib/component/ComboboxField/ComboboxField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"ComboboxField.js","sourceRoot":"","sources":["../../../../../src/lib/component/ComboboxField/ComboboxField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iCAAiC,CAAC;AACxD,OAAO,WAAW,MAAM,qCAAqC,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAG1E;;;;;;GAMG;AACH,eAAe,WAAW,CACxB,SAAS,CAAqB,aAAa,EAAE,YAAY,CAAC,CAC3D,CAAC"}
|
|
@@ -1,11 +1,29 @@
|
|
|
1
|
-
import bindField from "
|
|
2
|
-
import withWrapper from "
|
|
3
|
-
import { DateInput } from "
|
|
1
|
+
import bindField from "../../common/bindField/index.js";
|
|
2
|
+
import withWrapper from "../../common/Wrapper/withWrapper.js";
|
|
3
|
+
import { DateInput } from "../../subcomponent/DateInput/index.js";
|
|
4
|
+
/**
|
|
5
|
+
* Turn the `min`/`max` date props into react-hook-form `min`/`max` rules so an
|
|
6
|
+
* out-of-range date reports an inline error — the native attributes alone only
|
|
7
|
+
* constrain the picker UI and never reach RHF. ISO `YYYY-MM-DD` strings compare
|
|
8
|
+
* lexicographically, so the native rule works directly on the stored value.
|
|
9
|
+
*/
|
|
10
|
+
const dateRangeRules = ({ min, max, }) => {
|
|
11
|
+
const rules = {};
|
|
12
|
+
if (typeof min === "string" && min) {
|
|
13
|
+
rules.min = { value: min, message: `Date must be on or after ${min}.` };
|
|
14
|
+
}
|
|
15
|
+
if (typeof max === "string" && max) {
|
|
16
|
+
rules.max = { value: max, message: `Date must be on or before ${max}.` };
|
|
17
|
+
}
|
|
18
|
+
return rules;
|
|
19
|
+
};
|
|
4
20
|
/**
|
|
5
21
|
* Date input bound to react-hook-form, wrapped with field chrome
|
|
6
22
|
* (label, description, error) and middleware/conditional-display support.
|
|
7
23
|
*
|
|
8
24
|
* `import { DateField } from "@canonical/react-ds-global-form";`
|
|
9
25
|
*/
|
|
10
|
-
export default withWrapper(bindField(DateInput, "native"
|
|
26
|
+
export default withWrapper(bindField(DateInput, "native", {
|
|
27
|
+
additionalRegisterProps: dateRangeRules,
|
|
28
|
+
}));
|
|
11
29
|
//# sourceMappingURL=DateField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateField.js","sourceRoot":"","sources":["../../../../../src/lib/component/DateField/DateField.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DateField.js","sourceRoot":"","sources":["../../../../../src/lib/component/DateField/DateField.tsx"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,iCAAiC,CAAC;AACxD,OAAO,WAAW,MAAM,qCAAqC,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAGlE;;;;;GAKG;AACH,MAAM,cAAc,GAAG,CAAC,EACtB,GAAG,EACH,GAAG,GACqB,EAAmB,EAAE;IAC7C,MAAM,KAAK,GAAoB,EAAE,CAAC;IAClC,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,EAAE,CAAC;QACnC,KAAK,CAAC,GAAG,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,4BAA4B,GAAG,GAAG,EAAE,CAAC;IAC1E,CAAC;IACD,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,EAAE,CAAC;QACnC,KAAK,CAAC,GAAG,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,6BAA6B,GAAG,GAAG,EAAE,CAAC;IAC3E,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF;;;;;GAKG;AACH,eAAe,WAAW,CACxB,SAAS,CAAiB,SAAS,EAAE,QAAQ,EAAE;IAC7C,uBAAuB,EAAE,cAAc;CACxC,CAAC,CACH,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import bindField from "
|
|
2
|
-
import withWrapper from "
|
|
3
|
-
import { DateTimeInput } from "
|
|
1
|
+
import bindField from "../../common/bindField/index.js";
|
|
2
|
+
import withWrapper from "../../common/Wrapper/withWrapper.js";
|
|
3
|
+
import { DateTimeInput } from "../../subcomponent/DateTimeInput/index.js";
|
|
4
4
|
/**
|
|
5
5
|
* DateTime input bound to react-hook-form, wrapped with field chrome
|
|
6
6
|
* (label, description, error) and middleware/conditional-display support.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTimeField.js","sourceRoot":"","sources":["../../../../../src/lib/component/DateTimeField/DateTimeField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"DateTimeField.js","sourceRoot":"","sources":["../../../../../src/lib/component/DateTimeField/DateTimeField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iCAAiC,CAAC;AACxD,OAAO,WAAW,MAAM,qCAAqC,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAG1E;;;;;GAKG;AACH,eAAe,WAAW,CACxB,SAAS,CAAqB,aAAa,EAAE,QAAQ,CAAC,CACvD,CAAC"}
|
|
@@ -1,14 +1,51 @@
|
|
|
1
|
-
import bindField from "
|
|
2
|
-
import withWrapper from "
|
|
3
|
-
import { FileUploadInput } from "
|
|
1
|
+
import bindField from "../../common/bindField/index.js";
|
|
2
|
+
import withWrapper from "../../common/Wrapper/withWrapper.js";
|
|
3
|
+
import { FileUploadInput } from "../../subcomponent/FileUploadInput/index.js";
|
|
4
|
+
const formatFileSize = (bytes) => {
|
|
5
|
+
if (bytes < 1024)
|
|
6
|
+
return `${bytes} B`;
|
|
7
|
+
if (bytes < 1024 * 1024)
|
|
8
|
+
return `${Math.round(bytes / 1024)} KB`;
|
|
9
|
+
return `${Math.round((bytes / (1024 * 1024)) * 10) / 10} MB`;
|
|
10
|
+
};
|
|
4
11
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
12
|
+
* Turn the `maxFiles`/`maxSize` props into a react-hook-form `validate` rule on
|
|
13
|
+
* the selected `File[]`, so an over-limit or oversized selection reports a
|
|
14
|
+
* standard field error (via the Wrapper's FieldError). Validation lives at the
|
|
15
|
+
* field/RHF layer — the presentational input just reports the chosen files.
|
|
16
|
+
*/
|
|
17
|
+
const fileConstraintRules = ({ maxFiles, maxSize, }) => {
|
|
18
|
+
const hasMaxFiles = typeof maxFiles === "number";
|
|
19
|
+
const hasMaxSize = typeof maxSize === "number";
|
|
20
|
+
if (!hasMaxFiles && !hasMaxSize)
|
|
21
|
+
return {};
|
|
22
|
+
return {
|
|
23
|
+
validate: (value) => {
|
|
24
|
+
const files = Array.isArray(value) ? value : [];
|
|
25
|
+
if (hasMaxFiles && files.length > maxFiles) {
|
|
26
|
+
return `You can upload at most ${maxFiles} file${maxFiles === 1 ? "" : "s"}.`;
|
|
27
|
+
}
|
|
28
|
+
if (hasMaxSize) {
|
|
29
|
+
const tooBig = files.find((file) => file.size > maxSize);
|
|
30
|
+
if (tooBig) {
|
|
31
|
+
return `${tooBig.name} exceeds ${formatFileSize(maxSize)}.`;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return true;
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* FileUploadInput bound to react-hook-form (controlled), wrapped with field
|
|
40
|
+
* chrome. The `defaultValue` preserves the registration default the original
|
|
41
|
+
* leaf set in `useController` (`[]`). `maxFiles`/`maxSize` are enforced as RHF
|
|
42
|
+
* validation rules so violations surface as a standard field error rather than
|
|
43
|
+
* being silently dropped in the input.
|
|
8
44
|
*
|
|
9
45
|
* `import { FileUploadField } from "@canonical/react-ds-global-form";`
|
|
10
46
|
*/
|
|
11
47
|
export default withWrapper(bindField(FileUploadInput, "controlled", {
|
|
12
48
|
defaultValue: [],
|
|
49
|
+
additionalRegisterProps: fileConstraintRules,
|
|
13
50
|
}));
|
|
14
51
|
//# sourceMappingURL=FileUploadField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUploadField.js","sourceRoot":"","sources":["../../../../../src/lib/component/FileUploadField/FileUploadField.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FileUploadField.js","sourceRoot":"","sources":["../../../../../src/lib/component/FileUploadField/FileUploadField.tsx"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,iCAAiC,CAAC;AACxD,OAAO,WAAW,MAAM,qCAAqC,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAG9E,MAAM,cAAc,GAAG,CAAC,KAAa,EAAU,EAAE;IAC/C,IAAI,KAAK,GAAG,IAAI;QAAE,OAAO,GAAG,KAAK,IAAI,CAAC;IACtC,IAAI,KAAK,GAAG,IAAI,GAAG,IAAI;QAAE,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,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AAE;IAC7D,YAAY,EAAE,EAAE;IAChB,uBAAuB,EAAE,mBAAmB;CAC7C,CAAC,CACH,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import bindField from "
|
|
2
|
-
import { InvisibleWrapper, withWrapper } from "
|
|
3
|
-
import { HiddenInput } from "
|
|
1
|
+
import bindField from "../../common/bindField/index.js";
|
|
2
|
+
import { InvisibleWrapper, withWrapper } from "../../common/Wrapper/index.js";
|
|
3
|
+
import { HiddenInput } from "../../subcomponent/HiddenInput/index.js";
|
|
4
4
|
/**
|
|
5
5
|
* HiddenInput bound to react-hook-form. Uses InvisibleWrapper so no label,
|
|
6
6
|
* description, or error chrome is rendered.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HiddenField.js","sourceRoot":"","sources":["../../../../../src/lib/component/HiddenField/HiddenField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"HiddenField.js","sourceRoot":"","sources":["../../../../../src/lib/component/HiddenField/HiddenField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iCAAiC,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAGtE;;;;;GAKG;AACH,eAAe,WAAW,CACxB,SAAS,CAAmB,WAAW,EAAE,QAAQ,CAAC,EAClD,EAAE,EACF,gBAAgB,CACjB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Generated by @canonical/summon-component:react v0.1.0
|
|
2
|
-
import bindField from "
|
|
3
|
-
import withWrapper from "
|
|
4
|
-
import { NumberInput } from "
|
|
2
|
+
import bindField from "../../common/bindField/index.js";
|
|
3
|
+
import withWrapper from "../../common/Wrapper/withWrapper.js";
|
|
4
|
+
import { NumberInput } from "../../subcomponent/NumberInput/index.js";
|
|
5
5
|
/**
|
|
6
6
|
* NumberInput bound to react-hook-form, wrapped with field chrome (label,
|
|
7
7
|
* description, error) and middleware/conditional-display support. Collects a
|
|
@@ -13,6 +13,6 @@ export default withWrapper(
|
|
|
13
13
|
// `valueAsNumber` so RHF stores a number, not the string the native
|
|
14
14
|
// `<input type="number">` reports (the consumer's registerProps still win).
|
|
15
15
|
bindField(NumberInput, "native", {
|
|
16
|
-
|
|
16
|
+
additionalRegisterProps: { valueAsNumber: true },
|
|
17
17
|
}));
|
|
18
18
|
//# sourceMappingURL=NumberField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberField.js","sourceRoot":"","sources":["../../../../../src/lib/component/NumberField/NumberField.tsx"],"names":[],"mappings":"AAAA,wDAAwD;AAExD,OAAO,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"NumberField.js","sourceRoot":"","sources":["../../../../../src/lib/component/NumberField/NumberField.tsx"],"names":[],"mappings":"AAAA,wDAAwD;AAExD,OAAO,SAAS,MAAM,iCAAiC,CAAC;AACxD,OAAO,WAAW,MAAM,qCAAqC,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAGtE;;;;;;GAMG;AACH,eAAe,WAAW;AACxB,oEAAoE;AACpE,4EAA4E;AAC5E,SAAS,CAAmB,WAAW,EAAE,QAAQ,EAAE;IACjD,uBAAuB,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE;CACjD,CAAC,CACH,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Generated by @canonical/summon-component:react v0.1.0
|
|
2
|
-
import bindField from "
|
|
3
|
-
import withWrapper from "
|
|
4
|
-
import { PasswordInput } from "
|
|
2
|
+
import bindField from "../../common/bindField/index.js";
|
|
3
|
+
import withWrapper from "../../common/Wrapper/withWrapper.js";
|
|
4
|
+
import { PasswordInput } from "../../subcomponent/PasswordInput/index.js";
|
|
5
5
|
/**
|
|
6
6
|
* PasswordInput bound to react-hook-form, wrapped with field chrome (label,
|
|
7
7
|
* description, error) and middleware/conditional-display support. Collects a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordField.js","sourceRoot":"","sources":["../../../../../src/lib/component/PasswordField/PasswordField.tsx"],"names":[],"mappings":"AAAA,wDAAwD;AAExD,OAAO,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"PasswordField.js","sourceRoot":"","sources":["../../../../../src/lib/component/PasswordField/PasswordField.tsx"],"names":[],"mappings":"AAAA,wDAAwD;AAExD,OAAO,SAAS,MAAM,iCAAiC,CAAC;AACxD,OAAO,WAAW,MAAM,qCAAqC,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAG1E;;;;;;GAMG;AACH,eAAe,WAAW,CACxB,SAAS,CAAqB,aAAa,EAAE,QAAQ,CAAC,CACvD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import bindField from "
|
|
2
|
-
import withWrapper from "
|
|
3
|
-
import { PhoneInput } from "
|
|
1
|
+
import bindField from "../../common/bindField/index.js";
|
|
2
|
+
import withWrapper from "../../common/Wrapper/withWrapper.js";
|
|
3
|
+
import { PhoneInput } from "../../subcomponent/PhoneInput/index.js";
|
|
4
4
|
/**
|
|
5
5
|
* PhoneInput bound to react-hook-form (controlled), wrapped with field chrome.
|
|
6
6
|
* The single composite value (an E.164 string or a structured object) is owned
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PhoneField.js","sourceRoot":"","sources":["../../../../../src/lib/component/PhoneField/PhoneField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"PhoneField.js","sourceRoot":"","sources":["../../../../../src/lib/component/PhoneField/PhoneField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iCAAiC,CAAC;AACxD,OAAO,WAAW,MAAM,qCAAqC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAGpE;;;;;;;;;;;GAWG;AACH,eAAe,WAAW,CACxB,SAAS,CAAkB,UAAU,EAAE,YAAY,CAAC,CACrD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import bindField from "
|
|
2
|
-
import withWrapper from "
|
|
1
|
+
import bindField from "../../common/bindField/index.js";
|
|
2
|
+
import withWrapper from "../../common/Wrapper/withWrapper.js";
|
|
3
3
|
import { RangeControl } from "./common/index.js";
|
|
4
4
|
/**
|
|
5
5
|
* A numeric field offering both precise entry and a slider for one value.
|
|
@@ -14,6 +14,6 @@ import { RangeControl } from "./common/index.js";
|
|
|
14
14
|
* `import { RangeField } from "@canonical/react-ds-global-form";`
|
|
15
15
|
*/
|
|
16
16
|
export default withWrapper(bindField(RangeControl, "native", {
|
|
17
|
-
|
|
17
|
+
additionalRegisterProps: { valueAsNumber: true },
|
|
18
18
|
}));
|
|
19
19
|
//# sourceMappingURL=RangeField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RangeField.js","sourceRoot":"","sources":["../../../../../src/lib/component/RangeField/RangeField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"RangeField.js","sourceRoot":"","sources":["../../../../../src/lib/component/RangeField/RangeField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iCAAiC,CAAC;AACxD,OAAO,WAAW,MAAM,qCAAqC,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGjD;;;;;;;;;;;GAWG;AACH,eAAe,WAAW,CACxB,SAAS,CAAkB,YAAY,EAAE,QAAQ,EAAE;IACjD,uBAAuB,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE;CACjD,CAAC,CACH,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, useEffect, useRef, useState, } from "react";
|
|
3
|
-
import { NumberInput } from "
|
|
3
|
+
import { NumberInput } from "../../../../subcomponent/NumberInput/index.js";
|
|
4
4
|
import "./styles.css";
|
|
5
5
|
const componentCssClassName = "ds range-control";
|
|
6
6
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RangeControl.js","sourceRoot":"","sources":["../../../../../../../src/lib/component/RangeField/common/RangeControl/RangeControl.tsx"],"names":[],"mappings":";AAAA,OAAO,EAEL,UAAU,EAEV,SAAS,EACT,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"RangeControl.js","sourceRoot":"","sources":["../../../../../../../src/lib/component/RangeField/common/RangeControl/RangeControl.tsx"],"names":[],"mappings":";AAAA,OAAO,EAEL,UAAU,EAEV,SAAS,EACT,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE5E,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,kBAAkB,CAAC;AAEjD;;;;GAIG;AACH,SAAS,aAAa,CAAC,GAAW,EAAE,GAAW,EAAE,GAAW;IAC1D,MAAM,CAAC,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IACjC,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QAAE,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;IACxC,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;AACjD,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CACpC,SAAS,YAAY,CACnB,EACE,EAAE,EACF,SAAS,EACT,KAAK,EACL,G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,OAAO,IAAI,CACV,gBACE,IAAI,EAAC,OAAO,EACZ,SAAS,EAAC,uBAAuB,gBACrB,mBAAmB,EAC/B,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,WAAW,CAAC,QAAQ,EAC9B,QAAQ,EAAE,kBAAkB,GAC5B,CACH,IACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import bindField from "../../common/bindField/index.js";
|
|
2
|
+
import withWrapper from "../../common/Wrapper/withWrapper.js";
|
|
3
|
+
import { RatingInput } from "../../subcomponent/RatingInput/index.js";
|
|
4
|
+
/**
|
|
5
|
+
* RatingInput bound to react-hook-form (controlled), wrapped with the field
|
|
6
|
+
* chrome (label, description, error) and middleware/conditional-display support.
|
|
7
|
+
* The numeric rating is owned by the field.
|
|
8
|
+
*
|
|
9
|
+
* `import { RatingField } from "@canonical/react-ds-global-form";`
|
|
10
|
+
*/
|
|
11
|
+
export default withWrapper(bindField(RatingInput, "controlled"));
|
|
12
|
+
//# sourceMappingURL=RatingField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RatingField.js","sourceRoot":"","sources":["../../../../../src/lib/component/RatingField/RatingField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iCAAiC,CAAC;AACxD,OAAO,WAAW,MAAM,qCAAqC,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAGtE;;;;;;GAMG;AACH,eAAe,WAAW,CACxB,SAAS,CAAmB,WAAW,EAAE,YAAY,CAAC,CACvD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/component/RatingField/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/lib/component/RatingField/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import bindField from "
|
|
2
|
-
import withWrapper from "
|
|
1
|
+
import bindField from "../../common/bindField/index.js";
|
|
2
|
+
import withWrapper from "../../common/Wrapper/withWrapper.js";
|
|
3
3
|
import { RichChoices } from "./RichChoices.js";
|
|
4
4
|
/**
|
|
5
5
|
* RichChoices bound to react-hook-form (controlled), wrapped with field chrome.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RichChoicesField.js","sourceRoot":"","sources":["../../../../../src/lib/component/RichChoicesField/RichChoicesField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"RichChoicesField.js","sourceRoot":"","sources":["../../../../../src/lib/component/RichChoicesField/RichChoicesField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iCAAiC,CAAC;AACxD,OAAO,WAAW,MAAM,qCAAqC,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG/C;;;;;;GAMG;AACH,eAAe,WAAW,CACxB,SAAS,CAAwB,WAAW,EAAE,YAAY,CAAC,EAC3D,EAAE,SAAS,EAAE,IAAI,EAAE,CACpB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import useOptionAriaProperties from "
|
|
2
|
+
import useOptionAriaProperties from "../../../../utils/hooks/useOptionAriaProperties.js";
|
|
3
3
|
const componentCssClassName = "ds option";
|
|
4
4
|
/**
|
|
5
5
|
* A single selectable option within a `RichChoices` group: a hidden native input
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Option.js","sourceRoot":"","sources":["../../../../../../../src/lib/component/RichChoicesField/common/Option/Option.tsx"],"names":[],"mappings":";AAGA,OAAO,uBAAuB,MAAM,
|
|
1
|
+
{"version":3,"file":"Option.js","sourceRoot":"","sources":["../../../../../../../src/lib/component/RichChoicesField/common/Option/Option.tsx"],"names":[],"mappings":";AAGA,OAAO,uBAAuB,MAAM,oDAAoD,CAAC;AAGzF,MAAM,qBAAqB,GAAG,WAAW,CAAC;AAE1C;;;;;GAKG;AACH,MAAM,MAAM,GAAG,CAAC,EACd,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,OAAO,EACP,QAAQ,EACR,QAAQ,GACI,EAAsB,EAAE;IACpC,MAAM,SAAS,GAAG,uBAAuB,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IAC9D,OAAO,CACL,eACE,SAAS,EAAE,CAAC,qBAAqB,EAAE,QAAQ,IAAI,UAAU,CAAC;aACvD,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,GAAG,CAAC,aAEZ,gBACE,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,KACd,SAAS,CAAC,KAAK,GACnB,EAEF,gBAAO,SAAS,EAAC,GAAG,KAAK,SAAS,CAAC,KAAK,YACrC,MAAM,CAAC,KAAK,GACP,IACJ,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -66,6 +66,10 @@
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
/* Focus */
|
|
69
|
+
/* biome-ignore lint/style/noDescendingSpecificity: state rules are ordered by
|
|
70
|
+
interaction semantics (hover → focus → checked → disabled); the preceding
|
|
71
|
+
:hover rule only reads as higher specificity because of its :not(:disabled)
|
|
72
|
+
guard. Reordering to satisfy the linter would change the cascade. */
|
|
69
73
|
& > input:focus-visible + label {
|
|
70
74
|
outline: none;
|
|
71
75
|
border-color: var(--form-input-border-color-focus);
|
|
@@ -73,6 +77,7 @@
|
|
|
73
77
|
}
|
|
74
78
|
|
|
75
79
|
/* Checked / selected */
|
|
80
|
+
/* biome-ignore lint/style/noDescendingSpecificity: see the focus rule above. */
|
|
76
81
|
& > input:checked + label {
|
|
77
82
|
border-color: var(--form-input-border-color-focus);
|
|
78
83
|
background-color: var(
|
|
@@ -83,6 +88,7 @@
|
|
|
83
88
|
}
|
|
84
89
|
|
|
85
90
|
/* Disabled */
|
|
91
|
+
/* biome-ignore lint/style/noDescendingSpecificity: see the focus rule above. */
|
|
86
92
|
& > input:disabled + label {
|
|
87
93
|
border-color: var(--form-input-border-color-disabled);
|
|
88
94
|
background-color: var(--form-input-background-disabled);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import bindField from "
|
|
2
|
-
import withWrapper from "
|
|
3
|
-
import { SelectInput } from "
|
|
1
|
+
import bindField from "../../common/bindField/index.js";
|
|
2
|
+
import withWrapper from "../../common/Wrapper/withWrapper.js";
|
|
3
|
+
import { SelectInput } from "../../subcomponent/SelectInput/index.js";
|
|
4
4
|
/**
|
|
5
5
|
* SelectInput bound to react-hook-form, wrapped with field chrome
|
|
6
6
|
* (label, description, error) and middleware/conditional-display support.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectField.js","sourceRoot":"","sources":["../../../../../src/lib/component/SelectField/SelectField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"SelectField.js","sourceRoot":"","sources":["../../../../../src/lib/component/SelectField/SelectField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iCAAiC,CAAC;AACxD,OAAO,WAAW,MAAM,qCAAqC,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAGtE;;;;;GAKG;AACH,eAAe,WAAW,CACxB,SAAS,CAAmB,WAAW,EAAE,QAAQ,CAAC,CACnD,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import bindField from "../../common/bindField/index.js";
|
|
2
|
+
import withToggleWrapper from "../../common/Wrapper/withToggleWrapper.js";
|
|
3
|
+
import { SwitchInput } from "../../subcomponent/SwitchInput/index.js";
|
|
4
|
+
/**
|
|
5
|
+
* SwitchInput bound to react-hook-form, wrapped with the toggle field chrome
|
|
6
|
+
* (inline label, optional heading, description, error) and
|
|
7
|
+
* middleware/conditional-display support. Requires at least one of
|
|
8
|
+
* `label`/`controlLabel`.
|
|
9
|
+
*
|
|
10
|
+
* `import { SwitchField } from "@canonical/react-ds-global-form";`
|
|
11
|
+
*/
|
|
12
|
+
export default withToggleWrapper(bindField(SwitchInput, "native"));
|
|
13
|
+
//# sourceMappingURL=SwitchField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SwitchField.js","sourceRoot":"","sources":["../../../../../src/lib/component/SwitchField/SwitchField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iCAAiC,CAAC;AAExD,OAAO,iBAAiB,MAAM,2CAA2C,CAAC;AAE1E,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAItE;;;;;;;GAOG;AACH,eAAe,iBAAiB,CAC9B,SAAS,CAAwB,WAAW,EAAE,QAAQ,CAAC,CACxD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/component/SwitchField/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/lib/component/SwitchField/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import bindField from "
|
|
2
|
-
import withWrapper from "
|
|
3
|
-
import { TextInput } from "
|
|
1
|
+
import bindField from "../../common/bindField/index.js";
|
|
2
|
+
import withWrapper from "../../common/Wrapper/withWrapper.js";
|
|
3
|
+
import { TextInput } from "../../subcomponent/TextInput/index.js";
|
|
4
4
|
/**
|
|
5
5
|
* TextInput bound to react-hook-form, wrapped with field chrome
|
|
6
6
|
* (label, description, error) and middleware/conditional-display support.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.js","sourceRoot":"","sources":["../../../../../src/lib/component/TextField/TextField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"TextField.js","sourceRoot":"","sources":["../../../../../src/lib/component/TextField/TextField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iCAAiC,CAAC;AACxD,OAAO,WAAW,MAAM,qCAAqC,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAGlE;;;;;GAKG;AACH,eAAe,WAAW,CACxB,SAAS,CAAiB,SAAS,EAAE,QAAQ,CAAC,CAC/C,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import bindField from "
|
|
2
|
-
import withWrapper from "
|
|
3
|
-
import { TextareaInput } from "
|
|
1
|
+
import bindField from "../../common/bindField/index.js";
|
|
2
|
+
import withWrapper from "../../common/Wrapper/withWrapper.js";
|
|
3
|
+
import { TextareaInput } from "../../subcomponent/TextareaInput/index.js";
|
|
4
4
|
/**
|
|
5
5
|
* TextareaInput bound to react-hook-form, wrapped with field chrome
|
|
6
6
|
* (label, description, error) and middleware/conditional-display support.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextareaField.js","sourceRoot":"","sources":["../../../../../src/lib/component/TextareaField/TextareaField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"TextareaField.js","sourceRoot":"","sources":["../../../../../src/lib/component/TextareaField/TextareaField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iCAAiC,CAAC;AACxD,OAAO,WAAW,MAAM,qCAAqC,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAG1E;;;;;GAKG;AACH,eAAe,WAAW,CACxB,SAAS,CAAqB,aAAa,EAAE,QAAQ,CAAC,CACvD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import bindField from "
|
|
2
|
-
import withWrapper from "
|
|
3
|
-
import { TimeInput } from "
|
|
1
|
+
import bindField from "../../common/bindField/index.js";
|
|
2
|
+
import withWrapper from "../../common/Wrapper/withWrapper.js";
|
|
3
|
+
import { TimeInput } from "../../subcomponent/TimeInput/index.js";
|
|
4
4
|
/**
|
|
5
5
|
* Time input bound to react-hook-form, wrapped with field chrome
|
|
6
6
|
* (label, description, error) and middleware/conditional-display support.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeField.js","sourceRoot":"","sources":["../../../../../src/lib/component/TimeField/TimeField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"TimeField.js","sourceRoot":"","sources":["../../../../../src/lib/component/TimeField/TimeField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iCAAiC,CAAC;AACxD,OAAO,WAAW,MAAM,qCAAqC,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAGlE;;;;;GAKG;AACH,eAAe,WAAW,CACxB,SAAS,CAAiB,SAAS,EAAE,QAAQ,CAAC,CAC/C,CAAC"}
|
|
@@ -12,8 +12,10 @@ export * from "./NumberField/index.js";
|
|
|
12
12
|
export * from "./PasswordField/index.js";
|
|
13
13
|
export * from "./PhoneField/index.js";
|
|
14
14
|
export * from "./RangeField/index.js";
|
|
15
|
+
export * from "./RatingField/index.js";
|
|
15
16
|
export * from "./RichChoicesField/index.js";
|
|
16
17
|
export * from "./SelectField/index.js";
|
|
18
|
+
export * from "./SwitchField/index.js";
|
|
17
19
|
export * from "./TextareaField/index.js";
|
|
18
20
|
export * from "./TextField/index.js";
|
|
19
21
|
export * from "./TimeField/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/component/index.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,oEAAoE;AACpE,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/component/index.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,oEAAoE;AACpE,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC"}
|
package/dist/esm/lib/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// Public package surface (unchanged by the tier restructure): the Field pattern
|
|
2
2
|
// (Field + FieldProps + the shared/machinery types it re-exports), the Form
|
|
3
3
|
// pattern, and the form middleware. The component/ and subcomponent/ tiers are
|
|
4
|
-
// internal — composed by the Field pattern, not exported at the root.
|
|
4
|
+
// otherwise internal — composed by the Field pattern, not exported at the root.
|
|
5
5
|
export * from "./pattern/index.js";
|
|
6
|
+
export { RatingInput } from "./subcomponent/index.js";
|
|
6
7
|
export * from "./utils/middleware/index.js";
|
|
7
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,4EAA4E;AAC5E,+EAA+E;AAC/E,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,4EAA4E;AAC5E,+EAA+E;AAC/E,gFAAgF;AAChF,cAAc,oBAAoB,CAAC;AAUnC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,cAAc,6BAA6B,CAAC"}
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { CheckboxField } from "
|
|
3
|
-
import { ChoicesField } from "
|
|
4
|
-
import { ColorField } from "
|
|
5
|
-
import { ComboboxField } from "
|
|
6
|
-
import { DateField } from "
|
|
7
|
-
import { DateTimeField } from "
|
|
8
|
-
import { FileUploadField } from "
|
|
9
|
-
import { HiddenField } from "
|
|
10
|
-
import { NumberField } from "
|
|
11
|
-
import { PasswordField } from "
|
|
12
|
-
import { PhoneField } from "
|
|
13
|
-
import { RangeField } from "
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
2
|
+
import { CheckboxField } from "../../component/CheckboxField/index.js";
|
|
3
|
+
import { ChoicesField } from "../../component/ChoicesField/index.js";
|
|
4
|
+
import { ColorField } from "../../component/ColorField/index.js";
|
|
5
|
+
import { ComboboxField } from "../../component/ComboboxField/index.js";
|
|
6
|
+
import { DateField } from "../../component/DateField/index.js";
|
|
7
|
+
import { DateTimeField } from "../../component/DateTimeField/index.js";
|
|
8
|
+
import { FileUploadField } from "../../component/FileUploadField/index.js";
|
|
9
|
+
import { HiddenField } from "../../component/HiddenField/index.js";
|
|
10
|
+
import { NumberField } from "../../component/NumberField/index.js";
|
|
11
|
+
import { PasswordField } from "../../component/PasswordField/index.js";
|
|
12
|
+
import { PhoneField } from "../../component/PhoneField/index.js";
|
|
13
|
+
import { RangeField } from "../../component/RangeField/index.js";
|
|
14
|
+
import { RatingField } from "../../component/RatingField/index.js";
|
|
15
|
+
import { RichChoicesField } from "../../component/RichChoicesField/index.js";
|
|
16
|
+
import { SelectField } from "../../component/SelectField/index.js";
|
|
17
|
+
import { SwitchField } from "../../component/SwitchField/index.js";
|
|
18
|
+
import { TextareaField } from "../../component/TextareaField/index.js";
|
|
19
|
+
import { TextField } from "../../component/TextField/index.js";
|
|
20
|
+
import { TimeField } from "../../component/TimeField/index.js";
|
|
19
21
|
/**
|
|
20
22
|
* description of the Field component
|
|
21
23
|
* @returns {React.ReactElement} - Rendered Field
|
|
@@ -28,6 +30,10 @@ const Field = ({ inputType, CustomComponent, ...props }) => {
|
|
|
28
30
|
return _jsx(TextareaField, { ...props });
|
|
29
31
|
case "checkbox":
|
|
30
32
|
return _jsx(CheckboxField, { ...props });
|
|
33
|
+
case "switch":
|
|
34
|
+
return _jsx(SwitchField, { ...props });
|
|
35
|
+
case "rating":
|
|
36
|
+
return _jsx(RatingField, { ...props });
|
|
31
37
|
case "range":
|
|
32
38
|
return _jsx(RangeField, { ...props });
|
|
33
39
|
case "select":
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Field.js","sourceRoot":"","sources":["../../../../../src/lib/pattern/Field/Field.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Field.js","sourceRoot":"","sources":["../../../../../src/lib/pattern/Field/Field.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAo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