@superblocksteam/library 2.0.0-next.98 → 2.0.0-next.99
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/{allPaths-BWbS8jKY.js → allPaths-BwY_k0XB.js} +2 -2
- package/dist/{allPaths-BWbS8jKY.js.map → allPaths-BwY_k0XB.js.map} +1 -1
- package/dist/{allPaths-DLvz7sMG.js → allPaths-D7ld9CX_.js} +2 -2
- package/dist/{allPaths-DLvz7sMG.js.map → allPaths-D7ld9CX_.js.map} +1 -1
- package/dist/{allPathsLoader-1k1s_eYQ.js → allPathsLoader-BK2ifVAz.js} +3 -3
- package/dist/{allPathsLoader-1k1s_eYQ.js.map → allPathsLoader-BK2ifVAz.js.map} +1 -1
- package/dist/{allPathsLoader-BEq28PgG.js → allPathsLoader-BedT2t1j.js} +3 -3
- package/dist/{allPathsLoader-BEq28PgG.js.map → allPathsLoader-BedT2t1j.js.map} +1 -1
- package/dist/{index-CE5Ur-oO.js → index-D_-27jtA.js} +147 -169
- package/dist/{index-CE5Ur-oO.js.map → index-D_-27jtA.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/{splitPathsBySizeLoader-BaYSsfyB.js → splitPathsBySizeLoader-B2GV93jI.js} +2 -2
- package/dist/{splitPathsBySizeLoader-BaYSsfyB.js.map → splitPathsBySizeLoader-B2GV93jI.js.map} +1 -1
- package/dist/{splitPathsBySizeLoader-CCp8V4s7.js → splitPathsBySizeLoader-C5SxMHH4.js} +2 -2
- package/dist/{splitPathsBySizeLoader-CCp8V4s7.js.map → splitPathsBySizeLoader-C5SxMHH4.js.map} +1 -1
- package/dist-types/internal-testing/components/form.d.ts +1 -0
- package/dist-types/lib/user-facing/components/date-picker/index.d.ts +4 -0
- package/dist-types/lib/user-facing/components/date-picker/props.d.ts +4 -0
- package/dist-types/lib/user-facing/components/date-picker/types.d.ts +3 -0
- package/dist-types/lib/user-facing/components/dropdown/dropdown-component.d.ts +1 -1
- package/dist-types/lib/user-facing/components/dropdown/props.d.ts +2 -3
- package/dist-types/lib/user-facing/properties-panel/mixins/appearance-properties.d.ts +1 -0
- package/dist-types/lib/user-facing/themes/constants.d.ts +2 -2
- package/package.json +2 -2
|
@@ -1078,11 +1078,6 @@ intentClass$1(Intent$1.SUCCESS);
|
|
|
1078
1078
|
intentClass$1(Intent$1.WARNING);
|
|
1079
1079
|
intentClass$1(Intent$1.DANGER);
|
|
1080
1080
|
var TEXT_OVERFLOW_ELLIPSIS$1 = "".concat(NS$6, "-text-overflow-ellipsis");
|
|
1081
|
-
var BLOCKQUOTE = "".concat(NS$6, "-blockquote");
|
|
1082
|
-
var CODE = "".concat(NS$6, "-code");
|
|
1083
|
-
var CODE_BLOCK = "".concat(NS$6, "-code-block");
|
|
1084
|
-
var HEADING = "".concat(NS$6, "-heading");
|
|
1085
|
-
var LIST = "".concat(NS$6, "-list");
|
|
1086
1081
|
var BUTTON$1 = "".concat(NS$6, "-button");
|
|
1087
1082
|
var BUTTON_GROUP = "".concat(BUTTON$1, "-group");
|
|
1088
1083
|
var BUTTON_SPINNER$1 = "".concat(BUTTON$1, "-spinner");
|
|
@@ -1096,7 +1091,6 @@ var INPUT_GROUP$1 = "".concat(INPUT$1, "-group");
|
|
|
1096
1091
|
var INPUT_LEFT_CONTAINER$1 = "".concat(INPUT$1, "-left-container");
|
|
1097
1092
|
var INPUT_ACTION$1 = "".concat(INPUT$1, "-action");
|
|
1098
1093
|
var RESIZABLE_INPUT_SPAN = "".concat(NS$6, "-resizable-input-span");
|
|
1099
|
-
var LABEL = "".concat(NS$6, "-label");
|
|
1100
1094
|
var MENU$1 = "".concat(NS$6, "-menu");
|
|
1101
1095
|
var MENU_ITEM$1 = "".concat(MENU$1, "-item");
|
|
1102
1096
|
var MENU_ITEM_IS_SELECTABLE$1 = "".concat(MENU_ITEM$1, "-is-selectable");
|
|
@@ -2690,14 +2684,14 @@ function getLoaderFn$1(options) {
|
|
|
2690
2684
|
if (!(loader === "all")) return [3, 3];
|
|
2691
2685
|
return [4, import(
|
|
2692
2686
|
/* webpackChunkName: "blueprint-icons-all-paths-loader" */
|
|
2693
|
-
"./allPathsLoader-
|
|
2687
|
+
"./allPathsLoader-BedT2t1j.js"
|
|
2694
2688
|
)];
|
|
2695
2689
|
case 2:
|
|
2696
2690
|
return [2, _b2.sent().allPathsLoader];
|
|
2697
2691
|
case 3:
|
|
2698
2692
|
return [4, import(
|
|
2699
2693
|
/* webpackChunkName: "blueprint-icons-split-paths-by-size-loader" */
|
|
2700
|
-
"./splitPathsBySizeLoader-
|
|
2694
|
+
"./splitPathsBySizeLoader-C5SxMHH4.js"
|
|
2701
2695
|
)];
|
|
2702
2696
|
case 4:
|
|
2703
2697
|
return [2, _b2.sent().splitPathsBySizeLoader];
|
|
@@ -3184,24 +3178,6 @@ function renderButtonContents$1(props2) {
|
|
|
3184
3178
|
React.createElement(Icon$3, { key: "rightIcon", icon: rightIcon })
|
|
3185
3179
|
);
|
|
3186
3180
|
}
|
|
3187
|
-
function htmlElement(tagName, tagClassName) {
|
|
3188
|
-
return React.forwardRef(function(props2, ref2) {
|
|
3189
|
-
var className = props2.className, children = props2.children, htmlProps = __rest$B(props2, ["className", "children"]);
|
|
3190
|
-
return React.createElement(tagName, __assign$2(__assign$2({}, htmlProps), { className: classNames(tagClassName, className), ref: ref2 }), children);
|
|
3191
|
-
});
|
|
3192
|
-
}
|
|
3193
|
-
htmlElement("h1", HEADING);
|
|
3194
|
-
htmlElement("h2", HEADING);
|
|
3195
|
-
htmlElement("h3", HEADING);
|
|
3196
|
-
htmlElement("h4", HEADING);
|
|
3197
|
-
htmlElement("h5", HEADING);
|
|
3198
|
-
htmlElement("h6", HEADING);
|
|
3199
|
-
htmlElement("blockquote", BLOCKQUOTE);
|
|
3200
|
-
htmlElement("code", CODE);
|
|
3201
|
-
htmlElement("pre", CODE_BLOCK);
|
|
3202
|
-
var Label = htmlElement("label", LABEL);
|
|
3203
|
-
htmlElement("ol", LIST);
|
|
3204
|
-
htmlElement("ul", LIST);
|
|
3205
3181
|
function _extends$5() {
|
|
3206
3182
|
return _extends$5 = Object.assign ? Object.assign.bind() : function(n2) {
|
|
3207
3183
|
for (var e3 = 1; e3 < arguments.length; e3++) {
|
|
@@ -48906,18 +48882,13 @@ const BUTTON_PADDING = {
|
|
|
48906
48882
|
top: { mode: "px", value: 9 },
|
|
48907
48883
|
bottom: { mode: "px", value: 9 }
|
|
48908
48884
|
};
|
|
48909
|
-
const DROPDOWN_PADDING = {
|
|
48910
|
-
left: Dim.px(10),
|
|
48911
|
-
right: Dim.px(10),
|
|
48912
|
-
top: Dim.px(4),
|
|
48913
|
-
bottom: Dim.px(4)
|
|
48914
|
-
};
|
|
48915
48885
|
const INPUT_PADDING = {
|
|
48916
48886
|
left: Dim.px(10),
|
|
48917
48887
|
right: Dim.px(10),
|
|
48918
48888
|
top: Dim.px(8),
|
|
48919
48889
|
bottom: Dim.px(8)
|
|
48920
48890
|
};
|
|
48891
|
+
const DROPDOWN_PADDING = INPUT_PADDING;
|
|
48921
48892
|
const KEY_VALUE_PADDING = {
|
|
48922
48893
|
left: Dim.px(20),
|
|
48923
48894
|
right: Dim.px(20),
|
|
@@ -118269,6 +118240,16 @@ const labelTextStyle = () => textStyleProp({
|
|
|
118269
118240
|
}
|
|
118270
118241
|
}).default(() => ({
|
|
118271
118242
|
variant: DEFAULT_INPUT_WIDGET_LABEL_STYLE_VARIANT,
|
|
118243
|
+
textColor: {
|
|
118244
|
+
default: Theme.colors.neutral700
|
|
118245
|
+
}
|
|
118246
|
+
}));
|
|
118247
|
+
const inputTextStyle = () => textStyleProp({
|
|
118248
|
+
propertiesPanel: {
|
|
118249
|
+
label: "Input style"
|
|
118250
|
+
}
|
|
118251
|
+
}).default(() => ({
|
|
118252
|
+
variant: DEFAULT_INPUT_WIDGET_INPUT_STYLE_VARIANT,
|
|
118272
118253
|
textColor: {
|
|
118273
118254
|
default: Theme.colors.neutral900
|
|
118274
118255
|
}
|
|
@@ -118349,7 +118330,7 @@ function getDefaultBorderRadius() {
|
|
|
118349
118330
|
}
|
|
118350
118331
|
return createBorderRadiusObject(borderRadius2);
|
|
118351
118332
|
}
|
|
118352
|
-
const textStyle$
|
|
118333
|
+
const textStyle$1 = textStyleProp().default(function() {
|
|
118353
118334
|
return {
|
|
118354
118335
|
variant: "buttonLabel",
|
|
118355
118336
|
textColor: {
|
|
@@ -118403,7 +118384,7 @@ const propertiesDefinition$h = {
|
|
|
118403
118384
|
return !!this.icon;
|
|
118404
118385
|
}
|
|
118405
118386
|
}),
|
|
118406
|
-
textStyle: textStyle$
|
|
118387
|
+
textStyle: textStyle$1,
|
|
118407
118388
|
backgroundColor: colorProp({
|
|
118408
118389
|
label: "Background color",
|
|
118409
118390
|
visibility: "SHOW_NAME",
|
|
@@ -125221,7 +125202,7 @@ const getIconPadding = (paddingValue = INPUT_PADDING.right, iconSize = DEFAULT_I
|
|
|
125221
125202
|
const DEFAULT_LABEL_WIDTH_IN_PERCENT = 30;
|
|
125222
125203
|
const DEFAULT_LABEL_WIDTH_IN_PX = 80;
|
|
125223
125204
|
const WIDGET_PADDING = 1;
|
|
125224
|
-
const labelStyleRaw
|
|
125205
|
+
const labelStyleRaw = {
|
|
125225
125206
|
vertical: `
|
|
125226
125207
|
margin: var(--label-margin) var(--label-margin) var(--label-margin) 0;
|
|
125227
125208
|
`,
|
|
@@ -125231,10 +125212,10 @@ const labelStyleRaw$1 = {
|
|
|
125231
125212
|
};
|
|
125232
125213
|
const labelStyle = {
|
|
125233
125214
|
vertical: Ae$1`
|
|
125234
|
-
${labelStyleRaw
|
|
125215
|
+
${labelStyleRaw.vertical}
|
|
125235
125216
|
`,
|
|
125236
125217
|
horizontal: Ae$1`
|
|
125237
|
-
${labelStyleRaw
|
|
125218
|
+
${labelStyleRaw.horizontal}
|
|
125238
125219
|
`
|
|
125239
125220
|
};
|
|
125240
125221
|
const getLabelWidthCssValue = (dimension) => {
|
|
@@ -125685,7 +125666,7 @@ const ControlGroupClassName = styleAsClass`
|
|
|
125685
125666
|
&[data-vertical="true"] {
|
|
125686
125667
|
&&&& {
|
|
125687
125668
|
label {
|
|
125688
|
-
${labelStyleRaw
|
|
125669
|
+
${labelStyleRaw.vertical}
|
|
125689
125670
|
flex: 0 0 auto;
|
|
125690
125671
|
max-width: 100%;
|
|
125691
125672
|
}
|
|
@@ -125702,7 +125683,7 @@ const ControlGroupClassName = styleAsClass`
|
|
|
125702
125683
|
align-items: baseline;
|
|
125703
125684
|
|
|
125704
125685
|
label {
|
|
125705
|
-
${labelStyleRaw
|
|
125686
|
+
${labelStyleRaw.horizontal}
|
|
125706
125687
|
text-align: left;
|
|
125707
125688
|
align-self: flex-start;
|
|
125708
125689
|
|
|
@@ -126469,7 +126450,7 @@ const _InputComponent = class _InputComponent extends React__default.Component {
|
|
|
126469
126450
|
"data-disabled": this.props.isDisabled,
|
|
126470
126451
|
children: [
|
|
126471
126452
|
this.props.label ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
126472
|
-
|
|
126453
|
+
"label",
|
|
126473
126454
|
{
|
|
126474
126455
|
className: `${CLASS_NAMES.ELLIPSIS_TEXT} ${this.props.isLoading ? SKELETON : ""} ${this.props.labelClassName ?? CLASS_NAMES.INPUT_LABEL} ${this.props.isDisabled ? CLASS_NAMES.DISABLED_MODIFIER : ""}
|
|
126475
126456
|
`,
|
|
@@ -126839,16 +126820,6 @@ const textLengthProps = {
|
|
|
126839
126820
|
isRemovable: true
|
|
126840
126821
|
})
|
|
126841
126822
|
};
|
|
126842
|
-
const textStyle$2 = textStyleProp({
|
|
126843
|
-
propertiesPanel: {
|
|
126844
|
-
label: "Input text style"
|
|
126845
|
-
}
|
|
126846
|
-
}).default(() => ({
|
|
126847
|
-
variant: DEFAULT_INPUT_WIDGET_INPUT_STYLE_VARIANT,
|
|
126848
|
-
textColor: {
|
|
126849
|
-
default: Theme.colors.neutral900
|
|
126850
|
-
}
|
|
126851
|
-
}));
|
|
126852
126823
|
const propertiesDefinition$d = {
|
|
126853
126824
|
general: Section.category(PropsPanelCategory.Content).children({
|
|
126854
126825
|
label: Prop.string().readAndWrite().default("").propertiesPanel({
|
|
@@ -126925,7 +126896,7 @@ const propertiesDefinition$d = {
|
|
|
126925
126896
|
controlType: "INPUT_TEXT",
|
|
126926
126897
|
placeholder: "Input text"
|
|
126927
126898
|
}),
|
|
126928
|
-
textStyle:
|
|
126899
|
+
textStyle: inputTextStyle(),
|
|
126929
126900
|
backgroundColor: colorProp({
|
|
126930
126901
|
label: "Background",
|
|
126931
126902
|
helpText: "Changes the color of the background"
|
|
@@ -133905,7 +133876,7 @@ const numberFormatProperty = Prop.string().readAndWrite().default("standard").pr
|
|
|
133905
133876
|
options: NUMBER_FORMATTING_OPTIONS,
|
|
133906
133877
|
helpText: "The display format of the number"
|
|
133907
133878
|
});
|
|
133908
|
-
const textStyle
|
|
133879
|
+
const textStyle = textStyleProp().default(function() {
|
|
133909
133880
|
return {
|
|
133910
133881
|
variant: DEFAULT_TEXT_WIDGET_TEXT_STYLE_VARIANT,
|
|
133911
133882
|
textColor: Theme.typographies.label.textColor
|
|
@@ -133930,7 +133901,7 @@ const propertiesDefinition$b = {
|
|
|
133930
133901
|
})
|
|
133931
133902
|
}),
|
|
133932
133903
|
appearance: Section.category(PropsPanelCategory.Appearance).children({
|
|
133933
|
-
textStyle
|
|
133904
|
+
textStyle,
|
|
133934
133905
|
horizontalAlign: Prop.string().readAndWrite().default("left").propertiesPanel({
|
|
133935
133906
|
label: "Horizontal align",
|
|
133936
133907
|
helpText: "The horizontal alignment of the text relative to the component width",
|
|
@@ -144485,14 +144456,14 @@ function getLoaderFn(options) {
|
|
|
144485
144456
|
if (!(loader === "all")) return [3, 3];
|
|
144486
144457
|
return [4, import(
|
|
144487
144458
|
/* webpackChunkName: "blueprint-icons-all-paths-loader" */
|
|
144488
|
-
"./allPathsLoader-
|
|
144459
|
+
"./allPathsLoader-BK2ifVAz.js"
|
|
144489
144460
|
)];
|
|
144490
144461
|
case 2:
|
|
144491
144462
|
return [2, _b2.sent().allPathsLoader];
|
|
144492
144463
|
case 3:
|
|
144493
144464
|
return [4, import(
|
|
144494
144465
|
/* webpackChunkName: "blueprint-icons-split-paths-by-size-loader" */
|
|
144495
|
-
"./splitPathsBySizeLoader-
|
|
144466
|
+
"./splitPathsBySizeLoader-B2GV93jI.js"
|
|
144496
144467
|
)];
|
|
144497
144468
|
case 4:
|
|
144498
144469
|
return [2, _b2.sent().splitPathsBySizeLoader];
|
|
@@ -152305,6 +152276,32 @@ const dependencies = { "date-fns": "^2.30.0" };
|
|
|
152305
152276
|
const packageJson = {
|
|
152306
152277
|
dependencies
|
|
152307
152278
|
};
|
|
152279
|
+
function getTagElementSpace(element) {
|
|
152280
|
+
return element.clientWidth + 4;
|
|
152281
|
+
}
|
|
152282
|
+
const createCssVariablesForPadding = memoizeOne$1(
|
|
152283
|
+
(hasIcon, inputPadding, iconSize) => {
|
|
152284
|
+
const rightIconPadding = (inputPadding == null ? void 0 : inputPadding.right) ?? Dim.px(0);
|
|
152285
|
+
return generatePaddingVariableAssignmentStyleObject({
|
|
152286
|
+
...inputPadding,
|
|
152287
|
+
left: hasIcon ? getIconPadding(inputPadding == null ? void 0 : inputPadding.left, iconSize) : (inputPadding == null ? void 0 : inputPadding.left) ?? Dimension.px(0),
|
|
152288
|
+
right: rightIconPadding
|
|
152289
|
+
});
|
|
152290
|
+
}
|
|
152291
|
+
);
|
|
152292
|
+
const getClearableIconRight = memoizeOne$1(
|
|
152293
|
+
(allowClearing, inputPadding, iconSize) => {
|
|
152294
|
+
if (!allowClearing) {
|
|
152295
|
+
return 0;
|
|
152296
|
+
}
|
|
152297
|
+
const iconPadding = getIconPadding(
|
|
152298
|
+
inputPadding == null ? void 0 : inputPadding.right,
|
|
152299
|
+
iconSize ?? DEFAULT_ICON_SIZE$1,
|
|
152300
|
+
false
|
|
152301
|
+
);
|
|
152302
|
+
return iconPadding.value;
|
|
152303
|
+
}
|
|
152304
|
+
);
|
|
152308
152305
|
const DatePickerActionsWrapper = qe$1.div`
|
|
152309
152306
|
display: flex;
|
|
152310
152307
|
justify-content: end;
|
|
@@ -152421,14 +152418,6 @@ const getTimePrecision = (dateFormat) => {
|
|
|
152421
152418
|
const isValidDate = (date4) => {
|
|
152422
152419
|
return date4 !== "Invalid date" && moment(date4).isValid();
|
|
152423
152420
|
};
|
|
152424
|
-
const labelStyleRaw = {
|
|
152425
|
-
vertical: Ae$1`
|
|
152426
|
-
align-self: flex-start;
|
|
152427
|
-
`,
|
|
152428
|
-
horizontal: Ae$1`
|
|
152429
|
-
flex-basis: var(--label-width);
|
|
152430
|
-
`
|
|
152431
|
-
};
|
|
152432
152421
|
const StyledControlGroup$1 = qe$1(ControlGroup)`
|
|
152433
152422
|
height: 100%;
|
|
152434
152423
|
&&& {
|
|
@@ -152723,6 +152712,11 @@ class DatePickerComponent extends React__default.Component {
|
|
|
152723
152712
|
const isInputFocused = this.state.isOpen;
|
|
152724
152713
|
const isVertical = !this.props.labelPosition || this.props.labelPosition === "top";
|
|
152725
152714
|
const errorMessages = this.props.errorMessages;
|
|
152715
|
+
const paddingVarDeclarations = createCssVariablesForPadding(
|
|
152716
|
+
!!this.props.icon,
|
|
152717
|
+
this.props.inputPadding,
|
|
152718
|
+
this.props.iconSize
|
|
152719
|
+
);
|
|
152726
152720
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
152727
152721
|
WidgetErrorsWrapper,
|
|
152728
152722
|
{
|
|
@@ -152755,72 +152749,81 @@ class DatePickerComponent extends React__default.Component {
|
|
|
152755
152749
|
]
|
|
152756
152750
|
}
|
|
152757
152751
|
),
|
|
152758
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
152759
|
-
|
|
152760
|
-
|
|
152761
|
-
{
|
|
152762
|
-
|
|
152763
|
-
|
|
152764
|
-
|
|
152765
|
-
|
|
152766
|
-
|
|
152767
|
-
|
|
152768
|
-
|
|
152769
|
-
|
|
152770
|
-
|
|
152771
|
-
|
|
152772
|
-
|
|
152773
|
-
|
|
152774
|
-
|
|
152775
|
-
|
|
152776
|
-
|
|
152777
|
-
|
|
152778
|
-
|
|
152779
|
-
|
|
152780
|
-
|
|
152781
|
-
|
|
152782
|
-
|
|
152783
|
-
|
|
152784
|
-
|
|
152785
|
-
|
|
152786
|
-
|
|
152787
|
-
|
|
152788
|
-
|
|
152789
|
-
|
|
152790
|
-
|
|
152791
|
-
|
|
152792
|
-
|
|
152793
|
-
|
|
152794
|
-
|
|
152795
|
-
|
|
152796
|
-
|
|
152797
|
-
|
|
152798
|
-
|
|
152752
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
152753
|
+
"div",
|
|
152754
|
+
{
|
|
152755
|
+
style: {
|
|
152756
|
+
...FormInputWithErrorWrapperStyle,
|
|
152757
|
+
...paddingVarDeclarations
|
|
152758
|
+
},
|
|
152759
|
+
children: [
|
|
152760
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
152761
|
+
DateInput3,
|
|
152762
|
+
{
|
|
152763
|
+
dateFnsLocaleLoader: localeLoader,
|
|
152764
|
+
timezone: moment.tz.guess(),
|
|
152765
|
+
formatDate: this.formatDisplayDate,
|
|
152766
|
+
placeholder: this.props.placeholder,
|
|
152767
|
+
disabled: this.props.isDisabled,
|
|
152768
|
+
className: `${CLASS_NAMES.DATEPICKER} ${this.state.isOpen ? CLASS_NAMES.POPOVER_WRAPPER : ""} ${this.shouldWrapTime() ? "sb-datepicker-wrapped-time" : ""}`,
|
|
152769
|
+
showActionsBar: false,
|
|
152770
|
+
dayPickerProps: {
|
|
152771
|
+
formatters: {
|
|
152772
|
+
formatMonthCaption: (date4) => date4.toLocaleString("default", { month: "short" })
|
|
152773
|
+
},
|
|
152774
|
+
onSelect: this.onDayChanged,
|
|
152775
|
+
footer: this.getPopoverFooter()
|
|
152776
|
+
},
|
|
152777
|
+
timePickerProps: !showTime ? void 0 : {
|
|
152778
|
+
precision: timePrecision,
|
|
152779
|
+
useAmPm: !this.props.twentyFourHourTime,
|
|
152780
|
+
onChange: this.onTimeChanged
|
|
152781
|
+
},
|
|
152782
|
+
value: currentValue,
|
|
152783
|
+
initialMonth,
|
|
152784
|
+
minDate,
|
|
152785
|
+
maxDate,
|
|
152786
|
+
closeOnSelection: false,
|
|
152787
|
+
inputProps: {
|
|
152788
|
+
className: `${CLASS_NAMES.INPUT} ${this.props.inputClassName ?? ""} ${inputClassNames}`,
|
|
152789
|
+
style: {
|
|
152790
|
+
...this.props.inputStyleOverride,
|
|
152791
|
+
minHeight: this.props.inputLineHeightPx ? `${this.props.inputLineHeightPx + INPUT_ADDITIONAL_MIN_HEIGHT$1}px` : void 0
|
|
152792
|
+
},
|
|
152793
|
+
onClick: this.props.onInputClick,
|
|
152794
|
+
leftElement: this.props.icon ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
152795
|
+
"div",
|
|
152799
152796
|
{
|
|
152800
|
-
|
|
152801
|
-
|
|
152797
|
+
className: `IconWrapper ${CLASS_NAMES.ICON} ${isInputFocused ? CLASS_NAMES.ACTIVE_MODIFIER : ""} ${this.props.isDisabled || this.props.selectedDate === "" || this.props.selectedDate == null ? CLASS_NAMES.DISABLED_MODIFIER : ""} ${!this.props.isValid ? CLASS_NAMES.ERROR_MODIFIER : ""}`,
|
|
152798
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
152799
|
+
DynamicSVG,
|
|
152800
|
+
{
|
|
152801
|
+
iconName: this.props.icon,
|
|
152802
|
+
size: this.props.iconSize ?? DEFAULT_ICON_SIZE$1
|
|
152803
|
+
}
|
|
152804
|
+
)
|
|
152802
152805
|
}
|
|
152803
|
-
)
|
|
152806
|
+
) : void 0,
|
|
152807
|
+
// @ts-expect-error extra props
|
|
152808
|
+
"data-invalid": !this.props.isValid && !this.state.isOpen,
|
|
152809
|
+
"data-active": this.state.isOpen,
|
|
152810
|
+
rightElement: !formatIncludesTimezone(displayFormat) && this.props.showTimezone ? /* @__PURE__ */ jsxRuntimeExports.jsx(Timezone, { timezone: this.displayTimezone }) : void 0,
|
|
152811
|
+
onChange: this.onInputChanged
|
|
152812
|
+
},
|
|
152813
|
+
popoverProps: {
|
|
152814
|
+
...this.props.forceOpen ? { isOpen: this.state.isOpen } : {},
|
|
152815
|
+
onInteraction: this.handleInteraction,
|
|
152816
|
+
className: CLASS_NAMES.DATEPICKER,
|
|
152817
|
+
onClose: this.props.onDatePickerClosed,
|
|
152818
|
+
position: "auto",
|
|
152819
|
+
rootBoundary: "viewport"
|
|
152804
152820
|
}
|
|
152805
|
-
|
|
152806
|
-
|
|
152807
|
-
|
|
152808
|
-
|
|
152809
|
-
|
|
152810
|
-
|
|
152811
|
-
},
|
|
152812
|
-
popoverProps: {
|
|
152813
|
-
...this.props.forceOpen ? { isOpen: this.state.isOpen } : {},
|
|
152814
|
-
onInteraction: this.handleInteraction,
|
|
152815
|
-
className: CLASS_NAMES.DATEPICKER,
|
|
152816
|
-
onClose: this.props.onDatePickerClosed,
|
|
152817
|
-
position: "auto",
|
|
152818
|
-
rootBoundary: "viewport"
|
|
152819
|
-
}
|
|
152820
|
-
}
|
|
152821
|
-
),
|
|
152822
|
-
inlineError
|
|
152823
|
-
] })
|
|
152821
|
+
}
|
|
152822
|
+
),
|
|
152823
|
+
inlineError
|
|
152824
|
+
]
|
|
152825
|
+
}
|
|
152826
|
+
)
|
|
152824
152827
|
]
|
|
152825
152828
|
}
|
|
152826
152829
|
)
|
|
@@ -179633,32 +179636,6 @@ Fuse.config = Config;
|
|
|
179633
179636
|
{
|
|
179634
179637
|
register3(ExtendedSearch);
|
|
179635
179638
|
}
|
|
179636
|
-
function getTagElementSpace(element) {
|
|
179637
|
-
return element.clientWidth + 4;
|
|
179638
|
-
}
|
|
179639
|
-
const createCssVariablesForPadding = memoizeOne$1(
|
|
179640
|
-
(hasIcon, inputPadding, iconSize) => {
|
|
179641
|
-
const rightIconPadding = (inputPadding == null ? void 0 : inputPadding.right) ?? Dim.px(0);
|
|
179642
|
-
return generatePaddingVariableAssignmentStyleObject({
|
|
179643
|
-
...inputPadding,
|
|
179644
|
-
left: hasIcon ? getIconPadding(inputPadding == null ? void 0 : inputPadding.left, iconSize) : (inputPadding == null ? void 0 : inputPadding.left) ?? Dimension.px(0),
|
|
179645
|
-
right: rightIconPadding
|
|
179646
|
-
});
|
|
179647
|
-
}
|
|
179648
|
-
);
|
|
179649
|
-
const getClearableIconRight = memoizeOne$1(
|
|
179650
|
-
(allowClearing, inputPadding, iconSize) => {
|
|
179651
|
-
if (!allowClearing) {
|
|
179652
|
-
return 0;
|
|
179653
|
-
}
|
|
179654
|
-
const iconPadding = getIconPadding(
|
|
179655
|
-
inputPadding == null ? void 0 : inputPadding.right,
|
|
179656
|
-
iconSize ?? DEFAULT_ICON_SIZE$1,
|
|
179657
|
-
false
|
|
179658
|
-
);
|
|
179659
|
-
return iconPadding.value;
|
|
179660
|
-
}
|
|
179661
|
-
);
|
|
179662
179639
|
const TAG_HEIGHT = 26;
|
|
179663
179640
|
const INPUT_SIZE = 36;
|
|
179664
179641
|
const MORE_TAGS_SIZE = 90;
|
|
@@ -180648,17 +180625,6 @@ const normalizeFunction = (val, transformationValue) => {
|
|
|
180648
180625
|
}
|
|
180649
180626
|
return String(val);
|
|
180650
180627
|
};
|
|
180651
|
-
const baseTextStyleProp = createTextStyleCompositeBase();
|
|
180652
|
-
const textStyle = textStyleProp({
|
|
180653
|
-
baseProp: baseTextStyleProp
|
|
180654
|
-
}).default(
|
|
180655
|
-
() => ({
|
|
180656
|
-
variant: DEFAULT_INPUT_WIDGET_INPUT_STYLE_VARIANT,
|
|
180657
|
-
textColor: {
|
|
180658
|
-
default: Theme.colors.neutral900
|
|
180659
|
-
}
|
|
180660
|
-
})
|
|
180661
|
-
);
|
|
180662
180628
|
const propertiesDefinition$8 = {
|
|
180663
180629
|
general: Section.category(PropsPanelCategory.Content).children({
|
|
180664
180630
|
label: Prop.string().readAndWrite().default("").propertiesPanel({
|
|
@@ -180713,7 +180679,7 @@ const propertiesDefinition$8 = {
|
|
|
180713
180679
|
label: "Placeholder",
|
|
180714
180680
|
helpText: "Text to be shown inside of placeholder"
|
|
180715
180681
|
}),
|
|
180716
|
-
textStyle,
|
|
180682
|
+
textStyle: inputTextStyle(),
|
|
180717
180683
|
loadingAnimation: Prop.boolean().propertiesPanel({
|
|
180718
180684
|
label: "Loading animation",
|
|
180719
180685
|
helpText: "Display a loading animation if dependent data is loading"
|
|
@@ -181623,20 +181589,25 @@ const propertiesDefinition$6 = {
|
|
|
181623
181589
|
controlType: "SWITCH"
|
|
181624
181590
|
})
|
|
181625
181591
|
}),
|
|
181626
|
-
layout: Section.category(PropsPanelCategory.Layout).add({
|
|
181592
|
+
layout: Section.category(PropsPanelCategory.Layout).add(padding({ themeValue: DROPDOWN_PADDING, default: DROPDOWN_PADDING })).add({
|
|
181627
181593
|
...size$2(),
|
|
181628
181594
|
...widthWithoutFit()
|
|
181629
181595
|
}).add(margin()).add(visible()),
|
|
181630
181596
|
appearance: Section.category(PropsPanelCategory.Appearance).children({
|
|
181631
181597
|
labelPosition: labelPosition(),
|
|
181632
181598
|
labelStyle: labelTextStyle(),
|
|
181633
|
-
// TODO(code-mode): Add color pickers, border controls, etc.
|
|
181634
181599
|
icon: Prop.string().readAndWrite().default("calendar_today").propertiesPanel({
|
|
181635
181600
|
label: "Icon",
|
|
181636
181601
|
helpText: "The icon to display",
|
|
181637
181602
|
controlType: "ICON_SELECTOR",
|
|
181638
|
-
isRemovable: true
|
|
181639
|
-
|
|
181603
|
+
isRemovable: true,
|
|
181604
|
+
visibility: "SHOW_NAME"
|
|
181605
|
+
}),
|
|
181606
|
+
placeholder: Prop.string().default("Select date").propertiesPanel({
|
|
181607
|
+
label: "Placeholder",
|
|
181608
|
+
helpText: "Text to be shown inside of placeholder"
|
|
181609
|
+
}),
|
|
181610
|
+
textStyle: inputTextStyle()
|
|
181640
181611
|
}),
|
|
181641
181612
|
interaction: Section.category(PropsPanelCategory.Interaction).children({
|
|
181642
181613
|
isRequired: Prop.boolean().readAndWrite().default(false).propertiesPanel({
|
|
@@ -181771,6 +181742,10 @@ const SbDatePicker = registerSbComponent(
|
|
|
181771
181742
|
return Object.values(errors2).filter(Boolean);
|
|
181772
181743
|
}, [props2.showError, props2.validationErrors]);
|
|
181773
181744
|
const labelProps = useLabelProps(props2);
|
|
181745
|
+
const inputProps = useInputTypographyProps({
|
|
181746
|
+
backgroundColor: props2.backgroundColor,
|
|
181747
|
+
textStyle: props2.textStyle
|
|
181748
|
+
});
|
|
181774
181749
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(DatePickerContainer, { ...passThroughProps, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
181775
181750
|
DatePickerComponent,
|
|
181776
181751
|
{
|
|
@@ -181793,7 +181768,10 @@ const SbDatePicker = registerSbComponent(
|
|
|
181793
181768
|
showTimezone: !!props2.manageTimezone,
|
|
181794
181769
|
icon: props2.icon,
|
|
181795
181770
|
onDatePickerClosed: handleDatePickerClosed,
|
|
181771
|
+
placeholder: props2.placeholder,
|
|
181796
181772
|
labelStyleOverride: labelProps == null ? void 0 : labelProps.style,
|
|
181773
|
+
inputStyleOverride: inputProps.style,
|
|
181774
|
+
inputPadding: props2.padding,
|
|
181797
181775
|
labelPosition: props2.labelPosition,
|
|
181798
181776
|
errorMessagePlacement: props2.errorMessagePlacement,
|
|
181799
181777
|
errorMessages,
|
|
@@ -196720,4 +196698,4 @@ export {
|
|
|
196720
196698
|
copyToClipboard as y,
|
|
196721
196699
|
navigateTo as z
|
|
196722
196700
|
};
|
|
196723
|
-
//# sourceMappingURL=index-
|
|
196701
|
+
//# sourceMappingURL=index-D_-27jtA.js.map
|