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.esm.js
CHANGED
|
@@ -4425,7 +4425,7 @@ const Icon = ({
|
|
|
4425
4425
|
children: /*#__PURE__*/createElement(Icons[name])
|
|
4426
4426
|
});
|
|
4427
4427
|
|
|
4428
|
-
const MAIN_CLASS$
|
|
4428
|
+
const MAIN_CLASS$u = 'Alert';
|
|
4429
4429
|
/**
|
|
4430
4430
|
* Alert
|
|
4431
4431
|
*
|
|
@@ -4445,13 +4445,13 @@ const Alert = ({
|
|
|
4445
4445
|
onDismiss,
|
|
4446
4446
|
id
|
|
4447
4447
|
}) => {
|
|
4448
|
-
const className = [MAIN_CLASS$
|
|
4448
|
+
const className = [MAIN_CLASS$u, appearance && `${MAIN_CLASS$u}--${appearance}`].filter(Boolean).join(' ');
|
|
4449
4449
|
return /*#__PURE__*/jsxs("div", {
|
|
4450
4450
|
className: className,
|
|
4451
4451
|
children: [/*#__PURE__*/jsxs("div", {
|
|
4452
|
-
className: `${MAIN_CLASS$
|
|
4452
|
+
className: `${MAIN_CLASS$u}__content`,
|
|
4453
4453
|
children: [icon && /*#__PURE__*/jsx("div", {
|
|
4454
|
-
className: `${MAIN_CLASS$
|
|
4454
|
+
className: `${MAIN_CLASS$u}__icon`,
|
|
4455
4455
|
children: /*#__PURE__*/jsx(Icon, {
|
|
4456
4456
|
name: icon
|
|
4457
4457
|
})
|
|
@@ -4459,7 +4459,7 @@ const Alert = ({
|
|
|
4459
4459
|
children: content
|
|
4460
4460
|
})]
|
|
4461
4461
|
}), onDismiss ? /*#__PURE__*/jsx("div", {
|
|
4462
|
-
className: `${MAIN_CLASS$
|
|
4462
|
+
className: `${MAIN_CLASS$u}__close`,
|
|
4463
4463
|
onClick: () => onDismiss(id),
|
|
4464
4464
|
children: /*#__PURE__*/jsx(Icon, {
|
|
4465
4465
|
name: "Close"
|
|
@@ -4468,7 +4468,7 @@ const Alert = ({
|
|
|
4468
4468
|
});
|
|
4469
4469
|
};
|
|
4470
4470
|
|
|
4471
|
-
const MAIN_CLASS$
|
|
4471
|
+
const MAIN_CLASS$t = 'Button';
|
|
4472
4472
|
|
|
4473
4473
|
/**
|
|
4474
4474
|
* Buttons are used primarily for actions, such as “Add”, “Close”, “Cancel”, or “Save”.
|
|
@@ -4513,7 +4513,7 @@ const Button = ({
|
|
|
4513
4513
|
} = useTheme();
|
|
4514
4514
|
const THEME_CLASS = `Button--${theme}`;
|
|
4515
4515
|
/** Check if every prop has been passed and asign the class name to the className const */
|
|
4516
|
-
const className = [MAIN_CLASS$
|
|
4516
|
+
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(' ');
|
|
4517
4517
|
return /*#__PURE__*/jsxs("button", {
|
|
4518
4518
|
className: className,
|
|
4519
4519
|
onClick: rest.disabled || isLoading ? () => {} : onClick,
|
|
@@ -4762,7 +4762,7 @@ const ActionList = ({
|
|
|
4762
4762
|
});
|
|
4763
4763
|
};
|
|
4764
4764
|
|
|
4765
|
-
const MAIN_CLASS$
|
|
4765
|
+
const MAIN_CLASS$s = 'avatar';
|
|
4766
4766
|
/**
|
|
4767
4767
|
* Avatar is a graphic representation that is associated with a user for identification.
|
|
4768
4768
|
*
|
|
@@ -4788,7 +4788,7 @@ const Avatar = ({
|
|
|
4788
4788
|
const {
|
|
4789
4789
|
theme
|
|
4790
4790
|
} = useTheme();
|
|
4791
|
-
const className = [MAIN_CLASS$
|
|
4791
|
+
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(' ');
|
|
4792
4792
|
let showIcon = false;
|
|
4793
4793
|
let showInitials = false;
|
|
4794
4794
|
let showSourse = false;
|
|
@@ -6487,7 +6487,7 @@ const useDeleteAlert = () => {
|
|
|
6487
6487
|
return deleteAlert;
|
|
6488
6488
|
};
|
|
6489
6489
|
|
|
6490
|
-
const MAIN_CLASS$
|
|
6490
|
+
const MAIN_CLASS$r = "column";
|
|
6491
6491
|
/** Grid.Item is used for set size of element in the Grid
|
|
6492
6492
|
* @example
|
|
6493
6493
|
* <Grid>
|
|
@@ -6512,14 +6512,14 @@ const GridItem = ({
|
|
|
6512
6512
|
sizeTablet,
|
|
6513
6513
|
sizeMobile
|
|
6514
6514
|
}) => {
|
|
6515
|
-
const className = [MAIN_CLASS$
|
|
6515
|
+
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(" ");
|
|
6516
6516
|
return /*#__PURE__*/jsx("div", {
|
|
6517
6517
|
className: className,
|
|
6518
6518
|
children: children
|
|
6519
6519
|
});
|
|
6520
6520
|
};
|
|
6521
6521
|
|
|
6522
|
-
const MAIN_CLASS$
|
|
6522
|
+
const MAIN_CLASS$q = "columns";
|
|
6523
6523
|
|
|
6524
6524
|
/** The grid system is used to arrange elements on a screen, usually by columns.
|
|
6525
6525
|
* @example
|
|
@@ -6535,7 +6535,7 @@ const Grid = ({
|
|
|
6535
6535
|
children,
|
|
6536
6536
|
isMultiline
|
|
6537
6537
|
}) => {
|
|
6538
|
-
const className = [MAIN_CLASS$
|
|
6538
|
+
const className = [MAIN_CLASS$q, isMultiline && "is-multiline"].filter(Boolean).join(" ");
|
|
6539
6539
|
return /*#__PURE__*/jsx("div", {
|
|
6540
6540
|
className: className,
|
|
6541
6541
|
children: children
|
|
@@ -7045,7 +7045,7 @@ const AlphaTooltip = ({
|
|
|
7045
7045
|
});
|
|
7046
7046
|
};
|
|
7047
7047
|
|
|
7048
|
-
const MAIN_CLASS$
|
|
7048
|
+
const MAIN_CLASS$p = 'Icon-button';
|
|
7049
7049
|
|
|
7050
7050
|
/**
|
|
7051
7051
|
* Icon Button are used primarily for actions, this component only contain a icon.
|
|
@@ -7076,7 +7076,7 @@ const IconButton = ({
|
|
|
7076
7076
|
theme
|
|
7077
7077
|
} = useTheme();
|
|
7078
7078
|
/** Check if every prop has been passed and asign the class name to the className const */
|
|
7079
|
-
const className = [MAIN_CLASS$
|
|
7079
|
+
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(' ');
|
|
7080
7080
|
return /*#__PURE__*/jsx("button", {
|
|
7081
7081
|
className: className,
|
|
7082
7082
|
onClick: onClick,
|
|
@@ -16529,8 +16529,8 @@ const OptionList = ({
|
|
|
16529
16529
|
});
|
|
16530
16530
|
};
|
|
16531
16531
|
|
|
16532
|
-
const MAIN_CLASS$
|
|
16533
|
-
const TAG_TEXT = `${MAIN_CLASS$
|
|
16532
|
+
const MAIN_CLASS$o = 'Tag'; // Component main class name
|
|
16533
|
+
const TAG_TEXT = `${MAIN_CLASS$o}__text`; // Text container class name
|
|
16534
16534
|
|
|
16535
16535
|
/**
|
|
16536
16536
|
* Tag represents a set of interactive, supplied keywords that help label,
|
|
@@ -16560,7 +16560,7 @@ const Tag = ({
|
|
|
16560
16560
|
theme
|
|
16561
16561
|
} = useTheme();
|
|
16562
16562
|
/** Check if every prop has been passed and asign the class name to the className const */
|
|
16563
|
-
const classNames = [MAIN_CLASS$
|
|
16563
|
+
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(' ');
|
|
16564
16564
|
if (onClick) {
|
|
16565
16565
|
return /*#__PURE__*/jsx("button", {
|
|
16566
16566
|
className: classNames,
|
|
@@ -16573,7 +16573,7 @@ const Tag = ({
|
|
|
16573
16573
|
const removeButton = onRemove && /*#__PURE__*/jsx("button", {
|
|
16574
16574
|
"aria-label": ariaLabel,
|
|
16575
16575
|
type: "button",
|
|
16576
|
-
className: `${MAIN_CLASS$
|
|
16576
|
+
className: `${MAIN_CLASS$o}__Remove-Button`,
|
|
16577
16577
|
onClick: onRemove,
|
|
16578
16578
|
disabled: isDisabled,
|
|
16579
16579
|
tabIndex: -1,
|
|
@@ -16910,7 +16910,7 @@ const Select = ({
|
|
|
16910
16910
|
});
|
|
16911
16911
|
};
|
|
16912
16912
|
|
|
16913
|
-
const MAIN_CLASS$
|
|
16913
|
+
const MAIN_CLASS$n = 'Media';
|
|
16914
16914
|
|
|
16915
16915
|
/**
|
|
16916
16916
|
* Media component are used primarily for show a little box whit a icon inside.
|
|
@@ -16933,7 +16933,7 @@ const Media = ({
|
|
|
16933
16933
|
theme
|
|
16934
16934
|
} = useTheme();
|
|
16935
16935
|
/** Check if every prop has been passed and asign the class name to the className const */
|
|
16936
|
-
const className = [MAIN_CLASS$
|
|
16936
|
+
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(' ');
|
|
16937
16937
|
return /*#__PURE__*/jsx("div", {
|
|
16938
16938
|
className: className,
|
|
16939
16939
|
children: icon && /*#__PURE__*/jsx(Icon, {
|
|
@@ -17099,7 +17099,7 @@ const Item$3 = ({
|
|
|
17099
17099
|
children: children
|
|
17100
17100
|
});
|
|
17101
17101
|
|
|
17102
|
-
const MAIN_CLASS$
|
|
17102
|
+
const MAIN_CLASS$m = 'FormLayout__items';
|
|
17103
17103
|
|
|
17104
17104
|
/**
|
|
17105
17105
|
*
|
|
@@ -17119,7 +17119,7 @@ const Group = ({
|
|
|
17119
17119
|
children: child
|
|
17120
17120
|
}, index);
|
|
17121
17121
|
});
|
|
17122
|
-
const className = [MAIN_CLASS$
|
|
17122
|
+
const className = [MAIN_CLASS$m, !condensed && `${MAIN_CLASS$m}--grouped`, condensed && `${MAIN_CLASS$m}--condensed`].filter(Boolean).join(' ');
|
|
17123
17123
|
return /*#__PURE__*/jsx("div", {
|
|
17124
17124
|
className: className,
|
|
17125
17125
|
children: itemsMarkup
|
|
@@ -17144,7 +17144,7 @@ const FormLayout = ({
|
|
|
17144
17144
|
};
|
|
17145
17145
|
FormLayout.Group = Group;
|
|
17146
17146
|
|
|
17147
|
-
const MAIN_CLASS$
|
|
17147
|
+
const MAIN_CLASS$l = 'PageActions';
|
|
17148
17148
|
|
|
17149
17149
|
/**
|
|
17150
17150
|
* PageActions component is used to display the buttons
|
|
@@ -17178,7 +17178,7 @@ const PageActions = ({
|
|
|
17178
17178
|
children: buttonProps.children
|
|
17179
17179
|
}, `pageAction-${index}`);
|
|
17180
17180
|
};
|
|
17181
|
-
const className = [MAIN_CLASS$
|
|
17181
|
+
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(' ');
|
|
17182
17182
|
return /*#__PURE__*/jsxs("div", {
|
|
17183
17183
|
className: className,
|
|
17184
17184
|
children: [extraAction && /*#__PURE__*/jsx("div", {
|
|
@@ -17191,7 +17191,7 @@ const PageActions = ({
|
|
|
17191
17191
|
});
|
|
17192
17192
|
};
|
|
17193
17193
|
|
|
17194
|
-
const MAIN_CLASS$
|
|
17194
|
+
const MAIN_CLASS$k = 'Tabs__Tab';
|
|
17195
17195
|
const Tab = ({
|
|
17196
17196
|
ariaLabel,
|
|
17197
17197
|
content,
|
|
@@ -17199,7 +17199,7 @@ const Tab = ({
|
|
|
17199
17199
|
onClick,
|
|
17200
17200
|
isFitted
|
|
17201
17201
|
}) => {
|
|
17202
|
-
const className = cssClassName(MAIN_CLASS$
|
|
17202
|
+
const className = cssClassName(MAIN_CLASS$k, isSelected && 'isSelected', isFitted && 'isFitted');
|
|
17203
17203
|
return /*#__PURE__*/jsx("button", {
|
|
17204
17204
|
"aria-label": ariaLabel,
|
|
17205
17205
|
className: className,
|
|
@@ -17208,7 +17208,7 @@ const Tab = ({
|
|
|
17208
17208
|
});
|
|
17209
17209
|
};
|
|
17210
17210
|
|
|
17211
|
-
const MAIN_CLASS$
|
|
17211
|
+
const MAIN_CLASS$j = 'Tabs__TabsWrapper';
|
|
17212
17212
|
const TabsWrapper = ({
|
|
17213
17213
|
onSelect,
|
|
17214
17214
|
selected,
|
|
@@ -17226,18 +17226,18 @@ const TabsWrapper = ({
|
|
|
17226
17226
|
isFitted: areFitted
|
|
17227
17227
|
}, tab.id);
|
|
17228
17228
|
return /*#__PURE__*/jsx("div", {
|
|
17229
|
-
className: MAIN_CLASS$
|
|
17229
|
+
className: MAIN_CLASS$j,
|
|
17230
17230
|
children: tabs.map(renderTab)
|
|
17231
17231
|
});
|
|
17232
17232
|
};
|
|
17233
17233
|
|
|
17234
|
-
const MAIN_CLASS$
|
|
17234
|
+
const MAIN_CLASS$i = 'Tabs__Panel';
|
|
17235
17235
|
const Panel$1 = ({
|
|
17236
17236
|
id,
|
|
17237
17237
|
children,
|
|
17238
17238
|
isHidden
|
|
17239
17239
|
}) => {
|
|
17240
|
-
const className = [MAIN_CLASS$
|
|
17240
|
+
const className = [MAIN_CLASS$i, isHidden && `${MAIN_CLASS$i}--is-hidden`].filter(Boolean).join(' ');
|
|
17241
17241
|
return /*#__PURE__*/jsx("div", {
|
|
17242
17242
|
className: className,
|
|
17243
17243
|
id: id,
|
|
@@ -17327,7 +17327,7 @@ const FilterField$1 = ({
|
|
|
17327
17327
|
});
|
|
17328
17328
|
};
|
|
17329
17329
|
|
|
17330
|
-
const MAIN_CLASS$
|
|
17330
|
+
const MAIN_CLASS$h = 'AlphaFilterControl';
|
|
17331
17331
|
const AlphaFilterControl = ({
|
|
17332
17332
|
primaryAction,
|
|
17333
17333
|
secondaryActions,
|
|
@@ -17344,7 +17344,7 @@ const AlphaFilterControl = ({
|
|
|
17344
17344
|
panelID: `panel-${section.id}`
|
|
17345
17345
|
}));
|
|
17346
17346
|
const headerMarkup = /*#__PURE__*/jsx("div", {
|
|
17347
|
-
className: `${MAIN_CLASS$
|
|
17347
|
+
className: `${MAIN_CLASS$h}__HeaderWrapper`,
|
|
17348
17348
|
children: /*#__PURE__*/jsx("span", {
|
|
17349
17349
|
children: title
|
|
17350
17350
|
})
|
|
@@ -17407,7 +17407,7 @@ const AlphaFilterControl = ({
|
|
|
17407
17407
|
setFilterValues(values);
|
|
17408
17408
|
}, [values]);
|
|
17409
17409
|
const bodyMarkup = useMemo(() => /*#__PURE__*/jsx("div", {
|
|
17410
|
-
className: `${MAIN_CLASS$
|
|
17410
|
+
className: `${MAIN_CLASS$h}__BodyWrapper`,
|
|
17411
17411
|
children: /*#__PURE__*/jsx(Tabs, {
|
|
17412
17412
|
selected: selectedTab,
|
|
17413
17413
|
tabs: tabsConfig,
|
|
@@ -17416,7 +17416,7 @@ const AlphaFilterControl = ({
|
|
|
17416
17416
|
})
|
|
17417
17417
|
}), [tabsConfig, selectedTab, fieldsSearch]);
|
|
17418
17418
|
const actionsMarkup = /*#__PURE__*/jsx("div", {
|
|
17419
|
-
className: `${MAIN_CLASS$
|
|
17419
|
+
className: `${MAIN_CLASS$h}__ActionWrapper`,
|
|
17420
17420
|
children: /*#__PURE__*/jsx(PageActions, {
|
|
17421
17421
|
position: "flex-end",
|
|
17422
17422
|
primaryAction: {
|
|
@@ -17427,12 +17427,12 @@ const AlphaFilterControl = ({
|
|
|
17427
17427
|
})
|
|
17428
17428
|
});
|
|
17429
17429
|
return /*#__PURE__*/jsxs("div", {
|
|
17430
|
-
className: `${MAIN_CLASS$
|
|
17430
|
+
className: `${MAIN_CLASS$h}`,
|
|
17431
17431
|
children: [headerMarkup, bodyMarkup, actionsMarkup]
|
|
17432
17432
|
});
|
|
17433
17433
|
};
|
|
17434
17434
|
|
|
17435
|
-
const MAIN_CLASS$
|
|
17435
|
+
const MAIN_CLASS$g = "AlphaGraphicCard";
|
|
17436
17436
|
const AlphaGraphicCard = ({
|
|
17437
17437
|
data
|
|
17438
17438
|
}) => {
|
|
@@ -17442,14 +17442,14 @@ const AlphaGraphicCard = ({
|
|
|
17442
17442
|
percent
|
|
17443
17443
|
} = dataGraphic;
|
|
17444
17444
|
return /*#__PURE__*/jsxs("div", {
|
|
17445
|
-
className: `${MAIN_CLASS$
|
|
17445
|
+
className: `${MAIN_CLASS$g}__GraphicContainerWrapper`,
|
|
17446
17446
|
children: [/*#__PURE__*/jsx("div", {
|
|
17447
|
-
className: `${MAIN_CLASS$
|
|
17447
|
+
className: `${MAIN_CLASS$g}__Graphic`,
|
|
17448
17448
|
style: {
|
|
17449
17449
|
width: `${percent}%`
|
|
17450
17450
|
}
|
|
17451
17451
|
}), /*#__PURE__*/jsx("span", {
|
|
17452
|
-
className: `${MAIN_CLASS$
|
|
17452
|
+
className: `${MAIN_CLASS$g}__GraphicLabel`,
|
|
17453
17453
|
children: label
|
|
17454
17454
|
})]
|
|
17455
17455
|
}, `graphic-item-${index}`);
|
|
@@ -17460,12 +17460,12 @@ const AlphaGraphicCard = ({
|
|
|
17460
17460
|
total
|
|
17461
17461
|
} = dataGraphic;
|
|
17462
17462
|
return /*#__PURE__*/jsxs("div", {
|
|
17463
|
-
className: `${MAIN_CLASS$
|
|
17463
|
+
className: `${MAIN_CLASS$g}__TotalContainer`,
|
|
17464
17464
|
children: [!hidePercent ? /*#__PURE__*/jsxs(Fragment, {
|
|
17465
17465
|
children: [/*#__PURE__*/jsxs("span", {
|
|
17466
17466
|
children: [percent, "%"]
|
|
17467
17467
|
}), /*#__PURE__*/jsx("span", {
|
|
17468
|
-
className: `${MAIN_CLASS$
|
|
17468
|
+
className: `${MAIN_CLASS$g}__TotalDivider`
|
|
17469
17469
|
})]
|
|
17470
17470
|
}) : null, /*#__PURE__*/jsx("span", {
|
|
17471
17471
|
children: total
|
|
@@ -17479,15 +17479,15 @@ const AlphaGraphicCard = ({
|
|
|
17479
17479
|
variant,
|
|
17480
17480
|
hidePercent
|
|
17481
17481
|
} = dataCard;
|
|
17482
|
-
const classesGraphicWrapper = cssClassName(`${MAIN_CLASS$
|
|
17483
|
-
const classesTotalWrapper = cssClassName(`${MAIN_CLASS$
|
|
17482
|
+
const classesGraphicWrapper = cssClassName(`${MAIN_CLASS$g}__GraphicWrapper`, variant || "primary");
|
|
17483
|
+
const classesTotalWrapper = cssClassName(`${MAIN_CLASS$g}__TotalWrapper`, variant || "primary");
|
|
17484
17484
|
return /*#__PURE__*/jsxs("div", {
|
|
17485
|
-
className: `${MAIN_CLASS$
|
|
17485
|
+
className: `${MAIN_CLASS$g}__DataContainer`,
|
|
17486
17486
|
children: [/*#__PURE__*/jsx("div", {
|
|
17487
|
-
className: `${MAIN_CLASS$
|
|
17487
|
+
className: `${MAIN_CLASS$g}__TitleContainer`,
|
|
17488
17488
|
children: title
|
|
17489
17489
|
}), /*#__PURE__*/jsxs("div", {
|
|
17490
|
-
className: `${MAIN_CLASS$
|
|
17490
|
+
className: `${MAIN_CLASS$g}__GraphicTotalWrapper`,
|
|
17491
17491
|
children: [/*#__PURE__*/jsx("div", {
|
|
17492
17492
|
className: classesGraphicWrapper,
|
|
17493
17493
|
children: dataGraphics.map(renderGraphic)
|
|
@@ -17508,14 +17508,14 @@ const AlphaGraphicCard = ({
|
|
|
17508
17508
|
const isOnlyRow = allItems.length <= 3;
|
|
17509
17509
|
const haveItemTop = index > 3;
|
|
17510
17510
|
const haveItemBottom = index + 4 <= totalItems;
|
|
17511
|
-
const classesContainer = cssClassName(`${MAIN_CLASS$
|
|
17511
|
+
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");
|
|
17512
17512
|
return /*#__PURE__*/jsx("div", {
|
|
17513
17513
|
className: classesContainer,
|
|
17514
17514
|
children: renderContent(item)
|
|
17515
17515
|
}, `graphic-card-${index}`);
|
|
17516
17516
|
};
|
|
17517
17517
|
return /*#__PURE__*/jsx("div", {
|
|
17518
|
-
className: MAIN_CLASS$
|
|
17518
|
+
className: MAIN_CLASS$g,
|
|
17519
17519
|
children: data.map(renderContainer)
|
|
17520
17520
|
});
|
|
17521
17521
|
};
|
|
@@ -18843,7 +18843,7 @@ const AnnotatedSection = ({
|
|
|
18843
18843
|
})]
|
|
18844
18844
|
});
|
|
18845
18845
|
|
|
18846
|
-
const MAIN_CLASS$
|
|
18846
|
+
const MAIN_CLASS$f = "Thumbnail";
|
|
18847
18847
|
|
|
18848
18848
|
/** Thumbnail is used to provides a miniaturized version of image
|
|
18849
18849
|
*
|
|
@@ -18868,7 +18868,7 @@ const Thumbnail = ({
|
|
|
18868
18868
|
source,
|
|
18869
18869
|
icon
|
|
18870
18870
|
}) => {
|
|
18871
|
-
const className = [MAIN_CLASS$
|
|
18871
|
+
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(" ");
|
|
18872
18872
|
return /*#__PURE__*/jsxs("div", {
|
|
18873
18873
|
className: className,
|
|
18874
18874
|
children: [source !== "" && /*#__PURE__*/jsx("img", {
|
|
@@ -18880,7 +18880,7 @@ const Thumbnail = ({
|
|
|
18880
18880
|
});
|
|
18881
18881
|
};
|
|
18882
18882
|
|
|
18883
|
-
const MAIN_CLASS$
|
|
18883
|
+
const MAIN_CLASS$e = 'Card';
|
|
18884
18884
|
|
|
18885
18885
|
/**
|
|
18886
18886
|
* Card component are used primarily for show a little information, sometimes with image.
|
|
@@ -18921,7 +18921,7 @@ const Card = ({
|
|
|
18921
18921
|
title,
|
|
18922
18922
|
icon
|
|
18923
18923
|
}) => {
|
|
18924
|
-
const className = [MAIN_CLASS$
|
|
18924
|
+
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(' ');
|
|
18925
18925
|
const showThumbnail = source !== undefined || icon;
|
|
18926
18926
|
return /*#__PURE__*/jsxs("div", {
|
|
18927
18927
|
className: className,
|
|
@@ -19025,7 +19025,7 @@ const Badge = ({
|
|
|
19025
19025
|
children: children
|
|
19026
19026
|
});
|
|
19027
19027
|
|
|
19028
|
-
const MAIN_CLASS$
|
|
19028
|
+
const MAIN_CLASS$d = 'Banner';
|
|
19029
19029
|
|
|
19030
19030
|
/**
|
|
19031
19031
|
* Banner are used primarily show something informatión in a small container blue.
|
|
@@ -19052,7 +19052,7 @@ const Banner = ({
|
|
|
19052
19052
|
const {
|
|
19053
19053
|
theme
|
|
19054
19054
|
} = useTheme();
|
|
19055
|
-
const classes = [MAIN_CLASS$
|
|
19055
|
+
const classes = [MAIN_CLASS$d, `${MAIN_CLASS$d}--${theme}`, hasShadow && 'Banner--has-shadow', appearance && `Banner--${appearance}`, appearance === 'info' && `Banner--${appearance}-${theme}`].filter(Boolean).join(' ');
|
|
19056
19056
|
return /*#__PURE__*/jsxs("div", {
|
|
19057
19057
|
className: classes,
|
|
19058
19058
|
children: [icon && /*#__PURE__*/jsxs("div", {
|
|
@@ -25210,7 +25210,7 @@ const Checkbox = ({
|
|
|
25210
25210
|
});
|
|
25211
25211
|
};
|
|
25212
25212
|
|
|
25213
|
-
const MAIN_CLASS$
|
|
25213
|
+
const MAIN_CLASS$c = 'ChoiceList';
|
|
25214
25214
|
|
|
25215
25215
|
/**
|
|
25216
25216
|
* Allow user to select one or multiple options from a list. Make sure all options
|
|
@@ -25240,7 +25240,7 @@ const ChoiceList = ({
|
|
|
25240
25240
|
onChange,
|
|
25241
25241
|
title
|
|
25242
25242
|
}) => {
|
|
25243
|
-
const className = [MAIN_CLASS$
|
|
25243
|
+
const className = [MAIN_CLASS$c].filter(Boolean).join(' ');
|
|
25244
25244
|
const ControlComponent = allowMultiple ? Checkbox : RadioButton;
|
|
25245
25245
|
const titleMarkup = title ? /*#__PURE__*/jsx("legend", {
|
|
25246
25246
|
children: title
|
|
@@ -25257,7 +25257,7 @@ const ChoiceList = ({
|
|
|
25257
25257
|
}
|
|
25258
25258
|
};
|
|
25259
25259
|
return /*#__PURE__*/jsx("li", {
|
|
25260
|
-
className: `${MAIN_CLASS$
|
|
25260
|
+
className: `${MAIN_CLASS$c}__ListItem`,
|
|
25261
25261
|
children: /*#__PURE__*/jsx(ControlComponent, {
|
|
25262
25262
|
"aria-label": ariaLabel,
|
|
25263
25263
|
name: name,
|
|
@@ -25289,10 +25289,10 @@ const ChoiceList = ({
|
|
|
25289
25289
|
return /*#__PURE__*/jsxs("fieldset", {
|
|
25290
25290
|
className: className,
|
|
25291
25291
|
children: [titleMarkup || checkboxSelectAllMarkup ? /*#__PURE__*/jsxs("div", {
|
|
25292
|
-
className: `${MAIN_CLASS$
|
|
25292
|
+
className: `${MAIN_CLASS$c}__TitleContainer`,
|
|
25293
25293
|
children: [checkboxSelectAllMarkup, titleMarkup]
|
|
25294
25294
|
}) : null, /*#__PURE__*/jsx("ul", {
|
|
25295
|
-
className: `${MAIN_CLASS$
|
|
25295
|
+
className: `${MAIN_CLASS$c}__List`,
|
|
25296
25296
|
children: choicesMarkup
|
|
25297
25297
|
})]
|
|
25298
25298
|
});
|
|
@@ -25409,7 +25409,7 @@ const DataTable = ({
|
|
|
25409
25409
|
DataTable.Row = Row$1;
|
|
25410
25410
|
DataTable.Cell = Cell$1;
|
|
25411
25411
|
|
|
25412
|
-
const MAIN_CLASS$
|
|
25412
|
+
const MAIN_CLASS$b = "Connector";
|
|
25413
25413
|
const Connector = ({
|
|
25414
25414
|
alt,
|
|
25415
25415
|
icon,
|
|
@@ -25421,7 +25421,7 @@ const Connector = ({
|
|
|
25421
25421
|
onClick,
|
|
25422
25422
|
theme = "CLOUD"
|
|
25423
25423
|
}) => {
|
|
25424
|
-
const classes = [`${MAIN_CLASS$
|
|
25424
|
+
const classes = [`${MAIN_CLASS$b}`, theme && `${MAIN_CLASS$b}--is-${theme}`, isActive && `${MAIN_CLASS$b}--is-active`].filter(Boolean).join(" ");
|
|
25425
25425
|
const handleOnClick = () => {
|
|
25426
25426
|
onClick && onClick(id);
|
|
25427
25427
|
};
|
|
@@ -25429,30 +25429,30 @@ const Connector = ({
|
|
|
25429
25429
|
className: classes,
|
|
25430
25430
|
onClick: handleOnClick,
|
|
25431
25431
|
children: /*#__PURE__*/jsxs("div", {
|
|
25432
|
-
className: `${MAIN_CLASS$
|
|
25432
|
+
className: `${MAIN_CLASS$b}__container`,
|
|
25433
25433
|
children: [!image && icon && /*#__PURE__*/jsx("div", {
|
|
25434
|
-
className: `${MAIN_CLASS$
|
|
25434
|
+
className: `${MAIN_CLASS$b}__icon`,
|
|
25435
25435
|
children: /*#__PURE__*/jsx(Icon, {
|
|
25436
25436
|
name: icon
|
|
25437
25437
|
})
|
|
25438
25438
|
}), image && /*#__PURE__*/jsx("div", {
|
|
25439
|
-
className: `${MAIN_CLASS$
|
|
25439
|
+
className: `${MAIN_CLASS$b}__image`,
|
|
25440
25440
|
children: /*#__PURE__*/jsx("img", {
|
|
25441
25441
|
alt: alt,
|
|
25442
25442
|
src: image
|
|
25443
25443
|
})
|
|
25444
25444
|
}), name && /*#__PURE__*/jsx("span", {
|
|
25445
|
-
className: `${MAIN_CLASS$
|
|
25445
|
+
className: `${MAIN_CLASS$b}__name`,
|
|
25446
25446
|
children: name
|
|
25447
25447
|
}), meta && /*#__PURE__*/jsx("div", {
|
|
25448
|
-
className: `${MAIN_CLASS$
|
|
25448
|
+
className: `${MAIN_CLASS$b}__meta`,
|
|
25449
25449
|
children: meta
|
|
25450
25450
|
})]
|
|
25451
25451
|
})
|
|
25452
25452
|
});
|
|
25453
25453
|
};
|
|
25454
25454
|
|
|
25455
|
-
const MAIN_CLASS$
|
|
25455
|
+
const MAIN_CLASS$a = 'Container';
|
|
25456
25456
|
|
|
25457
25457
|
/**
|
|
25458
25458
|
*
|
|
@@ -25465,14 +25465,14 @@ const Container = ({
|
|
|
25465
25465
|
children,
|
|
25466
25466
|
hasShadow = true
|
|
25467
25467
|
}) => {
|
|
25468
|
-
const className = [MAIN_CLASS$
|
|
25468
|
+
const className = [MAIN_CLASS$a, hasShadow && `${MAIN_CLASS$a}--has-shadow`].filter(Boolean).join(' ');
|
|
25469
25469
|
return /*#__PURE__*/jsx("div", {
|
|
25470
25470
|
className: className,
|
|
25471
25471
|
children: children
|
|
25472
25472
|
});
|
|
25473
25473
|
};
|
|
25474
25474
|
|
|
25475
|
-
const MAIN_CLASS$
|
|
25475
|
+
const MAIN_CLASS$9 = 'Cover';
|
|
25476
25476
|
|
|
25477
25477
|
/**
|
|
25478
25478
|
*
|
|
@@ -25488,7 +25488,7 @@ const Cover = ({
|
|
|
25488
25488
|
source,
|
|
25489
25489
|
hasShadow = false
|
|
25490
25490
|
}) => {
|
|
25491
|
-
const className = [MAIN_CLASS$
|
|
25491
|
+
const className = [MAIN_CLASS$9, position && `${MAIN_CLASS$9}--${position}`, hasShadow && `${MAIN_CLASS$9}--has-shadow`].filter(Boolean).join(' ');
|
|
25492
25492
|
return /*#__PURE__*/jsx("div", {
|
|
25493
25493
|
style: {
|
|
25494
25494
|
backgroundImage: `url(${source})`
|
|
@@ -33857,14 +33857,14 @@ const EmptyState = ({
|
|
|
33857
33857
|
});
|
|
33858
33858
|
};
|
|
33859
33859
|
|
|
33860
|
-
const MAIN_CLASS$
|
|
33860
|
+
const MAIN_CLASS$8 = "FileDownloader";
|
|
33861
33861
|
const FileDownloader = ({
|
|
33862
33862
|
ariaLabel,
|
|
33863
33863
|
title = "Download",
|
|
33864
33864
|
isDisabled,
|
|
33865
33865
|
onDownload
|
|
33866
33866
|
}) => {
|
|
33867
|
-
const className = [MAIN_CLASS$
|
|
33867
|
+
const className = [MAIN_CLASS$8, isDisabled && `${MAIN_CLASS$8}--is-disabled`].filter(Boolean).join(" ");
|
|
33868
33868
|
return /*#__PURE__*/jsxs("div", {
|
|
33869
33869
|
className: className,
|
|
33870
33870
|
children: [title, /*#__PURE__*/jsx("button", {
|
|
@@ -33877,6 +33877,233 @@ const FileDownloader = ({
|
|
|
33877
33877
|
});
|
|
33878
33878
|
};
|
|
33879
33879
|
|
|
33880
|
+
const MAIN_CLASS$7 = 'FileUpload';
|
|
33881
|
+
|
|
33882
|
+
/**
|
|
33883
|
+
* FileUpload component with drag and drop functionality
|
|
33884
|
+
*
|
|
33885
|
+
* @example
|
|
33886
|
+
* <FileUpload
|
|
33887
|
+
* label="Upload File"
|
|
33888
|
+
* iconName="Upload"
|
|
33889
|
+
* title="Drag & drop files here"
|
|
33890
|
+
* subtitle="Or click to browse"
|
|
33891
|
+
* value={files}
|
|
33892
|
+
* onValueChange={setFiles}
|
|
33893
|
+
* maxFiles={5}
|
|
33894
|
+
* maxSize={5 * 1024 * 1024}
|
|
33895
|
+
* accept=".csv"
|
|
33896
|
+
* multiple
|
|
33897
|
+
* />
|
|
33898
|
+
*/
|
|
33899
|
+
const FileUpload = ({
|
|
33900
|
+
label,
|
|
33901
|
+
iconName = 'Upload',
|
|
33902
|
+
title = 'Drag & drop files here',
|
|
33903
|
+
subtitle = 'Or click to browse',
|
|
33904
|
+
value = [],
|
|
33905
|
+
onValueChange,
|
|
33906
|
+
maxFiles,
|
|
33907
|
+
maxSize,
|
|
33908
|
+
accept,
|
|
33909
|
+
multiple = false,
|
|
33910
|
+
disabled = false,
|
|
33911
|
+
onFileReject,
|
|
33912
|
+
onFileRemove,
|
|
33913
|
+
onDrop,
|
|
33914
|
+
ariaLabel
|
|
33915
|
+
}) => {
|
|
33916
|
+
const [isDragging, setIsDragging] = useState(false);
|
|
33917
|
+
const fileInputRef = useRef(null);
|
|
33918
|
+
const dropzoneRef = useRef(null);
|
|
33919
|
+
const validateFile = useCallback(file => {
|
|
33920
|
+
// Check max size
|
|
33921
|
+
if (maxSize && file.size > maxSize) {
|
|
33922
|
+
return `File size exceeds maximum of ${formatFileSize(maxSize)}`;
|
|
33923
|
+
}
|
|
33924
|
+
|
|
33925
|
+
// Check accept
|
|
33926
|
+
if (accept) {
|
|
33927
|
+
const acceptTypes = accept.split(',').map(t => t.trim());
|
|
33928
|
+
const fileExtension = '.' + file.name.split('.').pop()?.toLowerCase();
|
|
33929
|
+
const fileType = file.type;
|
|
33930
|
+
const isAccepted = acceptTypes.some(acceptType => {
|
|
33931
|
+
if (acceptType.startsWith('.')) {
|
|
33932
|
+
return fileExtension === acceptType.toLowerCase();
|
|
33933
|
+
}
|
|
33934
|
+
if (acceptType.includes('/*')) {
|
|
33935
|
+
const baseType = acceptType.split('/')[0];
|
|
33936
|
+
return fileType.startsWith(baseType + '/');
|
|
33937
|
+
}
|
|
33938
|
+
return fileType === acceptType;
|
|
33939
|
+
});
|
|
33940
|
+
if (!isAccepted) {
|
|
33941
|
+
return `File type not accepted. Accepted types: ${accept}`;
|
|
33942
|
+
}
|
|
33943
|
+
}
|
|
33944
|
+
return null;
|
|
33945
|
+
}, [maxSize, accept]);
|
|
33946
|
+
const validateAndAddFiles = useCallback(newFiles => {
|
|
33947
|
+
const currentFiles = value || [];
|
|
33948
|
+
const validFiles = [];
|
|
33949
|
+
|
|
33950
|
+
// Check max files limit
|
|
33951
|
+
const remainingSlots = maxFiles ? maxFiles - currentFiles.length : Infinity;
|
|
33952
|
+
if (remainingSlots <= 0) {
|
|
33953
|
+
newFiles.forEach(file => {
|
|
33954
|
+
const message = `Maximum ${maxFiles} file(s) allowed`;
|
|
33955
|
+
onFileReject?.(file, message);
|
|
33956
|
+
});
|
|
33957
|
+
return currentFiles;
|
|
33958
|
+
}
|
|
33959
|
+
|
|
33960
|
+
// Validate and add files
|
|
33961
|
+
const filesToAdd = newFiles.slice(0, remainingSlots);
|
|
33962
|
+
const filesToReject = newFiles.slice(remainingSlots);
|
|
33963
|
+
filesToAdd.forEach(file => {
|
|
33964
|
+
const error = validateFile(file);
|
|
33965
|
+
if (error) {
|
|
33966
|
+
onFileReject?.(file, error);
|
|
33967
|
+
} else {
|
|
33968
|
+
validFiles.push(file);
|
|
33969
|
+
}
|
|
33970
|
+
});
|
|
33971
|
+
filesToReject.forEach(file => {
|
|
33972
|
+
const message = `Maximum ${maxFiles} file(s) allowed`;
|
|
33973
|
+
onFileReject?.(file, message);
|
|
33974
|
+
});
|
|
33975
|
+
if (validFiles.length > 0) {
|
|
33976
|
+
const updatedFiles = multiple ? [...currentFiles, ...validFiles] : validFiles.slice(0, 1);
|
|
33977
|
+
onValueChange?.(updatedFiles);
|
|
33978
|
+
return updatedFiles;
|
|
33979
|
+
}
|
|
33980
|
+
return currentFiles;
|
|
33981
|
+
}, [value, maxFiles, multiple, validateFile, onValueChange, onFileReject]);
|
|
33982
|
+
const handleFileInputChange = useCallback(event => {
|
|
33983
|
+
const files = event.target.files ? Array.from(event.target.files) : [];
|
|
33984
|
+
if (files.length > 0) {
|
|
33985
|
+
validateAndAddFiles(files);
|
|
33986
|
+
}
|
|
33987
|
+
// Reset input to allow selecting the same file again
|
|
33988
|
+
if (fileInputRef.current) {
|
|
33989
|
+
fileInputRef.current.value = '';
|
|
33990
|
+
}
|
|
33991
|
+
}, [validateAndAddFiles]);
|
|
33992
|
+
const handleDrop = useCallback(event => {
|
|
33993
|
+
event.preventDefault();
|
|
33994
|
+
event.stopPropagation();
|
|
33995
|
+
setIsDragging(false);
|
|
33996
|
+
if (disabled) return;
|
|
33997
|
+
const files = Array.from(event.dataTransfer.files);
|
|
33998
|
+
if (files.length > 0) {
|
|
33999
|
+
const updatedFiles = validateAndAddFiles(files);
|
|
34000
|
+
onDrop?.(updatedFiles);
|
|
34001
|
+
}
|
|
34002
|
+
}, [disabled, validateAndAddFiles, onDrop]);
|
|
34003
|
+
const handleDragOver = useCallback(event => {
|
|
34004
|
+
event.preventDefault();
|
|
34005
|
+
event.stopPropagation();
|
|
34006
|
+
if (!disabled) {
|
|
34007
|
+
setIsDragging(true);
|
|
34008
|
+
}
|
|
34009
|
+
}, [disabled]);
|
|
34010
|
+
const handleDragLeave = useCallback(event => {
|
|
34011
|
+
event.preventDefault();
|
|
34012
|
+
event.stopPropagation();
|
|
34013
|
+
// Only set dragging to false if we're leaving the dropzone
|
|
34014
|
+
if (!dropzoneRef.current?.contains(event.relatedTarget)) {
|
|
34015
|
+
setIsDragging(false);
|
|
34016
|
+
}
|
|
34017
|
+
}, []);
|
|
34018
|
+
const handleClick = useCallback(() => {
|
|
34019
|
+
if (!disabled && fileInputRef.current) {
|
|
34020
|
+
fileInputRef.current.click();
|
|
34021
|
+
}
|
|
34022
|
+
}, [disabled]);
|
|
34023
|
+
const handleRemoveFile = useCallback(fileToRemove => {
|
|
34024
|
+
const updatedFiles = value.filter(file => file !== fileToRemove);
|
|
34025
|
+
onValueChange?.(updatedFiles);
|
|
34026
|
+
onFileRemove?.(fileToRemove);
|
|
34027
|
+
}, [value, onValueChange, onFileRemove]);
|
|
34028
|
+
const dropzoneClassName = [`${MAIN_CLASS$7}__dropzone`, isDragging && `${MAIN_CLASS$7}__dropzone--dragging`, disabled && `${MAIN_CLASS$7}__dropzone--disabled`].filter(Boolean).join(' ');
|
|
34029
|
+
const labelMarkup = label ? /*#__PURE__*/jsx("label", {
|
|
34030
|
+
className: `${MAIN_CLASS$7}__label`,
|
|
34031
|
+
children: label
|
|
34032
|
+
}) : null;
|
|
34033
|
+
const dropzoneMarkup = /*#__PURE__*/jsxs("div", {
|
|
34034
|
+
ref: dropzoneRef,
|
|
34035
|
+
className: dropzoneClassName,
|
|
34036
|
+
onDrop: handleDrop,
|
|
34037
|
+
onDragOver: handleDragOver,
|
|
34038
|
+
onDragLeave: handleDragLeave,
|
|
34039
|
+
onClick: handleClick,
|
|
34040
|
+
role: "button",
|
|
34041
|
+
tabIndex: disabled ? -1 : 0,
|
|
34042
|
+
"aria-label": ariaLabel || 'File upload dropzone',
|
|
34043
|
+
"aria-disabled": disabled,
|
|
34044
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
34045
|
+
className: `${MAIN_CLASS$7}__container`,
|
|
34046
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
34047
|
+
className: `${MAIN_CLASS$7}__icon-wrapper`,
|
|
34048
|
+
children: /*#__PURE__*/jsx(Icon, {
|
|
34049
|
+
name: iconName
|
|
34050
|
+
})
|
|
34051
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
34052
|
+
className: `${MAIN_CLASS$7}__copy-wrapper`,
|
|
34053
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
34054
|
+
className: `${MAIN_CLASS$7}__copy-title`,
|
|
34055
|
+
children: title
|
|
34056
|
+
}), /*#__PURE__*/jsx("div", {
|
|
34057
|
+
className: `${MAIN_CLASS$7}__copy-subtitle`,
|
|
34058
|
+
children: subtitle
|
|
34059
|
+
})]
|
|
34060
|
+
})]
|
|
34061
|
+
}), /*#__PURE__*/jsx("input", {
|
|
34062
|
+
ref: fileInputRef,
|
|
34063
|
+
type: "file",
|
|
34064
|
+
multiple: multiple,
|
|
34065
|
+
accept: accept,
|
|
34066
|
+
onChange: handleFileInputChange,
|
|
34067
|
+
disabled: disabled,
|
|
34068
|
+
"aria-label": `${ariaLabel || 'file'}-input`,
|
|
34069
|
+
className: `${MAIN_CLASS$7}__input`
|
|
34070
|
+
})]
|
|
34071
|
+
});
|
|
34072
|
+
const fileListMarkup = value && value.length > 0 ? /*#__PURE__*/jsx("div", {
|
|
34073
|
+
className: `${MAIN_CLASS$7}__list`,
|
|
34074
|
+
children: value.map((file, index) => /*#__PURE__*/jsxs("div", {
|
|
34075
|
+
className: `${MAIN_CLASS$7}__item`,
|
|
34076
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
34077
|
+
className: `${MAIN_CLASS$7}__item-content`,
|
|
34078
|
+
children: [/*#__PURE__*/jsx(Icon, {
|
|
34079
|
+
name: "Paperclip"
|
|
34080
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
34081
|
+
className: `${MAIN_CLASS$7}__item-info`,
|
|
34082
|
+
children: [/*#__PURE__*/jsx("span", {
|
|
34083
|
+
className: `${MAIN_CLASS$7}__item-name`,
|
|
34084
|
+
children: file.name
|
|
34085
|
+
}), /*#__PURE__*/jsx("span", {
|
|
34086
|
+
className: `${MAIN_CLASS$7}__item-size`,
|
|
34087
|
+
children: formatFileSize(file.size)
|
|
34088
|
+
})]
|
|
34089
|
+
})]
|
|
34090
|
+
}), /*#__PURE__*/jsx("button", {
|
|
34091
|
+
className: `${MAIN_CLASS$7}__item-delete`,
|
|
34092
|
+
onClick: () => handleRemoveFile(file),
|
|
34093
|
+
"aria-label": `Remove ${file.name}`,
|
|
34094
|
+
type: "button",
|
|
34095
|
+
children: /*#__PURE__*/jsx(Icon, {
|
|
34096
|
+
name: "Close"
|
|
34097
|
+
})
|
|
34098
|
+
})]
|
|
34099
|
+
}, `${file.name}-${index}`))
|
|
34100
|
+
}) : null;
|
|
34101
|
+
return /*#__PURE__*/jsxs("div", {
|
|
34102
|
+
className: MAIN_CLASS$7,
|
|
34103
|
+
children: [labelMarkup, dropzoneMarkup, fileListMarkup]
|
|
34104
|
+
});
|
|
34105
|
+
};
|
|
34106
|
+
|
|
33880
34107
|
const MAIN_CLASS$6 = 'Label';
|
|
33881
34108
|
|
|
33882
34109
|
/**
|
|
@@ -41020,5 +41247,5 @@ const Link = ({
|
|
|
41020
41247
|
});
|
|
41021
41248
|
};
|
|
41022
41249
|
|
|
41023
|
-
export { ActionList, Alert, AlertProvider, AlphaAttributeInput, AlphaBadge, AlphaButton, AlphaChip, AlphaFilterControl, AlphaGraphicCard, AlphaIcon, AlphaInlineError, AlphaInputDate, InputTag$1 as AlphaInputTag, AlphaInputText, AlphaLabel, AlphaLabelledField, AlphaMultiSelectionPicker, AlphaSegmentedControl, AlphaSideMenu, AlphaSpinner, AlphaStepper, AlphaTag, AlphaTile, AlphaTooltip, Totalizer as AlphaTotalizer, AlphaZipCodeInput, AnnotatedSection, Avatar, Badge, Banner, Button, CalendarPicker, Card, Checkbox, ChoiceList, Collapsible, Connector, Container, Cover, DataTable, DatePicker, DeletableSection, Divider, DynamicForm, EmptyState, ErrorIcon, FileDownloader, Filedrop, FilterControl, Filters, Footer, Form$1 as Form, FormField, FormLayout, Frame, Grid, GridItem, Header$1 as Header, Icon, IconButton, IndexList, InlineEdit, InputPhoneNumber, InputTag, InputText, Item$2 as Item, JsonViewer, Label, Link, ListInfo, Loader, Logo, Media, Modal, ModalHeader, Nip, OptionList, Page, PageActions, Pagination, Pane, Panel, PanelFooter, PanelHeader, PendingIcon, Popover$1 as Popover, Progress, RadioButton, Section$1 as Section, SectionForm, Select, SideMenu, SkeletonInput, SkeletonMedia, SkeletonTabs, SkeletonText, SkeletonTitle, SortableList, Spinner, Stack, StepDefault, SuccessIcon, Table, Tabs, Tag, ThemeProvider, ThreadItem, Thumbnail, Tier, Tile, TimeSelector, Title, Toggle, Tooltip, WarningIcon, capitalize, cssClassName, formatDate, formatFileSize, isComponentTypeOf, isValidIcon, themeClassConverter, useDeleteAlert, useShowAlert, useTheme };
|
|
41250
|
+
export { ActionList, Alert, AlertProvider, AlphaAttributeInput, AlphaBadge, AlphaButton, AlphaChip, AlphaFilterControl, AlphaGraphicCard, AlphaIcon, AlphaInlineError, AlphaInputDate, InputTag$1 as AlphaInputTag, AlphaInputText, AlphaLabel, AlphaLabelledField, AlphaMultiSelectionPicker, AlphaSegmentedControl, AlphaSideMenu, AlphaSpinner, AlphaStepper, AlphaTag, AlphaTile, AlphaTooltip, Totalizer as AlphaTotalizer, AlphaZipCodeInput, AnnotatedSection, Avatar, Badge, Banner, Button, CalendarPicker, Card, Checkbox, ChoiceList, Collapsible, Connector, Container, Cover, DataTable, DatePicker, DeletableSection, Divider, DynamicForm, EmptyState, ErrorIcon, FileDownloader, FileUpload, Filedrop, FilterControl, Filters, Footer, Form$1 as Form, FormField, FormLayout, Frame, Grid, GridItem, Header$1 as Header, Icon, IconButton, IndexList, InlineEdit, InputPhoneNumber, InputTag, InputText, Item$2 as Item, JsonViewer, Label, Link, ListInfo, Loader, Logo, Media, Modal, ModalHeader, Nip, OptionList, Page, PageActions, Pagination, Pane, Panel, PanelFooter, PanelHeader, PendingIcon, Popover$1 as Popover, Progress, RadioButton, Section$1 as Section, SectionForm, Select, SideMenu, SkeletonInput, SkeletonMedia, SkeletonTabs, SkeletonText, SkeletonTitle, SortableList, Spinner, Stack, StepDefault, SuccessIcon, Table, Tabs, Tag, ThemeProvider, ThreadItem, Thumbnail, Tier, Tile, TimeSelector, Title, Toggle, Tooltip, WarningIcon, capitalize, cssClassName, formatDate, formatFileSize, isComponentTypeOf, isValidIcon, themeClassConverter, useDeleteAlert, useShowAlert, useTheme };
|
|
41024
41251
|
//# sourceMappingURL=index.esm.js.map
|