kiban-design-system 1.1.9 → 1.1.10
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/components/FileUpload/FileUpload.d.ts +21 -0
- package/dist/components/FileUpload/FileUpload.props.d.ts +63 -0
- package/dist/components/FileUpload/index.d.ts +3 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.cjs.js +301 -73
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.esm.js +301 -74
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -4445,7 +4445,7 @@ const Icon = ({
|
|
|
4445
4445
|
children: /*#__PURE__*/React2.createElement(Icons[name])
|
|
4446
4446
|
});
|
|
4447
4447
|
|
|
4448
|
-
const MAIN_CLASS$
|
|
4448
|
+
const MAIN_CLASS$u = 'Alert';
|
|
4449
4449
|
/**
|
|
4450
4450
|
* Alert
|
|
4451
4451
|
*
|
|
@@ -4465,13 +4465,13 @@ const Alert = ({
|
|
|
4465
4465
|
onDismiss,
|
|
4466
4466
|
id
|
|
4467
4467
|
}) => {
|
|
4468
|
-
const className = [MAIN_CLASS$
|
|
4468
|
+
const className = [MAIN_CLASS$u, appearance && `${MAIN_CLASS$u}--${appearance}`].filter(Boolean).join(' ');
|
|
4469
4469
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
4470
4470
|
className: className,
|
|
4471
4471
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
4472
|
-
className: `${MAIN_CLASS$
|
|
4472
|
+
className: `${MAIN_CLASS$u}__content`,
|
|
4473
4473
|
children: [icon && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
4474
|
-
className: `${MAIN_CLASS$
|
|
4474
|
+
className: `${MAIN_CLASS$u}__icon`,
|
|
4475
4475
|
children: /*#__PURE__*/jsxRuntime.jsx(Icon, {
|
|
4476
4476
|
name: icon
|
|
4477
4477
|
})
|
|
@@ -4479,7 +4479,7 @@ const Alert = ({
|
|
|
4479
4479
|
children: content
|
|
4480
4480
|
})]
|
|
4481
4481
|
}), onDismiss ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
4482
|
-
className: `${MAIN_CLASS$
|
|
4482
|
+
className: `${MAIN_CLASS$u}__close`,
|
|
4483
4483
|
onClick: () => onDismiss(id),
|
|
4484
4484
|
children: /*#__PURE__*/jsxRuntime.jsx(Icon, {
|
|
4485
4485
|
name: "Close"
|
|
@@ -4488,7 +4488,7 @@ const Alert = ({
|
|
|
4488
4488
|
});
|
|
4489
4489
|
};
|
|
4490
4490
|
|
|
4491
|
-
const MAIN_CLASS$
|
|
4491
|
+
const MAIN_CLASS$t = 'Button';
|
|
4492
4492
|
|
|
4493
4493
|
/**
|
|
4494
4494
|
* Buttons are used primarily for actions, such as “Add”, “Close”, “Cancel”, or “Save”.
|
|
@@ -4533,7 +4533,7 @@ const Button = ({
|
|
|
4533
4533
|
} = useTheme();
|
|
4534
4534
|
const THEME_CLASS = `Button--${theme}`;
|
|
4535
4535
|
/** Check if every prop has been passed and asign the class name to the className const */
|
|
4536
|
-
const className = [MAIN_CLASS$
|
|
4536
|
+
const className = [MAIN_CLASS$t, THEME_CLASS, appearance && `${THEME_CLASS}--is-${appearance}`, isDanger && `${MAIN_CLASS$t}--is-danger`, isBorderLess && `${MAIN_CLASS$t}--is-borderless`, isFullWidth && `${MAIN_CLASS$t}--is-full-width`, icon && `${MAIN_CLASS$t}--has-icon`, iconPosition && !isLoading && `${MAIN_CLASS$t}--icon-${iconPosition}`, contentAlign && `${MAIN_CLASS$t}--content-${contentAlign}`, size && `${MAIN_CLASS$t}--is-${size}`].filter(Boolean).join(' ');
|
|
4537
4537
|
return /*#__PURE__*/jsxRuntime.jsxs("button", {
|
|
4538
4538
|
className: className,
|
|
4539
4539
|
onClick: rest.disabled || isLoading ? () => {} : onClick,
|
|
@@ -4782,7 +4782,7 @@ const ActionList = ({
|
|
|
4782
4782
|
});
|
|
4783
4783
|
};
|
|
4784
4784
|
|
|
4785
|
-
const MAIN_CLASS$
|
|
4785
|
+
const MAIN_CLASS$s = 'avatar';
|
|
4786
4786
|
/**
|
|
4787
4787
|
* Avatar is a graphic representation that is associated with a user for identification.
|
|
4788
4788
|
*
|
|
@@ -4808,7 +4808,7 @@ const Avatar = ({
|
|
|
4808
4808
|
const {
|
|
4809
4809
|
theme
|
|
4810
4810
|
} = useTheme();
|
|
4811
|
-
const className = [MAIN_CLASS$
|
|
4811
|
+
const className = [MAIN_CLASS$s, theme && `is-${theme}`, appearance && `${MAIN_CLASS$s}--is-${appearance}`, size && `${MAIN_CLASS$s}--${size}`, isRounded && `${MAIN_CLASS$s}--rounded`].filter(Boolean).join(' ');
|
|
4812
4812
|
let showIcon = false;
|
|
4813
4813
|
let showInitials = false;
|
|
4814
4814
|
let showSourse = false;
|
|
@@ -6507,7 +6507,7 @@ const useDeleteAlert = () => {
|
|
|
6507
6507
|
return deleteAlert;
|
|
6508
6508
|
};
|
|
6509
6509
|
|
|
6510
|
-
const MAIN_CLASS$
|
|
6510
|
+
const MAIN_CLASS$r = "column";
|
|
6511
6511
|
/** Grid.Item is used for set size of element in the Grid
|
|
6512
6512
|
* @example
|
|
6513
6513
|
* <Grid>
|
|
@@ -6532,14 +6532,14 @@ const GridItem = ({
|
|
|
6532
6532
|
sizeTablet,
|
|
6533
6533
|
sizeMobile
|
|
6534
6534
|
}) => {
|
|
6535
|
-
const className = [MAIN_CLASS$
|
|
6535
|
+
const className = [MAIN_CLASS$r, size && typeof size === "string" && `${size}`, size && typeof size !== "string" && `is-${size}`, sizeFullHD && `${sizeFullHD}`, sizeWidescreen && `${sizeWidescreen}`, sizeDesktop && `${sizeDesktop}`, sizeTablet && `${sizeTablet}`, sizeMobile && `${sizeMobile}`].filter(Boolean).join(" ");
|
|
6536
6536
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
6537
6537
|
className: className,
|
|
6538
6538
|
children: children
|
|
6539
6539
|
});
|
|
6540
6540
|
};
|
|
6541
6541
|
|
|
6542
|
-
const MAIN_CLASS$
|
|
6542
|
+
const MAIN_CLASS$q = "columns";
|
|
6543
6543
|
|
|
6544
6544
|
/** The grid system is used to arrange elements on a screen, usually by columns.
|
|
6545
6545
|
* @example
|
|
@@ -6555,7 +6555,7 @@ const Grid = ({
|
|
|
6555
6555
|
children,
|
|
6556
6556
|
isMultiline
|
|
6557
6557
|
}) => {
|
|
6558
|
-
const className = [MAIN_CLASS$
|
|
6558
|
+
const className = [MAIN_CLASS$q, isMultiline && "is-multiline"].filter(Boolean).join(" ");
|
|
6559
6559
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
6560
6560
|
className: className,
|
|
6561
6561
|
children: children
|
|
@@ -7065,7 +7065,7 @@ const AlphaTooltip = ({
|
|
|
7065
7065
|
});
|
|
7066
7066
|
};
|
|
7067
7067
|
|
|
7068
|
-
const MAIN_CLASS$
|
|
7068
|
+
const MAIN_CLASS$p = 'Icon-button';
|
|
7069
7069
|
|
|
7070
7070
|
/**
|
|
7071
7071
|
* Icon Button are used primarily for actions, this component only contain a icon.
|
|
@@ -7096,7 +7096,7 @@ const IconButton = ({
|
|
|
7096
7096
|
theme
|
|
7097
7097
|
} = useTheme();
|
|
7098
7098
|
/** Check if every prop has been passed and asign the class name to the className const */
|
|
7099
|
-
const className = [MAIN_CLASS$
|
|
7099
|
+
const className = [MAIN_CLASS$p, appearance && `${MAIN_CLASS$p}--is-${appearance}`, theme && `is-${theme}`, size && `${MAIN_CLASS$p}--is-${size}`, isRound && `${MAIN_CLASS$p}--is-round`, isDisabled && `${MAIN_CLASS$p}--is-disabled`].filter(Boolean).join(' ');
|
|
7100
7100
|
return /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
7101
7101
|
className: className,
|
|
7102
7102
|
onClick: onClick,
|
|
@@ -16549,8 +16549,8 @@ const OptionList = ({
|
|
|
16549
16549
|
});
|
|
16550
16550
|
};
|
|
16551
16551
|
|
|
16552
|
-
const MAIN_CLASS$
|
|
16553
|
-
const TAG_TEXT = `${MAIN_CLASS$
|
|
16552
|
+
const MAIN_CLASS$o = 'Tag'; // Component main class name
|
|
16553
|
+
const TAG_TEXT = `${MAIN_CLASS$o}__text`; // Text container class name
|
|
16554
16554
|
|
|
16555
16555
|
/**
|
|
16556
16556
|
* Tag represents a set of interactive, supplied keywords that help label,
|
|
@@ -16580,7 +16580,7 @@ const Tag = ({
|
|
|
16580
16580
|
theme
|
|
16581
16581
|
} = useTheme();
|
|
16582
16582
|
/** Check if every prop has been passed and asign the class name to the className const */
|
|
16583
|
-
const classNames = [MAIN_CLASS$
|
|
16583
|
+
const classNames = [MAIN_CLASS$o, `${MAIN_CLASS$o}--${theme}`, onClick && `${MAIN_CLASS$o}--is-clickable`, isDisabled && `${MAIN_CLASS$o}--is-disabled`, isDanger && `${MAIN_CLASS$o}--is-danger`].filter(Boolean).join(' ');
|
|
16584
16584
|
if (onClick) {
|
|
16585
16585
|
return /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
16586
16586
|
className: classNames,
|
|
@@ -16593,7 +16593,7 @@ const Tag = ({
|
|
|
16593
16593
|
const removeButton = onRemove && /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
16594
16594
|
"aria-label": ariaLabel,
|
|
16595
16595
|
type: "button",
|
|
16596
|
-
className: `${MAIN_CLASS$
|
|
16596
|
+
className: `${MAIN_CLASS$o}__Remove-Button`,
|
|
16597
16597
|
onClick: onRemove,
|
|
16598
16598
|
disabled: isDisabled,
|
|
16599
16599
|
tabIndex: -1,
|
|
@@ -16930,7 +16930,7 @@ const Select = ({
|
|
|
16930
16930
|
});
|
|
16931
16931
|
};
|
|
16932
16932
|
|
|
16933
|
-
const MAIN_CLASS$
|
|
16933
|
+
const MAIN_CLASS$n = 'Media';
|
|
16934
16934
|
|
|
16935
16935
|
/**
|
|
16936
16936
|
* Media component are used primarily for show a little box whit a icon inside.
|
|
@@ -16953,7 +16953,7 @@ const Media = ({
|
|
|
16953
16953
|
theme
|
|
16954
16954
|
} = useTheme();
|
|
16955
16955
|
/** Check if every prop has been passed and asign the class name to the className const */
|
|
16956
|
-
const className = [MAIN_CLASS$
|
|
16956
|
+
const className = [MAIN_CLASS$n, `${MAIN_CLASS$n}--${themeAppearance ? themeAppearance : theme}`, appearance && `${MAIN_CLASS$n}--is-${appearance}`, appearance && `${MAIN_CLASS$n}--is-${appearance}--${themeAppearance ? themeAppearance : theme}`, size && `${MAIN_CLASS$n}--is-${size}`].filter(Boolean).join(' ');
|
|
16957
16957
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
16958
16958
|
className: className,
|
|
16959
16959
|
children: icon && /*#__PURE__*/jsxRuntime.jsx(Icon, {
|
|
@@ -17119,7 +17119,7 @@ const Item$3 = ({
|
|
|
17119
17119
|
children: children
|
|
17120
17120
|
});
|
|
17121
17121
|
|
|
17122
|
-
const MAIN_CLASS$
|
|
17122
|
+
const MAIN_CLASS$m = 'FormLayout__items';
|
|
17123
17123
|
|
|
17124
17124
|
/**
|
|
17125
17125
|
*
|
|
@@ -17139,7 +17139,7 @@ const Group = ({
|
|
|
17139
17139
|
children: child
|
|
17140
17140
|
}, index);
|
|
17141
17141
|
});
|
|
17142
|
-
const className = [MAIN_CLASS$
|
|
17142
|
+
const className = [MAIN_CLASS$m, !condensed && `${MAIN_CLASS$m}--grouped`, condensed && `${MAIN_CLASS$m}--condensed`].filter(Boolean).join(' ');
|
|
17143
17143
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
17144
17144
|
className: className,
|
|
17145
17145
|
children: itemsMarkup
|
|
@@ -17164,7 +17164,7 @@ const FormLayout = ({
|
|
|
17164
17164
|
};
|
|
17165
17165
|
FormLayout.Group = Group;
|
|
17166
17166
|
|
|
17167
|
-
const MAIN_CLASS$
|
|
17167
|
+
const MAIN_CLASS$l = 'PageActions';
|
|
17168
17168
|
|
|
17169
17169
|
/**
|
|
17170
17170
|
* PageActions component is used to display the buttons
|
|
@@ -17198,7 +17198,7 @@ const PageActions = ({
|
|
|
17198
17198
|
children: buttonProps.children
|
|
17199
17199
|
}, `pageAction-${index}`);
|
|
17200
17200
|
};
|
|
17201
|
-
const className = [MAIN_CLASS$
|
|
17201
|
+
const className = [MAIN_CLASS$l, `${MAIN_CLASS$l}__container`, position && `${MAIN_CLASS$l}--position-${position}`, isReverse && `${MAIN_CLASS$l}--is-reverse`, extraAction && `${MAIN_CLASS$l}--has-extra-action`].filter(Boolean).join(' ');
|
|
17202
17202
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
17203
17203
|
className: className,
|
|
17204
17204
|
children: [extraAction && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
@@ -17211,7 +17211,7 @@ const PageActions = ({
|
|
|
17211
17211
|
});
|
|
17212
17212
|
};
|
|
17213
17213
|
|
|
17214
|
-
const MAIN_CLASS$
|
|
17214
|
+
const MAIN_CLASS$k = 'Tabs__Tab';
|
|
17215
17215
|
const Tab = ({
|
|
17216
17216
|
ariaLabel,
|
|
17217
17217
|
content,
|
|
@@ -17219,7 +17219,7 @@ const Tab = ({
|
|
|
17219
17219
|
onClick,
|
|
17220
17220
|
isFitted
|
|
17221
17221
|
}) => {
|
|
17222
|
-
const className = cssClassName(MAIN_CLASS$
|
|
17222
|
+
const className = cssClassName(MAIN_CLASS$k, isSelected && 'isSelected', isFitted && 'isFitted');
|
|
17223
17223
|
return /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
17224
17224
|
"aria-label": ariaLabel,
|
|
17225
17225
|
className: className,
|
|
@@ -17228,7 +17228,7 @@ const Tab = ({
|
|
|
17228
17228
|
});
|
|
17229
17229
|
};
|
|
17230
17230
|
|
|
17231
|
-
const MAIN_CLASS$
|
|
17231
|
+
const MAIN_CLASS$j = 'Tabs__TabsWrapper';
|
|
17232
17232
|
const TabsWrapper = ({
|
|
17233
17233
|
onSelect,
|
|
17234
17234
|
selected,
|
|
@@ -17246,18 +17246,18 @@ const TabsWrapper = ({
|
|
|
17246
17246
|
isFitted: areFitted
|
|
17247
17247
|
}, tab.id);
|
|
17248
17248
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
17249
|
-
className: MAIN_CLASS$
|
|
17249
|
+
className: MAIN_CLASS$j,
|
|
17250
17250
|
children: tabs.map(renderTab)
|
|
17251
17251
|
});
|
|
17252
17252
|
};
|
|
17253
17253
|
|
|
17254
|
-
const MAIN_CLASS$
|
|
17254
|
+
const MAIN_CLASS$i = 'Tabs__Panel';
|
|
17255
17255
|
const Panel$1 = ({
|
|
17256
17256
|
id,
|
|
17257
17257
|
children,
|
|
17258
17258
|
isHidden
|
|
17259
17259
|
}) => {
|
|
17260
|
-
const className = [MAIN_CLASS$
|
|
17260
|
+
const className = [MAIN_CLASS$i, isHidden && `${MAIN_CLASS$i}--is-hidden`].filter(Boolean).join(' ');
|
|
17261
17261
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
17262
17262
|
className: className,
|
|
17263
17263
|
id: id,
|
|
@@ -17347,7 +17347,7 @@ const FilterField$1 = ({
|
|
|
17347
17347
|
});
|
|
17348
17348
|
};
|
|
17349
17349
|
|
|
17350
|
-
const MAIN_CLASS$
|
|
17350
|
+
const MAIN_CLASS$h = 'AlphaFilterControl';
|
|
17351
17351
|
const AlphaFilterControl = ({
|
|
17352
17352
|
primaryAction,
|
|
17353
17353
|
secondaryActions,
|
|
@@ -17364,7 +17364,7 @@ const AlphaFilterControl = ({
|
|
|
17364
17364
|
panelID: `panel-${section.id}`
|
|
17365
17365
|
}));
|
|
17366
17366
|
const headerMarkup = /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
17367
|
-
className: `${MAIN_CLASS$
|
|
17367
|
+
className: `${MAIN_CLASS$h}__HeaderWrapper`,
|
|
17368
17368
|
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
17369
17369
|
children: title
|
|
17370
17370
|
})
|
|
@@ -17427,7 +17427,7 @@ const AlphaFilterControl = ({
|
|
|
17427
17427
|
setFilterValues(values);
|
|
17428
17428
|
}, [values]);
|
|
17429
17429
|
const bodyMarkup = React2.useMemo(() => /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
17430
|
-
className: `${MAIN_CLASS$
|
|
17430
|
+
className: `${MAIN_CLASS$h}__BodyWrapper`,
|
|
17431
17431
|
children: /*#__PURE__*/jsxRuntime.jsx(Tabs, {
|
|
17432
17432
|
selected: selectedTab,
|
|
17433
17433
|
tabs: tabsConfig,
|
|
@@ -17436,7 +17436,7 @@ const AlphaFilterControl = ({
|
|
|
17436
17436
|
})
|
|
17437
17437
|
}), [tabsConfig, selectedTab, fieldsSearch]);
|
|
17438
17438
|
const actionsMarkup = /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
17439
|
-
className: `${MAIN_CLASS$
|
|
17439
|
+
className: `${MAIN_CLASS$h}__ActionWrapper`,
|
|
17440
17440
|
children: /*#__PURE__*/jsxRuntime.jsx(PageActions, {
|
|
17441
17441
|
position: "flex-end",
|
|
17442
17442
|
primaryAction: {
|
|
@@ -17447,12 +17447,12 @@ const AlphaFilterControl = ({
|
|
|
17447
17447
|
})
|
|
17448
17448
|
});
|
|
17449
17449
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
17450
|
-
className: `${MAIN_CLASS$
|
|
17450
|
+
className: `${MAIN_CLASS$h}`,
|
|
17451
17451
|
children: [headerMarkup, bodyMarkup, actionsMarkup]
|
|
17452
17452
|
});
|
|
17453
17453
|
};
|
|
17454
17454
|
|
|
17455
|
-
const MAIN_CLASS$
|
|
17455
|
+
const MAIN_CLASS$g = "AlphaGraphicCard";
|
|
17456
17456
|
const AlphaGraphicCard = ({
|
|
17457
17457
|
data
|
|
17458
17458
|
}) => {
|
|
@@ -17462,14 +17462,14 @@ const AlphaGraphicCard = ({
|
|
|
17462
17462
|
percent
|
|
17463
17463
|
} = dataGraphic;
|
|
17464
17464
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
17465
|
-
className: `${MAIN_CLASS$
|
|
17465
|
+
className: `${MAIN_CLASS$g}__GraphicContainerWrapper`,
|
|
17466
17466
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
17467
|
-
className: `${MAIN_CLASS$
|
|
17467
|
+
className: `${MAIN_CLASS$g}__Graphic`,
|
|
17468
17468
|
style: {
|
|
17469
17469
|
width: `${percent}%`
|
|
17470
17470
|
}
|
|
17471
17471
|
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
17472
|
-
className: `${MAIN_CLASS$
|
|
17472
|
+
className: `${MAIN_CLASS$g}__GraphicLabel`,
|
|
17473
17473
|
children: label
|
|
17474
17474
|
})]
|
|
17475
17475
|
}, `graphic-item-${index}`);
|
|
@@ -17480,12 +17480,12 @@ const AlphaGraphicCard = ({
|
|
|
17480
17480
|
total
|
|
17481
17481
|
} = dataGraphic;
|
|
17482
17482
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
17483
|
-
className: `${MAIN_CLASS$
|
|
17483
|
+
className: `${MAIN_CLASS$g}__TotalContainer`,
|
|
17484
17484
|
children: [!hidePercent ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
17485
17485
|
children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
17486
17486
|
children: [percent, "%"]
|
|
17487
17487
|
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
17488
|
-
className: `${MAIN_CLASS$
|
|
17488
|
+
className: `${MAIN_CLASS$g}__TotalDivider`
|
|
17489
17489
|
})]
|
|
17490
17490
|
}) : null, /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
17491
17491
|
children: total
|
|
@@ -17499,15 +17499,15 @@ const AlphaGraphicCard = ({
|
|
|
17499
17499
|
variant,
|
|
17500
17500
|
hidePercent
|
|
17501
17501
|
} = dataCard;
|
|
17502
|
-
const classesGraphicWrapper = cssClassName(`${MAIN_CLASS$
|
|
17503
|
-
const classesTotalWrapper = cssClassName(`${MAIN_CLASS$
|
|
17502
|
+
const classesGraphicWrapper = cssClassName(`${MAIN_CLASS$g}__GraphicWrapper`, variant || "primary");
|
|
17503
|
+
const classesTotalWrapper = cssClassName(`${MAIN_CLASS$g}__TotalWrapper`, variant || "primary");
|
|
17504
17504
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
17505
|
-
className: `${MAIN_CLASS$
|
|
17505
|
+
className: `${MAIN_CLASS$g}__DataContainer`,
|
|
17506
17506
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
17507
|
-
className: `${MAIN_CLASS$
|
|
17507
|
+
className: `${MAIN_CLASS$g}__TitleContainer`,
|
|
17508
17508
|
children: title
|
|
17509
17509
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
17510
|
-
className: `${MAIN_CLASS$
|
|
17510
|
+
className: `${MAIN_CLASS$g}__GraphicTotalWrapper`,
|
|
17511
17511
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
17512
17512
|
className: classesGraphicWrapper,
|
|
17513
17513
|
children: dataGraphics.map(renderGraphic)
|
|
@@ -17528,14 +17528,14 @@ const AlphaGraphicCard = ({
|
|
|
17528
17528
|
const isOnlyRow = allItems.length <= 3;
|
|
17529
17529
|
const haveItemTop = index > 3;
|
|
17530
17530
|
const haveItemBottom = index + 4 <= totalItems;
|
|
17531
|
-
const classesContainer = cssClassName(`${MAIN_CLASS$
|
|
17531
|
+
const classesContainer = cssClassName(`${MAIN_CLASS$g}__Container`, isFirst && "isFirst", isLast && "isLast", isStartRow && "isStartRow", isEndRow && "isEndRow", isMiddle && "isMiddle", isOnlyRow && "isOnlyRow", haveItemTop && "haveItemTop", (isEndRow || isStartRow) && !haveItemBottom && "haveNotItemBottom");
|
|
17532
17532
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
17533
17533
|
className: classesContainer,
|
|
17534
17534
|
children: renderContent(item)
|
|
17535
17535
|
}, `graphic-card-${index}`);
|
|
17536
17536
|
};
|
|
17537
17537
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
17538
|
-
className: MAIN_CLASS$
|
|
17538
|
+
className: MAIN_CLASS$g,
|
|
17539
17539
|
children: data.map(renderContainer)
|
|
17540
17540
|
});
|
|
17541
17541
|
};
|
|
@@ -18863,7 +18863,7 @@ const AnnotatedSection = ({
|
|
|
18863
18863
|
})]
|
|
18864
18864
|
});
|
|
18865
18865
|
|
|
18866
|
-
const MAIN_CLASS$
|
|
18866
|
+
const MAIN_CLASS$f = "Thumbnail";
|
|
18867
18867
|
|
|
18868
18868
|
/** Thumbnail is used to provides a miniaturized version of image
|
|
18869
18869
|
*
|
|
@@ -18888,7 +18888,7 @@ const Thumbnail = ({
|
|
|
18888
18888
|
source,
|
|
18889
18889
|
icon
|
|
18890
18890
|
}) => {
|
|
18891
|
-
const className = [MAIN_CLASS$
|
|
18891
|
+
const className = [MAIN_CLASS$f, size && `${MAIN_CLASS$f}--is-${size}`, isTransparent && `${MAIN_CLASS$f}--is-transparent`, fit && `${MAIN_CLASS$f}--image-${fit}`, hasShadow && `${MAIN_CLASS$f}--has-shadow`].filter(Boolean).join(" ");
|
|
18892
18892
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
18893
18893
|
className: className,
|
|
18894
18894
|
children: [source !== "" && /*#__PURE__*/jsxRuntime.jsx("img", {
|
|
@@ -18900,7 +18900,7 @@ const Thumbnail = ({
|
|
|
18900
18900
|
});
|
|
18901
18901
|
};
|
|
18902
18902
|
|
|
18903
|
-
const MAIN_CLASS$
|
|
18903
|
+
const MAIN_CLASS$e = 'Card';
|
|
18904
18904
|
|
|
18905
18905
|
/**
|
|
18906
18906
|
* Card component are used primarily for show a little information, sometimes with image.
|
|
@@ -18941,7 +18941,7 @@ const Card = ({
|
|
|
18941
18941
|
title,
|
|
18942
18942
|
icon
|
|
18943
18943
|
}) => {
|
|
18944
|
-
const className = [MAIN_CLASS$
|
|
18944
|
+
const className = [MAIN_CLASS$e, isBorderLess && `${MAIN_CLASS$e}--is-border-less`, isDisabled && `${MAIN_CLASS$e}--is-disabled`, isSelected && `${MAIN_CLASS$e}--is-selected`, size && `${MAIN_CLASS$e}--is-${size}`, image && `${MAIN_CLASS$e}--with-image`, onClick && !isDisabled && `${MAIN_CLASS$e}--is-clickable`].filter(Boolean).join(' ');
|
|
18945
18945
|
const showThumbnail = source !== undefined || icon;
|
|
18946
18946
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
18947
18947
|
className: className,
|
|
@@ -19045,7 +19045,7 @@ const Badge = ({
|
|
|
19045
19045
|
children: children
|
|
19046
19046
|
});
|
|
19047
19047
|
|
|
19048
|
-
const MAIN_CLASS$
|
|
19048
|
+
const MAIN_CLASS$d = 'Banner';
|
|
19049
19049
|
|
|
19050
19050
|
/**
|
|
19051
19051
|
* Banner are used primarily show something informatión in a small container blue.
|
|
@@ -19072,7 +19072,7 @@ const Banner = ({
|
|
|
19072
19072
|
const {
|
|
19073
19073
|
theme
|
|
19074
19074
|
} = useTheme();
|
|
19075
|
-
const classes = [MAIN_CLASS$
|
|
19075
|
+
const classes = [MAIN_CLASS$d, `${MAIN_CLASS$d}--${theme}`, hasShadow && 'Banner--has-shadow', appearance && `Banner--${appearance}`, appearance === 'info' && `Banner--${appearance}-${theme}`].filter(Boolean).join(' ');
|
|
19076
19076
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
19077
19077
|
className: classes,
|
|
19078
19078
|
children: [icon && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
@@ -25230,7 +25230,7 @@ const Checkbox = ({
|
|
|
25230
25230
|
});
|
|
25231
25231
|
};
|
|
25232
25232
|
|
|
25233
|
-
const MAIN_CLASS$
|
|
25233
|
+
const MAIN_CLASS$c = 'ChoiceList';
|
|
25234
25234
|
|
|
25235
25235
|
/**
|
|
25236
25236
|
* Allow user to select one or multiple options from a list. Make sure all options
|
|
@@ -25260,7 +25260,7 @@ const ChoiceList = ({
|
|
|
25260
25260
|
onChange,
|
|
25261
25261
|
title
|
|
25262
25262
|
}) => {
|
|
25263
|
-
const className = [MAIN_CLASS$
|
|
25263
|
+
const className = [MAIN_CLASS$c].filter(Boolean).join(' ');
|
|
25264
25264
|
const ControlComponent = allowMultiple ? Checkbox : RadioButton;
|
|
25265
25265
|
const titleMarkup = title ? /*#__PURE__*/jsxRuntime.jsx("legend", {
|
|
25266
25266
|
children: title
|
|
@@ -25277,7 +25277,7 @@ const ChoiceList = ({
|
|
|
25277
25277
|
}
|
|
25278
25278
|
};
|
|
25279
25279
|
return /*#__PURE__*/jsxRuntime.jsx("li", {
|
|
25280
|
-
className: `${MAIN_CLASS$
|
|
25280
|
+
className: `${MAIN_CLASS$c}__ListItem`,
|
|
25281
25281
|
children: /*#__PURE__*/jsxRuntime.jsx(ControlComponent, {
|
|
25282
25282
|
"aria-label": ariaLabel,
|
|
25283
25283
|
name: name,
|
|
@@ -25309,10 +25309,10 @@ const ChoiceList = ({
|
|
|
25309
25309
|
return /*#__PURE__*/jsxRuntime.jsxs("fieldset", {
|
|
25310
25310
|
className: className,
|
|
25311
25311
|
children: [titleMarkup || checkboxSelectAllMarkup ? /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
25312
|
-
className: `${MAIN_CLASS$
|
|
25312
|
+
className: `${MAIN_CLASS$c}__TitleContainer`,
|
|
25313
25313
|
children: [checkboxSelectAllMarkup, titleMarkup]
|
|
25314
25314
|
}) : null, /*#__PURE__*/jsxRuntime.jsx("ul", {
|
|
25315
|
-
className: `${MAIN_CLASS$
|
|
25315
|
+
className: `${MAIN_CLASS$c}__List`,
|
|
25316
25316
|
children: choicesMarkup
|
|
25317
25317
|
})]
|
|
25318
25318
|
});
|
|
@@ -25429,7 +25429,7 @@ const DataTable = ({
|
|
|
25429
25429
|
DataTable.Row = Row$1;
|
|
25430
25430
|
DataTable.Cell = Cell$1;
|
|
25431
25431
|
|
|
25432
|
-
const MAIN_CLASS$
|
|
25432
|
+
const MAIN_CLASS$b = "Connector";
|
|
25433
25433
|
const Connector = ({
|
|
25434
25434
|
alt,
|
|
25435
25435
|
icon,
|
|
@@ -25441,7 +25441,7 @@ const Connector = ({
|
|
|
25441
25441
|
onClick,
|
|
25442
25442
|
theme = "CLOUD"
|
|
25443
25443
|
}) => {
|
|
25444
|
-
const classes = [`${MAIN_CLASS$
|
|
25444
|
+
const classes = [`${MAIN_CLASS$b}`, theme && `${MAIN_CLASS$b}--is-${theme}`, isActive && `${MAIN_CLASS$b}--is-active`].filter(Boolean).join(" ");
|
|
25445
25445
|
const handleOnClick = () => {
|
|
25446
25446
|
onClick && onClick(id);
|
|
25447
25447
|
};
|
|
@@ -25449,30 +25449,30 @@ const Connector = ({
|
|
|
25449
25449
|
className: classes,
|
|
25450
25450
|
onClick: handleOnClick,
|
|
25451
25451
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
25452
|
-
className: `${MAIN_CLASS$
|
|
25452
|
+
className: `${MAIN_CLASS$b}__container`,
|
|
25453
25453
|
children: [!image && icon && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
25454
|
-
className: `${MAIN_CLASS$
|
|
25454
|
+
className: `${MAIN_CLASS$b}__icon`,
|
|
25455
25455
|
children: /*#__PURE__*/jsxRuntime.jsx(Icon, {
|
|
25456
25456
|
name: icon
|
|
25457
25457
|
})
|
|
25458
25458
|
}), image && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
25459
|
-
className: `${MAIN_CLASS$
|
|
25459
|
+
className: `${MAIN_CLASS$b}__image`,
|
|
25460
25460
|
children: /*#__PURE__*/jsxRuntime.jsx("img", {
|
|
25461
25461
|
alt: alt,
|
|
25462
25462
|
src: image
|
|
25463
25463
|
})
|
|
25464
25464
|
}), name && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
25465
|
-
className: `${MAIN_CLASS$
|
|
25465
|
+
className: `${MAIN_CLASS$b}__name`,
|
|
25466
25466
|
children: name
|
|
25467
25467
|
}), meta && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
25468
|
-
className: `${MAIN_CLASS$
|
|
25468
|
+
className: `${MAIN_CLASS$b}__meta`,
|
|
25469
25469
|
children: meta
|
|
25470
25470
|
})]
|
|
25471
25471
|
})
|
|
25472
25472
|
});
|
|
25473
25473
|
};
|
|
25474
25474
|
|
|
25475
|
-
const MAIN_CLASS$
|
|
25475
|
+
const MAIN_CLASS$a = 'Container';
|
|
25476
25476
|
|
|
25477
25477
|
/**
|
|
25478
25478
|
*
|
|
@@ -25485,14 +25485,14 @@ const Container = ({
|
|
|
25485
25485
|
children,
|
|
25486
25486
|
hasShadow = true
|
|
25487
25487
|
}) => {
|
|
25488
|
-
const className = [MAIN_CLASS$
|
|
25488
|
+
const className = [MAIN_CLASS$a, hasShadow && `${MAIN_CLASS$a}--has-shadow`].filter(Boolean).join(' ');
|
|
25489
25489
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
25490
25490
|
className: className,
|
|
25491
25491
|
children: children
|
|
25492
25492
|
});
|
|
25493
25493
|
};
|
|
25494
25494
|
|
|
25495
|
-
const MAIN_CLASS$
|
|
25495
|
+
const MAIN_CLASS$9 = 'Cover';
|
|
25496
25496
|
|
|
25497
25497
|
/**
|
|
25498
25498
|
*
|
|
@@ -25508,7 +25508,7 @@ const Cover = ({
|
|
|
25508
25508
|
source,
|
|
25509
25509
|
hasShadow = false
|
|
25510
25510
|
}) => {
|
|
25511
|
-
const className = [MAIN_CLASS$
|
|
25511
|
+
const className = [MAIN_CLASS$9, position && `${MAIN_CLASS$9}--${position}`, hasShadow && `${MAIN_CLASS$9}--has-shadow`].filter(Boolean).join(' ');
|
|
25512
25512
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
25513
25513
|
style: {
|
|
25514
25514
|
backgroundImage: `url(${source})`
|
|
@@ -33877,14 +33877,14 @@ const EmptyState = ({
|
|
|
33877
33877
|
});
|
|
33878
33878
|
};
|
|
33879
33879
|
|
|
33880
|
-
const MAIN_CLASS$
|
|
33880
|
+
const MAIN_CLASS$8 = "FileDownloader";
|
|
33881
33881
|
const FileDownloader = ({
|
|
33882
33882
|
ariaLabel,
|
|
33883
33883
|
title = "Download",
|
|
33884
33884
|
isDisabled,
|
|
33885
33885
|
onDownload
|
|
33886
33886
|
}) => {
|
|
33887
|
-
const className = [MAIN_CLASS$
|
|
33887
|
+
const className = [MAIN_CLASS$8, isDisabled && `${MAIN_CLASS$8}--is-disabled`].filter(Boolean).join(" ");
|
|
33888
33888
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
33889
33889
|
className: className,
|
|
33890
33890
|
children: [title, /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
@@ -33897,6 +33897,233 @@ const FileDownloader = ({
|
|
|
33897
33897
|
});
|
|
33898
33898
|
};
|
|
33899
33899
|
|
|
33900
|
+
const MAIN_CLASS$7 = 'FileUpload';
|
|
33901
|
+
|
|
33902
|
+
/**
|
|
33903
|
+
* FileUpload component with drag and drop functionality
|
|
33904
|
+
*
|
|
33905
|
+
* @example
|
|
33906
|
+
* <FileUpload
|
|
33907
|
+
* label="Upload File"
|
|
33908
|
+
* iconName="Upload"
|
|
33909
|
+
* title="Drag & drop files here"
|
|
33910
|
+
* subtitle="Or click to browse"
|
|
33911
|
+
* value={files}
|
|
33912
|
+
* onValueChange={setFiles}
|
|
33913
|
+
* maxFiles={5}
|
|
33914
|
+
* maxSize={5 * 1024 * 1024}
|
|
33915
|
+
* accept=".csv"
|
|
33916
|
+
* multiple
|
|
33917
|
+
* />
|
|
33918
|
+
*/
|
|
33919
|
+
const FileUpload = ({
|
|
33920
|
+
label,
|
|
33921
|
+
iconName = 'Upload',
|
|
33922
|
+
title = 'Drag & drop files here',
|
|
33923
|
+
subtitle = 'Or click to browse',
|
|
33924
|
+
value = [],
|
|
33925
|
+
onValueChange,
|
|
33926
|
+
maxFiles,
|
|
33927
|
+
maxSize,
|
|
33928
|
+
accept,
|
|
33929
|
+
multiple = false,
|
|
33930
|
+
disabled = false,
|
|
33931
|
+
onFileReject,
|
|
33932
|
+
onFileRemove,
|
|
33933
|
+
onDrop,
|
|
33934
|
+
ariaLabel
|
|
33935
|
+
}) => {
|
|
33936
|
+
const [isDragging, setIsDragging] = React2.useState(false);
|
|
33937
|
+
const fileInputRef = React2.useRef(null);
|
|
33938
|
+
const dropzoneRef = React2.useRef(null);
|
|
33939
|
+
const validateFile = React2.useCallback(file => {
|
|
33940
|
+
// Check max size
|
|
33941
|
+
if (maxSize && file.size > maxSize) {
|
|
33942
|
+
return `File size exceeds maximum of ${formatFileSize(maxSize)}`;
|
|
33943
|
+
}
|
|
33944
|
+
|
|
33945
|
+
// Check accept
|
|
33946
|
+
if (accept) {
|
|
33947
|
+
const acceptTypes = accept.split(',').map(t => t.trim());
|
|
33948
|
+
const fileExtension = '.' + file.name.split('.').pop()?.toLowerCase();
|
|
33949
|
+
const fileType = file.type;
|
|
33950
|
+
const isAccepted = acceptTypes.some(acceptType => {
|
|
33951
|
+
if (acceptType.startsWith('.')) {
|
|
33952
|
+
return fileExtension === acceptType.toLowerCase();
|
|
33953
|
+
}
|
|
33954
|
+
if (acceptType.includes('/*')) {
|
|
33955
|
+
const baseType = acceptType.split('/')[0];
|
|
33956
|
+
return fileType.startsWith(baseType + '/');
|
|
33957
|
+
}
|
|
33958
|
+
return fileType === acceptType;
|
|
33959
|
+
});
|
|
33960
|
+
if (!isAccepted) {
|
|
33961
|
+
return `File type not accepted. Accepted types: ${accept}`;
|
|
33962
|
+
}
|
|
33963
|
+
}
|
|
33964
|
+
return null;
|
|
33965
|
+
}, [maxSize, accept]);
|
|
33966
|
+
const validateAndAddFiles = React2.useCallback(newFiles => {
|
|
33967
|
+
const currentFiles = value || [];
|
|
33968
|
+
const validFiles = [];
|
|
33969
|
+
|
|
33970
|
+
// Check max files limit
|
|
33971
|
+
const remainingSlots = maxFiles ? maxFiles - currentFiles.length : Infinity;
|
|
33972
|
+
if (remainingSlots <= 0) {
|
|
33973
|
+
newFiles.forEach(file => {
|
|
33974
|
+
const message = `Maximum ${maxFiles} file(s) allowed`;
|
|
33975
|
+
onFileReject?.(file, message);
|
|
33976
|
+
});
|
|
33977
|
+
return currentFiles;
|
|
33978
|
+
}
|
|
33979
|
+
|
|
33980
|
+
// Validate and add files
|
|
33981
|
+
const filesToAdd = newFiles.slice(0, remainingSlots);
|
|
33982
|
+
const filesToReject = newFiles.slice(remainingSlots);
|
|
33983
|
+
filesToAdd.forEach(file => {
|
|
33984
|
+
const error = validateFile(file);
|
|
33985
|
+
if (error) {
|
|
33986
|
+
onFileReject?.(file, error);
|
|
33987
|
+
} else {
|
|
33988
|
+
validFiles.push(file);
|
|
33989
|
+
}
|
|
33990
|
+
});
|
|
33991
|
+
filesToReject.forEach(file => {
|
|
33992
|
+
const message = `Maximum ${maxFiles} file(s) allowed`;
|
|
33993
|
+
onFileReject?.(file, message);
|
|
33994
|
+
});
|
|
33995
|
+
if (validFiles.length > 0) {
|
|
33996
|
+
const updatedFiles = multiple ? [...currentFiles, ...validFiles] : validFiles.slice(0, 1);
|
|
33997
|
+
onValueChange?.(updatedFiles);
|
|
33998
|
+
return updatedFiles;
|
|
33999
|
+
}
|
|
34000
|
+
return currentFiles;
|
|
34001
|
+
}, [value, maxFiles, multiple, validateFile, onValueChange, onFileReject]);
|
|
34002
|
+
const handleFileInputChange = React2.useCallback(event => {
|
|
34003
|
+
const files = event.target.files ? Array.from(event.target.files) : [];
|
|
34004
|
+
if (files.length > 0) {
|
|
34005
|
+
validateAndAddFiles(files);
|
|
34006
|
+
}
|
|
34007
|
+
// Reset input to allow selecting the same file again
|
|
34008
|
+
if (fileInputRef.current) {
|
|
34009
|
+
fileInputRef.current.value = '';
|
|
34010
|
+
}
|
|
34011
|
+
}, [validateAndAddFiles]);
|
|
34012
|
+
const handleDrop = React2.useCallback(event => {
|
|
34013
|
+
event.preventDefault();
|
|
34014
|
+
event.stopPropagation();
|
|
34015
|
+
setIsDragging(false);
|
|
34016
|
+
if (disabled) return;
|
|
34017
|
+
const files = Array.from(event.dataTransfer.files);
|
|
34018
|
+
if (files.length > 0) {
|
|
34019
|
+
const updatedFiles = validateAndAddFiles(files);
|
|
34020
|
+
onDrop?.(updatedFiles);
|
|
34021
|
+
}
|
|
34022
|
+
}, [disabled, validateAndAddFiles, onDrop]);
|
|
34023
|
+
const handleDragOver = React2.useCallback(event => {
|
|
34024
|
+
event.preventDefault();
|
|
34025
|
+
event.stopPropagation();
|
|
34026
|
+
if (!disabled) {
|
|
34027
|
+
setIsDragging(true);
|
|
34028
|
+
}
|
|
34029
|
+
}, [disabled]);
|
|
34030
|
+
const handleDragLeave = React2.useCallback(event => {
|
|
34031
|
+
event.preventDefault();
|
|
34032
|
+
event.stopPropagation();
|
|
34033
|
+
// Only set dragging to false if we're leaving the dropzone
|
|
34034
|
+
if (!dropzoneRef.current?.contains(event.relatedTarget)) {
|
|
34035
|
+
setIsDragging(false);
|
|
34036
|
+
}
|
|
34037
|
+
}, []);
|
|
34038
|
+
const handleClick = React2.useCallback(() => {
|
|
34039
|
+
if (!disabled && fileInputRef.current) {
|
|
34040
|
+
fileInputRef.current.click();
|
|
34041
|
+
}
|
|
34042
|
+
}, [disabled]);
|
|
34043
|
+
const handleRemoveFile = React2.useCallback(fileToRemove => {
|
|
34044
|
+
const updatedFiles = value.filter(file => file !== fileToRemove);
|
|
34045
|
+
onValueChange?.(updatedFiles);
|
|
34046
|
+
onFileRemove?.(fileToRemove);
|
|
34047
|
+
}, [value, onValueChange, onFileRemove]);
|
|
34048
|
+
const dropzoneClassName = [`${MAIN_CLASS$7}__dropzone`, isDragging && `${MAIN_CLASS$7}__dropzone--dragging`, disabled && `${MAIN_CLASS$7}__dropzone--disabled`].filter(Boolean).join(' ');
|
|
34049
|
+
const labelMarkup = label ? /*#__PURE__*/jsxRuntime.jsx("label", {
|
|
34050
|
+
className: `${MAIN_CLASS$7}__label`,
|
|
34051
|
+
children: label
|
|
34052
|
+
}) : null;
|
|
34053
|
+
const dropzoneMarkup = /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
34054
|
+
ref: dropzoneRef,
|
|
34055
|
+
className: dropzoneClassName,
|
|
34056
|
+
onDrop: handleDrop,
|
|
34057
|
+
onDragOver: handleDragOver,
|
|
34058
|
+
onDragLeave: handleDragLeave,
|
|
34059
|
+
onClick: handleClick,
|
|
34060
|
+
role: "button",
|
|
34061
|
+
tabIndex: disabled ? -1 : 0,
|
|
34062
|
+
"aria-label": ariaLabel || 'File upload dropzone',
|
|
34063
|
+
"aria-disabled": disabled,
|
|
34064
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
34065
|
+
className: `${MAIN_CLASS$7}__container`,
|
|
34066
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
34067
|
+
className: `${MAIN_CLASS$7}__icon-wrapper`,
|
|
34068
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Icon, {
|
|
34069
|
+
name: iconName
|
|
34070
|
+
})
|
|
34071
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
34072
|
+
className: `${MAIN_CLASS$7}__copy-wrapper`,
|
|
34073
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
34074
|
+
className: `${MAIN_CLASS$7}__copy-title`,
|
|
34075
|
+
children: title
|
|
34076
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
34077
|
+
className: `${MAIN_CLASS$7}__copy-subtitle`,
|
|
34078
|
+
children: subtitle
|
|
34079
|
+
})]
|
|
34080
|
+
})]
|
|
34081
|
+
}), /*#__PURE__*/jsxRuntime.jsx("input", {
|
|
34082
|
+
ref: fileInputRef,
|
|
34083
|
+
type: "file",
|
|
34084
|
+
multiple: multiple,
|
|
34085
|
+
accept: accept,
|
|
34086
|
+
onChange: handleFileInputChange,
|
|
34087
|
+
disabled: disabled,
|
|
34088
|
+
"aria-label": `${ariaLabel || 'file'}-input`,
|
|
34089
|
+
className: `${MAIN_CLASS$7}__input`
|
|
34090
|
+
})]
|
|
34091
|
+
});
|
|
34092
|
+
const fileListMarkup = value && value.length > 0 ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
34093
|
+
className: `${MAIN_CLASS$7}__list`,
|
|
34094
|
+
children: value.map((file, index) => /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
34095
|
+
className: `${MAIN_CLASS$7}__item`,
|
|
34096
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
34097
|
+
className: `${MAIN_CLASS$7}__item-content`,
|
|
34098
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Icon, {
|
|
34099
|
+
name: "Paperclip"
|
|
34100
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
34101
|
+
className: `${MAIN_CLASS$7}__item-info`,
|
|
34102
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
34103
|
+
className: `${MAIN_CLASS$7}__item-name`,
|
|
34104
|
+
children: file.name
|
|
34105
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
34106
|
+
className: `${MAIN_CLASS$7}__item-size`,
|
|
34107
|
+
children: formatFileSize(file.size)
|
|
34108
|
+
})]
|
|
34109
|
+
})]
|
|
34110
|
+
}), /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
34111
|
+
className: `${MAIN_CLASS$7}__item-delete`,
|
|
34112
|
+
onClick: () => handleRemoveFile(file),
|
|
34113
|
+
"aria-label": `Remove ${file.name}`,
|
|
34114
|
+
type: "button",
|
|
34115
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Icon, {
|
|
34116
|
+
name: "Close"
|
|
34117
|
+
})
|
|
34118
|
+
})]
|
|
34119
|
+
}, `${file.name}-${index}`))
|
|
34120
|
+
}) : null;
|
|
34121
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
34122
|
+
className: MAIN_CLASS$7,
|
|
34123
|
+
children: [labelMarkup, dropzoneMarkup, fileListMarkup]
|
|
34124
|
+
});
|
|
34125
|
+
};
|
|
34126
|
+
|
|
33900
34127
|
const MAIN_CLASS$6 = 'Label';
|
|
33901
34128
|
|
|
33902
34129
|
/**
|
|
@@ -41087,6 +41314,7 @@ exports.DynamicForm = DynamicForm;
|
|
|
41087
41314
|
exports.EmptyState = EmptyState;
|
|
41088
41315
|
exports.ErrorIcon = ErrorIcon;
|
|
41089
41316
|
exports.FileDownloader = FileDownloader;
|
|
41317
|
+
exports.FileUpload = FileUpload;
|
|
41090
41318
|
exports.Filedrop = Filedrop;
|
|
41091
41319
|
exports.FilterControl = FilterControl;
|
|
41092
41320
|
exports.Filters = Filters;
|