@metamask/snaps-sdk 6.16.0 → 6.17.1

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 (130) hide show
  1. package/CHANGELOG.md +20 -1
  2. package/dist/error-wrappers.d.cts +192 -192
  3. package/dist/error-wrappers.d.mts +192 -192
  4. package/dist/internals/error-wrappers.d.cts +12 -12
  5. package/dist/internals/error-wrappers.d.mts +12 -12
  6. package/dist/jsx/components/Avatar.cjs +1 -0
  7. package/dist/jsx/components/Avatar.cjs.map +1 -1
  8. package/dist/jsx/components/Avatar.d.cts +2 -0
  9. package/dist/jsx/components/Avatar.d.cts.map +1 -1
  10. package/dist/jsx/components/Avatar.d.mts +2 -0
  11. package/dist/jsx/components/Avatar.d.mts.map +1 -1
  12. package/dist/jsx/components/Avatar.mjs +1 -0
  13. package/dist/jsx/components/Avatar.mjs.map +1 -1
  14. package/dist/jsx/components/form/Checkbox.cjs +1 -0
  15. package/dist/jsx/components/form/Checkbox.cjs.map +1 -1
  16. package/dist/jsx/components/form/Checkbox.d.cts +3 -0
  17. package/dist/jsx/components/form/Checkbox.d.cts.map +1 -1
  18. package/dist/jsx/components/form/Checkbox.d.mts +3 -0
  19. package/dist/jsx/components/form/Checkbox.d.mts.map +1 -1
  20. package/dist/jsx/components/form/Checkbox.mjs +1 -0
  21. package/dist/jsx/components/form/Checkbox.mjs.map +1 -1
  22. package/dist/jsx/components/form/Dropdown.cjs +1 -0
  23. package/dist/jsx/components/form/Dropdown.cjs.map +1 -1
  24. package/dist/jsx/components/form/Dropdown.d.cts +3 -0
  25. package/dist/jsx/components/form/Dropdown.d.cts.map +1 -1
  26. package/dist/jsx/components/form/Dropdown.d.mts +3 -0
  27. package/dist/jsx/components/form/Dropdown.d.mts.map +1 -1
  28. package/dist/jsx/components/form/Dropdown.mjs +1 -0
  29. package/dist/jsx/components/form/Dropdown.mjs.map +1 -1
  30. package/dist/jsx/components/form/FileInput.cjs +1 -0
  31. package/dist/jsx/components/form/FileInput.cjs.map +1 -1
  32. package/dist/jsx/components/form/FileInput.d.cts +3 -0
  33. package/dist/jsx/components/form/FileInput.d.cts.map +1 -1
  34. package/dist/jsx/components/form/FileInput.d.mts +3 -0
  35. package/dist/jsx/components/form/FileInput.d.mts.map +1 -1
  36. package/dist/jsx/components/form/FileInput.mjs +1 -0
  37. package/dist/jsx/components/form/FileInput.mjs.map +1 -1
  38. package/dist/jsx/components/form/Input.cjs +1 -0
  39. package/dist/jsx/components/form/Input.cjs.map +1 -1
  40. package/dist/jsx/components/form/Input.d.cts +2 -0
  41. package/dist/jsx/components/form/Input.d.cts.map +1 -1
  42. package/dist/jsx/components/form/Input.d.mts +2 -0
  43. package/dist/jsx/components/form/Input.d.mts.map +1 -1
  44. package/dist/jsx/components/form/Input.mjs +1 -0
  45. package/dist/jsx/components/form/Input.mjs.map +1 -1
  46. package/dist/jsx/components/form/Option.cjs +1 -0
  47. package/dist/jsx/components/form/Option.cjs.map +1 -1
  48. package/dist/jsx/components/form/Option.d.cts +3 -0
  49. package/dist/jsx/components/form/Option.d.cts.map +1 -1
  50. package/dist/jsx/components/form/Option.d.mts +3 -0
  51. package/dist/jsx/components/form/Option.d.mts.map +1 -1
  52. package/dist/jsx/components/form/Option.mjs +1 -0
  53. package/dist/jsx/components/form/Option.mjs.map +1 -1
  54. package/dist/jsx/components/form/Radio.cjs +1 -0
  55. package/dist/jsx/components/form/Radio.cjs.map +1 -1
  56. package/dist/jsx/components/form/Radio.d.cts +3 -0
  57. package/dist/jsx/components/form/Radio.d.cts.map +1 -1
  58. package/dist/jsx/components/form/Radio.d.mts +3 -0
  59. package/dist/jsx/components/form/Radio.d.mts.map +1 -1
  60. package/dist/jsx/components/form/Radio.mjs +1 -0
  61. package/dist/jsx/components/form/Radio.mjs.map +1 -1
  62. package/dist/jsx/components/form/RadioGroup.cjs +5 -0
  63. package/dist/jsx/components/form/RadioGroup.cjs.map +1 -1
  64. package/dist/jsx/components/form/RadioGroup.d.cts +8 -0
  65. package/dist/jsx/components/form/RadioGroup.d.cts.map +1 -1
  66. package/dist/jsx/components/form/RadioGroup.d.mts +8 -0
  67. package/dist/jsx/components/form/RadioGroup.d.mts.map +1 -1
  68. package/dist/jsx/components/form/RadioGroup.mjs +5 -0
  69. package/dist/jsx/components/form/RadioGroup.mjs.map +1 -1
  70. package/dist/jsx/components/form/Selector.cjs +1 -0
  71. package/dist/jsx/components/form/Selector.cjs.map +1 -1
  72. package/dist/jsx/components/form/Selector.d.cts +3 -0
  73. package/dist/jsx/components/form/Selector.d.cts.map +1 -1
  74. package/dist/jsx/components/form/Selector.d.mts +3 -0
  75. package/dist/jsx/components/form/Selector.d.mts.map +1 -1
  76. package/dist/jsx/components/form/Selector.mjs +1 -0
  77. package/dist/jsx/components/form/Selector.mjs.map +1 -1
  78. package/dist/jsx/components/form/SelectorOption.cjs +1 -0
  79. package/dist/jsx/components/form/SelectorOption.cjs.map +1 -1
  80. package/dist/jsx/components/form/SelectorOption.d.cts +3 -0
  81. package/dist/jsx/components/form/SelectorOption.d.cts.map +1 -1
  82. package/dist/jsx/components/form/SelectorOption.d.mts +3 -0
  83. package/dist/jsx/components/form/SelectorOption.d.mts.map +1 -1
  84. package/dist/jsx/components/form/SelectorOption.mjs +1 -0
  85. package/dist/jsx/components/form/SelectorOption.mjs.map +1 -1
  86. package/dist/jsx/validation.cjs +9 -0
  87. package/dist/jsx/validation.cjs.map +1 -1
  88. package/dist/jsx/validation.d.cts +14 -0
  89. package/dist/jsx/validation.d.cts.map +1 -1
  90. package/dist/jsx/validation.d.mts +14 -0
  91. package/dist/jsx/validation.d.mts.map +1 -1
  92. package/dist/jsx/validation.mjs +9 -0
  93. package/dist/jsx/validation.mjs.map +1 -1
  94. package/dist/types/handlers/assets-conversion.cjs +1 -1
  95. package/dist/types/handlers/assets-conversion.cjs.map +1 -1
  96. package/dist/types/handlers/assets-conversion.d.cts +4 -4
  97. package/dist/types/handlers/assets-conversion.d.cts.map +1 -1
  98. package/dist/types/handlers/assets-conversion.d.mts +4 -4
  99. package/dist/types/handlers/assets-conversion.d.mts.map +1 -1
  100. package/dist/types/handlers/assets-conversion.mjs +2 -2
  101. package/dist/types/handlers/assets-conversion.mjs.map +1 -1
  102. package/dist/types/handlers/assets-lookup.cjs +1 -1
  103. package/dist/types/handlers/assets-lookup.cjs.map +1 -1
  104. package/dist/types/handlers/assets-lookup.d.cts +4 -4
  105. package/dist/types/handlers/assets-lookup.d.cts.map +1 -1
  106. package/dist/types/handlers/assets-lookup.d.mts +4 -4
  107. package/dist/types/handlers/assets-lookup.d.mts.map +1 -1
  108. package/dist/types/handlers/assets-lookup.mjs +2 -2
  109. package/dist/types/handlers/assets-lookup.mjs.map +1 -1
  110. package/dist/types/handlers/index.cjs +1 -0
  111. package/dist/types/handlers/index.cjs.map +1 -1
  112. package/dist/types/handlers/index.d.cts +1 -0
  113. package/dist/types/handlers/index.d.cts.map +1 -1
  114. package/dist/types/handlers/index.d.mts +1 -0
  115. package/dist/types/handlers/index.d.mts.map +1 -1
  116. package/dist/types/handlers/index.mjs +1 -0
  117. package/dist/types/handlers/index.mjs.map +1 -1
  118. package/dist/types/handlers/protocol.cjs +3 -0
  119. package/dist/types/handlers/protocol.cjs.map +1 -0
  120. package/dist/types/handlers/protocol.d.cts +23 -0
  121. package/dist/types/handlers/protocol.d.cts.map +1 -0
  122. package/dist/types/handlers/protocol.d.mts +23 -0
  123. package/dist/types/handlers/protocol.d.mts.map +1 -0
  124. package/dist/types/handlers/protocol.mjs +2 -0
  125. package/dist/types/handlers/protocol.mjs.map +1 -0
  126. package/dist/types/interface.d.cts +2 -0
  127. package/dist/types/interface.d.cts.map +1 -1
  128. package/dist/types/interface.d.mts +2 -0
  129. package/dist/types/interface.d.mts.map +1 -1
  130. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Option.cjs","sourceRoot":"","sources":["../../../../src/jsx/components/form/Option.ts"],"names":[],"mappings":";;;AAAA,mDAAsD;AACtD,6DAA6D;AAC7D,6CAAsC;AActC,MAAM,IAAI,GAAG,QAAQ,CAAC;AAEtB;;;;;;;;;;;;;;;GAeG;AACU,QAAA,MAAM,GAAG,IAAA,+BAAmB,EAA2B,IAAI,CAAC,CAAC","sourcesContent":["import { createSnapComponent } from '../../component';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { Dropdown } from './Dropdown';\n\n/**\n * The props of the {@link Option} component.\n *\n * @property value - The value of the dropdown option. This is used to populate the\n * state in the form data.\n * @property children - The text to display.\n */\ntype OptionProps = {\n value: string;\n children: string;\n};\n\nconst TYPE = 'Option';\n\n/**\n * A dropdown option component, which is used to create a dropdown option. This component\n * can only be used as a child of the {@link Dropdown} component.\n *\n * @param props - The props of the component.\n * @param props.value - The value of the dropdown option. This is used to populate the\n * state in the form data.\n * @param props.children - The text to display.\n * @returns A dropdown option element.\n * @example\n * <Dropdown name=\"dropdown\">\n * <Option value=\"option1\">Option 1</Option>\n * <Option value=\"option2\">Option 2</Option>\n * <Option value=\"option3\">Option 3</Option>\n * </Dropdown>\n */\nexport const Option = createSnapComponent<OptionProps, typeof TYPE>(TYPE);\n\n/**\n * A dropdown option element.\n *\n * @see Option\n */\nexport type OptionElement = ReturnType<typeof Option>;\n"]}
1
+ {"version":3,"file":"Option.cjs","sourceRoot":"","sources":["../../../../src/jsx/components/form/Option.ts"],"names":[],"mappings":";;;AAAA,mDAAsD;AACtD,6DAA6D;AAC7D,6CAAsC;AAgBtC,MAAM,IAAI,GAAG,QAAQ,CAAC;AAEtB;;;;;;;;;;;;;;;;GAgBG;AACU,QAAA,MAAM,GAAG,IAAA,+BAAmB,EAA2B,IAAI,CAAC,CAAC","sourcesContent":["import { createSnapComponent } from '../../component';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { Dropdown } from './Dropdown';\n\n/**\n * The props of the {@link Option} component.\n *\n * @property value - The value of the dropdown option. This is used to populate the\n * state in the form data.\n * @property children - The text to display.\n * @property disabled - Whether the option is disabled.\n */\ntype OptionProps = {\n value: string;\n children: string;\n disabled?: boolean;\n};\n\nconst TYPE = 'Option';\n\n/**\n * A dropdown option component, which is used to create a dropdown option. This component\n * can only be used as a child of the {@link Dropdown} component.\n *\n * @param props - The props of the component.\n * @param props.value - The value of the dropdown option. This is used to populate the\n * state in the form data.\n * @param props.children - The text to display.\n * @param props.disabled - Whether the option is disabled.\n * @returns A dropdown option element.\n * @example\n * <Dropdown name=\"dropdown\">\n * <Option value=\"option1\">Option 1</Option>\n * <Option value=\"option2\">Option 2</Option>\n * <Option value=\"option3\">Option 3</Option>\n * </Dropdown>\n */\nexport const Option = createSnapComponent<OptionProps, typeof TYPE>(TYPE);\n\n/**\n * A dropdown option element.\n *\n * @see Option\n */\nexport type OptionElement = ReturnType<typeof Option>;\n"]}
@@ -4,10 +4,12 @@
4
4
  * @property value - The value of the dropdown option. This is used to populate the
5
5
  * state in the form data.
6
6
  * @property children - The text to display.
7
+ * @property disabled - Whether the option is disabled.
7
8
  */
8
9
  type OptionProps = {
9
10
  value: string;
10
11
  children: string;
12
+ disabled?: boolean;
11
13
  };
12
14
  /**
13
15
  * A dropdown option component, which is used to create a dropdown option. This component
@@ -17,6 +19,7 @@ type OptionProps = {
17
19
  * @param props.value - The value of the dropdown option. This is used to populate the
18
20
  * state in the form data.
19
21
  * @param props.children - The text to display.
22
+ * @param props.disabled - Whether the option is disabled.
20
23
  * @returns A dropdown option element.
21
24
  * @example
22
25
  * <Dropdown name="dropdown">
@@ -1 +1 @@
1
- {"version":3,"file":"Option.d.cts","sourceRoot":"","sources":["../../../../src/jsx/components/form/Option.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAIF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,MAAM,gEAAsD,CAAC;AAE1E;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"Option.d.cts","sourceRoot":"","sources":["../../../../src/jsx/components/form/Option.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAIF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,MAAM,gEAAsD,CAAC;AAE1E;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC"}
@@ -4,10 +4,12 @@
4
4
  * @property value - The value of the dropdown option. This is used to populate the
5
5
  * state in the form data.
6
6
  * @property children - The text to display.
7
+ * @property disabled - Whether the option is disabled.
7
8
  */
8
9
  type OptionProps = {
9
10
  value: string;
10
11
  children: string;
12
+ disabled?: boolean;
11
13
  };
12
14
  /**
13
15
  * A dropdown option component, which is used to create a dropdown option. This component
@@ -17,6 +19,7 @@ type OptionProps = {
17
19
  * @param props.value - The value of the dropdown option. This is used to populate the
18
20
  * state in the form data.
19
21
  * @param props.children - The text to display.
22
+ * @param props.disabled - Whether the option is disabled.
20
23
  * @returns A dropdown option element.
21
24
  * @example
22
25
  * <Dropdown name="dropdown">
@@ -1 +1 @@
1
- {"version":3,"file":"Option.d.mts","sourceRoot":"","sources":["../../../../src/jsx/components/form/Option.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAIF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,MAAM,gEAAsD,CAAC;AAE1E;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"Option.d.mts","sourceRoot":"","sources":["../../../../src/jsx/components/form/Option.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAIF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,MAAM,gEAAsD,CAAC;AAE1E;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC"}
@@ -10,6 +10,7 @@ const TYPE = 'Option';
10
10
  * @param props.value - The value of the dropdown option. This is used to populate the
11
11
  * state in the form data.
12
12
  * @param props.children - The text to display.
13
+ * @param props.disabled - Whether the option is disabled.
13
14
  * @returns A dropdown option element.
14
15
  * @example
15
16
  * <Dropdown name="dropdown">
@@ -1 +1 @@
1
- {"version":3,"file":"Option.mjs","sourceRoot":"","sources":["../../../../src/jsx/components/form/Option.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,4BAAwB;AACtD,6DAA6D;AAC7D,OAAO,EAAE,QAAQ,EAAE,uBAAmB;AActC,MAAM,IAAI,GAAG,QAAQ,CAAC;AAEtB;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,mBAAmB,CAA2B,IAAI,CAAC,CAAC","sourcesContent":["import { createSnapComponent } from '../../component';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { Dropdown } from './Dropdown';\n\n/**\n * The props of the {@link Option} component.\n *\n * @property value - The value of the dropdown option. This is used to populate the\n * state in the form data.\n * @property children - The text to display.\n */\ntype OptionProps = {\n value: string;\n children: string;\n};\n\nconst TYPE = 'Option';\n\n/**\n * A dropdown option component, which is used to create a dropdown option. This component\n * can only be used as a child of the {@link Dropdown} component.\n *\n * @param props - The props of the component.\n * @param props.value - The value of the dropdown option. This is used to populate the\n * state in the form data.\n * @param props.children - The text to display.\n * @returns A dropdown option element.\n * @example\n * <Dropdown name=\"dropdown\">\n * <Option value=\"option1\">Option 1</Option>\n * <Option value=\"option2\">Option 2</Option>\n * <Option value=\"option3\">Option 3</Option>\n * </Dropdown>\n */\nexport const Option = createSnapComponent<OptionProps, typeof TYPE>(TYPE);\n\n/**\n * A dropdown option element.\n *\n * @see Option\n */\nexport type OptionElement = ReturnType<typeof Option>;\n"]}
1
+ {"version":3,"file":"Option.mjs","sourceRoot":"","sources":["../../../../src/jsx/components/form/Option.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,4BAAwB;AACtD,6DAA6D;AAC7D,OAAO,EAAE,QAAQ,EAAE,uBAAmB;AAgBtC,MAAM,IAAI,GAAG,QAAQ,CAAC;AAEtB;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,mBAAmB,CAA2B,IAAI,CAAC,CAAC","sourcesContent":["import { createSnapComponent } from '../../component';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { Dropdown } from './Dropdown';\n\n/**\n * The props of the {@link Option} component.\n *\n * @property value - The value of the dropdown option. This is used to populate the\n * state in the form data.\n * @property children - The text to display.\n * @property disabled - Whether the option is disabled.\n */\ntype OptionProps = {\n value: string;\n children: string;\n disabled?: boolean;\n};\n\nconst TYPE = 'Option';\n\n/**\n * A dropdown option component, which is used to create a dropdown option. This component\n * can only be used as a child of the {@link Dropdown} component.\n *\n * @param props - The props of the component.\n * @param props.value - The value of the dropdown option. This is used to populate the\n * state in the form data.\n * @param props.children - The text to display.\n * @param props.disabled - Whether the option is disabled.\n * @returns A dropdown option element.\n * @example\n * <Dropdown name=\"dropdown\">\n * <Option value=\"option1\">Option 1</Option>\n * <Option value=\"option2\">Option 2</Option>\n * <Option value=\"option3\">Option 3</Option>\n * </Dropdown>\n */\nexport const Option = createSnapComponent<OptionProps, typeof TYPE>(TYPE);\n\n/**\n * A dropdown option element.\n *\n * @see Option\n */\nexport type OptionElement = ReturnType<typeof Option>;\n"]}
@@ -11,6 +11,7 @@ const TYPE = 'Radio';
11
11
  * @param props.value - The value of the radio option. This is used to populate the
12
12
  * state in the form data.
13
13
  * @param props.children - The text to display.
14
+ * @param props.disabled - Whether the radio is disabled.
14
15
  * @returns A radio element.
15
16
  * @example
16
17
  * <RadioGroup name="radio-group">
@@ -1 +1 @@
1
- {"version":3,"file":"Radio.cjs","sourceRoot":"","sources":["../../../../src/jsx/components/form/Radio.ts"],"names":[],"mappings":";;;AAAA,mDAAsD;AActD,MAAM,IAAI,GAAG,OAAO,CAAC;AAErB;;;;;;;;;;;;;;;GAeG;AACU,QAAA,KAAK,GAAG,IAAA,+BAAmB,EAA0B,IAAI,CAAC,CAAC","sourcesContent":["import { createSnapComponent } from '../../component';\n\n/**\n * The props of the {@link Radio} component.\n *\n * @property value - The value of the radio option. This is used to populate the\n * state in the form data.\n * @property children - The text to display.\n */\ntype RadioProps = {\n value: string;\n children: string;\n};\n\nconst TYPE = 'Radio';\n\n/**\n * A radio component, which is used to create a radio option. This component\n * can only be used as a child of the {@link RadioGroup} component.\n *\n * @param props - The props of the component.\n * @param props.value - The value of the radio option. This is used to populate the\n * state in the form data.\n * @param props.children - The text to display.\n * @returns A radio element.\n * @example\n * <RadioGroup name=\"radio-group\">\n * <Radio value=\"option1\">Option 1</Radio>\n * <Radio value=\"option2\">Option 2</Radio>\n * <Radio value=\"option3\">Option 3</Radio>\n * </RadioGroup>\n */\nexport const Radio = createSnapComponent<RadioProps, typeof TYPE>(TYPE);\n\n/**\n * A radio element.\n *\n * @see Radio\n */\nexport type RadioElement = ReturnType<typeof Radio>;\n"]}
1
+ {"version":3,"file":"Radio.cjs","sourceRoot":"","sources":["../../../../src/jsx/components/form/Radio.ts"],"names":[],"mappings":";;;AAAA,mDAAsD;AAgBtD,MAAM,IAAI,GAAG,OAAO,CAAC;AAErB;;;;;;;;;;;;;;;;GAgBG;AACU,QAAA,KAAK,GAAG,IAAA,+BAAmB,EAA0B,IAAI,CAAC,CAAC","sourcesContent":["import { createSnapComponent } from '../../component';\n\n/**\n * The props of the {@link Radio} component.\n *\n * @property value - The value of the radio option. This is used to populate the\n * state in the form data.\n * @property children - The text to display.\n * @property disabled - Whether the radio is disabled.\n */\ntype RadioProps = {\n value: string;\n children: string;\n disabled?: boolean | undefined;\n};\n\nconst TYPE = 'Radio';\n\n/**\n * A radio component, which is used to create a radio option. This component\n * can only be used as a child of the {@link RadioGroup} component.\n *\n * @param props - The props of the component.\n * @param props.value - The value of the radio option. This is used to populate the\n * state in the form data.\n * @param props.children - The text to display.\n * @param props.disabled - Whether the radio is disabled.\n * @returns A radio element.\n * @example\n * <RadioGroup name=\"radio-group\">\n * <Radio value=\"option1\">Option 1</Radio>\n * <Radio value=\"option2\">Option 2</Radio>\n * <Radio value=\"option3\">Option 3</Radio>\n * </RadioGroup>\n */\nexport const Radio = createSnapComponent<RadioProps, typeof TYPE>(TYPE);\n\n/**\n * A radio element.\n *\n * @see Radio\n */\nexport type RadioElement = ReturnType<typeof Radio>;\n"]}
@@ -4,10 +4,12 @@
4
4
  * @property value - The value of the radio option. This is used to populate the
5
5
  * state in the form data.
6
6
  * @property children - The text to display.
7
+ * @property disabled - Whether the radio is disabled.
7
8
  */
8
9
  type RadioProps = {
9
10
  value: string;
10
11
  children: string;
12
+ disabled?: boolean | undefined;
11
13
  };
12
14
  /**
13
15
  * A radio component, which is used to create a radio option. This component
@@ -17,6 +19,7 @@ type RadioProps = {
17
19
  * @param props.value - The value of the radio option. This is used to populate the
18
20
  * state in the form data.
19
21
  * @param props.children - The text to display.
22
+ * @param props.disabled - Whether the radio is disabled.
20
23
  * @returns A radio element.
21
24
  * @example
22
25
  * <RadioGroup name="radio-group">
@@ -1 +1 @@
1
- {"version":3,"file":"Radio.d.cts","sourceRoot":"","sources":["../../../../src/jsx/components/form/Radio.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,KAAK,UAAU,GAAG;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAIF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,KAAK,8DAAqD,CAAC;AAExE;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"Radio.d.cts","sourceRoot":"","sources":["../../../../src/jsx/components/form/Radio.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,KAAK,UAAU,GAAG;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAChC,CAAC;AAIF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,KAAK,8DAAqD,CAAC;AAExE;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC"}
@@ -4,10 +4,12 @@
4
4
  * @property value - The value of the radio option. This is used to populate the
5
5
  * state in the form data.
6
6
  * @property children - The text to display.
7
+ * @property disabled - Whether the radio is disabled.
7
8
  */
8
9
  type RadioProps = {
9
10
  value: string;
10
11
  children: string;
12
+ disabled?: boolean | undefined;
11
13
  };
12
14
  /**
13
15
  * A radio component, which is used to create a radio option. This component
@@ -17,6 +19,7 @@ type RadioProps = {
17
19
  * @param props.value - The value of the radio option. This is used to populate the
18
20
  * state in the form data.
19
21
  * @param props.children - The text to display.
22
+ * @param props.disabled - Whether the radio is disabled.
20
23
  * @returns A radio element.
21
24
  * @example
22
25
  * <RadioGroup name="radio-group">
@@ -1 +1 @@
1
- {"version":3,"file":"Radio.d.mts","sourceRoot":"","sources":["../../../../src/jsx/components/form/Radio.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,KAAK,UAAU,GAAG;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAIF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,KAAK,8DAAqD,CAAC;AAExE;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"Radio.d.mts","sourceRoot":"","sources":["../../../../src/jsx/components/form/Radio.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,KAAK,UAAU,GAAG;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAChC,CAAC;AAIF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,KAAK,8DAAqD,CAAC;AAExE;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC"}
@@ -8,6 +8,7 @@ const TYPE = 'Radio';
8
8
  * @param props.value - The value of the radio option. This is used to populate the
9
9
  * state in the form data.
10
10
  * @param props.children - The text to display.
11
+ * @param props.disabled - Whether the radio is disabled.
11
12
  * @returns A radio element.
12
13
  * @example
13
14
  * <RadioGroup name="radio-group">
@@ -1 +1 @@
1
- {"version":3,"file":"Radio.mjs","sourceRoot":"","sources":["../../../../src/jsx/components/form/Radio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,4BAAwB;AActD,MAAM,IAAI,GAAG,OAAO,CAAC;AAErB;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,mBAAmB,CAA0B,IAAI,CAAC,CAAC","sourcesContent":["import { createSnapComponent } from '../../component';\n\n/**\n * The props of the {@link Radio} component.\n *\n * @property value - The value of the radio option. This is used to populate the\n * state in the form data.\n * @property children - The text to display.\n */\ntype RadioProps = {\n value: string;\n children: string;\n};\n\nconst TYPE = 'Radio';\n\n/**\n * A radio component, which is used to create a radio option. This component\n * can only be used as a child of the {@link RadioGroup} component.\n *\n * @param props - The props of the component.\n * @param props.value - The value of the radio option. This is used to populate the\n * state in the form data.\n * @param props.children - The text to display.\n * @returns A radio element.\n * @example\n * <RadioGroup name=\"radio-group\">\n * <Radio value=\"option1\">Option 1</Radio>\n * <Radio value=\"option2\">Option 2</Radio>\n * <Radio value=\"option3\">Option 3</Radio>\n * </RadioGroup>\n */\nexport const Radio = createSnapComponent<RadioProps, typeof TYPE>(TYPE);\n\n/**\n * A radio element.\n *\n * @see Radio\n */\nexport type RadioElement = ReturnType<typeof Radio>;\n"]}
1
+ {"version":3,"file":"Radio.mjs","sourceRoot":"","sources":["../../../../src/jsx/components/form/Radio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,4BAAwB;AAgBtD,MAAM,IAAI,GAAG,OAAO,CAAC;AAErB;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,mBAAmB,CAA0B,IAAI,CAAC,CAAC","sourcesContent":["import { createSnapComponent } from '../../component';\n\n/**\n * The props of the {@link Radio} component.\n *\n * @property value - The value of the radio option. This is used to populate the\n * state in the form data.\n * @property children - The text to display.\n * @property disabled - Whether the radio is disabled.\n */\ntype RadioProps = {\n value: string;\n children: string;\n disabled?: boolean | undefined;\n};\n\nconst TYPE = 'Radio';\n\n/**\n * A radio component, which is used to create a radio option. This component\n * can only be used as a child of the {@link RadioGroup} component.\n *\n * @param props - The props of the component.\n * @param props.value - The value of the radio option. This is used to populate the\n * state in the form data.\n * @param props.children - The text to display.\n * @param props.disabled - Whether the radio is disabled.\n * @returns A radio element.\n * @example\n * <RadioGroup name=\"radio-group\">\n * <Radio value=\"option1\">Option 1</Radio>\n * <Radio value=\"option2\">Option 2</Radio>\n * <Radio value=\"option3\">Option 3</Radio>\n * </RadioGroup>\n */\nexport const Radio = createSnapComponent<RadioProps, typeof TYPE>(TYPE);\n\n/**\n * A radio element.\n *\n * @see Radio\n */\nexport type RadioElement = ReturnType<typeof Radio>;\n"]}
@@ -6,6 +6,11 @@ const TYPE = 'RadioGroup';
6
6
  /**
7
7
  * A RadioGroup component, used to display multiple choices, where only one can be chosen.
8
8
  *
9
+ * @param props.name - The name of the dropdown. This is used to identify the
10
+ * state in the form data.
11
+ * @param props.value - The value of the radio group element.
12
+ * @param props.children - Radio options in form of <Radio> elements.
13
+ * @param props.disabled - Whether the radio group is disabled.
9
14
  * @returns A RadioGroup element.
10
15
  * @example
11
16
  * <RadioGroup />
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.cjs","sourceRoot":"","sources":["../../../../src/jsx/components/form/RadioGroup.ts"],"names":[],"mappings":";;;AACA,mDAAsD;AAGtD,MAAM,IAAI,GAAG,YAAY,CAAC;AAe1B;;;;;;GAMG;AACU,QAAA,UAAU,GAAG,IAAA,+BAAmB,EAC3C,IAAI,CACL,CAAC","sourcesContent":["import type { SnapsChildren } from '../../component';\nimport { createSnapComponent } from '../../component';\nimport type { RadioElement } from './Radio';\n\nconst TYPE = 'RadioGroup';\n\n/**\n * The props of the {@link RadioGroup} component.\n *\n * @property name - The name of the dropdown. This is used to identify the\n * state in the form data.\n * @property children - Radio options in form of <Radio> elements.\n */\ntype RadioGroupProps = {\n name: string;\n value?: string | undefined;\n children: SnapsChildren<RadioElement>;\n};\n\n/**\n * A RadioGroup component, used to display multiple choices, where only one can be chosen.\n *\n * @returns A RadioGroup element.\n * @example\n * <RadioGroup />\n */\nexport const RadioGroup = createSnapComponent<RadioGroupProps, typeof TYPE>(\n TYPE,\n);\n\n/**\n * A RadioGroup element.\n *\n * @see RadioGroup\n */\nexport type RadioGroupElement = ReturnType<typeof RadioGroup>;\n"]}
1
+ {"version":3,"file":"RadioGroup.cjs","sourceRoot":"","sources":["../../../../src/jsx/components/form/RadioGroup.ts"],"names":[],"mappings":";;;AACA,mDAAsD;AAGtD,MAAM,IAAI,GAAG,YAAY,CAAC;AAkB1B;;;;;;;;;;;GAWG;AACU,QAAA,UAAU,GAAG,IAAA,+BAAmB,EAC3C,IAAI,CACL,CAAC","sourcesContent":["import type { SnapsChildren } from '../../component';\nimport { createSnapComponent } from '../../component';\nimport type { RadioElement } from './Radio';\n\nconst TYPE = 'RadioGroup';\n\n/**\n * The props of the {@link RadioGroup} component.\n *\n * @property name - The name of the dropdown. This is used to identify the\n * state in the form data.\n * @property value - The value of the radio group element.\n * @property children - Radio options in form of <Radio> elements.\n * @property disabled - Whether the radio group is disabled.\n */\ntype RadioGroupProps = {\n name: string;\n value?: string | undefined;\n children: SnapsChildren<RadioElement>;\n disabled?: boolean | undefined;\n};\n\n/**\n * A RadioGroup component, used to display multiple choices, where only one can be chosen.\n *\n * @param props.name - The name of the dropdown. This is used to identify the\n * state in the form data.\n * @param props.value - The value of the radio group element.\n * @param props.children - Radio options in form of <Radio> elements.\n * @param props.disabled - Whether the radio group is disabled.\n * @returns A RadioGroup element.\n * @example\n * <RadioGroup />\n */\nexport const RadioGroup = createSnapComponent<RadioGroupProps, typeof TYPE>(\n TYPE,\n);\n\n/**\n * A RadioGroup element.\n *\n * @see RadioGroup\n */\nexport type RadioGroupElement = ReturnType<typeof RadioGroup>;\n"]}
@@ -5,16 +5,24 @@ import type { RadioElement } from "./Radio.cjs";
5
5
  *
6
6
  * @property name - The name of the dropdown. This is used to identify the
7
7
  * state in the form data.
8
+ * @property value - The value of the radio group element.
8
9
  * @property children - Radio options in form of <Radio> elements.
10
+ * @property disabled - Whether the radio group is disabled.
9
11
  */
10
12
  type RadioGroupProps = {
11
13
  name: string;
12
14
  value?: string | undefined;
13
15
  children: SnapsChildren<RadioElement>;
16
+ disabled?: boolean | undefined;
14
17
  };
15
18
  /**
16
19
  * A RadioGroup component, used to display multiple choices, where only one can be chosen.
17
20
  *
21
+ * @param props.name - The name of the dropdown. This is used to identify the
22
+ * state in the form data.
23
+ * @param props.value - The value of the radio group element.
24
+ * @param props.children - Radio options in form of <Radio> elements.
25
+ * @param props.disabled - Whether the radio group is disabled.
18
26
  * @returns A RadioGroup element.
19
27
  * @example
20
28
  * <RadioGroup />
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.d.cts","sourceRoot":"","sources":["../../../../src/jsx/components/form/RadioGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,4BAAwB;AAErD,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAgB;AAI5C;;;;;;GAMG;AACH,KAAK,eAAe,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,QAAQ,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;CACvC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,wEAEtB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC"}
1
+ {"version":3,"file":"RadioGroup.d.cts","sourceRoot":"","sources":["../../../../src/jsx/components/form/RadioGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,4BAAwB;AAErD,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAgB;AAI5C;;;;;;;;GAQG;AACH,KAAK,eAAe,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,QAAQ,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IACtC,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAChC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,UAAU,wEAEtB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC"}
@@ -5,16 +5,24 @@ import type { RadioElement } from "./Radio.mjs";
5
5
  *
6
6
  * @property name - The name of the dropdown. This is used to identify the
7
7
  * state in the form data.
8
+ * @property value - The value of the radio group element.
8
9
  * @property children - Radio options in form of <Radio> elements.
10
+ * @property disabled - Whether the radio group is disabled.
9
11
  */
10
12
  type RadioGroupProps = {
11
13
  name: string;
12
14
  value?: string | undefined;
13
15
  children: SnapsChildren<RadioElement>;
16
+ disabled?: boolean | undefined;
14
17
  };
15
18
  /**
16
19
  * A RadioGroup component, used to display multiple choices, where only one can be chosen.
17
20
  *
21
+ * @param props.name - The name of the dropdown. This is used to identify the
22
+ * state in the form data.
23
+ * @param props.value - The value of the radio group element.
24
+ * @param props.children - Radio options in form of <Radio> elements.
25
+ * @param props.disabled - Whether the radio group is disabled.
18
26
  * @returns A RadioGroup element.
19
27
  * @example
20
28
  * <RadioGroup />
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.d.mts","sourceRoot":"","sources":["../../../../src/jsx/components/form/RadioGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,4BAAwB;AAErD,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAgB;AAI5C;;;;;;GAMG;AACH,KAAK,eAAe,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,QAAQ,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;CACvC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,wEAEtB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC"}
1
+ {"version":3,"file":"RadioGroup.d.mts","sourceRoot":"","sources":["../../../../src/jsx/components/form/RadioGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,4BAAwB;AAErD,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAgB;AAI5C;;;;;;;;GAQG;AACH,KAAK,eAAe,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,QAAQ,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IACtC,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAChC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,UAAU,wEAEtB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC"}
@@ -3,6 +3,11 @@ const TYPE = 'RadioGroup';
3
3
  /**
4
4
  * A RadioGroup component, used to display multiple choices, where only one can be chosen.
5
5
  *
6
+ * @param props.name - The name of the dropdown. This is used to identify the
7
+ * state in the form data.
8
+ * @param props.value - The value of the radio group element.
9
+ * @param props.children - Radio options in form of <Radio> elements.
10
+ * @param props.disabled - Whether the radio group is disabled.
6
11
  * @returns A RadioGroup element.
7
12
  * @example
8
13
  * <RadioGroup />
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.mjs","sourceRoot":"","sources":["../../../../src/jsx/components/form/RadioGroup.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,4BAAwB;AAGtD,MAAM,IAAI,GAAG,YAAY,CAAC;AAe1B;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,mBAAmB,CAC3C,IAAI,CACL,CAAC","sourcesContent":["import type { SnapsChildren } from '../../component';\nimport { createSnapComponent } from '../../component';\nimport type { RadioElement } from './Radio';\n\nconst TYPE = 'RadioGroup';\n\n/**\n * The props of the {@link RadioGroup} component.\n *\n * @property name - The name of the dropdown. This is used to identify the\n * state in the form data.\n * @property children - Radio options in form of <Radio> elements.\n */\ntype RadioGroupProps = {\n name: string;\n value?: string | undefined;\n children: SnapsChildren<RadioElement>;\n};\n\n/**\n * A RadioGroup component, used to display multiple choices, where only one can be chosen.\n *\n * @returns A RadioGroup element.\n * @example\n * <RadioGroup />\n */\nexport const RadioGroup = createSnapComponent<RadioGroupProps, typeof TYPE>(\n TYPE,\n);\n\n/**\n * A RadioGroup element.\n *\n * @see RadioGroup\n */\nexport type RadioGroupElement = ReturnType<typeof RadioGroup>;\n"]}
1
+ {"version":3,"file":"RadioGroup.mjs","sourceRoot":"","sources":["../../../../src/jsx/components/form/RadioGroup.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,4BAAwB;AAGtD,MAAM,IAAI,GAAG,YAAY,CAAC;AAkB1B;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,mBAAmB,CAC3C,IAAI,CACL,CAAC","sourcesContent":["import type { SnapsChildren } from '../../component';\nimport { createSnapComponent } from '../../component';\nimport type { RadioElement } from './Radio';\n\nconst TYPE = 'RadioGroup';\n\n/**\n * The props of the {@link RadioGroup} component.\n *\n * @property name - The name of the dropdown. This is used to identify the\n * state in the form data.\n * @property value - The value of the radio group element.\n * @property children - Radio options in form of <Radio> elements.\n * @property disabled - Whether the radio group is disabled.\n */\ntype RadioGroupProps = {\n name: string;\n value?: string | undefined;\n children: SnapsChildren<RadioElement>;\n disabled?: boolean | undefined;\n};\n\n/**\n * A RadioGroup component, used to display multiple choices, where only one can be chosen.\n *\n * @param props.name - The name of the dropdown. This is used to identify the\n * state in the form data.\n * @param props.value - The value of the radio group element.\n * @param props.children - Radio options in form of <Radio> elements.\n * @param props.disabled - Whether the radio group is disabled.\n * @returns A RadioGroup element.\n * @example\n * <RadioGroup />\n */\nexport const RadioGroup = createSnapComponent<RadioGroupProps, typeof TYPE>(\n TYPE,\n);\n\n/**\n * A RadioGroup element.\n *\n * @see RadioGroup\n */\nexport type RadioGroupElement = ReturnType<typeof RadioGroup>;\n"]}
@@ -12,6 +12,7 @@ const TYPE = 'Selector';
12
12
  * @param props.title - The title of the selector field. This is displayed in the UI.
13
13
  * @param props.value - The selected value of the selector.
14
14
  * @param props.children - The children of the selector.
15
+ * @property disabled - Whether the selector is disabled.
15
16
  * @returns A selector element.
16
17
  * @example
17
18
  * <Selector name="selector">
@@ -1 +1 @@
1
- {"version":3,"file":"Selector.cjs","sourceRoot":"","sources":["../../../../src/jsx/components/form/Selector.ts"],"names":[],"mappings":";;;AACA,mDAAsD;AAmBtD,MAAM,IAAI,GAAG,UAAU,CAAC;AAExB;;;;;;;;;;;;;;;;GAgBG;AACU,QAAA,QAAQ,GAAG,IAAA,+BAAmB,EAA6B,IAAI,CAAC,CAAC","sourcesContent":["import type { SnapsChildren } from '../../component';\nimport { createSnapComponent } from '../../component';\nimport type { SelectorOptionElement } from './SelectorOption';\n\n/**\n * The props of the {@link Selector} component.\n *\n * @property name - The name of the selector. This is used to identify the\n * state in the form data.\n * @property title - The title of the selector. This is displayed in the UI.\n * @property value - The selected value of the selector.\n * @property children - The children of the selector.\n */\nexport type SelectorProps = {\n name: string;\n title: string;\n value?: string | undefined;\n children: SnapsChildren<SelectorOptionElement>;\n};\n\nconst TYPE = 'Selector';\n\n/**\n * A selector component, which is used to create a selector.\n *\n * @param props - The props of the component.\n * @param props.name - The name of the selector field. This is used to identify the\n * state in the form data.\n * @param props.title - The title of the selector field. This is displayed in the UI.\n * @param props.value - The selected value of the selector.\n * @param props.children - The children of the selector.\n * @returns A selector element.\n * @example\n * <Selector name=\"selector\">\n * <SelectorOption value=\"option1\"><Card title=\"Option 1\" value=\"Foo\" /></SelectorOption>\n * <SelectorOption value=\"option2\"><Card title=\"Option 2\" value=\"Bar\" /></SelectorOption>\n * <SelectorOption value=\"option3\"><Card title=\"Option 3\" value=\"Baz\" /></SelectorOption>\n * </Selector>\n */\nexport const Selector = createSnapComponent<SelectorProps, typeof TYPE>(TYPE);\n\n/**\n * A selector element.\n *\n * @see Selector\n */\nexport type SelectorElement = ReturnType<typeof Selector>;\n"]}
1
+ {"version":3,"file":"Selector.cjs","sourceRoot":"","sources":["../../../../src/jsx/components/form/Selector.ts"],"names":[],"mappings":";;;AACA,mDAAsD;AAqBtD,MAAM,IAAI,GAAG,UAAU,CAAC;AAExB;;;;;;;;;;;;;;;;;GAiBG;AACU,QAAA,QAAQ,GAAG,IAAA,+BAAmB,EAA6B,IAAI,CAAC,CAAC","sourcesContent":["import type { SnapsChildren } from '../../component';\nimport { createSnapComponent } from '../../component';\nimport type { SelectorOptionElement } from './SelectorOption';\n\n/**\n * The props of the {@link Selector} component.\n *\n * @property name - The name of the selector. This is used to identify the\n * state in the form data.\n * @property title - The title of the selector. This is displayed in the UI.\n * @property value - The selected value of the selector.\n * @property children - The children of the selector.\n * @property disabled - Whether the selector is disabled.\n */\nexport type SelectorProps = {\n name: string;\n title: string;\n value?: string | undefined;\n children: SnapsChildren<SelectorOptionElement>;\n disabled?: boolean | undefined;\n};\n\nconst TYPE = 'Selector';\n\n/**\n * A selector component, which is used to create a selector.\n *\n * @param props - The props of the component.\n * @param props.name - The name of the selector field. This is used to identify the\n * state in the form data.\n * @param props.title - The title of the selector field. This is displayed in the UI.\n * @param props.value - The selected value of the selector.\n * @param props.children - The children of the selector.\n * @property disabled - Whether the selector is disabled.\n * @returns A selector element.\n * @example\n * <Selector name=\"selector\">\n * <SelectorOption value=\"option1\"><Card title=\"Option 1\" value=\"Foo\" /></SelectorOption>\n * <SelectorOption value=\"option2\"><Card title=\"Option 2\" value=\"Bar\" /></SelectorOption>\n * <SelectorOption value=\"option3\"><Card title=\"Option 3\" value=\"Baz\" /></SelectorOption>\n * </Selector>\n */\nexport const Selector = createSnapComponent<SelectorProps, typeof TYPE>(TYPE);\n\n/**\n * A selector element.\n *\n * @see Selector\n */\nexport type SelectorElement = ReturnType<typeof Selector>;\n"]}
@@ -8,12 +8,14 @@ import type { SelectorOptionElement } from "./SelectorOption.cjs";
8
8
  * @property title - The title of the selector. This is displayed in the UI.
9
9
  * @property value - The selected value of the selector.
10
10
  * @property children - The children of the selector.
11
+ * @property disabled - Whether the selector is disabled.
11
12
  */
12
13
  export type SelectorProps = {
13
14
  name: string;
14
15
  title: string;
15
16
  value?: string | undefined;
16
17
  children: SnapsChildren<SelectorOptionElement>;
18
+ disabled?: boolean | undefined;
17
19
  };
18
20
  /**
19
21
  * A selector component, which is used to create a selector.
@@ -24,6 +26,7 @@ export type SelectorProps = {
24
26
  * @param props.title - The title of the selector field. This is displayed in the UI.
25
27
  * @param props.value - The selected value of the selector.
26
28
  * @param props.children - The children of the selector.
29
+ * @property disabled - Whether the selector is disabled.
27
30
  * @returns A selector element.
28
31
  * @example
29
32
  * <Selector name="selector">
@@ -1 +1 @@
1
- {"version":3,"file":"Selector.d.cts","sourceRoot":"","sources":["../../../../src/jsx/components/form/Selector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,4BAAwB;AAErD,OAAO,KAAK,EAAE,qBAAqB,EAAE,6BAAyB;AAE9D;;;;;;;;GAQG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,QAAQ,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;CAChD,CAAC;AAIF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,QAAQ,oEAAwD,CAAC;AAE9E;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC"}
1
+ {"version":3,"file":"Selector.d.cts","sourceRoot":"","sources":["../../../../src/jsx/components/form/Selector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,4BAAwB;AAErD,OAAO,KAAK,EAAE,qBAAqB,EAAE,6BAAyB;AAE9D;;;;;;;;;GASG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,QAAQ,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;IAC/C,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAChC,CAAC;AAIF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,QAAQ,oEAAwD,CAAC;AAE9E;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC"}
@@ -8,12 +8,14 @@ import type { SelectorOptionElement } from "./SelectorOption.mjs";
8
8
  * @property title - The title of the selector. This is displayed in the UI.
9
9
  * @property value - The selected value of the selector.
10
10
  * @property children - The children of the selector.
11
+ * @property disabled - Whether the selector is disabled.
11
12
  */
12
13
  export type SelectorProps = {
13
14
  name: string;
14
15
  title: string;
15
16
  value?: string | undefined;
16
17
  children: SnapsChildren<SelectorOptionElement>;
18
+ disabled?: boolean | undefined;
17
19
  };
18
20
  /**
19
21
  * A selector component, which is used to create a selector.
@@ -24,6 +26,7 @@ export type SelectorProps = {
24
26
  * @param props.title - The title of the selector field. This is displayed in the UI.
25
27
  * @param props.value - The selected value of the selector.
26
28
  * @param props.children - The children of the selector.
29
+ * @property disabled - Whether the selector is disabled.
27
30
  * @returns A selector element.
28
31
  * @example
29
32
  * <Selector name="selector">
@@ -1 +1 @@
1
- {"version":3,"file":"Selector.d.mts","sourceRoot":"","sources":["../../../../src/jsx/components/form/Selector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,4BAAwB;AAErD,OAAO,KAAK,EAAE,qBAAqB,EAAE,6BAAyB;AAE9D;;;;;;;;GAQG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,QAAQ,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;CAChD,CAAC;AAIF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,QAAQ,oEAAwD,CAAC;AAE9E;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC"}
1
+ {"version":3,"file":"Selector.d.mts","sourceRoot":"","sources":["../../../../src/jsx/components/form/Selector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,4BAAwB;AAErD,OAAO,KAAK,EAAE,qBAAqB,EAAE,6BAAyB;AAE9D;;;;;;;;;GASG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,QAAQ,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;IAC/C,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAChC,CAAC;AAIF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,QAAQ,oEAAwD,CAAC;AAE9E;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC"}
@@ -9,6 +9,7 @@ const TYPE = 'Selector';
9
9
  * @param props.title - The title of the selector field. This is displayed in the UI.
10
10
  * @param props.value - The selected value of the selector.
11
11
  * @param props.children - The children of the selector.
12
+ * @property disabled - Whether the selector is disabled.
12
13
  * @returns A selector element.
13
14
  * @example
14
15
  * <Selector name="selector">
@@ -1 +1 @@
1
- {"version":3,"file":"Selector.mjs","sourceRoot":"","sources":["../../../../src/jsx/components/form/Selector.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,4BAAwB;AAmBtD,MAAM,IAAI,GAAG,UAAU,CAAC;AAExB;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,mBAAmB,CAA6B,IAAI,CAAC,CAAC","sourcesContent":["import type { SnapsChildren } from '../../component';\nimport { createSnapComponent } from '../../component';\nimport type { SelectorOptionElement } from './SelectorOption';\n\n/**\n * The props of the {@link Selector} component.\n *\n * @property name - The name of the selector. This is used to identify the\n * state in the form data.\n * @property title - The title of the selector. This is displayed in the UI.\n * @property value - The selected value of the selector.\n * @property children - The children of the selector.\n */\nexport type SelectorProps = {\n name: string;\n title: string;\n value?: string | undefined;\n children: SnapsChildren<SelectorOptionElement>;\n};\n\nconst TYPE = 'Selector';\n\n/**\n * A selector component, which is used to create a selector.\n *\n * @param props - The props of the component.\n * @param props.name - The name of the selector field. This is used to identify the\n * state in the form data.\n * @param props.title - The title of the selector field. This is displayed in the UI.\n * @param props.value - The selected value of the selector.\n * @param props.children - The children of the selector.\n * @returns A selector element.\n * @example\n * <Selector name=\"selector\">\n * <SelectorOption value=\"option1\"><Card title=\"Option 1\" value=\"Foo\" /></SelectorOption>\n * <SelectorOption value=\"option2\"><Card title=\"Option 2\" value=\"Bar\" /></SelectorOption>\n * <SelectorOption value=\"option3\"><Card title=\"Option 3\" value=\"Baz\" /></SelectorOption>\n * </Selector>\n */\nexport const Selector = createSnapComponent<SelectorProps, typeof TYPE>(TYPE);\n\n/**\n * A selector element.\n *\n * @see Selector\n */\nexport type SelectorElement = ReturnType<typeof Selector>;\n"]}
1
+ {"version":3,"file":"Selector.mjs","sourceRoot":"","sources":["../../../../src/jsx/components/form/Selector.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,4BAAwB;AAqBtD,MAAM,IAAI,GAAG,UAAU,CAAC;AAExB;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,mBAAmB,CAA6B,IAAI,CAAC,CAAC","sourcesContent":["import type { SnapsChildren } from '../../component';\nimport { createSnapComponent } from '../../component';\nimport type { SelectorOptionElement } from './SelectorOption';\n\n/**\n * The props of the {@link Selector} component.\n *\n * @property name - The name of the selector. This is used to identify the\n * state in the form data.\n * @property title - The title of the selector. This is displayed in the UI.\n * @property value - The selected value of the selector.\n * @property children - The children of the selector.\n * @property disabled - Whether the selector is disabled.\n */\nexport type SelectorProps = {\n name: string;\n title: string;\n value?: string | undefined;\n children: SnapsChildren<SelectorOptionElement>;\n disabled?: boolean | undefined;\n};\n\nconst TYPE = 'Selector';\n\n/**\n * A selector component, which is used to create a selector.\n *\n * @param props - The props of the component.\n * @param props.name - The name of the selector field. This is used to identify the\n * state in the form data.\n * @param props.title - The title of the selector field. This is displayed in the UI.\n * @param props.value - The selected value of the selector.\n * @param props.children - The children of the selector.\n * @property disabled - Whether the selector is disabled.\n * @returns A selector element.\n * @example\n * <Selector name=\"selector\">\n * <SelectorOption value=\"option1\"><Card title=\"Option 1\" value=\"Foo\" /></SelectorOption>\n * <SelectorOption value=\"option2\"><Card title=\"Option 2\" value=\"Bar\" /></SelectorOption>\n * <SelectorOption value=\"option3\"><Card title=\"Option 3\" value=\"Baz\" /></SelectorOption>\n * </Selector>\n */\nexport const Selector = createSnapComponent<SelectorProps, typeof TYPE>(TYPE);\n\n/**\n * A selector element.\n *\n * @see Selector\n */\nexport type SelectorElement = ReturnType<typeof Selector>;\n"]}
@@ -11,6 +11,7 @@ const TYPE = 'SelectorOption';
11
11
  * @param props.value - The value of the selector option. This is used to populate the
12
12
  * state in the form data.
13
13
  * @param props.children - The component to display.
14
+ * @param props.disabled - Whether the selector option is disabled.
14
15
  * @returns A selector option element.
15
16
  * @example
16
17
  * <Selector name="selector">
@@ -1 +1 @@
1
- {"version":3,"file":"SelectorOption.cjs","sourceRoot":"","sources":["../../../../src/jsx/components/form/SelectorOption.ts"],"names":[],"mappings":";;;AAAA,mDAAsD;AAetD,MAAM,IAAI,GAAG,gBAAgB,CAAC;AAE9B;;;;;;;;;;;;;;;GAeG;AACU,QAAA,cAAc,GAAG,IAAA,+BAAmB,EAG/C,IAAI,CAAC,CAAC","sourcesContent":["import { createSnapComponent } from '../../component';\nimport type { CardElement } from '../Card';\n\n/**\n * The props of the {@link SelectorOption} component.\n *\n * @property value - The value of the selector option. This is used to populate the\n * state in the form data.\n * @property children - The component to display.\n */\nexport type SelectorOptionProps = {\n value: string;\n children: CardElement;\n};\n\nconst TYPE = 'SelectorOption';\n\n/**\n * A selector option component, which is used to create a selector option. This component\n * can only be used as a child of the {@link Selector} component.\n *\n * @param props - The props of the component.\n * @param props.value - The value of the selector option. This is used to populate the\n * state in the form data.\n * @param props.children - The component to display.\n * @returns A selector option element.\n * @example\n * <Selector name=\"selector\">\n * <SelectorOption value=\"option1\"><Card title=\"Option 1\" value=\"Foo\" /></SelectorOption>\n * <SelectorOption value=\"option2\"><Card title=\"Option 2\" value=\"Bar\" /></SelectorOption>\n * <SelectorOption value=\"option3\"><Card title=\"Option 3\" value=\"Baz\" /></SelectorOption>\n * </Selector>\n */\nexport const SelectorOption = createSnapComponent<\n SelectorOptionProps,\n typeof TYPE\n>(TYPE);\n\n/**\n * A selector option element.\n *\n * @see SelectorOption\n */\nexport type SelectorOptionElement = ReturnType<typeof SelectorOption>;\n"]}
1
+ {"version":3,"file":"SelectorOption.cjs","sourceRoot":"","sources":["../../../../src/jsx/components/form/SelectorOption.ts"],"names":[],"mappings":";;;AAAA,mDAAsD;AAiBtD,MAAM,IAAI,GAAG,gBAAgB,CAAC;AAE9B;;;;;;;;;;;;;;;;GAgBG;AACU,QAAA,cAAc,GAAG,IAAA,+BAAmB,EAG/C,IAAI,CAAC,CAAC","sourcesContent":["import { createSnapComponent } from '../../component';\nimport type { CardElement } from '../Card';\n\n/**\n * The props of the {@link SelectorOption} component.\n *\n * @property value - The value of the selector option. This is used to populate the\n * state in the form data.\n * @property children - The component to display.\n * @property disabled - Whether the selector option is disabled.\n */\nexport type SelectorOptionProps = {\n value: string;\n children: CardElement;\n disabled?: boolean;\n};\n\nconst TYPE = 'SelectorOption';\n\n/**\n * A selector option component, which is used to create a selector option. This component\n * can only be used as a child of the {@link Selector} component.\n *\n * @param props - The props of the component.\n * @param props.value - The value of the selector option. This is used to populate the\n * state in the form data.\n * @param props.children - The component to display.\n * @param props.disabled - Whether the selector option is disabled.\n * @returns A selector option element.\n * @example\n * <Selector name=\"selector\">\n * <SelectorOption value=\"option1\"><Card title=\"Option 1\" value=\"Foo\" /></SelectorOption>\n * <SelectorOption value=\"option2\"><Card title=\"Option 2\" value=\"Bar\" /></SelectorOption>\n * <SelectorOption value=\"option3\"><Card title=\"Option 3\" value=\"Baz\" /></SelectorOption>\n * </Selector>\n */\nexport const SelectorOption = createSnapComponent<\n SelectorOptionProps,\n typeof TYPE\n>(TYPE);\n\n/**\n * A selector option element.\n *\n * @see SelectorOption\n */\nexport type SelectorOptionElement = ReturnType<typeof SelectorOption>;\n"]}
@@ -5,10 +5,12 @@ import type { CardElement } from "../Card.cjs";
5
5
  * @property value - The value of the selector option. This is used to populate the
6
6
  * state in the form data.
7
7
  * @property children - The component to display.
8
+ * @property disabled - Whether the selector option is disabled.
8
9
  */
9
10
  export type SelectorOptionProps = {
10
11
  value: string;
11
12
  children: CardElement;
13
+ disabled?: boolean;
12
14
  };
13
15
  /**
14
16
  * A selector option component, which is used to create a selector option. This component
@@ -18,6 +20,7 @@ export type SelectorOptionProps = {
18
20
  * @param props.value - The value of the selector option. This is used to populate the
19
21
  * state in the form data.
20
22
  * @param props.children - The component to display.
23
+ * @param props.disabled - Whether the selector option is disabled.
21
24
  * @returns A selector option element.
22
25
  * @example
23
26
  * <Selector name="selector">
@@ -1 +1 @@
1
- {"version":3,"file":"SelectorOption.d.cts","sourceRoot":"","sources":["../../../../src/jsx/components/form/SelectorOption.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,oBAAgB;AAE3C;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,WAAW,CAAC;CACvB,CAAC;AAIF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,cAAc,gFAGpB,CAAC;AAER;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC"}
1
+ {"version":3,"file":"SelectorOption.d.cts","sourceRoot":"","sources":["../../../../src/jsx/components/form/SelectorOption.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,oBAAgB;AAE3C;;;;;;;GAOG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,WAAW,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAIF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,cAAc,gFAGpB,CAAC;AAER;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC"}
@@ -5,10 +5,12 @@ import type { CardElement } from "../Card.mjs";
5
5
  * @property value - The value of the selector option. This is used to populate the
6
6
  * state in the form data.
7
7
  * @property children - The component to display.
8
+ * @property disabled - Whether the selector option is disabled.
8
9
  */
9
10
  export type SelectorOptionProps = {
10
11
  value: string;
11
12
  children: CardElement;
13
+ disabled?: boolean;
12
14
  };
13
15
  /**
14
16
  * A selector option component, which is used to create a selector option. This component
@@ -18,6 +20,7 @@ export type SelectorOptionProps = {
18
20
  * @param props.value - The value of the selector option. This is used to populate the
19
21
  * state in the form data.
20
22
  * @param props.children - The component to display.
23
+ * @param props.disabled - Whether the selector option is disabled.
21
24
  * @returns A selector option element.
22
25
  * @example
23
26
  * <Selector name="selector">
@@ -1 +1 @@
1
- {"version":3,"file":"SelectorOption.d.mts","sourceRoot":"","sources":["../../../../src/jsx/components/form/SelectorOption.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,oBAAgB;AAE3C;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,WAAW,CAAC;CACvB,CAAC;AAIF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,cAAc,gFAGpB,CAAC;AAER;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC"}
1
+ {"version":3,"file":"SelectorOption.d.mts","sourceRoot":"","sources":["../../../../src/jsx/components/form/SelectorOption.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,oBAAgB;AAE3C;;;;;;;GAOG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,WAAW,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAIF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,cAAc,gFAGpB,CAAC;AAER;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC"}
@@ -8,6 +8,7 @@ const TYPE = 'SelectorOption';
8
8
  * @param props.value - The value of the selector option. This is used to populate the
9
9
  * state in the form data.
10
10
  * @param props.children - The component to display.
11
+ * @param props.disabled - Whether the selector option is disabled.
11
12
  * @returns A selector option element.
12
13
  * @example
13
14
  * <Selector name="selector">
@@ -1 +1 @@
1
- {"version":3,"file":"SelectorOption.mjs","sourceRoot":"","sources":["../../../../src/jsx/components/form/SelectorOption.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,4BAAwB;AAetD,MAAM,IAAI,GAAG,gBAAgB,CAAC;AAE9B;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,mBAAmB,CAG/C,IAAI,CAAC,CAAC","sourcesContent":["import { createSnapComponent } from '../../component';\nimport type { CardElement } from '../Card';\n\n/**\n * The props of the {@link SelectorOption} component.\n *\n * @property value - The value of the selector option. This is used to populate the\n * state in the form data.\n * @property children - The component to display.\n */\nexport type SelectorOptionProps = {\n value: string;\n children: CardElement;\n};\n\nconst TYPE = 'SelectorOption';\n\n/**\n * A selector option component, which is used to create a selector option. This component\n * can only be used as a child of the {@link Selector} component.\n *\n * @param props - The props of the component.\n * @param props.value - The value of the selector option. This is used to populate the\n * state in the form data.\n * @param props.children - The component to display.\n * @returns A selector option element.\n * @example\n * <Selector name=\"selector\">\n * <SelectorOption value=\"option1\"><Card title=\"Option 1\" value=\"Foo\" /></SelectorOption>\n * <SelectorOption value=\"option2\"><Card title=\"Option 2\" value=\"Bar\" /></SelectorOption>\n * <SelectorOption value=\"option3\"><Card title=\"Option 3\" value=\"Baz\" /></SelectorOption>\n * </Selector>\n */\nexport const SelectorOption = createSnapComponent<\n SelectorOptionProps,\n typeof TYPE\n>(TYPE);\n\n/**\n * A selector option element.\n *\n * @see SelectorOption\n */\nexport type SelectorOptionElement = ReturnType<typeof SelectorOption>;\n"]}
1
+ {"version":3,"file":"SelectorOption.mjs","sourceRoot":"","sources":["../../../../src/jsx/components/form/SelectorOption.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,4BAAwB;AAiBtD,MAAM,IAAI,GAAG,gBAAgB,CAAC;AAE9B;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,mBAAmB,CAG/C,IAAI,CAAC,CAAC","sourcesContent":["import { createSnapComponent } from '../../component';\nimport type { CardElement } from '../Card';\n\n/**\n * The props of the {@link SelectorOption} component.\n *\n * @property value - The value of the selector option. This is used to populate the\n * state in the form data.\n * @property children - The component to display.\n * @property disabled - Whether the selector option is disabled.\n */\nexport type SelectorOptionProps = {\n value: string;\n children: CardElement;\n disabled?: boolean;\n};\n\nconst TYPE = 'SelectorOption';\n\n/**\n * A selector option component, which is used to create a selector option. This component\n * can only be used as a child of the {@link Selector} component.\n *\n * @param props - The props of the component.\n * @param props.value - The value of the selector option. This is used to populate the\n * state in the form data.\n * @param props.children - The component to display.\n * @param props.disabled - Whether the selector option is disabled.\n * @returns A selector option element.\n * @example\n * <Selector name=\"selector\">\n * <SelectorOption value=\"option1\"><Card title=\"Option 1\" value=\"Foo\" /></SelectorOption>\n * <SelectorOption value=\"option2\"><Card title=\"Option 2\" value=\"Bar\" /></SelectorOption>\n * <SelectorOption value=\"option3\"><Card title=\"Option 3\" value=\"Baz\" /></SelectorOption>\n * </Selector>\n */\nexport const SelectorOption = createSnapComponent<\n SelectorOptionProps,\n typeof TYPE\n>(TYPE);\n\n/**\n * A selector option element.\n *\n * @see SelectorOption\n */\nexport type SelectorOptionElement = ReturnType<typeof SelectorOption>;\n"]}
@@ -146,6 +146,7 @@ exports.CheckboxStruct = element('Checkbox', {
146
146
  checked: (0, superstruct_1.optional)((0, superstruct_1.boolean)()),
147
147
  label: (0, superstruct_1.optional)((0, superstruct_1.string)()),
148
148
  variant: (0, superstruct_1.optional)((0, internals_1.nullUnion)([(0, internals_1.literal)('default'), (0, internals_1.literal)('toggle')])),
149
+ disabled: (0, superstruct_1.optional)((0, superstruct_1.boolean)()),
149
150
  });
150
151
  /**
151
152
  * A struct for the generic input element props.
@@ -154,6 +155,7 @@ exports.GenericInputPropsStruct = (0, superstruct_1.object)({
154
155
  name: (0, superstruct_1.string)(),
155
156
  value: (0, superstruct_1.optional)((0, superstruct_1.string)()),
156
157
  placeholder: (0, superstruct_1.optional)((0, superstruct_1.string)()),
158
+ disabled: (0, superstruct_1.optional)((0, superstruct_1.boolean)()),
157
159
  });
158
160
  /**
159
161
  * A struct for the text type input props.
@@ -200,6 +202,7 @@ exports.InputStruct = elementWithSelectiveProps('Input', (value) => {
200
202
  exports.OptionStruct = element('Option', {
201
203
  value: (0, superstruct_1.string)(),
202
204
  children: (0, superstruct_1.string)(),
205
+ disabled: (0, superstruct_1.optional)((0, superstruct_1.boolean)()),
203
206
  });
204
207
  /**
205
208
  * A struct for the {@link DropdownElement} type.
@@ -208,6 +211,7 @@ exports.DropdownStruct = element('Dropdown', {
208
211
  name: (0, superstruct_1.string)(),
209
212
  value: (0, superstruct_1.optional)((0, superstruct_1.string)()),
210
213
  children: children([exports.OptionStruct]),
214
+ disabled: (0, superstruct_1.optional)((0, superstruct_1.boolean)()),
211
215
  });
212
216
  /**
213
217
  * A struct for the {@link AddressElement} type.
@@ -239,6 +243,7 @@ exports.CardStruct = element('Card', {
239
243
  exports.SelectorOptionStruct = element('SelectorOption', {
240
244
  value: (0, superstruct_1.string)(),
241
245
  children: exports.CardStruct,
246
+ disabled: (0, superstruct_1.optional)((0, superstruct_1.boolean)()),
242
247
  });
243
248
  /**
244
249
  * A struct for the {@link SelectorElement} type.
@@ -248,6 +253,7 @@ exports.SelectorStruct = element('Selector', {
248
253
  title: (0, superstruct_1.string)(),
249
254
  value: (0, superstruct_1.optional)((0, superstruct_1.string)()),
250
255
  children: children([exports.SelectorOptionStruct]),
256
+ disabled: (0, superstruct_1.optional)((0, superstruct_1.boolean)()),
251
257
  });
252
258
  /**
253
259
  * A struct for the {@link RadioElement} type.
@@ -255,6 +261,7 @@ exports.SelectorStruct = element('Selector', {
255
261
  exports.RadioStruct = element('Radio', {
256
262
  value: (0, superstruct_1.string)(),
257
263
  children: (0, superstruct_1.string)(),
264
+ disabled: (0, superstruct_1.optional)((0, superstruct_1.boolean)()),
258
265
  });
259
266
  /**
260
267
  * A struct for the {@link RadioGroupElement} type.
@@ -263,6 +270,7 @@ exports.RadioGroupStruct = element('RadioGroup', {
263
270
  name: (0, superstruct_1.string)(),
264
271
  value: (0, superstruct_1.optional)((0, superstruct_1.string)()),
265
272
  children: children([exports.RadioStruct]),
273
+ disabled: (0, superstruct_1.optional)((0, superstruct_1.boolean)()),
266
274
  });
267
275
  /**
268
276
  * A struct for the {@link FileInputElement} type.
@@ -271,6 +279,7 @@ exports.FileInputStruct = element('FileInput', {
271
279
  name: (0, superstruct_1.string)(),
272
280
  accept: (0, internals_1.nullUnion)([(0, superstruct_1.optional)((0, superstruct_1.array)((0, superstruct_1.string)()))]),
273
281
  compact: (0, superstruct_1.optional)((0, superstruct_1.boolean)()),
282
+ disabled: (0, superstruct_1.optional)((0, superstruct_1.boolean)()),
274
283
  });
275
284
  /**
276
285
  * A subset of JSX elements that represent the tuple Box + Input of the Field children.