@norges-domstoler/dds-components 0.0.0-dev-20251107074733 → 0.0.0-dev-20251111115604
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +19 -14
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +13 -2
- package/dist/index.d.ts +13 -2
- package/dist/index.js +103 -52
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +150 -99
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -693,6 +693,8 @@ interface PrimitiveLayoutProps {
|
|
|
693
693
|
rowGap?: ResponsiveProp<Property.RowGap | SpacingScale>;
|
|
694
694
|
/** CSS `column-gap`. Støtter standardverdier og dds spacing tokens skala, per brekkpunkt eller samme for alle skjermstørrelser. */
|
|
695
695
|
columnGap?: ResponsiveProp<Property.ColumnGap | SpacingScale>;
|
|
696
|
+
/** CSS `word-break`. Støtter verdi per brekkpunkt eller samme for alle skjermstørrelser. */
|
|
697
|
+
wordBreak?: ResponsiveProp<Property.WordBreak>;
|
|
696
698
|
}
|
|
697
699
|
type ResponsiveProps = PrimitiveDisplayProps & PrimitiveLayoutProps;
|
|
698
700
|
type ResponsiveStackProps = Omit<ResponsiveProps, 'display' | 'flexDirection'>;
|
|
@@ -2726,6 +2728,8 @@ type DateFieldProps<T extends DateValue$1 = CalendarDate> = AriaDateFieldOptions
|
|
|
2726
2728
|
groupProps?: ReturnType<typeof useDatePicker>['groupProps'];
|
|
2727
2729
|
ref?: Ref<HTMLDivElement>;
|
|
2728
2730
|
clearable?: boolean;
|
|
2731
|
+
tipId?: string;
|
|
2732
|
+
errorMessageId?: string;
|
|
2729
2733
|
} & Pick<InputProps, 'componentSize' | 'errorMessage' | 'tip' | 'disabled' | 'style' | 'width' | 'className'>;
|
|
2730
2734
|
|
|
2731
2735
|
interface DatePickerProps extends Omit<AriaDatePickerProps<CalendarDate>, 'granularity'>, Pick<DateFieldProps<CalendarDate>, 'componentSize' | 'tip' | 'style'>, Pick<ResponsiveProps, 'width'> {
|
|
@@ -3136,12 +3140,19 @@ type InputMessageProps = BaseComponentProps<HTMLDivElement, {
|
|
|
3136
3140
|
* @default "error"
|
|
3137
3141
|
*/
|
|
3138
3142
|
messageType: InputMessageType;
|
|
3139
|
-
}
|
|
3143
|
+
} & Pick<ResponsiveProps, 'margin' | 'marginInline' | 'marginBlock'>>;
|
|
3140
3144
|
declare const InputMessage: {
|
|
3141
3145
|
({ message, messageType, id, className, htmlProps, children, ...rest }: InputMessageProps): react_jsx_runtime.JSX.Element;
|
|
3142
3146
|
displayName: string;
|
|
3143
3147
|
};
|
|
3144
|
-
|
|
3148
|
+
interface RenderInputMessageProps {
|
|
3149
|
+
tip?: string;
|
|
3150
|
+
tipId?: string;
|
|
3151
|
+
errorMessage?: string;
|
|
3152
|
+
errorMessageId?: string;
|
|
3153
|
+
noSpacing?: boolean;
|
|
3154
|
+
}
|
|
3155
|
+
declare const renderInputMessage: ({ tip, tipId, errorMessage, errorMessageId, noSpacing, }: RenderInputMessageProps) => react_jsx_runtime.JSX.Element;
|
|
3145
3156
|
|
|
3146
3157
|
type FormSummaryHeaderProps = ComponentPropsWithRef<'div'>;
|
|
3147
3158
|
declare function FormSummaryHeader({ ...props }: FormSummaryHeaderProps): react_jsx_runtime.JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -693,6 +693,8 @@ interface PrimitiveLayoutProps {
|
|
|
693
693
|
rowGap?: ResponsiveProp<Property.RowGap | SpacingScale>;
|
|
694
694
|
/** CSS `column-gap`. Støtter standardverdier og dds spacing tokens skala, per brekkpunkt eller samme for alle skjermstørrelser. */
|
|
695
695
|
columnGap?: ResponsiveProp<Property.ColumnGap | SpacingScale>;
|
|
696
|
+
/** CSS `word-break`. Støtter verdi per brekkpunkt eller samme for alle skjermstørrelser. */
|
|
697
|
+
wordBreak?: ResponsiveProp<Property.WordBreak>;
|
|
696
698
|
}
|
|
697
699
|
type ResponsiveProps = PrimitiveDisplayProps & PrimitiveLayoutProps;
|
|
698
700
|
type ResponsiveStackProps = Omit<ResponsiveProps, 'display' | 'flexDirection'>;
|
|
@@ -2726,6 +2728,8 @@ type DateFieldProps<T extends DateValue$1 = CalendarDate> = AriaDateFieldOptions
|
|
|
2726
2728
|
groupProps?: ReturnType<typeof useDatePicker>['groupProps'];
|
|
2727
2729
|
ref?: Ref<HTMLDivElement>;
|
|
2728
2730
|
clearable?: boolean;
|
|
2731
|
+
tipId?: string;
|
|
2732
|
+
errorMessageId?: string;
|
|
2729
2733
|
} & Pick<InputProps, 'componentSize' | 'errorMessage' | 'tip' | 'disabled' | 'style' | 'width' | 'className'>;
|
|
2730
2734
|
|
|
2731
2735
|
interface DatePickerProps extends Omit<AriaDatePickerProps<CalendarDate>, 'granularity'>, Pick<DateFieldProps<CalendarDate>, 'componentSize' | 'tip' | 'style'>, Pick<ResponsiveProps, 'width'> {
|
|
@@ -3136,12 +3140,19 @@ type InputMessageProps = BaseComponentProps<HTMLDivElement, {
|
|
|
3136
3140
|
* @default "error"
|
|
3137
3141
|
*/
|
|
3138
3142
|
messageType: InputMessageType;
|
|
3139
|
-
}
|
|
3143
|
+
} & Pick<ResponsiveProps, 'margin' | 'marginInline' | 'marginBlock'>>;
|
|
3140
3144
|
declare const InputMessage: {
|
|
3141
3145
|
({ message, messageType, id, className, htmlProps, children, ...rest }: InputMessageProps): react_jsx_runtime.JSX.Element;
|
|
3142
3146
|
displayName: string;
|
|
3143
3147
|
};
|
|
3144
|
-
|
|
3148
|
+
interface RenderInputMessageProps {
|
|
3149
|
+
tip?: string;
|
|
3150
|
+
tipId?: string;
|
|
3151
|
+
errorMessage?: string;
|
|
3152
|
+
errorMessageId?: string;
|
|
3153
|
+
noSpacing?: boolean;
|
|
3154
|
+
}
|
|
3155
|
+
declare const renderInputMessage: ({ tip, tipId, errorMessage, errorMessageId, noSpacing, }: RenderInputMessageProps) => react_jsx_runtime.JSX.Element;
|
|
3145
3156
|
|
|
3146
3157
|
type FormSummaryHeaderProps = ComponentPropsWithRef<'div'>;
|
|
3147
3158
|
declare function FormSummaryHeader({ ...props }: FormSummaryHeaderProps): react_jsx_runtime.JSX.Element;
|
package/dist/index.js
CHANGED
|
@@ -1444,6 +1444,7 @@ var layout_default = {
|
|
|
1444
1444
|
"dds-o-y": "layout_dds-o-y",
|
|
1445
1445
|
"dds-display": "layout_dds-display",
|
|
1446
1446
|
"dds-text-align": "layout_dds-text-align",
|
|
1447
|
+
"dds-word-break": "layout_dds-word-break",
|
|
1447
1448
|
"dds-flex-dir": "layout_dds-flex-dir",
|
|
1448
1449
|
"dds-gap": "layout_dds-gap",
|
|
1449
1450
|
"dds-c-gap": "layout_dds-c-gap",
|
|
@@ -5344,7 +5345,6 @@ function convertBooleanishToBoolean(value) {
|
|
|
5344
5345
|
// src/components/InputMessage/InputMessage.module.css
|
|
5345
5346
|
var InputMessage_default = {
|
|
5346
5347
|
container: "InputMessage_container",
|
|
5347
|
-
"container--error": "InputMessage_container--error",
|
|
5348
5348
|
icon: "InputMessage_icon"
|
|
5349
5349
|
};
|
|
5350
5350
|
|
|
@@ -5360,41 +5360,72 @@ var InputMessage = ({
|
|
|
5360
5360
|
...rest
|
|
5361
5361
|
}) => {
|
|
5362
5362
|
const isError = messageType === "error";
|
|
5363
|
-
|
|
5364
|
-
"
|
|
5363
|
+
const commonProps = {
|
|
5364
|
+
display: "flex",
|
|
5365
|
+
width: "fit-content",
|
|
5366
|
+
maxWidth: "100%",
|
|
5367
|
+
wordBreak: "break-word",
|
|
5368
|
+
...getBaseHTMLProps(id, cn(className, InputMessage_default.container), htmlProps, rest)
|
|
5369
|
+
};
|
|
5370
|
+
const tgCommonProps = {
|
|
5371
|
+
as: "span",
|
|
5372
|
+
children: message != null ? message : children
|
|
5373
|
+
};
|
|
5374
|
+
return isError ? /* @__PURE__ */ (0, import_jsx_runtime213.jsxs)(
|
|
5375
|
+
Paper,
|
|
5365
5376
|
{
|
|
5366
|
-
...
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
),
|
|
5377
|
+
...commonProps,
|
|
5378
|
+
gap: "x0.25",
|
|
5379
|
+
padding: "x0.25 x0.5",
|
|
5380
|
+
background: "surface-danger-default",
|
|
5381
|
+
borderRadius: "surface",
|
|
5372
5382
|
children: [
|
|
5373
|
-
|
|
5383
|
+
/* @__PURE__ */ (0, import_jsx_runtime213.jsx)(
|
|
5384
|
+
Icon,
|
|
5385
|
+
{
|
|
5386
|
+
icon: ErrorIcon,
|
|
5387
|
+
iconSize: "small",
|
|
5388
|
+
className: InputMessage_default.icon,
|
|
5389
|
+
color: "icon-on-danger-default"
|
|
5390
|
+
}
|
|
5391
|
+
),
|
|
5374
5392
|
/* @__PURE__ */ (0, import_jsx_runtime213.jsx)(
|
|
5375
5393
|
Typography,
|
|
5376
5394
|
{
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
children: message != null ? message : children
|
|
5395
|
+
...tgCommonProps,
|
|
5396
|
+
typographyType: "bodySmall",
|
|
5397
|
+
color: "textDefault"
|
|
5381
5398
|
}
|
|
5382
5399
|
)
|
|
5383
5400
|
]
|
|
5384
5401
|
}
|
|
5385
|
-
)
|
|
5402
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(Box, { ...commonProps, children: /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(
|
|
5403
|
+
Typography,
|
|
5404
|
+
{
|
|
5405
|
+
...tgCommonProps,
|
|
5406
|
+
typographyType: "bodyXsmall",
|
|
5407
|
+
color: "textSubtle"
|
|
5408
|
+
}
|
|
5409
|
+
) });
|
|
5386
5410
|
};
|
|
5387
5411
|
InputMessage.displayName = "InputMessage";
|
|
5388
|
-
var renderInputMessage = (
|
|
5389
|
-
|
|
5412
|
+
var renderInputMessage = ({
|
|
5413
|
+
tip,
|
|
5414
|
+
tipId,
|
|
5415
|
+
errorMessage,
|
|
5416
|
+
errorMessageId,
|
|
5417
|
+
noSpacing
|
|
5418
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime213.jsxs)(import_jsx_runtime213.Fragment, { children: [
|
|
5419
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(
|
|
5390
5420
|
InputMessage,
|
|
5391
5421
|
{
|
|
5392
5422
|
message: errorMessage,
|
|
5393
5423
|
messageType: "error",
|
|
5394
|
-
id: errorMessageId
|
|
5424
|
+
id: errorMessageId,
|
|
5425
|
+
marginBlock: !noSpacing ? "x0.125 0" : void 0
|
|
5395
5426
|
}
|
|
5396
5427
|
),
|
|
5397
|
-
tip &&
|
|
5428
|
+
tip && !errorMessage && /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(InputMessage, { message: tip, messageType: "tip", id: tipId })
|
|
5398
5429
|
] });
|
|
5399
5430
|
|
|
5400
5431
|
// src/components/SelectionControl/Checkbox/CheckboxGroup.tsx
|
|
@@ -5446,7 +5477,7 @@ var CheckboxGroup = (props) => {
|
|
|
5446
5477
|
readOnly,
|
|
5447
5478
|
showRequiredStyling
|
|
5448
5479
|
}),
|
|
5449
|
-
renderInputMessage(tip, tipId),
|
|
5480
|
+
renderInputMessage({ tip, tipId }),
|
|
5450
5481
|
/* @__PURE__ */ (0, import_jsx_runtime214.jsx)(CheckboxGroupContext, { value: { ...contextProps }, children: /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
|
|
5451
5482
|
"div",
|
|
5452
5483
|
{
|
|
@@ -5457,7 +5488,7 @@ var CheckboxGroup = (props) => {
|
|
|
5457
5488
|
children
|
|
5458
5489
|
}
|
|
5459
5490
|
) }),
|
|
5460
|
-
renderInputMessage(
|
|
5491
|
+
renderInputMessage({ errorMessage, errorMessageId })
|
|
5461
5492
|
]
|
|
5462
5493
|
}
|
|
5463
5494
|
);
|
|
@@ -5638,7 +5669,7 @@ var RadioButtonGroup = ({
|
|
|
5638
5669
|
readOnly,
|
|
5639
5670
|
showRequiredStyling
|
|
5640
5671
|
}),
|
|
5641
|
-
renderInputMessage(tip, tipId),
|
|
5672
|
+
renderInputMessage({ tip, tipId }),
|
|
5642
5673
|
/* @__PURE__ */ (0, import_jsx_runtime216.jsx)(RadioButtonGroupContext, { value: { ...contextProps }, children: /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
|
|
5643
5674
|
"div",
|
|
5644
5675
|
{
|
|
@@ -5650,7 +5681,7 @@ var RadioButtonGroup = ({
|
|
|
5650
5681
|
children
|
|
5651
5682
|
}
|
|
5652
5683
|
) }),
|
|
5653
|
-
renderInputMessage(
|
|
5684
|
+
renderInputMessage({ errorMessage, errorMessageId })
|
|
5654
5685
|
]
|
|
5655
5686
|
}
|
|
5656
5687
|
);
|
|
@@ -5800,7 +5831,7 @@ var CardSelectableGroup = ({
|
|
|
5800
5831
|
);
|
|
5801
5832
|
return hasErrorMessage ? /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)("div", { children: [
|
|
5802
5833
|
mainContent,
|
|
5803
|
-
renderInputMessage(
|
|
5834
|
+
renderInputMessage({ errorMessage, errorMessageId })
|
|
5804
5835
|
] }) : mainContent;
|
|
5805
5836
|
};
|
|
5806
5837
|
CardSelectableGroup.displayName = "CardSelectableGroup";
|
|
@@ -6737,7 +6768,9 @@ var typographyTypes = {
|
|
|
6737
6768
|
function DateSegment({
|
|
6738
6769
|
segment,
|
|
6739
6770
|
state,
|
|
6740
|
-
componentSize
|
|
6771
|
+
componentSize,
|
|
6772
|
+
errorMessageId,
|
|
6773
|
+
tipId
|
|
6741
6774
|
}) {
|
|
6742
6775
|
const ref = (0, import_react43.useRef)(null);
|
|
6743
6776
|
const { segmentProps } = (0, import_datepicker.useDateSegment)(segment, state, ref);
|
|
@@ -6745,6 +6778,10 @@ function DateSegment({
|
|
|
6745
6778
|
"div",
|
|
6746
6779
|
{
|
|
6747
6780
|
...segmentProps,
|
|
6781
|
+
"aria-describedby": spaceSeparatedIdListGenerator([
|
|
6782
|
+
errorMessageId ? errorMessageId : void 0,
|
|
6783
|
+
tipId ? tipId : void 0
|
|
6784
|
+
]),
|
|
6748
6785
|
ref,
|
|
6749
6786
|
className: cn(
|
|
6750
6787
|
segmentProps.className,
|
|
@@ -6895,12 +6932,11 @@ function DateInput({
|
|
|
6895
6932
|
clearable,
|
|
6896
6933
|
ref,
|
|
6897
6934
|
afterLabelContent,
|
|
6935
|
+
tipId,
|
|
6936
|
+
errorMessageId,
|
|
6898
6937
|
...props
|
|
6899
6938
|
}) {
|
|
6900
|
-
var _a;
|
|
6901
6939
|
const hasErrorMessage = !!errorMessage;
|
|
6902
|
-
const hasTip = !!tip;
|
|
6903
|
-
const hasMessage = hasErrorMessage || hasTip;
|
|
6904
6940
|
const { isOpen } = (0, import_react44.useContext)(CalendarPopoverContext);
|
|
6905
6941
|
return /* @__PURE__ */ (0, import_jsx_runtime235.jsxs)(
|
|
6906
6942
|
"div",
|
|
@@ -6952,13 +6988,7 @@ function DateInput({
|
|
|
6952
6988
|
]
|
|
6953
6989
|
}
|
|
6954
6990
|
),
|
|
6955
|
-
|
|
6956
|
-
InputMessage,
|
|
6957
|
-
{
|
|
6958
|
-
messageType: hasErrorMessage ? "error" : "tip",
|
|
6959
|
-
message: (_a = errorMessage != null ? errorMessage : tip) != null ? _a : ""
|
|
6960
|
-
}
|
|
6961
|
-
)
|
|
6991
|
+
renderInputMessage({ tip, errorMessage, tipId, errorMessageId })
|
|
6962
6992
|
]
|
|
6963
6993
|
}
|
|
6964
6994
|
);
|
|
@@ -6973,6 +7003,8 @@ function DateField({
|
|
|
6973
7003
|
groupProps,
|
|
6974
7004
|
ref,
|
|
6975
7005
|
clearable,
|
|
7006
|
+
errorMessageId,
|
|
7007
|
+
tipId,
|
|
6976
7008
|
...props
|
|
6977
7009
|
}) {
|
|
6978
7010
|
const { locale } = (0, import_i18n15.useLocale)();
|
|
@@ -7006,6 +7038,8 @@ function DateField({
|
|
|
7006
7038
|
required: props.isRequired,
|
|
7007
7039
|
clearable,
|
|
7008
7040
|
ref,
|
|
7041
|
+
tipId,
|
|
7042
|
+
errorMessageId,
|
|
7009
7043
|
internalRef,
|
|
7010
7044
|
readOnly: props.isReadOnly,
|
|
7011
7045
|
prefix: /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(
|
|
@@ -7038,6 +7072,8 @@ function DateField({
|
|
|
7038
7072
|
{
|
|
7039
7073
|
"aria-readonly": props.isReadOnly,
|
|
7040
7074
|
componentSize,
|
|
7075
|
+
errorMessageId,
|
|
7076
|
+
tipId,
|
|
7041
7077
|
segment,
|
|
7042
7078
|
state
|
|
7043
7079
|
},
|
|
@@ -7095,6 +7131,7 @@ function DatePicker({
|
|
|
7095
7131
|
ref,
|
|
7096
7132
|
...props
|
|
7097
7133
|
}) {
|
|
7134
|
+
var _a;
|
|
7098
7135
|
const lang = useLanguage();
|
|
7099
7136
|
if (!lang) {
|
|
7100
7137
|
throw new Error("DatePicker must be used within a DdsProvider");
|
|
@@ -7108,6 +7145,11 @@ function DatePicker({
|
|
|
7108
7145
|
state,
|
|
7109
7146
|
internalRef
|
|
7110
7147
|
);
|
|
7148
|
+
const hasErrorMessage = !!errorMessage;
|
|
7149
|
+
const hasTip = !!tip;
|
|
7150
|
+
const uniqueId = (_a = props.id) != null ? _a : (0, import_react47.useId)();
|
|
7151
|
+
const errorMessageId = hasErrorMessage ? `${uniqueId}-errorMessage` : void 0;
|
|
7152
|
+
const tipId = hasTip ? `${uniqueId}-tip` : void 0;
|
|
7111
7153
|
return /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(import_i18n17.I18nProvider, { locale: LOCALE[lang], children: /* @__PURE__ */ (0, import_jsx_runtime237.jsxs)(
|
|
7112
7154
|
CalendarPopover,
|
|
7113
7155
|
{
|
|
@@ -7123,8 +7165,11 @@ function DatePicker({
|
|
|
7123
7165
|
ref: combinedRef,
|
|
7124
7166
|
componentSize,
|
|
7125
7167
|
tip,
|
|
7168
|
+
id: uniqueId,
|
|
7126
7169
|
label: props.label,
|
|
7127
7170
|
errorMessage,
|
|
7171
|
+
errorMessageId,
|
|
7172
|
+
tipId,
|
|
7128
7173
|
buttonProps,
|
|
7129
7174
|
style,
|
|
7130
7175
|
width,
|
|
@@ -7179,6 +7224,7 @@ function TimePicker({
|
|
|
7179
7224
|
ref,
|
|
7180
7225
|
...props
|
|
7181
7226
|
}) {
|
|
7227
|
+
var _a;
|
|
7182
7228
|
const lang = useLanguage();
|
|
7183
7229
|
if (!lang) {
|
|
7184
7230
|
throw new Error("TimePicker must be used within a DdsProvider");
|
|
@@ -7193,6 +7239,11 @@ function TimePicker({
|
|
|
7193
7239
|
state,
|
|
7194
7240
|
internalRef
|
|
7195
7241
|
);
|
|
7242
|
+
const hasErrorMessage = !!props.errorMessage;
|
|
7243
|
+
const hasTip = !!props.tip;
|
|
7244
|
+
const uniqueId = (_a = props.id) != null ? _a : (0, import_react48.useId)();
|
|
7245
|
+
const errorMessageId = hasErrorMessage ? `${uniqueId}-errorMessage` : void 0;
|
|
7246
|
+
const tipId = hasTip ? `${uniqueId}-tip` : void 0;
|
|
7196
7247
|
const iconSize = componentSize === "xsmall" ? "small" : "medium";
|
|
7197
7248
|
const disabled = props.isDisabled || !!fieldProps["aria-disabled"];
|
|
7198
7249
|
const formattedSegments = formatTimeSegments(state.segments);
|
|
@@ -7200,6 +7251,8 @@ function TimePicker({
|
|
|
7200
7251
|
DateInput,
|
|
7201
7252
|
{
|
|
7202
7253
|
...props,
|
|
7254
|
+
errorMessageId,
|
|
7255
|
+
tipId,
|
|
7203
7256
|
width,
|
|
7204
7257
|
disabled,
|
|
7205
7258
|
required: props.isRequired,
|
|
@@ -7224,6 +7277,8 @@ function TimePicker({
|
|
|
7224
7277
|
children: formattedSegments.map((segment, i) => /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
|
|
7225
7278
|
DateSegment,
|
|
7226
7279
|
{
|
|
7280
|
+
errorMessageId,
|
|
7281
|
+
tipId,
|
|
7227
7282
|
componentSize,
|
|
7228
7283
|
segment,
|
|
7229
7284
|
state
|
|
@@ -7953,7 +8008,7 @@ var TextArea = ({
|
|
|
7953
8008
|
justifyContent: withCharacterCounter ? hasMessage ? "space-between" : "flex-end" : void 0,
|
|
7954
8009
|
width: withCharacterCounter ? inputWidth : void 0,
|
|
7955
8010
|
children: [
|
|
7956
|
-
renderInputMessage(tip, tipId, errorMessage, errorMessageId),
|
|
8011
|
+
renderInputMessage({ tip, tipId, errorMessage, errorMessageId }),
|
|
7957
8012
|
renderCharCounter(
|
|
7958
8013
|
characterCounterId,
|
|
7959
8014
|
withCharacterCounter,
|
|
@@ -8412,14 +8467,10 @@ var ErrorList = (props) => {
|
|
|
8412
8467
|
return null;
|
|
8413
8468
|
}
|
|
8414
8469
|
if (errors.length === 1) {
|
|
8415
|
-
return
|
|
8416
|
-
|
|
8417
|
-
|
|
8418
|
-
|
|
8419
|
-
message: errors[0].message,
|
|
8420
|
-
messageType: "error"
|
|
8421
|
-
}
|
|
8422
|
-
);
|
|
8470
|
+
return renderInputMessage({
|
|
8471
|
+
errorMessage: errors[0].message,
|
|
8472
|
+
errorMessageId: errors[0].id
|
|
8473
|
+
});
|
|
8423
8474
|
}
|
|
8424
8475
|
return /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(StylelessList, { children: errors.map(({ id, message }) => {
|
|
8425
8476
|
return /* @__PURE__ */ (0, import_jsx_runtime259.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
|
|
@@ -8967,7 +9018,7 @@ var FileUploader = (props) => {
|
|
|
8967
9018
|
readOnly,
|
|
8968
9019
|
afterLabelContent
|
|
8969
9020
|
}),
|
|
8970
|
-
|
|
9021
|
+
renderInputMessage({ tip, tipId }),
|
|
8971
9022
|
inactive ? input : withDragAndDrop ? /* @__PURE__ */ (0, import_jsx_runtime261.jsxs)(
|
|
8972
9023
|
VStack,
|
|
8973
9024
|
{
|
|
@@ -9587,7 +9638,7 @@ function InlineField(props) {
|
|
|
9587
9638
|
renderElement()
|
|
9588
9639
|
] }),
|
|
9589
9640
|
inlineEditVisuallyHidden(descId, emptiable),
|
|
9590
|
-
renderInputMessage(
|
|
9641
|
+
renderInputMessage({ errorMessage, errorMessageId })
|
|
9591
9642
|
] });
|
|
9592
9643
|
}
|
|
9593
9644
|
|
|
@@ -10789,7 +10840,7 @@ function Select({
|
|
|
10789
10840
|
afterLabelContent
|
|
10790
10841
|
}),
|
|
10791
10842
|
/* @__PURE__ */ (0, import_jsx_runtime289.jsx)(import_react_select2.default, { ...reactSelectProps, ref }),
|
|
10792
|
-
renderInputMessage(tip, tipId, errorMessage, errorMessageId)
|
|
10843
|
+
renderInputMessage({ tip, tipId, errorMessage, errorMessageId })
|
|
10793
10844
|
]
|
|
10794
10845
|
}
|
|
10795
10846
|
);
|
|
@@ -10943,7 +10994,7 @@ var NativeSelect = ({
|
|
|
10943
10994
|
}
|
|
10944
10995
|
)
|
|
10945
10996
|
] }),
|
|
10946
|
-
renderInputMessage(tip, tipId, errorMessage, errorMessageId)
|
|
10997
|
+
renderInputMessage({ tip, tipId, errorMessage, errorMessageId })
|
|
10947
10998
|
] });
|
|
10948
10999
|
};
|
|
10949
11000
|
var NativeSelectPlaceholder = ({
|
|
@@ -11935,7 +11986,7 @@ var PhoneInput = ({
|
|
|
11935
11986
|
]
|
|
11936
11987
|
}
|
|
11937
11988
|
),
|
|
11938
|
-
hasMessage && renderInputMessage(tip, tipId, errorMessage, errorMessageId)
|
|
11989
|
+
hasMessage && renderInputMessage({ tip, tipId, errorMessage, errorMessageId })
|
|
11939
11990
|
] });
|
|
11940
11991
|
};
|
|
11941
11992
|
PhoneInput.displayName = "PhoneInput";
|
|
@@ -12558,7 +12609,7 @@ var ProgressBar = ({
|
|
|
12558
12609
|
)
|
|
12559
12610
|
}
|
|
12560
12611
|
),
|
|
12561
|
-
renderInputMessage(tip, tipId, errorMessage, errorMessageId)
|
|
12612
|
+
renderInputMessage({ tip, tipId, errorMessage, errorMessageId })
|
|
12562
12613
|
] });
|
|
12563
12614
|
};
|
|
12564
12615
|
ProgressBar.displayName = "ProgressBar";
|
|
@@ -12894,7 +12945,7 @@ var Search = ({
|
|
|
12894
12945
|
]
|
|
12895
12946
|
}
|
|
12896
12947
|
) : inputGroup,
|
|
12897
|
-
renderInputMessage(tip, tipId)
|
|
12948
|
+
renderInputMessage({ tip, tipId })
|
|
12898
12949
|
] })
|
|
12899
12950
|
] });
|
|
12900
12951
|
};
|
|
@@ -14189,7 +14240,7 @@ var TextInput = ({
|
|
|
14189
14240
|
gap: "x0.5",
|
|
14190
14241
|
width: withCharacterCounter ? inputWidth : void 0,
|
|
14191
14242
|
children: [
|
|
14192
|
-
renderInputMessage(tip, tipId, errorMessage, errorMessageId),
|
|
14243
|
+
renderInputMessage({ tip, tipId, errorMessage, errorMessageId }),
|
|
14193
14244
|
renderCharCounter(
|
|
14194
14245
|
characterCounterId,
|
|
14195
14246
|
withCharacterCounter,
|