@texaryn/react-bootstrap 0.1.3 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,60 @@
1
1
  # @texaryn/react-bootstrap
2
2
 
3
+ ## 0.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 04270e8: Give every array action control an accessible name that says which row it acts on.
8
+
9
+ Five buttons all announced as "Remove" leave a screen reader user guessing. Each now carries the current 1-based position and whatever schema titles exist, so "Remove Contact 2 from Contacts", degrading to "Remove item 2" when nothing is titled. Reorder controls read "Move up Contact 2 in Contacts", and the per-array control reads "Add item to Contacts". The visible words stay "Remove", "Up" and "Add", with the longer string in `aria-label`, which contains the visible text so speech input still works.
10
+
11
+ The row's own value is deliberately not used: it is mutable, often blank, frequently duplicated, and sometimes sensitive. The position is recomputed on every render rather than captured when a row is created, because a row survives a move while its position does not.
12
+
13
+ The add control is named from the item template rather than from the first row, so an empty array still says "Add Tag" where naming it matters most. That needed the template's annotations, which the projection did not carry: `NodeProjection.itemAnnotations` is new and optional, so an adapter that cannot supply it stays valid, and `ArrayMeta.itemTitle` carries the result to renderers.
14
+
15
+ React exposes the decision as `useArrayActions` so its three widget sets cannot drift, and the name builders are exported for custom widgets. Reorder-control parity is unchanged: the three React sets still expose no reorder button.
16
+ - c9b930f: Show a required field's requirement to a sighted user, without announcing it twice.
17
+
18
+ Required was conveyed only through `aria-required`, so a sighted user had nothing to tell a required field from an optional one. Every required label now carries a visible `(required)`.
19
+
20
+ Three channels carry that one fact and are deliberately kept separate. The visible label reads "Full Name (required)". The accessible name stays exactly "Full Name", because the indicator is `aria-hidden` and `aria-required` already reports the state; putting it in the name as well makes some screen readers say it twice. WCAG's Label in Name allows exactly this omission when the state is surfaced programmatically.
21
+
22
+ The indicator is the word rather than an asterisk, so nothing has to be explained elsewhere on the form. `field.label` and `fieldLabel()` still return the raw schema title: the decoration lives in the label rendering, so a visual convention does not become the canonical field title a custom widget sees. React exposes `FieldLabelContent` so its three widget sets cannot drift, and each binding exports `REQUIRED_INDICATOR` so a custom widget can match the wording.
23
+
24
+ ### Patch Changes
25
+
26
+ - Updated dependencies [04270e8]
27
+ - Updated dependencies [c9b930f]
28
+ - @texaryn/core@0.7.0
29
+ - @texaryn/react@0.4.0
30
+
31
+ ## 0.2.0
32
+
33
+ ### Minor Changes
34
+
35
+ - 3545378: Expose a titled nested object as a named group in React and Vue, closing the last gap the DOM accessibility contract declared.
36
+
37
+ A nested object rendered as a plain `div` gives no indication where one group of fields ends and the next begins. It is now a `fieldset` named by its `legend`, matching what `@texaryn/web-components` already did. The element is chosen once at mount and only the grouping semantics are re-derived, because a conditional subschema can add or drop a title on any recompile and swapping `div` for `fieldset` at that moment would remount the subtree and take the caret with it. An untitled nested object stays a `fieldset` but carries `role="none"`, since an unnamed group is noise in the accessibility tree.
38
+
39
+ The decision is shared through a new `useObjectGroup` hook, so the three React widget sets cannot drift apart on it. The root object is still a plain container: it is the form itself, not a group inside one.
40
+ - 3e53ca9: Keep each field's error container mounted as a live region instead of inserting it with the message already inside.
41
+
42
+ A region that appears together with its content is not reliably announced, which is what every binding did: React and Vue rendered nothing until an error existed, and Web Components kept the node but hid it, which takes it out of the accessibility tree just the same. The container now exists from mount, stays empty while the field is valid, and only its contents change.
43
+
44
+ It is `aria-live="polite" aria-atomic="true"` rather than `role="alert"`. This is a public semantic change: `ErrorProps` promised `role: 'alert'` and now carries the live-region attributes instead. Alert is assertive, and validation runs on change, blur and submit, so keeping it would have interrupted typing and spoken once per failing field on submit. `aria-describedby` stays conditional, pointing at the region only while it has something to say. `ErrorSummary` loses its `role="alert"` and keeps rendering conditionally, because the fields now announce their own errors and an aggregate region would repeat the same validation event.
45
+ - e7c00ce: Render a schema's `readOnly` as read-only rather than disabled, and enforce it in the runtime.
46
+
47
+ A disabled control is not focusable and is announced differently; a read-only one stays focusable and selectable, which is what `readOnly` means. Compiled nodes now carry a resolved `readOnly` that a read-only object or array passes to everything beneath it, because editing a descendant changes the ancestor's value. The runtime refuses `SetValue`, `InsertItem`, `RemoveItem` and `MoveItem` on a read-only node, so a custom widget set cannot write past the restriction; `Reset` stays allowed as the owning authority replacing state. Renderers use the native `readonly` attribute where HTML has one and `aria-readonly` plus refusing the change where it does not, which is select and checkbox. `disabled` remains part of the node API, but the compiler no longer derives it from `readOnly`, so compiled nodes currently resolve it to false.
48
+
49
+ ### Patch Changes
50
+
51
+ - Updated dependencies [3545378]
52
+ - Updated dependencies [3e53ca9]
53
+ - Updated dependencies [4a161b2]
54
+ - Updated dependencies [e7c00ce]
55
+ - @texaryn/react@0.3.0
56
+ - @texaryn/core@0.6.0
57
+
3
58
  ## 0.1.3
4
59
 
5
60
  ### Patch Changes
package/README.md CHANGED
@@ -42,7 +42,7 @@ The CSS import above assumes a bundler that resolves stylesheet imports. A page
42
42
 
43
43
  ## What this package renders
44
44
 
45
- `createBootstrapRegistry()` returns a `RendererRegistry<WidgetComponent>` with seven widgets. Each field widget sits in a `mb-3` wrapper, adds `is-invalid` to its control while the field shows errors, and renders the description as `form-text` and every visible error as `invalid-feedback d-block` inside the binding's `role="alert"` container.
45
+ `createBootstrapRegistry()` returns a `RendererRegistry<WidgetComponent>` with seven widgets. Each field widget sits in a `mb-3` wrapper, adds `is-invalid` to its control while the field shows errors, and renders the description as `form-text` and every visible error as `invalid-feedback d-block` inside the binding's live region, which stays mounted and empty while the field is valid.
46
46
 
47
47
  | Widget | Node it matches | Classes |
48
48
  | --- | --- | --- |
@@ -51,12 +51,12 @@ The CSS import above assumes a bundler that resolves stylesheet imports. A page
51
51
  | `BootstrapTextarea` | field with the `textarea` widget hint | `form-label`, `form-control` |
52
52
  | `BootstrapSelect` | field with enum values | `form-label`, `form-select` |
53
53
  | `BootstrapCheckbox` | boolean field | `form-check`, `form-check-input`, `form-check-label` |
54
- | `BootstrapObjectLayout` | object container | none, a plain `div` around the children |
54
+ | `BootstrapObjectLayout` | object container | a nested object is a `fieldset` named by its `legend`; the root is a plain `div` |
55
55
  | `BootstrapArrayControl` | array container | `btn btn-primary` to add, `btn btn-outline-danger btn-sm` to remove |
56
56
 
57
57
  Enum outranks the primitive type, so a string field with an `enum` renders as a select, and the `textarea` hint outranks both.
58
58
 
59
- `invalid-feedback` is hidden by Bootstrap unless it directly follows an `.is-invalid` sibling. The error lines sit inside the alert container rather than beside the control, so each one carries `d-block`.
59
+ `invalid-feedback` is hidden by Bootstrap unless it directly follows an `.is-invalid` sibling. The error lines sit inside the live region rather than beside the control, so each one carries `d-block`.
60
60
 
61
61
  ## Composing your own registry
62
62
 
@@ -1 +1 @@
1
- {"version":3,"file":"BootstrapArrayControl.d.ts","sourceRoot":"","sources":["../../src/widgets/BootstrapArrayControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAiB,MAAM,EAAE,MAAM,eAAe,CAAA;AAG1D,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;CACb;AAED,iBAAS,yBAAyB,CAAC,EAAE,IAAI,EAAE,EAAE,WAAW,qBA6BvD;AAED,eAAO,MAAM,qBAAqB,6DAGjC,CAAA"}
1
+ {"version":3,"file":"BootstrapArrayControl.d.ts","sourceRoot":"","sources":["../../src/widgets/BootstrapArrayControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAiB,MAAM,EAAE,MAAM,eAAe,CAAA;AAG1D,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;CACb;AAED,iBAAS,yBAAyB,CAAC,EAAE,IAAI,EAAE,EAAE,WAAW,qBAwCvD;AAED,eAAO,MAAM,qBAAqB,6DAGjC,CAAA"}
@@ -1,14 +1,15 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import { NodeRenderer, useFieldArray, useRendererContext } from '@texaryn/react';
3
+ import { NodeRenderer, useArrayActions, useFieldArray, useRendererContext } from '@texaryn/react';
4
4
  function BootstrapArrayControlImpl({ node }) {
5
5
  const containerNode = node;
6
6
  const fieldArray = useFieldArray(containerNode.id);
7
7
  const { document, registry } = useRendererContext();
8
+ const actions = useArrayActions(node);
8
9
  return (_jsxs("div", { children: [fieldArray.items.map((item, index) => {
9
10
  const childNode = item.nodeId ? document.nodes[item.nodeId] : undefined;
10
- return (_jsxs("div", { className: "mb-3", children: [childNode ? (_jsx(NodeRenderer, { node: childNode, document: document, registry: registry })) : null, fieldArray.canRemove ? (_jsx("button", { type: "button", className: "btn btn-outline-danger btn-sm", onClick: () => fieldArray.remove(index), children: "Remove" })) : null] }, item.id));
11
- }), fieldArray.canAdd ? (_jsx("button", { type: "button", className: "btn btn-primary", onClick: () => fieldArray.add(), children: "Add" })) : null] }));
11
+ return (_jsxs("div", { className: "mb-3", children: [childNode ? (_jsx(NodeRenderer, { node: childNode, document: document, registry: registry })) : null, fieldArray.canRemove ? (_jsx("button", { type: "button", className: "btn btn-outline-danger btn-sm", "aria-label": actions.removeName(index + 1, childNode), onClick: () => fieldArray.remove(index), children: "Remove" })) : null] }, item.id));
12
+ }), fieldArray.canAdd ? (_jsx("button", { type: "button", className: "btn btn-primary", "aria-label": actions.addName, onClick: () => fieldArray.add(), children: "Add" })) : null] }));
12
13
  }
13
14
  export const BootstrapArrayControl = React.memo(BootstrapArrayControlImpl, (prev, next) => prev.node.id === next.node.id);
14
15
  //# sourceMappingURL=BootstrapArrayControl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BootstrapArrayControl.js","sourceRoot":"","sources":["../../src/widgets/BootstrapArrayControl.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAMhF,SAAS,yBAAyB,CAAC,EAAE,IAAI,EAAe;IACtD,MAAM,aAAa,G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GhC,CACV,CAAC,CAAC,CAAC,IAAI,KAbA,IAAI,CAAC,EAAE,CAcX,CACP,CAAA;YACH,CAAC,CAAC,EACD,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CACnB,iBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,iBAAiB,gBACf,OAAO,CAAC,OAAO,EAC3B,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,oBAGxB,CACV,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAG,KAAK,CAAC,IAAI,CAC7C,yBAAyB,EACzB,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,CAC9C,CAAA"}
@@ -1,10 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import { useFieldBinding } from '@texaryn/react';
3
+ import { FieldLabelContent, useFieldBinding } from '@texaryn/react';
4
4
  import { BootstrapFeedback } from './BootstrapFeedback.js';
5
5
  function BootstrapCheckboxImpl({ node }) {
6
6
  const field = useFieldBinding(node);
7
- return (_jsxs("div", { className: "form-check mb-3", children: [_jsx("input", { ...field.domCheckboxProps, type: "checkbox", className: field.invalid ? 'form-check-input is-invalid' : 'form-check-input' }), _jsx("label", { ...field.labelProps, className: "form-check-label", children: field.label }), _jsx(BootstrapFeedback, { field: field })] }));
7
+ return (_jsxs("div", { className: "form-check mb-3", children: [_jsx("input", { ...field.domCheckboxProps, type: "checkbox", className: field.invalid ? 'form-check-input is-invalid' : 'form-check-input' }), _jsx("label", { ...field.labelProps, className: "form-check-label", children: _jsx(FieldLabelContent, { label: field.label, required: field.required }) }), _jsx(BootstrapFeedback, { field: field })] }));
8
8
  }
9
9
  export const BootstrapCheckbox = React.memo(BootstrapCheckboxImpl, (prev, next) => prev.node.id === next.node.id);
10
10
  //# sourceMappingURL=BootstrapCheckbox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BootstrapCheckbox.js","sourceRoot":"","sources":["../../src/widgets/BootstrapCheckbox.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAM1D,SAAS,qBAAqB,CAAC,EAAE,IAAI,EAAe;IAClD,MAAM,KAAK,GAAG,eAAe,CAAC,IAAiB,CAAC,CAAA;IAChD,OAAO,CACL,eAAK,SAAS,EAAC,iBAAiB,aAC9B,mBAAW,KAAK,CAAC,gBAAgB,EAAE,IAAI,EAAC,UAAU,EAAC,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC,CAAC,kBAAkB,GAAI,EACpI,mBAAW,KAAK,CAAC,UAAU,EAAE,SAAS,EAAC,kBAAkB,YAAE,KAAK,CAAC,KAAK,GAAS,EAC/E,KAAC,iBAAiB,IAAC,KAAK,EAAE,KAAK,GAAI,IAC/B,CACP,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,CAAC,IAAI,CAAC,qBAAqB,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA"}
1
+ {"version":3,"file":"BootstrapCheckbox.js","sourceRoot":"","sources":["../../src/widgets/BootstrapCheckbox.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAM1D,SAAS,qBAAqB,CAAC,EAAE,IAAI,EAAe;IAClD,MAAM,KAAK,GAAG,eAAe,CAAC,IAAiB,CAAC,CAAA;IAChD,OAAO,CACL,eAAK,SAAS,EAAC,iBAAiB,aAC9B,mBAAW,KAAK,CAAC,gBAAgB,EAAE,IAAI,EAAC,UAAU,EAAC,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC,CAAC,kBAAkB,GAAI,EACpI,mBAAW,KAAK,CAAC,UAAU,EAAE,SAAS,EAAC,kBAAkB,YAAC,KAAC,iBAAiB,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,GAAI,GAAQ,EACrI,KAAC,iBAAiB,IAAC,KAAK,EAAE,KAAK,GAAI,IAC/B,CACP,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,CAAC,IAAI,CAAC,qBAAqB,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"BootstrapFeedback.d.ts","sourceRoot":"","sources":["../../src/widgets/BootstrapFeedback.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAKlD,wBAAgB,iBAAiB,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,YAAY,CAAA;CAAE,+BAenE"}
1
+ {"version":3,"file":"BootstrapFeedback.d.ts","sourceRoot":"","sources":["../../src/widgets/BootstrapFeedback.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAKlD,wBAAgB,iBAAiB,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,YAAY,CAAA;CAAE,+BAiBnE"}
@@ -1,8 +1,10 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  // .invalid-feedback is display: none unless it follows an .is-invalid sibling or
3
- // carries d-block. The lines sit inside the role="alert" container, not beside
4
- // the control, so each one needs d-block.
3
+ // carries d-block. The lines sit inside the live region, not beside the
4
+ // control, so each one needs d-block.
5
5
  export function BootstrapFeedback({ field }) {
6
- return (_jsxs(_Fragment, { children: [field.description ? (_jsx("div", { ...field.descriptionProps, className: "form-text", children: field.description })) : null, field.invalid ? (_jsx("div", { ...field.errorProps, children: field.errors.map((error, index) => (_jsx("div", { className: "invalid-feedback d-block", children: error.message ?? error.keyword }, index))) })) : null] }));
6
+ return (_jsxs(_Fragment, { children: [field.description ? (_jsx("div", { ...field.descriptionProps, className: "form-text", children: field.description })) : null, _jsx("div", { ...field.errorProps, children: field.invalid
7
+ ? field.errors.map((error, index) => (_jsx("div", { className: "invalid-feedback d-block", children: error.message ?? error.keyword }, index)))
8
+ : null })] }));
7
9
  }
8
10
  //# sourceMappingURL=BootstrapFeedback.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BootstrapFeedback.js","sourceRoot":"","sources":["../../src/widgets/BootstrapFeedback.tsx"],"names":[],"mappings":";AAEA,iFAAiF;AACjF,+EAA+E;AAC/E,0CAA0C;AAC1C,MAAM,UAAU,iBAAiB,CAAC,EAAE,KAAK,EAA2B;IAClE,OAAO,CACL,8BACG,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CACnB,iBAAS,KAAK,CAAC,gBAAgB,EAAE,SAAS,EAAC,WAAW,YAAE,KAAK,CAAC,WAAW,GAAO,CACjF,CAAC,CAAC,CAAC,IAAI,EACP,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CACf,iBAAS,KAAK,CAAC,UAAU,YACtB,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAClC,cAAiB,SAAS,EAAC,0BAA0B,YAAE,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,IAA3E,KAAK,CAA6E,CAC7F,CAAC,GACE,CACP,CAAC,CAAC,CAAC,IAAI,IACP,CACJ,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"BootstrapFeedback.js","sourceRoot":"","sources":["../../src/widgets/BootstrapFeedback.tsx"],"names":[],"mappings":";AAEA,iFAAiF;AACjF,wEAAwE;AACxE,sCAAsC;AACtC,MAAM,UAAU,iBAAiB,CAAC,EAAE,KAAK,EAA2B;IAClE,OAAO,CACL,8BACG,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CACnB,iBAAS,KAAK,CAAC,gBAAgB,EAAE,SAAS,EAAC,WAAW,YAAE,KAAK,CAAC,WAAW,GAAO,CACjF,CAAC,CAAC,CAAC,IAAI,EAGR,iBAAS,KAAK,CAAC,UAAU,YACtB,KAAK,CAAC,OAAO;oBACZ,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CACjC,cAAiB,SAAS,EAAC,0BAA0B,YAAE,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,IAA3E,KAAK,CAA6E,CAC7F,CAAC;oBACJ,CAAC,CAAC,IAAI,GACJ,IACL,CACJ,CAAA;AACH,CAAC"}
@@ -1,10 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import { useFieldBinding } from '@texaryn/react';
3
+ import { FieldLabelContent, useFieldBinding } from '@texaryn/react';
4
4
  import { BootstrapFeedback } from './BootstrapFeedback.js';
5
5
  function BootstrapNumberInputImpl({ node }) {
6
6
  const field = useFieldBinding(node);
7
- return (_jsxs("div", { className: "mb-3", children: [_jsx("label", { ...field.labelProps, className: "form-label", children: field.label }), _jsx("input", { ...field.domInputProps, type: "number", className: field.invalid ? 'form-control is-invalid' : 'form-control' }), _jsx(BootstrapFeedback, { field: field })] }));
7
+ return (_jsxs("div", { className: "mb-3", children: [_jsx("label", { ...field.labelProps, className: "form-label", children: _jsx(FieldLabelContent, { label: field.label, required: field.required }) }), _jsx("input", { ...field.domInputProps, type: "number", className: field.invalid ? 'form-control is-invalid' : 'form-control' }), _jsx(BootstrapFeedback, { field: field })] }));
8
8
  }
9
9
  export const BootstrapNumberInput = React.memo(BootstrapNumberInputImpl, (prev, next) => prev.node.id === next.node.id);
10
10
  //# sourceMappingURL=BootstrapNumberInput.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BootstrapNumberInput.js","sourceRoot":"","sources":["../../src/widgets/BootstrapNumberInput.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAM1D,SAAS,wBAAwB,CAAC,EAAE,IAAI,EAAe;IACrD,MAAM,KAAK,GAAG,eAAe,CAAC,IAAiB,CAAC,CAAA;IAChD,OAAO,CACL,eAAK,SAAS,EAAC,MAAM,aACnB,mBAAW,KAAK,CAAC,UAAU,EAAE,SAAS,EAAC,YAAY,YAAE,KAAK,CAAC,KAAK,GAAS,EACzE,mBAAW,KAAK,CAAC,aAAa,EAAE,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,cAAc,GAAI,EACvH,KAAC,iBAAiB,IAAC,KAAK,EAAE,KAAK,GAAI,IAC/B,CACP,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC,IAAI,CAAC,wBAAwB,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA"}
1
+ {"version":3,"file":"BootstrapNumberInput.js","sourceRoot":"","sources":["../../src/widgets/BootstrapNumberInput.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAM1D,SAAS,wBAAwB,CAAC,EAAE,IAAI,EAAe;IACrD,MAAM,KAAK,GAAG,eAAe,CAAC,IAAiB,CAAC,CAAA;IAChD,OAAO,CACL,eAAK,SAAS,EAAC,MAAM,aACnB,mBAAW,KAAK,CAAC,UAAU,EAAE,SAAS,EAAC,YAAY,YAAC,KAAC,iBAAiB,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,GAAI,GAAQ,EAC/H,mBAAW,KAAK,CAAC,aAAa,EAAE,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,cAAc,GAAI,EACvH,KAAC,iBAAiB,IAAC,KAAK,EAAE,KAAK,GAAI,IAC/B,CACP,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC,IAAI,CAAC,wBAAwB,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"BootstrapObjectLayout.d.ts","sourceRoot":"","sources":["../../src/widgets/BootstrapObjectLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAiB,MAAM,EAAE,MAAM,eAAe,CAAA;AAG1D,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;CACb;AAED,iBAAS,yBAAyB,CAAC,EAAE,IAAI,EAAE,EAAE,WAAW,qBAevD;AAED,eAAO,MAAM,qBAAqB,6DAGjC,CAAA"}
1
+ {"version":3,"file":"BootstrapObjectLayout.d.ts","sourceRoot":"","sources":["../../src/widgets/BootstrapObjectLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAG3C,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;CACb;AAED,iBAAS,yBAAyB,CAAC,EAAE,IAAI,EAAE,EAAE,WAAW,qBAkBvD;AAED,eAAO,MAAM,qBAAqB,6DAGjC,CAAA"}
@@ -1,16 +1,14 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import { NodeRenderer, useRendererContext } from '@texaryn/react';
3
+ import { NodeRenderer, useObjectGroup, useRendererContext } from '@texaryn/react';
4
4
  function BootstrapObjectLayoutImpl({ node }) {
5
- const containerNode = node;
6
5
  const { document, registry } = useRendererContext();
7
- return (_jsx("div", { children: containerNode.children.map((childId) => {
8
- const child = document.nodes[childId];
9
- if (!child) {
10
- return null;
11
- }
12
- return _jsx(NodeRenderer, { node: child, document: document, registry: registry }, childId);
13
- }) }));
6
+ const { nested, title, children } = useObjectGroup(node);
7
+ const rendered = children.map((child) => (_jsx(NodeRenderer, { node: child, document: document, registry: registry }, child.id)));
8
+ if (!nested) {
9
+ return _jsx("div", { children: rendered });
10
+ }
11
+ return (_jsxs("fieldset", { role: title === undefined ? 'none' : undefined, className: "mb-3", children: [title === undefined ? null : _jsx("legend", { className: "fs-6 fw-semibold", children: title }), _jsx("div", { children: rendered })] }));
14
12
  }
15
13
  export const BootstrapObjectLayout = React.memo(BootstrapObjectLayoutImpl, (prev, next) => prev.node.id === next.node.id);
16
14
  //# sourceMappingURL=BootstrapObjectLayout.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BootstrapObjectLayout.js","sourceRoot":"","sources":["../../src/widgets/BootstrapObjectLayout.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAMjE,SAAS,yBAAyB,CAAC,EAAE,IAAI,EAAe;IACtD,MAAM,aAAa,GAAG,IAAqB,CAAA;IAC3C,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,kBAAkB,EAAE,CAAA;IAEnD,OAAO,CACL,wBACG,aAAa,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;YACtC,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;YACrC,IAAI,CAAC,KAAK,EAAE,CAAC;gBACX,OAAO,IAAI,CAAA;YACb,CAAC;YACD,OAAO,KAAC,YAAY,IAAe,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,IAA5D,OAAO,CAAyD,CAAA;QAC5F,CAAC,CAAC,GACE,CACP,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAG,KAAK,CAAC,IAAI,CAC7C,yBAAyB,EACzB,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,CAC9C,CAAA"}
1
+ {"version":3,"file":"BootstrapObjectLayout.js","sourceRoot":"","sources":["../../src/widgets/BootstrapObjectLayout.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAMjF,SAAS,yBAAyB,CAAC,EAAE,IAAI,EAAe;IACtD,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,kBAAkB,EAAE,CAAA;IACnD,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,cAAc,CAAC,IAAI,CAAC,CAAA;IAExD,MAAM,QAAQ,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CACvC,KAAC,YAAY,IAAgB,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,IAA7D,KAAK,CAAC,EAAE,CAAyD,CACrF,CAAC,CAAA;IAEF,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,wBAAM,QAAQ,GAAO,CAAA;IAC9B,CAAC;IAED,OAAO,CACL,oBAAU,IAAI,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EAAE,SAAS,EAAC,MAAM,aACvE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,iBAAQ,SAAS,EAAC,kBAAkB,YAAE,KAAK,GAAU,EACnF,wBAAM,QAAQ,GAAO,IACZ,CACZ,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAG,KAAK,CAAC,IAAI,CAC7C,yBAAyB,EACzB,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,CAC9C,CAAA"}
@@ -1,11 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import { useFieldBinding } from '@texaryn/react';
3
+ import { FieldLabelContent, useFieldBinding } from '@texaryn/react';
4
4
  import { BootstrapFeedback } from './BootstrapFeedback.js';
5
5
  function BootstrapSelectImpl({ node }) {
6
6
  const field = useFieldBinding(node);
7
7
  const enumValues = field.node.enumValues ?? [];
8
- return (_jsxs("div", { className: "mb-3", children: [_jsx("label", { ...field.labelProps, className: "form-label", children: field.label }), _jsx("select", { ...field.domInputProps, className: field.invalid ? 'form-select is-invalid' : 'form-select', children: enumValues.map((option) => (_jsx("option", { value: String(option.value), children: option.title ?? String(option.value) }, String(option.value)))) }), _jsx(BootstrapFeedback, { field: field })] }));
8
+ return (_jsxs("div", { className: "mb-3", children: [_jsx("label", { ...field.labelProps, className: "form-label", children: _jsx(FieldLabelContent, { label: field.label, required: field.required }) }), _jsx("select", { ...field.domInputProps, className: field.invalid ? 'form-select is-invalid' : 'form-select', children: enumValues.map((option) => (_jsx("option", { value: String(option.value), children: option.title ?? String(option.value) }, String(option.value)))) }), _jsx(BootstrapFeedback, { field: field })] }));
9
9
  }
10
10
  export const BootstrapSelect = React.memo(BootstrapSelectImpl, (prev, next) => prev.node.id === next.node.id);
11
11
  //# sourceMappingURL=BootstrapSelect.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BootstrapSelect.js","sourceRoot":"","sources":["../../src/widgets/BootstrapSelect.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAM1D,SAAS,mBAAmB,CAAC,EAAE,IAAI,EAAe;IAChD,MAAM,KAAK,GAAG,eAAe,CAAC,IAAiB,CAAC,CAAA;IAChD,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,UAAU,IAAI,EAAE,CAAA;IAE9C,OAAO,CACL,eAAK,SAAS,EAAC,MAAM,aACnB,mBAAW,KAAK,CAAC,UAAU,EAAE,SAAS,EAAC,YAAY,YAAE,KAAK,CAAC,KAAK,GAAS,EACzE,oBAAY,KAAK,CAAC,aAAa,EAAE,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,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AAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,aAAa,YACjG,UAAU,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAC1B,iBAAmC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,YAC3D,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,IAD1B,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAExB,CACV,CAAC,GACK,EACT,KAAC,iBAAiB,IAAC,KAAK,EAAE,KAAK,GAAI,IAC/B,CACP,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC,IAAI,CAAC,mBAAmB,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA"}
@@ -1,10 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import { useFieldBinding } from '@texaryn/react';
3
+ import { FieldLabelContent, useFieldBinding } from '@texaryn/react';
4
4
  import { BootstrapFeedback } from './BootstrapFeedback.js';
5
5
  function BootstrapTextInputImpl({ node }) {
6
6
  const field = useFieldBinding(node);
7
- return (_jsxs("div", { className: "mb-3", children: [_jsx("label", { ...field.labelProps, className: "form-label", children: field.label }), _jsx("input", { ...field.domInputProps, type: "text", className: field.invalid ? 'form-control is-invalid' : 'form-control' }), _jsx(BootstrapFeedback, { field: field })] }));
7
+ return (_jsxs("div", { className: "mb-3", children: [_jsx("label", { ...field.labelProps, className: "form-label", children: _jsx(FieldLabelContent, { label: field.label, required: field.required }) }), _jsx("input", { ...field.domInputProps, type: "text", className: field.invalid ? 'form-control is-invalid' : 'form-control' }), _jsx(BootstrapFeedback, { field: field })] }));
8
8
  }
9
9
  export const BootstrapTextInput = React.memo(BootstrapTextInputImpl, (prev, next) => prev.node.id === next.node.id);
10
10
  //# sourceMappingURL=BootstrapTextInput.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BootstrapTextInput.js","sourceRoot":"","sources":["../../src/widgets/BootstrapTextInput.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAM1D,SAAS,sBAAsB,CAAC,EAAE,IAAI,EAAe;IACnD,MAAM,KAAK,GAAG,eAAe,CAAC,IAAiB,CAAC,CAAA;IAChD,OAAO,CACL,eAAK,SAAS,EAAC,MAAM,aACnB,mBAAW,KAAK,CAAC,UAAU,EAAE,SAAS,EAAC,YAAY,YAAE,KAAK,CAAC,KAAK,GAAS,EACzE,mBAAW,KAAK,CAAC,aAAa,EAAE,IAAI,EAAC,MAAM,EAAC,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,cAAc,GAAI,EACrH,KAAC,iBAAiB,IAAC,KAAK,EAAE,KAAK,GAAI,IAC/B,CACP,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,CAAC,IAAI,CAAC,sBAAsB,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA"}
1
+ {"version":3,"file":"BootstrapTextInput.js","sourceRoot":"","sources":["../../src/widgets/BootstrapTextInput.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAM1D,SAAS,sBAAsB,CAAC,EAAE,IAAI,EAAe;IACnD,MAAM,KAAK,GAAG,eAAe,CAAC,IAAiB,CAAC,CAAA;IAChD,OAAO,CACL,eAAK,SAAS,EAAC,MAAM,aACnB,mBAAW,KAAK,CAAC,UAAU,EAAE,SAAS,EAAC,YAAY,YAAC,KAAC,iBAAiB,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,GAAI,GAAQ,EAC/H,mBAAW,KAAK,CAAC,aAAa,EAAE,IAAI,EAAC,MAAM,EAAC,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,cAAc,GAAI,EACrH,KAAC,iBAAiB,IAAC,KAAK,EAAE,KAAK,GAAI,IAC/B,CACP,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,CAAC,IAAI,CAAC,sBAAsB,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA"}
@@ -1,10 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import { useFieldBinding } from '@texaryn/react';
3
+ import { FieldLabelContent, useFieldBinding } from '@texaryn/react';
4
4
  import { BootstrapFeedback } from './BootstrapFeedback.js';
5
5
  function BootstrapTextareaImpl({ node }) {
6
6
  const field = useFieldBinding(node);
7
- return (_jsxs("div", { className: "mb-3", children: [_jsx("label", { ...field.labelProps, className: "form-label", children: field.label }), _jsx("textarea", { ...field.domInputProps, className: field.invalid ? 'form-control is-invalid' : 'form-control' }), _jsx(BootstrapFeedback, { field: field })] }));
7
+ return (_jsxs("div", { className: "mb-3", children: [_jsx("label", { ...field.labelProps, className: "form-label", children: _jsx(FieldLabelContent, { label: field.label, required: field.required }) }), _jsx("textarea", { ...field.domInputProps, className: field.invalid ? 'form-control is-invalid' : 'form-control' }), _jsx(BootstrapFeedback, { field: field })] }));
8
8
  }
9
9
  export const BootstrapTextarea = React.memo(BootstrapTextareaImpl, (prev, next) => prev.node.id === next.node.id);
10
10
  //# sourceMappingURL=BootstrapTextarea.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BootstrapTextarea.js","sourceRoot":"","sources":["../../src/widgets/BootstrapTextarea.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAM1D,SAAS,qBAAqB,CAAC,EAAE,IAAI,EAAe;IAClD,MAAM,KAAK,GAAG,eAAe,CAAC,IAAiB,CAAC,CAAA;IAChD,OAAO,CACL,eAAK,SAAS,EAAC,MAAM,aACnB,mBAAW,KAAK,CAAC,UAAU,EAAE,SAAS,EAAC,YAAY,YAAE,KAAK,CAAC,KAAK,GAAS,EACzE,sBAAc,KAAK,CAAC,aAAa,EAAE,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,cAAc,GAAI,EAC5G,KAAC,iBAAiB,IAAC,KAAK,EAAE,KAAK,GAAI,IAC/B,CACP,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,CAAC,IAAI,CAAC,qBAAqB,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA"}
1
+ {"version":3,"file":"BootstrapTextarea.js","sourceRoot":"","sources":["../../src/widgets/BootstrapTextarea.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAM1D,SAAS,qBAAqB,CAAC,EAAE,IAAI,EAAe;IAClD,MAAM,KAAK,GAAG,eAAe,CAAC,IAAiB,CAAC,CAAA;IAChD,OAAO,CACL,eAAK,SAAS,EAAC,MAAM,aACnB,mBAAW,KAAK,CAAC,UAAU,EAAE,SAAS,EAAC,YAAY,YAAC,KAAC,iBAAiB,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,GAAI,GAAQ,EAC/H,sBAAc,KAAK,CAAC,aAAa,EAAE,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,cAAc,GAAI,EAC5G,KAAC,iBAAiB,IAAC,KAAK,EAAE,KAAK,GAAI,IAC/B,CACP,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,CAAC,IAAI,CAAC,qBAAqB,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@texaryn/react-bootstrap",
3
- "version": "0.1.3",
3
+ "version": "0.3.0",
4
4
  "description": "Bootstrap 5 widgets for Texaryn: native markup and Bootstrap classes on top of @texaryn/react",
5
5
  "keywords": [
6
6
  "react",
@@ -41,12 +41,12 @@
41
41
  "CHANGELOG.md"
42
42
  ],
43
43
  "dependencies": {
44
- "@texaryn/core": "^0.5.0"
44
+ "@texaryn/core": "^0.7.0"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "react": ">=18.0.0",
48
48
  "bootstrap": "^5.3",
49
- "@texaryn/react": "^0.2.4"
49
+ "@texaryn/react": "^0.4.0"
50
50
  },
51
51
  "peerDependenciesMeta": {
52
52
  "bootstrap": {
@@ -59,8 +59,8 @@
59
59
  "jsdom": "^25.0.0",
60
60
  "react": "^19.0.0",
61
61
  "react-dom": "^19.0.0",
62
- "@texaryn/react": "0.2.4",
63
- "@texaryn/schema-json": "0.2.4"
62
+ "@texaryn/schema-json": "0.3.0",
63
+ "@texaryn/react": "0.4.0"
64
64
  },
65
65
  "scripts": {
66
66
  "build": "tsc --build"