@dashforge/tw 1.5.0 → 1.5.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.
package/CHANGELOG.md CHANGED
@@ -12,6 +12,19 @@ This project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
12
12
  > duplicated intentionally — no shared "lowest common denominator" headless
13
13
  > layer.
14
14
 
15
+ ## [1.5.1] — 2026-08-15
16
+
17
+ Patch: fixes the label ordering of the `tooltip` help icon relative to
18
+ the required asterisk.
19
+
20
+ ### Fixed
21
+
22
+ - **`tooltip` + `required` ordering** — the required `*` is part of the
23
+ primary label block and now always precedes the help `ⓘ`. Previously the
24
+ icon rendered between the label and the asterisk (`Label ⓘ *`); it now
25
+ reads `Label * ⓘ` (and `ⓘ Label *` for `position: 'before'`). Applies to
26
+ every form input.
27
+
15
28
  ## [1.5.0] — 2026-08-15
16
29
 
17
30
  Adds a label-help **`tooltip`** prop to every form input. No breaking
package/dist/index.esm.js CHANGED
@@ -775,22 +775,34 @@ const tooltipVariants = tv({
775
775
  });
776
776
  }
777
777
  /**
778
- * Compose a label node with its help-tooltip trigger. Pass the resolved
779
- * config (from {@link resolveFieldTooltip}) or `null`. Returns the plain
780
- * label when there is no tooltip.
781
- */ function renderLabelWithTooltip(label, config) {
782
- if (!config) return label;
778
+ * Compose the primary label block — `label` plus its optional `required`
779
+ * mark — with the help-tooltip trigger. The required asterisk stays part
780
+ * of the primary block; the `ⓘ` is secondary and sits before/after that
781
+ * whole block. Returns the plain primary block when there is no tooltip.
782
+ *
783
+ * @param label - the label node.
784
+ * @param config - resolved tooltip config (from {@link resolveFieldTooltip}) or `null`.
785
+ * @param requiredMark - the required-asterisk node (or falsy), rendered as
786
+ * part of the primary block, immediately after the label.
787
+ */ function renderLabelWithTooltip(label, config, requiredMark) {
788
+ const primary = requiredMark ? jsxs(Fragment, {
789
+ children: [
790
+ label,
791
+ requiredMark
792
+ ]
793
+ }) : label;
794
+ if (!config) return primary;
783
795
  const trigger = jsx(LabelTooltipTrigger, {
784
796
  config: config
785
797
  });
786
798
  return config.position === 'before' ? jsxs(Fragment, {
787
799
  children: [
788
800
  trigger,
789
- label
801
+ primary
790
802
  ]
791
803
  }) : jsxs(Fragment, {
792
804
  children: [
793
- label,
805
+ primary,
794
806
  trigger
795
807
  ]
796
808
  });
@@ -1139,17 +1151,14 @@ const tooltipVariants = tv({
1139
1151
  return jsxs("div", {
1140
1152
  className: cn(v.root(), sx, themeSlotProps == null ? void 0 : (_themeSlotProps_root = themeSlotProps.root) == null ? void 0 : _themeSlotProps_root.className, slotProps == null ? void 0 : (_slotProps_root = slotProps.root) == null ? void 0 : _slotProps_root.className),
1141
1153
  children: [
1142
- label && jsxs("label", {
1154
+ label && jsx("label", {
1143
1155
  htmlFor: inputId,
1144
1156
  className: cn(v.label(), themeSlotProps == null ? void 0 : (_themeSlotProps_label = themeSlotProps.label) == null ? void 0 : _themeSlotProps_label.className, slotProps == null ? void 0 : (_slotProps_label = slotProps.label) == null ? void 0 : _slotProps_label.className),
1145
- children: [
1146
- renderLabelWithTooltip(label, tooltipConfig),
1147
- required && jsx("span", {
1148
- "aria-hidden": "true",
1149
- className: cn(v.requiredMark(), themeSlotProps == null ? void 0 : (_themeSlotProps_requiredMark = themeSlotProps.requiredMark) == null ? void 0 : _themeSlotProps_requiredMark.className, slotProps == null ? void 0 : (_slotProps_requiredMark = slotProps.requiredMark) == null ? void 0 : _slotProps_requiredMark.className),
1150
- children: "*"
1151
- })
1152
- ]
1157
+ children: renderLabelWithTooltip(label, tooltipConfig, required && jsx("span", {
1158
+ "aria-hidden": "true",
1159
+ className: cn(v.requiredMark(), themeSlotProps == null ? void 0 : (_themeSlotProps_requiredMark = themeSlotProps.requiredMark) == null ? void 0 : _themeSlotProps_requiredMark.className, slotProps == null ? void 0 : (_slotProps_requiredMark = slotProps.requiredMark) == null ? void 0 : _slotProps_requiredMark.className),
1160
+ children: "*"
1161
+ }))
1153
1162
  }),
1154
1163
  jsxs("div", {
1155
1164
  className: cn(v.inputWrapper(), themeSlotProps == null ? void 0 : (_themeSlotProps_inputWrapper = themeSlotProps.inputWrapper) == null ? void 0 : _themeSlotProps_inputWrapper.className, slotProps == null ? void 0 : (_slotProps_inputWrapper = slotProps.inputWrapper) == null ? void 0 : _slotProps_inputWrapper.className),
@@ -1953,17 +1962,14 @@ const tooltipVariants = tv({
1953
1962
  className: cn(v.root(), sx, themeSlotProps == null ? void 0 : (_themeSlotProps_root = themeSlotProps.root) == null ? void 0 : _themeSlotProps_root.className, slotProps == null ? void 0 : (_slotProps_root = slotProps.root) == null ? void 0 : _slotProps_root.className),
1954
1963
  "aria-describedby": resolvedHelperText ? helperId : undefined,
1955
1964
  children: [
1956
- label && jsxs("div", {
1965
+ label && jsx("div", {
1957
1966
  id: labelId,
1958
1967
  className: cn(v.label(), themeSlotProps == null ? void 0 : (_themeSlotProps_label = themeSlotProps.label) == null ? void 0 : _themeSlotProps_label.className, slotProps == null ? void 0 : (_slotProps_label = slotProps.label) == null ? void 0 : _slotProps_label.className),
1959
- children: [
1960
- renderLabelWithTooltip(label, tooltipConfig),
1961
- required && jsx("span", {
1962
- "aria-hidden": "true",
1963
- className: cn(v.requiredMark(), themeSlotProps == null ? void 0 : (_themeSlotProps_requiredMark = themeSlotProps.requiredMark) == null ? void 0 : _themeSlotProps_requiredMark.className, slotProps == null ? void 0 : (_slotProps_requiredMark = slotProps.requiredMark) == null ? void 0 : _slotProps_requiredMark.className),
1964
- children: "*"
1965
- })
1966
- ]
1968
+ children: renderLabelWithTooltip(label, tooltipConfig, required && jsx("span", {
1969
+ "aria-hidden": "true",
1970
+ className: cn(v.requiredMark(), themeSlotProps == null ? void 0 : (_themeSlotProps_requiredMark = themeSlotProps.requiredMark) == null ? void 0 : _themeSlotProps_requiredMark.className, slotProps == null ? void 0 : (_slotProps_requiredMark = slotProps.requiredMark) == null ? void 0 : _slotProps_requiredMark.className),
1971
+ children: "*"
1972
+ }))
1967
1973
  }),
1968
1974
  jsx(RadixRadioGroup.Root, _extends({
1969
1975
  name: name
@@ -2237,17 +2243,14 @@ const tooltipVariants = tv({
2237
2243
  return jsxs("div", {
2238
2244
  className: cn(v.root(), sx, themeSlotProps == null ? void 0 : (_themeSlotProps_root = themeSlotProps.root) == null ? void 0 : _themeSlotProps_root.className, slotProps == null ? void 0 : (_slotProps_root = slotProps.root) == null ? void 0 : _slotProps_root.className),
2239
2245
  children: [
2240
- label && jsxs("label", {
2246
+ label && jsx("label", {
2241
2247
  htmlFor: inputId,
2242
2248
  className: cn(v.label(), themeSlotProps == null ? void 0 : (_themeSlotProps_label = themeSlotProps.label) == null ? void 0 : _themeSlotProps_label.className, slotProps == null ? void 0 : (_slotProps_label = slotProps.label) == null ? void 0 : _slotProps_label.className),
2243
- children: [
2244
- renderLabelWithTooltip(label, tooltipConfig),
2245
- required && jsx("span", {
2246
- "aria-hidden": "true",
2247
- className: cn(v.requiredMark(), themeSlotProps == null ? void 0 : (_themeSlotProps_requiredMark = themeSlotProps.requiredMark) == null ? void 0 : _themeSlotProps_requiredMark.className, slotProps == null ? void 0 : (_slotProps_requiredMark = slotProps.requiredMark) == null ? void 0 : _slotProps_requiredMark.className),
2248
- children: "*"
2249
- })
2250
- ]
2249
+ children: renderLabelWithTooltip(label, tooltipConfig, required && jsx("span", {
2250
+ "aria-hidden": "true",
2251
+ className: cn(v.requiredMark(), themeSlotProps == null ? void 0 : (_themeSlotProps_requiredMark = themeSlotProps.requiredMark) == null ? void 0 : _themeSlotProps_requiredMark.className, slotProps == null ? void 0 : (_slotProps_requiredMark = slotProps.requiredMark) == null ? void 0 : _slotProps_requiredMark.className),
2252
+ children: "*"
2253
+ }))
2251
2254
  }),
2252
2255
  jsx("div", {
2253
2256
  className: cn(v.inputWrapper(), themeSlotProps == null ? void 0 : (_themeSlotProps_inputWrapper = themeSlotProps.inputWrapper) == null ? void 0 : _themeSlotProps_inputWrapper.className, slotProps == null ? void 0 : (_slotProps_inputWrapper = slotProps.inputWrapper) == null ? void 0 : _slotProps_inputWrapper.className),
@@ -2583,17 +2586,14 @@ const tooltipVariants = tv({
2583
2586
  return jsxs("div", {
2584
2587
  className: cn(v.root(), sx, themeSlotProps == null ? void 0 : (_themeSlotProps_root = themeSlotProps.root) == null ? void 0 : _themeSlotProps_root.className, slotProps == null ? void 0 : (_slotProps_root = slotProps.root) == null ? void 0 : _slotProps_root.className),
2585
2588
  children: [
2586
- label && jsxs("label", {
2589
+ label && jsx("label", {
2587
2590
  htmlFor: inputId,
2588
2591
  className: cn(v.label(), themeSlotProps == null ? void 0 : (_themeSlotProps_label = themeSlotProps.label) == null ? void 0 : _themeSlotProps_label.className, slotProps == null ? void 0 : (_slotProps_label = slotProps.label) == null ? void 0 : _slotProps_label.className),
2589
- children: [
2590
- renderLabelWithTooltip(label, tooltipConfig),
2591
- required && jsx("span", {
2592
- "aria-hidden": "true",
2593
- className: cn(v.requiredMark(), themeSlotProps == null ? void 0 : (_themeSlotProps_requiredMark = themeSlotProps.requiredMark) == null ? void 0 : _themeSlotProps_requiredMark.className, slotProps == null ? void 0 : (_slotProps_requiredMark = slotProps.requiredMark) == null ? void 0 : _slotProps_requiredMark.className),
2594
- children: "*"
2595
- })
2596
- ]
2592
+ children: renderLabelWithTooltip(label, tooltipConfig, required && jsx("span", {
2593
+ "aria-hidden": "true",
2594
+ className: cn(v.requiredMark(), themeSlotProps == null ? void 0 : (_themeSlotProps_requiredMark = themeSlotProps.requiredMark) == null ? void 0 : _themeSlotProps_requiredMark.className, slotProps == null ? void 0 : (_slotProps_requiredMark = slotProps.requiredMark) == null ? void 0 : _slotProps_requiredMark.className),
2595
+ children: "*"
2596
+ }))
2597
2597
  }),
2598
2598
  jsxs("div", {
2599
2599
  className: cn(v.inputWrapper(), themeSlotProps == null ? void 0 : (_themeSlotProps_inputWrapper = themeSlotProps.inputWrapper) == null ? void 0 : _themeSlotProps_inputWrapper.className, slotProps == null ? void 0 : (_slotProps_inputWrapper = slotProps.inputWrapper) == null ? void 0 : _slotProps_inputWrapper.className),
@@ -2868,18 +2868,15 @@ const tooltipVariants = tv({
2868
2868
  return jsxs("div", {
2869
2869
  className: cn(v.root(), sx, themeSlotProps == null ? void 0 : (_themeSlotProps_root = themeSlotProps.root) == null ? void 0 : _themeSlotProps_root.className, slotProps == null ? void 0 : (_slotProps_root = slotProps.root) == null ? void 0 : _slotProps_root.className),
2870
2870
  children: [
2871
- label && jsxs("label", {
2871
+ label && jsx("label", {
2872
2872
  id: labelId,
2873
2873
  htmlFor: inputId,
2874
2874
  className: cn(v.label(), themeSlotProps == null ? void 0 : (_themeSlotProps_label = themeSlotProps.label) == null ? void 0 : _themeSlotProps_label.className, slotProps == null ? void 0 : (_slotProps_label = slotProps.label) == null ? void 0 : _slotProps_label.className),
2875
- children: [
2876
- renderLabelWithTooltip(label, tooltipConfig),
2877
- required && jsx("span", {
2878
- "aria-hidden": "true",
2879
- className: cn(v.requiredMark(), themeSlotProps == null ? void 0 : (_themeSlotProps_requiredMark = themeSlotProps.requiredMark) == null ? void 0 : _themeSlotProps_requiredMark.className, slotProps == null ? void 0 : (_slotProps_requiredMark = slotProps.requiredMark) == null ? void 0 : _slotProps_requiredMark.className),
2880
- children: "*"
2881
- })
2882
- ]
2875
+ children: renderLabelWithTooltip(label, tooltipConfig, required && jsx("span", {
2876
+ "aria-hidden": "true",
2877
+ className: cn(v.requiredMark(), themeSlotProps == null ? void 0 : (_themeSlotProps_requiredMark = themeSlotProps.requiredMark) == null ? void 0 : _themeSlotProps_requiredMark.className, slotProps == null ? void 0 : (_slotProps_requiredMark = slotProps.requiredMark) == null ? void 0 : _slotProps_requiredMark.className),
2878
+ children: "*"
2879
+ }))
2883
2880
  }),
2884
2881
  jsxs("div", {
2885
2882
  className: cn(v.slotsRow(), themeSlotProps == null ? void 0 : (_themeSlotProps_slotsRow = themeSlotProps.slotsRow) == null ? void 0 : _themeSlotProps_slotsRow.className, slotProps == null ? void 0 : (_slotProps_slotsRow = slotProps.slotsRow) == null ? void 0 : _slotProps_slotsRow.className),
@@ -3782,18 +3779,15 @@ const defaultGetOptionDisabled = (option)=>Boolean(option.disabled);
3782
3779
  ref: rootRef,
3783
3780
  className: cn(v.root(), sx, themeSlotProps == null ? void 0 : (_themeSlotProps_root = themeSlotProps.root) == null ? void 0 : _themeSlotProps_root.className, slotProps == null ? void 0 : (_slotProps_root = slotProps.root) == null ? void 0 : _slotProps_root.className),
3784
3781
  children: [
3785
- label && jsxs("label", {
3782
+ label && jsx("label", {
3786
3783
  id: labelId,
3787
3784
  htmlFor: `${baseId}-input`,
3788
3785
  className: cn(v.label(), themeSlotProps == null ? void 0 : (_themeSlotProps_label = themeSlotProps.label) == null ? void 0 : _themeSlotProps_label.className, slotProps == null ? void 0 : (_slotProps_label = slotProps.label) == null ? void 0 : _slotProps_label.className),
3789
- children: [
3790
- renderLabelWithTooltip(label, tooltipConfig),
3791
- required && jsx("span", {
3792
- "aria-hidden": "true",
3793
- className: cn(v.requiredMark(), themeSlotProps == null ? void 0 : (_themeSlotProps_requiredMark = themeSlotProps.requiredMark) == null ? void 0 : _themeSlotProps_requiredMark.className, slotProps == null ? void 0 : (_slotProps_requiredMark = slotProps.requiredMark) == null ? void 0 : _slotProps_requiredMark.className),
3794
- children: "*"
3795
- })
3796
- ]
3786
+ children: renderLabelWithTooltip(label, tooltipConfig, required && jsx("span", {
3787
+ "aria-hidden": "true",
3788
+ className: cn(v.requiredMark(), themeSlotProps == null ? void 0 : (_themeSlotProps_requiredMark = themeSlotProps.requiredMark) == null ? void 0 : _themeSlotProps_requiredMark.className, slotProps == null ? void 0 : (_slotProps_requiredMark = slotProps.requiredMark) == null ? void 0 : _slotProps_requiredMark.className),
3789
+ children: "*"
3790
+ }))
3797
3791
  }),
3798
3792
  jsxs("div", {
3799
3793
  className: cn(v.inputWrapper(), // Multi mode: let chips wrap and replace the fixed `h-*`
@@ -4515,17 +4509,14 @@ function CalendarIcon$2() {
4515
4509
  "data-testid": testId,
4516
4510
  className: cn(v.root(), sx, themeSlotProps == null ? void 0 : (_themeSlotProps_root = themeSlotProps.root) == null ? void 0 : _themeSlotProps_root.className, slotProps == null ? void 0 : (_slotProps_root = slotProps.root) == null ? void 0 : _slotProps_root.className),
4517
4511
  children: [
4518
- label && jsxs("label", {
4512
+ label && jsx("label", {
4519
4513
  htmlFor: fieldId,
4520
4514
  className: cn(v.label(), themeSlotProps == null ? void 0 : (_themeSlotProps_label = themeSlotProps.label) == null ? void 0 : _themeSlotProps_label.className, slotProps == null ? void 0 : (_slotProps_label = slotProps.label) == null ? void 0 : _slotProps_label.className),
4521
- children: [
4522
- renderLabelWithTooltip(label, tooltipConfig),
4523
- required && jsx("span", {
4524
- "aria-hidden": "true",
4525
- className: cn(v.requiredMark(), themeSlotProps == null ? void 0 : (_themeSlotProps_requiredMark = themeSlotProps.requiredMark) == null ? void 0 : _themeSlotProps_requiredMark.className, slotProps == null ? void 0 : (_slotProps_requiredMark = slotProps.requiredMark) == null ? void 0 : _slotProps_requiredMark.className),
4526
- children: "*"
4527
- })
4528
- ]
4515
+ children: renderLabelWithTooltip(label, tooltipConfig, required && jsx("span", {
4516
+ "aria-hidden": "true",
4517
+ className: cn(v.requiredMark(), themeSlotProps == null ? void 0 : (_themeSlotProps_requiredMark = themeSlotProps.requiredMark) == null ? void 0 : _themeSlotProps_requiredMark.className, slotProps == null ? void 0 : (_slotProps_requiredMark = slotProps.requiredMark) == null ? void 0 : _slotProps_requiredMark.className),
4518
+ children: "*"
4519
+ }))
4529
4520
  }),
4530
4521
  jsx(Popover, {
4531
4522
  open: isOpen,
@@ -4802,17 +4793,14 @@ function ClockIcon() {
4802
4793
  "data-testid": testId,
4803
4794
  className: cn(v.root(), sx, themeSlotProps == null ? void 0 : (_themeSlotProps_root = themeSlotProps.root) == null ? void 0 : _themeSlotProps_root.className, slotProps == null ? void 0 : (_slotProps_root = slotProps.root) == null ? void 0 : _slotProps_root.className),
4804
4795
  children: [
4805
- label && jsxs("label", {
4796
+ label && jsx("label", {
4806
4797
  htmlFor: fieldId,
4807
4798
  className: cn(v.label(), themeSlotProps == null ? void 0 : (_themeSlotProps_label = themeSlotProps.label) == null ? void 0 : _themeSlotProps_label.className, slotProps == null ? void 0 : (_slotProps_label = slotProps.label) == null ? void 0 : _slotProps_label.className),
4808
- children: [
4809
- renderLabelWithTooltip(label, tooltipConfig),
4810
- required && jsx("span", {
4811
- "aria-hidden": "true",
4812
- className: cn(v.requiredMark(), themeSlotProps == null ? void 0 : (_themeSlotProps_requiredMark = themeSlotProps.requiredMark) == null ? void 0 : _themeSlotProps_requiredMark.className, slotProps == null ? void 0 : (_slotProps_requiredMark = slotProps.requiredMark) == null ? void 0 : _slotProps_requiredMark.className),
4813
- children: "*"
4814
- })
4815
- ]
4799
+ children: renderLabelWithTooltip(label, tooltipConfig, required && jsx("span", {
4800
+ "aria-hidden": "true",
4801
+ className: cn(v.requiredMark(), themeSlotProps == null ? void 0 : (_themeSlotProps_requiredMark = themeSlotProps.requiredMark) == null ? void 0 : _themeSlotProps_requiredMark.className, slotProps == null ? void 0 : (_slotProps_requiredMark = slotProps.requiredMark) == null ? void 0 : _slotProps_requiredMark.className),
4802
+ children: "*"
4803
+ }))
4816
4804
  }),
4817
4805
  jsx(Popover, {
4818
4806
  open: isOpen,
@@ -5134,17 +5122,14 @@ const DATETIME_PATTERN = /^(\d{4}-\d{2}-\d{2})T(\d{2}):(\d{2})/;
5134
5122
  "data-testid": testId,
5135
5123
  className: cn(v.root(), sx, themeSlotProps == null ? void 0 : (_themeSlotProps_root = themeSlotProps.root) == null ? void 0 : _themeSlotProps_root.className, slotProps == null ? void 0 : (_slotProps_root = slotProps.root) == null ? void 0 : _slotProps_root.className),
5136
5124
  children: [
5137
- label && jsxs("label", {
5125
+ label && jsx("label", {
5138
5126
  htmlFor: fieldId,
5139
5127
  className: cn(v.label(), themeSlotProps == null ? void 0 : (_themeSlotProps_label = themeSlotProps.label) == null ? void 0 : _themeSlotProps_label.className, slotProps == null ? void 0 : (_slotProps_label = slotProps.label) == null ? void 0 : _slotProps_label.className),
5140
- children: [
5141
- renderLabelWithTooltip(label, tooltipConfig),
5142
- required && jsx("span", {
5143
- "aria-hidden": "true",
5144
- className: cn(v.requiredMark(), themeSlotProps == null ? void 0 : (_themeSlotProps_requiredMark = themeSlotProps.requiredMark) == null ? void 0 : _themeSlotProps_requiredMark.className, slotProps == null ? void 0 : (_slotProps_requiredMark = slotProps.requiredMark) == null ? void 0 : _slotProps_requiredMark.className),
5145
- children: "*"
5146
- })
5147
- ]
5128
+ children: renderLabelWithTooltip(label, tooltipConfig, required && jsx("span", {
5129
+ "aria-hidden": "true",
5130
+ className: cn(v.requiredMark(), themeSlotProps == null ? void 0 : (_themeSlotProps_requiredMark = themeSlotProps.requiredMark) == null ? void 0 : _themeSlotProps_requiredMark.className, slotProps == null ? void 0 : (_slotProps_requiredMark = slotProps.requiredMark) == null ? void 0 : _slotProps_requiredMark.className),
5131
+ children: "*"
5132
+ }))
5148
5133
  }),
5149
5134
  jsx(Popover, {
5150
5135
  open: isOpen,
@@ -5694,17 +5679,14 @@ function formatRange(range, locale) {
5694
5679
  "data-testid": testId,
5695
5680
  className: cn(v.root(), sx, themeSlotProps == null ? void 0 : (_themeSlotProps_root = themeSlotProps.root) == null ? void 0 : _themeSlotProps_root.className, slotProps == null ? void 0 : (_slotProps_root = slotProps.root) == null ? void 0 : _slotProps_root.className),
5696
5681
  children: [
5697
- label && jsxs("label", {
5682
+ label && jsx("label", {
5698
5683
  htmlFor: fieldId,
5699
5684
  className: cn(v.label(), themeSlotProps == null ? void 0 : (_themeSlotProps_label = themeSlotProps.label) == null ? void 0 : _themeSlotProps_label.className, slotProps == null ? void 0 : (_slotProps_label = slotProps.label) == null ? void 0 : _slotProps_label.className),
5700
- children: [
5701
- renderLabelWithTooltip(label, tooltipConfig),
5702
- required && jsx("span", {
5703
- "aria-hidden": "true",
5704
- className: cn(v.requiredMark(), themeSlotProps == null ? void 0 : (_themeSlotProps_requiredMark = themeSlotProps.requiredMark) == null ? void 0 : _themeSlotProps_requiredMark.className, slotProps == null ? void 0 : (_slotProps_requiredMark = slotProps.requiredMark) == null ? void 0 : _slotProps_requiredMark.className),
5705
- children: "*"
5706
- })
5707
- ]
5685
+ children: renderLabelWithTooltip(label, tooltipConfig, required && jsx("span", {
5686
+ "aria-hidden": "true",
5687
+ className: cn(v.requiredMark(), themeSlotProps == null ? void 0 : (_themeSlotProps_requiredMark = themeSlotProps.requiredMark) == null ? void 0 : _themeSlotProps_requiredMark.className, slotProps == null ? void 0 : (_slotProps_requiredMark = slotProps.requiredMark) == null ? void 0 : _slotProps_requiredMark.className),
5688
+ children: "*"
5689
+ }))
5708
5690
  }),
5709
5691
  jsx(Popover, {
5710
5692
  open: isOpen,
@@ -10612,16 +10594,13 @@ Slider.displayName = 'Slider';
10612
10594
  className: rootClasses,
10613
10595
  "data-testid": testId,
10614
10596
  children: [
10615
- label != null && jsxs("label", {
10597
+ label != null && jsx("label", {
10616
10598
  htmlFor: controlId,
10617
10599
  className: labelClasses,
10618
- children: [
10619
- renderLabelWithTooltip(label, tooltipConfig),
10620
- required && jsx("span", {
10621
- className: requiredMarkClasses,
10622
- children: "*"
10623
- })
10624
- ]
10600
+ children: renderLabelWithTooltip(label, tooltipConfig, required && jsx("span", {
10601
+ className: requiredMarkClasses,
10602
+ children: "*"
10603
+ }))
10625
10604
  }),
10626
10605
  jsxs(RadixPopover.Root, {
10627
10606
  open: isOpen,
@@ -19427,6 +19406,6 @@ function SearchIcon(props) {
19427
19406
  */ // ───── Components ─────
19428
19407
  /**
19429
19408
  * Package version (synced with `package.json` at publish time).
19430
- */ const VERSION = '1.5.0';
19409
+ */ const VERSION = '1.5.1';
19431
19410
 
19432
19411
  export { AVATAR_SOFT_FALLBACK, AVATAR_TONE_FALLBACK, Accordion, Alert, AlertTitle, AppShell, AspectRatio, Autocomplete, Avatar, AvatarGroup, Badge, Box, Breadcrumbs, Button, Calendar, Card, CardActionArea, CardContent, Checkbox, Chip, ConfirmDialogProvider, Container, DRAWER_SIZE_PRESETS, DataGrid, DatePicker, DateRangePicker, DateTimePicker, Dialog, Divider, Drawer, Grid, ICON_BUTTON_BASE, ICON_BUTTON_SIZE_OVERRIDES, IconButton, Image, LeftNav, Link, Menu, MenuContent, MenuItem, MenuLabel, MenuSeparator, MenuSkeleton, MenuTrigger, NumberField, OTPField, Pagination, Popover, Progress, RadioGroup, RenderButton, RenderChip, RenderText, RenderTwoLine, RowActionsMenu, SPINNER_COLORS, SPINNER_STROKE_WIDTH, SPINNER_TRACK_OPACITY, Select, Skeleton, Slider, SnackbarProvider, Spinner, Stack, Step, Stepper, Switch, Table, Tabs, TextField, Textarea, TimePicker, Tooltip, TopBar, Typography, VERSION, Video, VisuallyHidden, accordionVariants, alertVariants, appShellVariants, autocompleteVariants, avatarVariants, badgeVariants, boxVariants, breadcrumbsVariants, buttonVariants, calendarDayVariants, calendarVariants, checkboxVariants, chipVariants, cn, confirmDialogVariants, containerVariants, dataGridVariants, datePickerVariants, dateRangeDayVariants, dateRangePickerVariants, dateTimePickerVariants, dialogVariants, dividerLineVariants, dividerVariants, drawerVariants, getNestedValue, gridVariants, imageVariants, leftNavVariants, linkVariants, menuVariants, numberFieldVariants, otpFieldVariants, paginationVariants, popoverVariants, progressVariants, radioGroupVariants, selectVariants, skeletonVariants, sliderVariants, snackbarVariants, spinnerVariants, stackVariants, stepperVariants, switchVariants, tableVariants, tabsVariants, textFieldVariants, textareaVariants, timePickerVariants, tooltipVariants, topBarVariants, typographyVariants, useAccessState, useConfirm, useSnackbar, useStep, videoVariants };
@@ -1 +1 @@
1
- {"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../../../src/components/Autocomplete/Autocomplete.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EACV,kBAAkB,EAClB,iBAAiB,EAElB,MAAM,yBAAyB,CAAC;AA8FjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,YAAY,CAAC,OAAO,GAAG,kBAAkB,EACvD,KAAK,EAAE,iBAAiB,CAAC,OAAO,CAAC,kDAi6BlC"}
1
+ {"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../../../src/components/Autocomplete/Autocomplete.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EACV,kBAAkB,EAClB,iBAAiB,EAElB,MAAM,yBAAyB,CAAC;AA8FjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,YAAY,CAAC,OAAO,GAAG,kBAAkB,EACvD,KAAK,EAAE,iBAAiB,CAAC,OAAO,CAAC,kDAo6BlC"}
@@ -1 +1 @@
1
- {"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../../src/components/DatePicker/DatePicker.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAqD7D;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,eAAe,kDAyOjD"}
1
+ {"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../../src/components/DatePicker/DatePicker.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAqD7D;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,eAAe,kDA4OjD"}
@@ -1 +1 @@
1
- {"version":3,"file":"DateRangePicker.d.ts","sourceRoot":"","sources":["../../../../src/components/DateRangePicker/DateRangePicker.tsx"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAoQvE;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,oBAAoB,kDAyN3D"}
1
+ {"version":3,"file":"DateRangePicker.d.ts","sourceRoot":"","sources":["../../../../src/components/DateRangePicker/DateRangePicker.tsx"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAoQvE;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,oBAAoB,kDA4N3D"}
@@ -1 +1 @@
1
- {"version":3,"file":"DateTimePicker.d.ts","sourceRoot":"","sources":["../../../../src/components/DateTimePicker/DateTimePicker.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AA8ErE;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,mBAAmB,kDAsPzD"}
1
+ {"version":3,"file":"DateTimePicker.d.ts","sourceRoot":"","sources":["../../../../src/components/DateTimePicker/DateTimePicker.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AA8ErE;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,mBAAmB,kDAyPzD"}
@@ -1 +1 @@
1
- {"version":3,"file":"NumberField.d.ts","sourceRoot":"","sources":["../../../../src/components/NumberField/NumberField.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAuC/D;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,kDAwQlD"}
1
+ {"version":3,"file":"NumberField.d.ts","sourceRoot":"","sources":["../../../../src/components/NumberField/NumberField.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAuC/D;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,kDA2QlD"}
@@ -1 +1 @@
1
- {"version":3,"file":"OTPField.d.ts","sourceRoot":"","sources":["../../../../src/components/OTPField/OTPField.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAgB,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAgBvE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,kDAgN5C"}
1
+ {"version":3,"file":"OTPField.d.ts","sourceRoot":"","sources":["../../../../src/components/OTPField/OTPField.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAgB,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAgBvE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,kDAmN5C"}
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/RadioGroup/RadioGroup.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,kDA+PhD"}
1
+ {"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/RadioGroup/RadioGroup.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,kDAkQhD"}
@@ -1 +1 @@
1
- {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AAYf,OAAO,KAAK,EAIV,WAAW,EACX,WAAW,EACZ,MAAM,mBAAmB,CAAC;AAulB3B;;;;;;;GAOG;AACH,eAAO,MAAM,MAAM,EAA8B,CAAC,CAAC,SAAS,WAAW,GAAG,MAAM,EAC9E,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAA;CAAE,KAC3D,YAAY,GAAG,IAAI,CAAC"}
1
+ {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AAYf,OAAO,KAAK,EAIV,WAAW,EACX,WAAW,EACZ,MAAM,mBAAmB,CAAC;AA0lB3B;;;;;;;GAOG;AACH,eAAO,MAAM,MAAM,EAA8B,CAAC,CAAC,SAAS,WAAW,GAAG,MAAM,EAC9E,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAA;CAAE,KAC3D,YAAY,GAAG,IAAI,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,kDA0N9C"}
1
+ {"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,kDA6N9C"}
@@ -1 +1 @@
1
- {"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../../src/components/Textarea/Textarea.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD;;;;;;;;;;;;GAYG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,kDA4K5C"}
1
+ {"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../../src/components/Textarea/Textarea.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD;;;;;;;;;;;;GAYG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,kDA+K5C"}
@@ -1 +1 @@
1
- {"version":3,"file":"TimePicker.d.ts","sourceRoot":"","sources":["../../../../src/components/TimePicker/TimePicker.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAkB7D;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,eAAe,kDA6OjD"}
1
+ {"version":3,"file":"TimePicker.d.ts","sourceRoot":"","sources":["../../../../src/components/TimePicker/TimePicker.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAkB7D;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,eAAe,kDAgPjD"}
@@ -35,9 +35,15 @@ export declare function normalizeFieldTooltip(tooltip: FieldTooltipProp | undefi
35
35
  */
36
36
  export declare function resolveFieldTooltip(instance: FieldTooltipProp | undefined, themeDefault: FieldTooltipProp | undefined): FieldTooltipConfig | null;
37
37
  /**
38
- * Compose a label node with its help-tooltip trigger. Pass the resolved
39
- * config (from {@link resolveFieldTooltip}) or `null`. Returns the plain
40
- * label when there is no tooltip.
38
+ * Compose the primary label block — `label` plus its optional `required`
39
+ * mark — with the help-tooltip trigger. The required asterisk stays part
40
+ * of the primary block; the `ⓘ` is secondary and sits before/after that
41
+ * whole block. Returns the plain primary block when there is no tooltip.
42
+ *
43
+ * @param label - the label node.
44
+ * @param config - resolved tooltip config (from {@link resolveFieldTooltip}) or `null`.
45
+ * @param requiredMark - the required-asterisk node (or falsy), rendered as
46
+ * part of the primary block, immediately after the label.
41
47
  */
42
- export declare function renderLabelWithTooltip(label: ReactNode, config: FieldTooltipConfig | null): ReactNode;
48
+ export declare function renderLabelWithTooltip(label: ReactNode, config: FieldTooltipConfig | null, requiredMark?: ReactNode): ReactNode;
43
49
  //# sourceMappingURL=fieldTooltip.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fieldTooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/_shared/fieldTooltip.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,oDAAoD;AACpD,MAAM,WAAW,kBAAkB;IACjC,wDAAwD;IACxD,OAAO,EAAE,SAAS,CAAC;IACnB,4DAA4D;IAC5D,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC9B,sDAAsD;IACtD,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;CAC5C;AAED,iFAAiF;AACjF,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,kBAAkB,CAAC;AAE3D,qEAAqE;AACrE,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,gBAAgB,GAAG,SAAS,GACpC,kBAAkB,GAAG,IAAI,CAG3B;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,gBAAgB,GAAG,SAAS,EACtC,YAAY,EAAE,gBAAgB,GAAG,SAAS,GACzC,kBAAkB,GAAG,IAAI,CAO3B;AA0CD;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,SAAS,EAChB,MAAM,EAAE,kBAAkB,GAAG,IAAI,GAChC,SAAS,CAcX"}
1
+ {"version":3,"file":"fieldTooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/_shared/fieldTooltip.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,oDAAoD;AACpD,MAAM,WAAW,kBAAkB;IACjC,wDAAwD;IACxD,OAAO,EAAE,SAAS,CAAC;IACnB,4DAA4D;IAC5D,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC9B,sDAAsD;IACtD,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;CAC5C;AAED,iFAAiF;AACjF,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,kBAAkB,CAAC;AAE3D,qEAAqE;AACrE,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,gBAAgB,GAAG,SAAS,GACpC,kBAAkB,GAAG,IAAI,CAG3B;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,gBAAgB,GAAG,SAAS,EACtC,YAAY,EAAE,gBAAgB,GAAG,SAAS,GACzC,kBAAkB,GAAG,IAAI,CAO3B;AA0CD;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,SAAS,EAChB,MAAM,EAAE,kBAAkB,GAAG,IAAI,EACjC,YAAY,CAAC,EAAE,SAAS,GACvB,SAAS,CAsBX"}
@@ -195,5 +195,5 @@ export type { VariantProps } from 'tailwind-variants';
195
195
  /**
196
196
  * Package version (synced with `package.json` at publish time).
197
197
  */
198
- export declare const VERSION = "1.5.0";
198
+ export declare const VERSION = "1.5.1";
199
199
  //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dashforge/tw",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.esm.js",
@@ -35,15 +35,15 @@
35
35
  "tailwind-merge": "^3.0.0",
36
36
  "tailwind-variants": "^3.1.1",
37
37
  "@dashforge/calendar-core": "1.0.0",
38
+ "@dashforge/ui-core": "1.0.0",
38
39
  "@dashforge/forms": "1.0.0",
39
- "@dashforge/rbac": "1.0.0",
40
- "@dashforge/ui-core": "1.0.0"
40
+ "@dashforge/rbac": "1.0.0"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "react": "^18.0.0 || ^19.0.0",
44
44
  "tailwindcss": ">=3.4.1",
45
- "@dashforge/tw-tokens": "1.2.0",
46
- "@dashforge/tw-theme": "1.2.0"
45
+ "@dashforge/tw-theme": "1.2.0",
46
+ "@dashforge/tw-tokens": "1.2.0"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@vitejs/plugin-react": "*",