xmlui 0.10.13 → 0.10.15

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 (217) hide show
  1. package/dist/lib/{index-Db5iQkFp.mjs → index-axjeT2uJ.mjs} +1626 -1080
  2. package/dist/lib/index.css +1 -1
  3. package/dist/lib/{initMock-B9LtmFJG.mjs → initMock-BoTWMs19.mjs} +1 -1
  4. package/dist/lib/language-server-web-worker.mjs +1 -1
  5. package/dist/lib/language-server.mjs +1 -1
  6. package/dist/lib/{metadata-utils-D90qqMGc.mjs → metadata-utils-CtY0QcvH.mjs} +2 -1
  7. package/dist/lib/{server-common-lmBDLpUh.mjs → server-common-Cine5nRR.mjs} +1 -1
  8. package/dist/lib/xmlui.d.ts +99 -6
  9. package/dist/lib/xmlui.mjs +78 -42
  10. package/dist/metadata/{collectedComponentMetadata-BN8eg9Gr.mjs → collectedComponentMetadata-CQywuPDB.mjs} +17448 -16984
  11. package/dist/metadata/{initMock-J7pN8owj.mjs → initMock-Bi5kF5Af.mjs} +1 -1
  12. package/dist/metadata/style.css +1 -1
  13. package/dist/metadata/xmlui-metadata.mjs +1 -1
  14. package/dist/metadata/xmlui-metadata.umd.js +3 -3
  15. package/dist/scripts/bin/build-lib.js +21 -13
  16. package/dist/scripts/bin/viteConfig.js +3 -1
  17. package/dist/scripts/package.json +2 -3
  18. package/dist/scripts/src/abstractions/scripting/Token.js +2 -0
  19. package/dist/scripts/src/abstractions/scripting/TryScope.js +2 -0
  20. package/dist/scripts/src/abstractions/scripting/modules.js +2 -0
  21. package/dist/scripts/src/components/APICall/APICall.spec.js +910 -0
  22. package/dist/scripts/src/components/Accordion/Accordion.spec.js +969 -0
  23. package/dist/scripts/src/components/Animation/Animation.js +50 -0
  24. package/dist/scripts/src/components/App/App.spec.js +219 -0
  25. package/dist/scripts/src/components/AppHeader/AppHeader.spec.js +169 -0
  26. package/dist/scripts/src/components/AppState/AppState.js +32 -2
  27. package/dist/scripts/src/components/AppState/AppState.spec.js +268 -0
  28. package/dist/scripts/src/components/AppState/AppStateNative.js +27 -3
  29. package/dist/scripts/src/components/AutoComplete/AutoComplete.spec.js +383 -0
  30. package/dist/scripts/src/components/Avatar/Avatar.spec.js +1543 -0
  31. package/dist/scripts/src/components/Backdrop/Backdrop.spec.js +131 -0
  32. package/dist/scripts/src/components/Badge/Badge.spec.js +2214 -0
  33. package/dist/scripts/src/components/Bookmark/Bookmark.spec.js +230 -0
  34. package/dist/scripts/src/components/Breakout/Breakout.spec.js +56 -0
  35. package/dist/scripts/src/components/Button/Button-style.spec.js +274 -0
  36. package/dist/scripts/src/components/Button/Button.js +5 -1
  37. package/dist/scripts/src/components/Button/Button.spec.js +454 -0
  38. package/dist/scripts/src/components/Card/Card.spec.js +150 -0
  39. package/dist/scripts/src/components/Carousel/Carousel.spec.js +343 -0
  40. package/dist/scripts/src/components/Carousel/CarouselNative.js +2 -2
  41. package/dist/scripts/src/components/ChangeListener/ChangeListener.spec.js +169 -0
  42. package/dist/scripts/src/components/Charts/AreaChart/AreaChart.spec.js +999 -0
  43. package/dist/scripts/src/components/Charts/BarChart/BarChart.spec.js +597 -0
  44. package/dist/scripts/src/components/Charts/DonutChart/DonutChart.spec.js +608 -0
  45. package/dist/scripts/src/components/Charts/LabelList/LabelList.spec.js +539 -0
  46. package/dist/scripts/src/components/Charts/Legend/Legend.spec.js +558 -0
  47. package/dist/scripts/src/components/Charts/LineChart/LineChart.spec.js +450 -0
  48. package/dist/scripts/src/components/Charts/PieChart/PieChart.spec.js +584 -0
  49. package/dist/scripts/src/components/Charts/PieChart/PieChartNative.js +41 -2
  50. package/dist/scripts/src/components/Charts/RadarChart/RadarChart.spec.js +571 -0
  51. package/dist/scripts/src/components/Charts/Tooltip/TooltipContent.spec.js +449 -0
  52. package/dist/scripts/src/components/Checkbox/Checkbox.spec.js +964 -0
  53. package/dist/scripts/src/components/CodeBlock/CodeBlock.spec.js +196 -0
  54. package/dist/scripts/src/components/ColorPicker/ColorPicker.spec.js +283 -0
  55. package/dist/scripts/src/components/ColorPicker/ColorPickerNative.js +9 -26
  56. package/dist/scripts/src/components/Column/doc-resources/list-component-data.js +53 -0
  57. package/dist/scripts/src/components/ComponentProvider.js +6 -2
  58. package/dist/scripts/src/components/ContentSeparator/ContentSeparator.spec.js +338 -0
  59. package/dist/scripts/src/components/DateInput/DateInput.spec.js +918 -0
  60. package/dist/scripts/src/components/DatePicker/DatePicker.spec.js +362 -0
  61. package/dist/scripts/src/components/DatePicker/DatePickerNative.js +3 -3
  62. package/dist/scripts/src/components/DropdownMenu/DropdownMenu.spec.js +331 -0
  63. package/dist/scripts/src/components/DropdownMenu/DropdownMenuNative.js +7 -9
  64. package/dist/scripts/src/components/EmojiSelector/EmojiSelector.spec.js +29 -0
  65. package/dist/scripts/src/components/ExpandableItem/ExpandableItem.spec.js +435 -0
  66. package/dist/scripts/src/components/FileInput/FileInput.spec.js +249 -0
  67. package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZone.spec.js +296 -0
  68. package/dist/scripts/src/components/FlowLayout/FlowLayout.spec.js +518 -0
  69. package/dist/scripts/src/components/Footer/Footer.spec.js +991 -0
  70. package/dist/scripts/src/components/Form/Form.spec.js +1257 -0
  71. package/dist/scripts/src/components/FormItem/FormItem.spec.js +723 -0
  72. package/dist/scripts/src/components/FormItem/ItemWithLabel.js +3 -3
  73. package/dist/scripts/src/components/FormSection/FormSection.js +6 -31
  74. package/dist/scripts/src/components/Fragment/Fragment.spec.js +50 -0
  75. package/dist/scripts/src/components/Heading/H1.spec.js +66 -0
  76. package/dist/scripts/src/components/Heading/H2.spec.js +66 -0
  77. package/dist/scripts/src/components/Heading/H3.spec.js +66 -0
  78. package/dist/scripts/src/components/Heading/H4.spec.js +66 -0
  79. package/dist/scripts/src/components/Heading/H5.spec.js +66 -0
  80. package/dist/scripts/src/components/Heading/H6.spec.js +66 -0
  81. package/dist/scripts/src/components/Heading/Heading.spec.js +897 -0
  82. package/dist/scripts/src/components/HtmlTags/HtmlTags.spec.js +69 -0
  83. package/dist/scripts/src/components/IFrame/IFrame.spec.js +527 -0
  84. package/dist/scripts/src/components/Icon/ArrowDropDown.js +11 -0
  85. package/dist/scripts/src/components/Icon/ArrowDropUp.js +11 -0
  86. package/dist/scripts/src/components/Icon/ArrowLeft.js +11 -0
  87. package/dist/scripts/src/components/Icon/ArrowRight.js +11 -0
  88. package/dist/scripts/src/components/Icon/ChevronDownIcon.js +7 -0
  89. package/dist/scripts/src/components/Icon/ChevronUpIcon.js +7 -0
  90. package/dist/scripts/src/components/Icon/Icon.spec.js +527 -0
  91. package/dist/scripts/src/components/Icon/SunIcon.js +10 -0
  92. package/dist/scripts/src/components/Image/Image.js +2 -1
  93. package/dist/scripts/src/components/Image/Image.spec.js +198 -0
  94. package/dist/scripts/src/components/Image/ImageNative.js +30 -2
  95. package/dist/scripts/src/components/Input/InputLabel.js +25 -0
  96. package/dist/scripts/src/components/Input/index.js +5 -0
  97. package/dist/scripts/src/components/Items/Items.spec.js +397 -0
  98. package/dist/scripts/src/components/Link/Link.spec.js +894 -0
  99. package/dist/scripts/src/components/List/List.spec.js +927 -0
  100. package/dist/scripts/src/components/List/doc-resources/list-component-data.js +53 -0
  101. package/dist/scripts/src/components/Markdown/Markdown.spec.js +188 -0
  102. package/dist/scripts/src/components/ModalDialog/ModalDialog.spec.js +162 -0
  103. package/dist/scripts/src/components/NavGroup/NavGroup.spec.js +212 -0
  104. package/dist/scripts/src/components/NavGroup/NavGroupNative.js +15 -7
  105. package/dist/scripts/src/components/NavLink/NavLink.spec.js +864 -0
  106. package/dist/scripts/src/components/NavPanel/NavPanel.spec.js +864 -0
  107. package/dist/scripts/src/components/NoResult/NoResult.spec.js +863 -0
  108. package/dist/scripts/src/components/NumberBox/NumberBox.spec.js +1237 -0
  109. package/dist/scripts/src/components/Option/Option.spec.js +472 -0
  110. package/dist/scripts/src/components/PageMetaTitle/PageMetaTitle.spec.js +80 -0
  111. package/dist/scripts/src/components/Pagination/Pagination.spec.js +1003 -0
  112. package/dist/scripts/src/components/ProfileMenu/ProfileMenu.js +20 -0
  113. package/dist/scripts/src/components/ProgressBar/ProgressBar.spec.js +166 -0
  114. package/dist/scripts/src/components/Queue/Queue.spec.js +626 -0
  115. package/dist/scripts/src/components/RadioGroup/RadioGroup.spec.js +479 -0
  116. package/dist/scripts/src/components/Redirect/Redirect.spec.js +527 -0
  117. package/dist/scripts/src/components/ResponsiveBar/ResponsiveBar.spec.js +76 -0
  118. package/dist/scripts/src/components/Select/Select.spec.js +527 -0
  119. package/dist/scripts/src/components/SelectionStore/SelectionStoreNative.js +3 -1
  120. package/dist/scripts/src/components/Slider/Slider.js +2 -0
  121. package/dist/scripts/src/components/Slider/Slider.spec.js +574 -0
  122. package/dist/scripts/src/components/Slider/SliderNative.js +63 -26
  123. package/dist/scripts/src/components/Slot/Slot.spec.js +368 -0
  124. package/dist/scripts/src/components/SpaceFiller/SpaceFiller.spec.js +184 -0
  125. package/dist/scripts/src/components/Spinner/Spinner.spec.js +161 -0
  126. package/dist/scripts/src/components/Splitter/HSplitter.spec.js +104 -0
  127. package/dist/scripts/src/components/Splitter/Splitter.spec.js +543 -0
  128. package/dist/scripts/src/components/Splitter/VSplitter.spec.js +104 -0
  129. package/dist/scripts/src/components/Stack/CHStack.spec.js +86 -0
  130. package/dist/scripts/src/components/Stack/CVStack.spec.js +86 -0
  131. package/dist/scripts/src/components/Stack/HStack.spec.js +67 -0
  132. package/dist/scripts/src/components/Stack/Stack.spec.js +654 -0
  133. package/dist/scripts/src/components/Stack/VStack.spec.js +67 -0
  134. package/dist/scripts/src/components/Switch/Switch.spec.js +829 -0
  135. package/dist/scripts/src/components/Table/Table.js +7 -1
  136. package/dist/scripts/src/components/Table/Table.spec.js +555 -0
  137. package/dist/scripts/src/components/Table/TableNative.js +4 -1
  138. package/dist/scripts/src/components/Table/doc-resources/list-component-data.js +53 -0
  139. package/dist/scripts/src/components/Table/useRowSelection.js +215 -1
  140. package/dist/scripts/src/components/TableOfContents/TableOfContents.spec.js +838 -0
  141. package/dist/scripts/src/components/Tabs/Tabs.spec.js +875 -0
  142. package/dist/scripts/src/components/Text/Text.spec.js +1075 -0
  143. package/dist/scripts/src/components/TextArea/TextArea.spec.js +714 -0
  144. package/dist/scripts/src/components/TextBox/TextBox.js +1 -5
  145. package/dist/scripts/src/components/TextBox/TextBox.spec.js +687 -0
  146. package/dist/scripts/src/components/TextBox/TextBoxNative.js +10 -15
  147. package/dist/scripts/src/components/Theme/Theme.spec.js +124 -0
  148. package/dist/scripts/src/components/Theme/ThemeNative.js +2 -6
  149. package/dist/scripts/src/components/TimeInput/TimeInput.js +1 -5
  150. package/dist/scripts/src/components/TimeInput/TimeInput.spec.js +1122 -0
  151. package/dist/scripts/src/components/TimeInput/TimeInputNative.js +2 -9
  152. package/dist/scripts/src/components/Timer/Timer.spec.js +358 -0
  153. package/dist/scripts/src/components/ToneChangerButton/ToneChangerButton.spec.js +414 -0
  154. package/dist/scripts/src/components/ToneSwitch/ToneSwitch.spec.js +89 -0
  155. package/dist/scripts/src/components/Tooltip/Tooltip.spec.js +418 -0
  156. package/dist/scripts/src/components/chart-color-schemes.js +43 -0
  157. package/dist/scripts/src/components-core/ApiBoundComponent.js +38 -24
  158. package/dist/scripts/src/components-core/CompoundComponent.js +1 -1
  159. package/dist/scripts/src/components-core/RestApiProxy.js +84 -8
  160. package/dist/scripts/src/components-core/behaviors/BehaviorContext.js +54 -0
  161. package/dist/scripts/src/components-core/behaviors/CoreBehaviors.js +80 -0
  162. package/dist/scripts/src/components-core/descriptorHelper.js +1 -0
  163. package/dist/scripts/src/components-core/devtools/InspectorDialogVisibilityContext.js +8 -0
  164. package/dist/scripts/src/components-core/parts.js +4 -1
  165. package/dist/scripts/src/components-core/renderers.js +31 -0
  166. package/dist/scripts/src/components-core/rendering/AppRoot.js +2 -1
  167. package/dist/scripts/src/components-core/rendering/ComponentAdapter.js +31 -46
  168. package/dist/scripts/src/components-core/rendering/nodeUtils.js +6 -0
  169. package/dist/scripts/src/components-core/script-runner/simplify-expression.js +386 -0
  170. package/dist/scripts/src/components-core/theming/component-layout-resolver.js +153 -0
  171. package/dist/scripts/src/components-core/theming/layout-resolver.js +2 -0
  172. package/dist/scripts/src/components-core/theming/parse-layout-props.js +98 -0
  173. package/dist/scripts/src/components-core/theming/themes/solid.js +16 -0
  174. package/dist/scripts/src/components-core/utils/audio-utils.js +83 -0
  175. package/dist/scripts/src/index-standalone.js +61 -0
  176. package/dist/scripts/src/index.js +39 -1
  177. package/dist/scripts/src/language-server/server-common.js +151 -0
  178. package/dist/scripts/src/language-server/server-web-worker.js +47 -0
  179. package/dist/scripts/src/language-server/server.js +42 -0
  180. package/dist/scripts/src/language-server/services/common/docs-generation.js +73 -0
  181. package/dist/scripts/src/language-server/services/common/lsp-utils.js +9 -0
  182. package/dist/scripts/src/language-server/services/common/syntax-node-utilities.js +135 -0
  183. package/dist/scripts/src/language-server/services/completion.js +270 -0
  184. package/dist/scripts/src/language-server/services/diagnostic.js +19 -0
  185. package/dist/scripts/src/language-server/services/format.js +430 -0
  186. package/dist/scripts/src/language-server/services/hover.js +164 -0
  187. package/dist/scripts/src/language-server/xmlui-metadata-generated.mjs +16266 -0
  188. package/dist/scripts/src/logging/xmlui.js +21 -0
  189. package/dist/scripts/src/parsers/common/utils.js +19 -0
  190. package/dist/scripts/src/syntax/monaco/grammar.monacoLanguage.js +286 -0
  191. package/dist/scripts/src/syntax/monaco/index.js +14 -0
  192. package/dist/scripts/src/syntax/monaco/xmlui-dark.js +25 -0
  193. package/dist/scripts/src/syntax/monaco/xmlui-light.js +25 -0
  194. package/dist/scripts/src/syntax/monaco/xmluiscript.monacoLanguage.js +310 -0
  195. package/dist/scripts/src/syntax/textMate/index.js +14 -0
  196. package/dist/scripts/src/syntax/textMate/xmlui-dark.json +631 -0
  197. package/dist/scripts/src/syntax/textMate/xmlui-light.json +565 -0
  198. package/dist/scripts/src/syntax/textMate/xmlui.json +564 -0
  199. package/dist/scripts/src/syntax/textMate/xmlui.tmLanguage.json +341 -0
  200. package/dist/scripts/src/testing/ComponentDrivers.js +1327 -0
  201. package/dist/scripts/src/testing/assertions.js +444 -0
  202. package/dist/scripts/src/testing/component-test-helpers.js +389 -0
  203. package/dist/scripts/src/testing/drivers/DateInputDriver.js +19 -0
  204. package/dist/scripts/src/testing/drivers/ModalDialogDriver.js +10 -0
  205. package/dist/scripts/src/testing/drivers/NumberBoxDriver.js +44 -0
  206. package/dist/scripts/src/testing/drivers/SliderDriver.js +20 -0
  207. package/dist/scripts/src/testing/drivers/TextBoxDriver.js +20 -0
  208. package/dist/scripts/src/testing/drivers/TimeInputDriver.js +22 -0
  209. package/dist/scripts/src/testing/drivers/TimerDriver.js +64 -0
  210. package/dist/scripts/src/testing/fixtures.js +513 -0
  211. package/dist/scripts/src/testing/infrastructure/TestBed.js +17 -0
  212. package/dist/scripts/src/testing/infrastructure/main.js +9 -0
  213. package/dist/scripts/src/testing/infrastructure/public/mockServiceWorker.js +266 -0
  214. package/dist/scripts/src/testing/themed-app-test-helpers.js +139 -0
  215. package/dist/standalone/xmlui-standalone.es.d.ts +172 -10
  216. package/dist/standalone/xmlui-standalone.umd.js +36 -36
  217. package/package.json +2 -3
@@ -27,7 +27,7 @@ exports.defaultProps = {
27
27
  };
28
28
  const numberRegex = /^[0-9]+$/;
29
29
  exports.ItemWithLabel = (0, react_1.forwardRef)(function ItemWithLabel(_a, ref) {
30
- var { id, labelPosition = "top", style = {}, className, label, labelBreak = exports.defaultProps.labelBreak, labelWidth, enabled = true, required = false, children, validationInProgress = false, shrinkToLabel = false, onFocus, onBlur, labelStyle, validationResult, isInputTemplateUsed = false, onLabelClick } = _a, rest = __rest(_a, ["id", "labelPosition", "style", "className", "label", "labelBreak", "labelWidth", "enabled", "required", "children", "validationInProgress", "shrinkToLabel", "onFocus", "onBlur", "labelStyle", "validationResult", "isInputTemplateUsed", "onLabelClick"]);
30
+ var { id, testId, labelPosition = "top", style = {}, className, label, labelBreak = exports.defaultProps.labelBreak, labelWidth, enabled = true, required = false, children, validationInProgress = false, shrinkToLabel = false, onFocus, onBlur, labelStyle, validationResult, isInputTemplateUsed = false, onLabelClick } = _a, rest = __rest(_a, ["id", "testId", "labelPosition", "style", "className", "label", "labelBreak", "labelWidth", "enabled", "required", "children", "validationInProgress", "shrinkToLabel", "onFocus", "onBlur", "labelStyle", "validationResult", "isInputTemplateUsed", "onLabelClick"]);
31
31
  // --- HACK: the "rest" may contain a "layoutContext" property that React doesn't recognize
32
32
  // --- as a valid DOM attribute, which would issue a warning in React.
33
33
  if (rest.layoutContext !== undefined) {
@@ -47,7 +47,7 @@ exports.ItemWithLabel = (0, react_1.forwardRef)(function ItemWithLabel(_a, ref)
47
47
  // }),
48
48
  // });
49
49
  }
50
- return ((0, jsx_runtime_1.jsxs)("div", Object.assign({}, rest, { ref: ref, style: style, className: (0, classnames_1.default)(className, FormItem_module_scss_1.default.itemWithLabel), children: [(0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(FormItem_module_scss_1.default.container, {
50
+ return ((0, jsx_runtime_1.jsxs)("div", Object.assign({}, rest, { "data-testid": testId, ref: ref, style: style, className: (0, classnames_1.default)(className, FormItem_module_scss_1.default.itemWithLabel), children: [(0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(FormItem_module_scss_1.default.container, {
51
51
  [FormItem_module_scss_1.default.top]: labelPosition === "top",
52
52
  [FormItem_module_scss_1.default.bottom]: labelPosition === "bottom",
53
53
  [FormItem_module_scss_1.default.start]: labelPosition === "start",
@@ -57,5 +57,5 @@ exports.ItemWithLabel = (0, react_1.forwardRef)(function ItemWithLabel(_a, ref)
57
57
  [FormItem_module_scss_1.default.required]: required,
58
58
  [FormItem_module_scss_1.default.disabled]: !enabled,
59
59
  [FormItem_module_scss_1.default.labelBreak]: labelBreak,
60
- }), children: [label, " ", required && (0, jsx_runtime_1.jsx)("span", { className: FormItem_module_scss_1.default.requiredMark, children: "*" }), validationInProgress && ((0, jsx_runtime_1.jsx)(SpinnerNative_1.Spinner, { style: { height: "1em", width: "1em", marginLeft: "1em", alignSelf: "center" } }))] })), (0, jsx_runtime_1.jsx)(react_slot_1.Slot, { "data-part-id": parts_1.PART_LABELED_ITEM, id: !isInputTemplateUsed ? inputId : undefined, children: children })] }), validationResult] })));
60
+ }), children: [label, " ", required && (0, jsx_runtime_1.jsx)("span", { className: FormItem_module_scss_1.default.requiredMark, children: "*" }), validationInProgress && ((0, jsx_runtime_1.jsx)(SpinnerNative_1.Spinner, { style: { height: "1em", width: "1em", marginLeft: "1em", alignSelf: "center" } }))] })), (0, jsx_runtime_1.jsx)(react_slot_1.Slot, { "data-part-id": parts_1.PART_LABELED_ITEM, id: !isInputTemplateUsed ? inputId : undefined, "data-testid": undefined, children: children })] }), validationResult] })));
61
61
  });
@@ -1,10 +1,12 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.formSectionRenderer = exports.FormSectionMd = void 0;
4
- const compound_utils_1 = require("../../components-core/utils/compound-utils");
7
+ const renderers_1 = require("../../components-core/renderers");
5
8
  const metadata_helpers_1 = require("../metadata-helpers");
6
- // --- We cannot use this with nextra
7
- // import componentSource from "./FormSection.xmlui?raw";
9
+ const FormSection_xmlui_1 = __importDefault(require("./FormSection.xmlui"));
8
10
  const COMP = "FormSection";
9
11
  exports.FormSectionMd = (0, metadata_helpers_1.createMetadata)({
10
12
  status: "experimental",
@@ -51,31 +53,4 @@ exports.FormSectionMd = (0, metadata_helpers_1.createMetadata)({
51
53
  },
52
54
  },
53
55
  });
54
- const componentSource = `
55
- <Component name="FormSection">
56
- <VStack paddingBottom="{$props.paddingBottom ?? '1rem'}" gap="0" width="100%">
57
- <Heading
58
- when="{!!$props.heading}"
59
- marginBottom="$space-tight"
60
- level="{$props.headingLevel ?? 'h3'}"
61
- fontWeight="{$props.headingWeight ?? 'bold'}"
62
- value="{$props.heading}" />
63
- <Text
64
- when="{!!$props.info}"
65
- fontSize="{$props.infoFontSize ?? '0.8rem'}"
66
- paddingBottom="$space-normal"
67
- value="{$props.info}" />
68
- <FlowLayout
69
- width="100%"
70
- paddingTop="{$props.paddingTop ?? '$space-normal'}"
71
- columnGap="{$props.columnGap ?? '3rem'}"
72
- rowGap="{$props.rowGap ?? '$space-normal'}" >
73
- <Slot />
74
- </FlowLayout>
75
- </VStack>
76
- </Component>
77
- `;
78
- exports.formSectionRenderer = {
79
- compoundComponentDef: (0, compound_utils_1.compoundComponentDefFromSource)(COMP, componentSource),
80
- metadata: exports.FormSectionMd,
81
- };
56
+ exports.formSectionRenderer = (0, renderers_1.createUserDefinedComponentRenderer)(exports.FormSectionMd, FormSection_xmlui_1.default);
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const fixtures_1 = require("../../testing/fixtures");
13
+ // =============================================================================
14
+ // BASIC FUNCTIONALITY TESTS
15
+ // =============================================================================
16
+ fixtures_1.test.describe("Basic Functionality", () => {
17
+ (0, fixtures_1.test)("parent has items", (_a) => __awaiter(void 0, [_a], void 0, function* ({ page, initTestBed }) {
18
+ const expectedChildCount = 3;
19
+ const expectedChildrenDisplay = ["Item #1", "Item #2", "Item #3"];
20
+ yield initTestBed(`
21
+ <Stack testId="container">
22
+ <Fragment>
23
+ <Text value='Item #1' />
24
+ <Text value='Item #2' />
25
+ <Text value='Item #3' />
26
+ </Fragment>
27
+ </Stack>`);
28
+ const children = page.locator(`[data-testid="container"] > *`);
29
+ yield (0, fixtures_1.expect)(children).toHaveCount(expectedChildCount);
30
+ yield (0, fixtures_1.expect)(children).toHaveText(expectedChildrenDisplay);
31
+ }));
32
+ (0, fixtures_1.test)("parent style affects children", (_a) => __awaiter(void 0, [_a], void 0, function* ({ page, initTestBed }) {
33
+ const expectedFontSize = "14px";
34
+ yield initTestBed(`
35
+ <Stack testId="container" fontSize="${expectedFontSize}">
36
+ <Fragment>
37
+ <Text value='Item #1' />
38
+ <Text value='Item #2' />
39
+ <Text value='Item #3' />
40
+ </Fragment>
41
+ </Stack>`, {
42
+ testThemeVars: {
43
+ "font-size": "16px",
44
+ },
45
+ });
46
+ for (const child of yield page.locator(`[data-testid="container"] > *`).all()) {
47
+ yield (0, fixtures_1.expect)(child).toHaveCSS("font-size", expectedFontSize);
48
+ }
49
+ }));
50
+ });
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const fixtures_1 = require("../../testing/fixtures");
13
+ // =============================================================================
14
+ // BASIC FUNCTIONALITY TESTS
15
+ // =============================================================================
16
+ fixtures_1.test.describe("Basic Functionality", () => {
17
+ (0, fixtures_1.test)("renders as h1 level heading", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createHeadingDriver }) {
18
+ yield initTestBed(`<H1 testId="h1">Test Heading</H1>`);
19
+ const driver = yield createHeadingDriver("h1");
20
+ yield (0, fixtures_1.expect)(driver.component).toBeVisible();
21
+ yield (0, fixtures_1.expect)(driver.component).toContainText("Test Heading");
22
+ yield (0, fixtures_1.expect)(driver.component).toHaveRole("heading");
23
+ // Verify it renders as h1 HTML element
24
+ const tagName = yield driver.getComponentTagName();
25
+ (0, fixtures_1.expect)(tagName.toLowerCase()).toBe("h1");
26
+ }));
27
+ (0, fixtures_1.test)("renders with value property", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createHeadingDriver }) {
28
+ yield initTestBed(`<H1 testId="h1" value="Value Property Text" />`);
29
+ const driver = yield createHeadingDriver("h1");
30
+ yield (0, fixtures_1.expect)(driver.component).toBeVisible();
31
+ yield (0, fixtures_1.expect)(driver.component).toContainText("Value Property Text");
32
+ yield (0, fixtures_1.expect)(driver.component).toHaveRole("heading");
33
+ // Verify it renders as h1 HTML element
34
+ const tagName = yield driver.getComponentTagName();
35
+ (0, fixtures_1.expect)(tagName.toLowerCase()).toBe("h1");
36
+ }));
37
+ (0, fixtures_1.test)("is equivalent to Heading with level='h1'", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createHeadingDriver }) {
38
+ yield initTestBed(`
39
+ <Fragment>
40
+ <Heading testId="heading" level="h1">Heading Content</Heading>
41
+ <H1 testId="h1">H1 Content</H1>
42
+ </Fragment>
43
+ `);
44
+ const headingDriver = yield createHeadingDriver("heading");
45
+ const h1Driver = yield createHeadingDriver("h1");
46
+ // Both should render as h1 elements
47
+ const headingTagName = yield headingDriver.getComponentTagName();
48
+ const h1TagName = yield h1Driver.getComponentTagName();
49
+ (0, fixtures_1.expect)(headingTagName.toLowerCase()).toBe("h1");
50
+ (0, fixtures_1.expect)(h1TagName.toLowerCase()).toBe("h1");
51
+ (0, fixtures_1.expect)(headingTagName).toEqual(h1TagName);
52
+ // Both should have heading role
53
+ yield (0, fixtures_1.expect)(headingDriver.component).toHaveRole("heading");
54
+ yield (0, fixtures_1.expect)(h1Driver.component).toHaveRole("heading");
55
+ }));
56
+ (0, fixtures_1.test)("ignores level property when provided", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createHeadingDriver }) {
57
+ yield initTestBed(`<H1 testId="h1" level="h3">Should be H1</H1>`);
58
+ const driver = yield createHeadingDriver("h1");
59
+ yield (0, fixtures_1.expect)(driver.component).toBeVisible();
60
+ yield (0, fixtures_1.expect)(driver.component).toContainText("Should be H1");
61
+ yield (0, fixtures_1.expect)(driver.component).toHaveRole("heading");
62
+ // Should always be h1 despite level="h3" prop (this is the expected behavior)
63
+ const tagName = yield driver.getComponentTagName();
64
+ (0, fixtures_1.expect)(tagName.toLowerCase()).toBe("h1");
65
+ }));
66
+ });
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const fixtures_1 = require("../../testing/fixtures");
13
+ // =============================================================================
14
+ // BASIC FUNCTIONALITY TESTS
15
+ // =============================================================================
16
+ fixtures_1.test.describe("Basic Functionality", () => {
17
+ (0, fixtures_1.test)("renders as h2 level heading", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createHeadingDriver }) {
18
+ yield initTestBed(`<H2 testId="h2">Test Heading</H2>`);
19
+ const driver = yield createHeadingDriver("h2");
20
+ yield (0, fixtures_1.expect)(driver.component).toBeVisible();
21
+ yield (0, fixtures_1.expect)(driver.component).toContainText("Test Heading");
22
+ yield (0, fixtures_1.expect)(driver.component).toHaveRole("heading");
23
+ // Verify it renders as h2 HTML element
24
+ const tagName = yield driver.getComponentTagName();
25
+ (0, fixtures_1.expect)(tagName.toLowerCase()).toBe("h2");
26
+ }));
27
+ (0, fixtures_1.test)("renders with value property", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createHeadingDriver }) {
28
+ yield initTestBed(`<H2 testId="h2" value="Value Property Text" />`);
29
+ const driver = yield createHeadingDriver("h2");
30
+ yield (0, fixtures_1.expect)(driver.component).toBeVisible();
31
+ yield (0, fixtures_1.expect)(driver.component).toContainText("Value Property Text");
32
+ yield (0, fixtures_1.expect)(driver.component).toHaveRole("heading");
33
+ // Verify it renders as h2 HTML element
34
+ const tagName = yield driver.getComponentTagName();
35
+ (0, fixtures_1.expect)(tagName.toLowerCase()).toBe("h2");
36
+ }));
37
+ (0, fixtures_1.test)("is equivalent to Heading with level='h2'", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createHeadingDriver }) {
38
+ yield initTestBed(`
39
+ <Fragment>
40
+ <Heading testId="heading" level="h2">Heading Content</Heading>
41
+ <H2 testId="h2">H2 Content</H2>
42
+ </Fragment>
43
+ `);
44
+ const headingDriver = yield createHeadingDriver("heading");
45
+ const h2Driver = yield createHeadingDriver("h2");
46
+ // Both should render as h2 elements
47
+ const headingTagName = yield headingDriver.getComponentTagName();
48
+ const h2TagName = yield h2Driver.getComponentTagName();
49
+ (0, fixtures_1.expect)(headingTagName.toLowerCase()).toBe("h2");
50
+ (0, fixtures_1.expect)(h2TagName.toLowerCase()).toBe("h2");
51
+ (0, fixtures_1.expect)(headingTagName).toEqual(h2TagName);
52
+ // Both should have heading role
53
+ yield (0, fixtures_1.expect)(headingDriver.component).toHaveRole("heading");
54
+ yield (0, fixtures_1.expect)(h2Driver.component).toHaveRole("heading");
55
+ }));
56
+ (0, fixtures_1.test)("ignores level property when provided", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createHeadingDriver }) {
57
+ yield initTestBed(`<H2 testId="h2" level="h4">Should be H2</H2>`);
58
+ const driver = yield createHeadingDriver("h2");
59
+ yield (0, fixtures_1.expect)(driver.component).toBeVisible();
60
+ yield (0, fixtures_1.expect)(driver.component).toContainText("Should be H2");
61
+ yield (0, fixtures_1.expect)(driver.component).toHaveRole("heading");
62
+ // Should always be h2 despite level="h4" prop (this is the expected behavior)
63
+ const tagName = yield driver.getComponentTagName();
64
+ (0, fixtures_1.expect)(tagName.toLowerCase()).toBe("h2");
65
+ }));
66
+ });
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const fixtures_1 = require("../../testing/fixtures");
13
+ // =============================================================================
14
+ // BASIC FUNCTIONALITY TESTS
15
+ // =============================================================================
16
+ fixtures_1.test.describe("Basic Functionality", () => {
17
+ (0, fixtures_1.test)("renders as h3 level heading", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createHeadingDriver }) {
18
+ yield initTestBed(`<H3 testId="h3">Test Heading</H3>`);
19
+ const driver = yield createHeadingDriver("h3");
20
+ yield (0, fixtures_1.expect)(driver.component).toBeVisible();
21
+ yield (0, fixtures_1.expect)(driver.component).toContainText("Test Heading");
22
+ yield (0, fixtures_1.expect)(driver.component).toHaveRole("heading");
23
+ // Verify it renders as h3 HTML element
24
+ const tagName = yield driver.getComponentTagName();
25
+ (0, fixtures_1.expect)(tagName.toLowerCase()).toBe("h3");
26
+ }));
27
+ (0, fixtures_1.test)("renders with value property", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createHeadingDriver }) {
28
+ yield initTestBed(`<H3 testId="h3" value="Value Property Text" />`);
29
+ const driver = yield createHeadingDriver("h3");
30
+ yield (0, fixtures_1.expect)(driver.component).toBeVisible();
31
+ yield (0, fixtures_1.expect)(driver.component).toContainText("Value Property Text");
32
+ yield (0, fixtures_1.expect)(driver.component).toHaveRole("heading");
33
+ // Verify it renders as h3 HTML element
34
+ const tagName = yield driver.getComponentTagName();
35
+ (0, fixtures_1.expect)(tagName.toLowerCase()).toBe("h3");
36
+ }));
37
+ (0, fixtures_1.test)("is equivalent to Heading with level='h3'", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createHeadingDriver }) {
38
+ yield initTestBed(`
39
+ <Fragment>
40
+ <Heading testId="heading" level="h3">Heading Content</Heading>
41
+ <H3 testId="h3">H3 Content</H3>
42
+ </Fragment>
43
+ `);
44
+ const headingDriver = yield createHeadingDriver("heading");
45
+ const h3Driver = yield createHeadingDriver("h3");
46
+ // Both should render as h3 elements
47
+ const headingTagName = yield headingDriver.getComponentTagName();
48
+ const h3TagName = yield h3Driver.getComponentTagName();
49
+ (0, fixtures_1.expect)(headingTagName.toLowerCase()).toBe("h3");
50
+ (0, fixtures_1.expect)(h3TagName.toLowerCase()).toBe("h3");
51
+ (0, fixtures_1.expect)(headingTagName).toEqual(h3TagName);
52
+ // Both should have heading role
53
+ yield (0, fixtures_1.expect)(headingDriver.component).toHaveRole("heading");
54
+ yield (0, fixtures_1.expect)(h3Driver.component).toHaveRole("heading");
55
+ }));
56
+ (0, fixtures_1.test)("ignores level property when provided", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createHeadingDriver }) {
57
+ yield initTestBed(`<H3 testId="h3" level="h1">Should be H3</H3>`);
58
+ const driver = yield createHeadingDriver("h3");
59
+ yield (0, fixtures_1.expect)(driver.component).toBeVisible();
60
+ yield (0, fixtures_1.expect)(driver.component).toContainText("Should be H3");
61
+ yield (0, fixtures_1.expect)(driver.component).toHaveRole("heading");
62
+ // Should always be h3 despite level="h1" prop (this is the expected behavior)
63
+ const tagName = yield driver.getComponentTagName();
64
+ (0, fixtures_1.expect)(tagName.toLowerCase()).toBe("h3");
65
+ }));
66
+ });
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const fixtures_1 = require("../../testing/fixtures");
13
+ // =============================================================================
14
+ // BASIC FUNCTIONALITY TESTS
15
+ // =============================================================================
16
+ fixtures_1.test.describe("Basic Functionality", () => {
17
+ (0, fixtures_1.test)("renders as h4 level heading", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createHeadingDriver }) {
18
+ yield initTestBed(`<H4 testId="h4">Test Heading</H4>`);
19
+ const driver = yield createHeadingDriver("h4");
20
+ yield (0, fixtures_1.expect)(driver.component).toBeVisible();
21
+ yield (0, fixtures_1.expect)(driver.component).toContainText("Test Heading");
22
+ yield (0, fixtures_1.expect)(driver.component).toHaveRole("heading");
23
+ // Verify it renders as h4 HTML element
24
+ const tagName = yield driver.getComponentTagName();
25
+ (0, fixtures_1.expect)(tagName.toLowerCase()).toBe("h4");
26
+ }));
27
+ (0, fixtures_1.test)("renders with value property", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createHeadingDriver }) {
28
+ yield initTestBed(`<H4 testId="h4" value="Value Property Text" />`);
29
+ const driver = yield createHeadingDriver("h4");
30
+ yield (0, fixtures_1.expect)(driver.component).toBeVisible();
31
+ yield (0, fixtures_1.expect)(driver.component).toContainText("Value Property Text");
32
+ yield (0, fixtures_1.expect)(driver.component).toHaveRole("heading");
33
+ // Verify it renders as h4 HTML element
34
+ const tagName = yield driver.getComponentTagName();
35
+ (0, fixtures_1.expect)(tagName.toLowerCase()).toBe("h4");
36
+ }));
37
+ (0, fixtures_1.test)("is equivalent to Heading with level='h4'", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createHeadingDriver }) {
38
+ yield initTestBed(`
39
+ <Fragment>
40
+ <Heading testId="heading" level="h4">Heading Content</Heading>
41
+ <H4 testId="h4">H4 Content</H4>
42
+ </Fragment>
43
+ `);
44
+ const headingDriver = yield createHeadingDriver("heading");
45
+ const h4Driver = yield createHeadingDriver("h4");
46
+ // Both should render as h4 elements
47
+ const headingTagName = yield headingDriver.getComponentTagName();
48
+ const h4TagName = yield h4Driver.getComponentTagName();
49
+ (0, fixtures_1.expect)(headingTagName.toLowerCase()).toBe("h4");
50
+ (0, fixtures_1.expect)(h4TagName.toLowerCase()).toBe("h4");
51
+ (0, fixtures_1.expect)(headingTagName).toEqual(h4TagName);
52
+ // Both should have heading role
53
+ yield (0, fixtures_1.expect)(headingDriver.component).toHaveRole("heading");
54
+ yield (0, fixtures_1.expect)(h4Driver.component).toHaveRole("heading");
55
+ }));
56
+ (0, fixtures_1.test)("ignores level property when provided", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createHeadingDriver }) {
57
+ yield initTestBed(`<H4 testId="h4" level="h1">Should be H4</H4>`);
58
+ const driver = yield createHeadingDriver("h4");
59
+ yield (0, fixtures_1.expect)(driver.component).toBeVisible();
60
+ yield (0, fixtures_1.expect)(driver.component).toContainText("Should be H4");
61
+ yield (0, fixtures_1.expect)(driver.component).toHaveRole("heading");
62
+ // Should always be h4 despite level="h1" prop (this is the expected behavior)
63
+ const tagName = yield driver.getComponentTagName();
64
+ (0, fixtures_1.expect)(tagName.toLowerCase()).toBe("h4");
65
+ }));
66
+ });
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const fixtures_1 = require("../../testing/fixtures");
13
+ // =============================================================================
14
+ // BASIC FUNCTIONALITY TESTS
15
+ // =============================================================================
16
+ fixtures_1.test.describe("Basic Functionality", () => {
17
+ (0, fixtures_1.test)("renders as h5 level heading", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createHeadingDriver }) {
18
+ yield initTestBed(`<H5 testId="h5">Test Heading</H5>`);
19
+ const driver = yield createHeadingDriver("h5");
20
+ yield (0, fixtures_1.expect)(driver.component).toBeVisible();
21
+ yield (0, fixtures_1.expect)(driver.component).toContainText("Test Heading");
22
+ yield (0, fixtures_1.expect)(driver.component).toHaveRole("heading");
23
+ // Verify it renders as h5 HTML element
24
+ const tagName = yield driver.getComponentTagName();
25
+ (0, fixtures_1.expect)(tagName.toLowerCase()).toBe("h5");
26
+ }));
27
+ (0, fixtures_1.test)("renders with value property", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createHeadingDriver }) {
28
+ yield initTestBed(`<H5 testId="h5" value="Value Property Text" />`);
29
+ const driver = yield createHeadingDriver("h5");
30
+ yield (0, fixtures_1.expect)(driver.component).toBeVisible();
31
+ yield (0, fixtures_1.expect)(driver.component).toContainText("Value Property Text");
32
+ yield (0, fixtures_1.expect)(driver.component).toHaveRole("heading");
33
+ // Verify it renders as h5 HTML element
34
+ const tagName = yield driver.getComponentTagName();
35
+ (0, fixtures_1.expect)(tagName.toLowerCase()).toBe("h5");
36
+ }));
37
+ (0, fixtures_1.test)("is equivalent to Heading with level='h5'", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createHeadingDriver }) {
38
+ yield initTestBed(`
39
+ <Fragment>
40
+ <Heading testId="heading" level="h5">Heading Content</Heading>
41
+ <H5 testId="h5">H5 Content</H5>
42
+ </Fragment>
43
+ `);
44
+ const headingDriver = yield createHeadingDriver("heading");
45
+ const h5Driver = yield createHeadingDriver("h5");
46
+ // Both should render as h5 elements
47
+ const headingTagName = yield headingDriver.getComponentTagName();
48
+ const h5TagName = yield h5Driver.getComponentTagName();
49
+ (0, fixtures_1.expect)(headingTagName.toLowerCase()).toBe("h5");
50
+ (0, fixtures_1.expect)(h5TagName.toLowerCase()).toBe("h5");
51
+ (0, fixtures_1.expect)(headingTagName).toEqual(h5TagName);
52
+ // Both should have heading role
53
+ yield (0, fixtures_1.expect)(headingDriver.component).toHaveRole("heading");
54
+ yield (0, fixtures_1.expect)(h5Driver.component).toHaveRole("heading");
55
+ }));
56
+ (0, fixtures_1.test)("ignores level property when provided", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createHeadingDriver }) {
57
+ yield initTestBed(`<H5 testId="h5" level="h1">Should be H5</H5>`);
58
+ const driver = yield createHeadingDriver("h5");
59
+ yield (0, fixtures_1.expect)(driver.component).toBeVisible();
60
+ yield (0, fixtures_1.expect)(driver.component).toContainText("Should be H5");
61
+ yield (0, fixtures_1.expect)(driver.component).toHaveRole("heading");
62
+ // Should always be h5 despite level="h1" prop (this is the expected behavior)
63
+ const tagName = yield driver.getComponentTagName();
64
+ (0, fixtures_1.expect)(tagName.toLowerCase()).toBe("h5");
65
+ }));
66
+ });
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const fixtures_1 = require("../../testing/fixtures");
13
+ // =============================================================================
14
+ // BASIC FUNCTIONALITY TESTS
15
+ // =============================================================================
16
+ fixtures_1.test.describe("Basic Functionality", () => {
17
+ (0, fixtures_1.test)("renders as h6 level heading", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createHeadingDriver }) {
18
+ yield initTestBed(`<H6 testId="h6">Test Heading</H6>`);
19
+ const driver = yield createHeadingDriver("h6");
20
+ yield (0, fixtures_1.expect)(driver.component).toBeVisible();
21
+ yield (0, fixtures_1.expect)(driver.component).toContainText("Test Heading");
22
+ yield (0, fixtures_1.expect)(driver.component).toHaveRole("heading");
23
+ // Verify it renders as h6 HTML element
24
+ const tagName = yield driver.getComponentTagName();
25
+ (0, fixtures_1.expect)(tagName.toLowerCase()).toBe("h6");
26
+ }));
27
+ (0, fixtures_1.test)("renders with value property", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createHeadingDriver }) {
28
+ yield initTestBed(`<H6 testId="h6" value="Value Property Text" />`);
29
+ const driver = yield createHeadingDriver("h6");
30
+ yield (0, fixtures_1.expect)(driver.component).toBeVisible();
31
+ yield (0, fixtures_1.expect)(driver.component).toContainText("Value Property Text");
32
+ yield (0, fixtures_1.expect)(driver.component).toHaveRole("heading");
33
+ // Verify it renders as h6 HTML element
34
+ const tagName = yield driver.getComponentTagName();
35
+ (0, fixtures_1.expect)(tagName.toLowerCase()).toBe("h6");
36
+ }));
37
+ (0, fixtures_1.test)("is equivalent to Heading with level='h6'", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createHeadingDriver }) {
38
+ yield initTestBed(`
39
+ <Fragment>
40
+ <Heading testId="heading" level="h6">Heading Content</Heading>
41
+ <H6 testId="h6">H6 Content</H6>
42
+ </Fragment>
43
+ `);
44
+ const headingDriver = yield createHeadingDriver("heading");
45
+ const h6Driver = yield createHeadingDriver("h6");
46
+ // Both should render as h6 elements
47
+ const headingTagName = yield headingDriver.getComponentTagName();
48
+ const h6TagName = yield h6Driver.getComponentTagName();
49
+ (0, fixtures_1.expect)(headingTagName.toLowerCase()).toBe("h6");
50
+ (0, fixtures_1.expect)(h6TagName.toLowerCase()).toBe("h6");
51
+ (0, fixtures_1.expect)(headingTagName).toEqual(h6TagName);
52
+ // Both should have heading role
53
+ yield (0, fixtures_1.expect)(headingDriver.component).toHaveRole("heading");
54
+ yield (0, fixtures_1.expect)(h6Driver.component).toHaveRole("heading");
55
+ }));
56
+ (0, fixtures_1.test)("ignores level property when provided", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createHeadingDriver }) {
57
+ yield initTestBed(`<H6 testId="h6" level="h1">Should be H6</H6>`);
58
+ const driver = yield createHeadingDriver("h6");
59
+ yield (0, fixtures_1.expect)(driver.component).toBeVisible();
60
+ yield (0, fixtures_1.expect)(driver.component).toContainText("Should be H6");
61
+ yield (0, fixtures_1.expect)(driver.component).toHaveRole("heading");
62
+ // Should always be h6 despite level="h1" prop (this is the expected behavior)
63
+ const tagName = yield driver.getComponentTagName();
64
+ (0, fixtures_1.expect)(tagName.toLowerCase()).toBe("h6");
65
+ }));
66
+ });