@taikai/rocket-kit 3.0.2 → 3.0.4
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/molecules/field-with-button/index.d.ts +4 -1
- package/dist/rocket-kit.cjs.development.js +70 -55
- package/dist/rocket-kit.cjs.development.js.map +1 -1
- package/dist/rocket-kit.cjs.production.min.js +9 -9
- package/dist/rocket-kit.cjs.production.min.js.map +1 -1
- package/dist/rocket-kit.esm.js +70 -55
- package/dist/rocket-kit.esm.js.map +1 -1
- package/package.json +20 -13
- package/dist/atoms/avatar-image/stories/avatar-image.stories.d.ts +0 -48
- package/dist/atoms/button/stories/button.stories.d.ts +0 -57
- package/dist/atoms/button-dropdown/stories/button-dropdown.stories.d.ts +0 -56
- package/dist/atoms/button-link/stories/button-link.stories.d.ts +0 -58
- package/dist/atoms/checkbox-button/stories/checkbox-button.stories.d.ts +0 -24
- package/dist/atoms/file-picker/stories/file-picker.stories.d.ts +0 -22
- package/dist/atoms/icon/stories/icon.stories.d.ts +0 -40
- package/dist/atoms/label/stories/label.stories.d.ts +0 -30
- package/dist/atoms/progress-bar/stories/progress-bar.stories.d.ts +0 -15
- package/dist/atoms/select/stories/select.stories.d.ts +0 -31
- package/dist/atoms/select-interactive/stories/select-interactive.stories.d.ts +0 -50
- package/dist/atoms/slideshow/stories/slideshow.stories.d.ts +0 -22
- package/dist/atoms/tag/stories/tag.stories.d.ts +0 -37
- package/dist/atoms/tag-number/stories/tag-number.stories.d.ts +0 -31
- package/dist/atoms/text-area/stories/text-area.stories.d.ts +0 -80
- package/dist/atoms/text-field-appendix/stories/text-field-appendix.stories.d.ts +0 -43
- package/dist/atoms/toggle/stories/toogle.stories.d.ts +0 -18
- package/dist/atoms/truncate-line/stories/truncate-line.stories.d.ts +0 -14
- package/dist/atoms/video-player/stories/video-player.stories.d.ts +0 -24
- package/dist/globalStyles.d.ts +0 -2
- package/dist/molecules/card-value/stories/card-value.stories.d.ts +0 -45
- package/dist/molecules/checkbox-group/stories/checkbox-group.stories.d.ts +0 -33
- package/dist/molecules/data-warning/stories/data-warning.stories.d.ts +0 -22
- package/dist/molecules/empty-table/stories/empty-table.stories.d.ts +0 -17
- package/dist/molecules/error/stories/error.stories.d.ts +0 -22
- package/dist/molecules/field-with-button/stories/field-with-button.stories.d.ts +0 -25
- package/dist/molecules/form-group/stories/form-group.stories.d.ts +0 -29
- package/dist/molecules/modal-footer/stories/modal-footer.stories.d.ts +0 -22
- package/dist/molecules/number-input-spinner/stories/number-input-spinner.stories.d.ts +0 -39
- package/dist/molecules/pagination-control/stories/pagination-control.stories.d.ts +0 -42
- package/dist/molecules/radio-group/stories/radio-group.stories.d.ts +0 -34
- package/dist/molecules/table/stories/table.stories.d.ts +0 -46
- package/dist/molecules/table-dnd/stories/table-dnd.stories.d.ts +0 -23
- package/dist/molecules/wizard-steps/stories/wizard-steps.stories.d.ts +0 -14
- package/dist/organisms/grid-container/stories/grid-container.stories.d.ts +0 -10
- package/dist/organisms/horizontal-nav/stories/horizontal-nav.stories.d.ts +0 -20
- package/dist/organisms/loading-state/stories/loading-state.stories.d.ts +0 -25
- package/dist/organisms/modal/stories/modal.stories.d.ts +0 -25
- package/dist/organisms/modal-drawer/stories/modal-drawer.stories.d.ts +0 -26
- package/dist/organisms/tabs-panel/stories/tabs-panel.stories.d.ts +0 -20
|
@@ -6,11 +6,14 @@ export interface FieldWidthButtonProps {
|
|
|
6
6
|
name?: string;
|
|
7
7
|
placeholder?: string;
|
|
8
8
|
value?: string | number;
|
|
9
|
+
disabled?: boolean;
|
|
9
10
|
dataTestId?: string;
|
|
10
11
|
buttonIcon: string;
|
|
11
12
|
buttonValue?: string;
|
|
12
|
-
|
|
13
|
+
onChange?: (value: string | number | null) => void;
|
|
14
|
+
buttonAction?: (value: string | number | null) => void | Promise<void>;
|
|
13
15
|
buttonDisabled?: boolean;
|
|
16
|
+
clearFieldAfterSubmit?: boolean;
|
|
14
17
|
}
|
|
15
18
|
declare const FieldWidthButton: (props: FieldWidthButtonProps) => React.JSX.Element;
|
|
16
19
|
export default FieldWidthButton;
|
|
@@ -232,7 +232,7 @@ const AvatarImage = props => {
|
|
|
232
232
|
|
|
233
233
|
const useColor = value => {
|
|
234
234
|
// @ts-ignore
|
|
235
|
-
const color = colors
|
|
235
|
+
const color = colors[value];
|
|
236
236
|
const c = value.split(/([0-9]+)/).filter(Boolean);
|
|
237
237
|
const tint = c[0];
|
|
238
238
|
const hue = parseFloat(c[1]);
|
|
@@ -241,8 +241,8 @@ const useColor = value => {
|
|
|
241
241
|
const indexIsLast = indexCurrentHue === colorHues.length - 1;
|
|
242
242
|
const indexHoverHue = indexIsLast ? indexCurrentHue - 1 : indexCurrentHue + 1;
|
|
243
243
|
// @ts-ignore
|
|
244
|
-
const hoverColor = colors
|
|
245
|
-
return hoverColor
|
|
244
|
+
const hoverColor = colors[indexCurrentHue > -1 ? tint + colorHues[indexHoverHue] : tint];
|
|
245
|
+
return hoverColor ?? colors.black;
|
|
246
246
|
};
|
|
247
247
|
const hover = getHoverColor(tint, hue);
|
|
248
248
|
return {
|
|
@@ -254,16 +254,7 @@ const useColor = value => {
|
|
|
254
254
|
const ButtonWrapper = /*#__PURE__*/_styled__default.button.withConfig({
|
|
255
255
|
displayName: "styles__ButtonWrapper",
|
|
256
256
|
componentId: "sc-baestp-0"
|
|
257
|
-
})(["--bg:", ";--txt:", ";--hover:", ";margin:0;border-width:", ";border-style:solid;border-color:var(--bg);border-radius:", ";background-color:", ";width:min-content;min-width:", ";height:", ";display:flex;justify-content:center;align-items:center;padding:", ";white-space:nowrap;text-decoration:none;transition-duration:", ";cursor:pointer;outline:none;&:hover{border-color:", ";background-color:", ";span{color:", ";}svg{fill:", ";}}&:disabled{cursor:inherit;opacity:0.5;&:hover{background-color:", ";pointer-events:none;}}> *:not(:last-child){margin-left:", ";margin-right:", ";}.spinner{order:", ";border-top-color:", ";}span{position:relative;font-size:", ";font-weight:", ";line-height:", ";color:", ";pointer-events:none;transition-duration:", ";order:", ";}svg{order:", ";width:", ";height:", ";fill:", ";transition:", ";}"], props => {
|
|
258
|
-
var _props$color;
|
|
259
|
-
return useColor((_props$color = props.color) != null ? _props$color : 'black').color;
|
|
260
|
-
}, props => {
|
|
261
|
-
var _props$color2, _props$txtColor;
|
|
262
|
-
return props.variant === 'outline' && !props.txtColor ? useColor((_props$color2 = props.color) != null ? _props$color2 : 'black').color : useColor((_props$txtColor = props.txtColor) != null ? _props$txtColor : 'white').color;
|
|
263
|
-
}, props => {
|
|
264
|
-
var _props$color3;
|
|
265
|
-
return props.color === 'white' ? colors.grey100 : props.color === 'black' ? colors.grey900 : useColor((_props$color3 = props.color) != null ? _props$color3 : 'black').hover;
|
|
266
|
-
}, props => props.variant === 'outline' ? button.borderWidth : 0, props => props.variant === 'text' ? 0 : props.rounded ? '999px' : button.borderRadius, props => props.variant === 'solid' ? 'var(--bg)' : 'transparent', props => props.value ? polished.rem('80px') : polished.rem('42px'), button.height, props => props.value ? `0 ${button.padding}` : 0, misc.transitionDuration, props => props.variant === 'solid' ? '' : 'var(--hover)', props => props.variant === 'solid' ? 'var(--hover)' : 'transparent', props => props.variant === 'solid' ? '' : 'var(--hover)', props => props.variant === 'solid' ? '' : 'var(--hover)', props => props.variant === 'solid' ? 'var(--bg)' : 'transparent', props => props.iconPosition === 'right' ? button.iconSpacing : 0, props => props.iconPosition === 'left' ? button.iconSpacing : 0, props => props.iconPosition === 'left' ? 1 : 2, props => props.variant === 'solid' ? '' : 'var(--button)', /*#__PURE__*/polished.rem(typography.defaultSize), typography.medium, /*#__PURE__*/polished.rem(typography.defaultSize), props => props.variant === 'solid' || props.variant === 'outline' ? 'var(--txt)' : 'var(--bg)', misc.transitionDuration, props => props.iconPosition === 'left' ? 2 : 1, props => props.iconPosition === 'left' ? 1 : 2, button.iconSize, button.iconSize, props => props.variant === 'solid' || props.variant === 'outline' ? 'var(--txt)' : 'var(--bg)', misc.transitionDuration);
|
|
257
|
+
})(["--bg:", ";--txt:", ";--hover:", ";margin:0;border-width:", ";border-style:solid;border-color:var(--bg);border-radius:", ";background-color:", ";width:min-content;min-width:", ";height:", ";display:flex;justify-content:center;align-items:center;padding:", ";white-space:nowrap;text-decoration:none;transition-duration:", ";cursor:pointer;outline:none;&:hover{border-color:", ";background-color:", ";span{color:", ";}svg{fill:", ";}}&:disabled{cursor:inherit;opacity:0.5;&:hover{background-color:", ";pointer-events:none;}}> *:not(:last-child){margin-left:", ";margin-right:", ";}.spinner{order:", ";border-top-color:", ";}span{position:relative;font-size:", ";font-weight:", ";line-height:", ";color:", ";pointer-events:none;transition-duration:", ";order:", ";}svg{order:", ";width:", ";height:", ";fill:", ";transition:", ";}"], props => useColor(props.color ?? 'black').color, props => props.variant === 'outline' && !props.txtColor ? useColor(props.color ?? 'black').color : useColor(props.txtColor ?? 'white').color, props => props.color === 'white' ? colors.grey100 : props.color === 'black' ? colors.grey900 : useColor(props.color ?? 'black').hover, props => props.variant === 'outline' ? button.borderWidth : 0, props => props.variant === 'text' ? 0 : props.rounded ? '999px' : button.borderRadius, props => props.variant === 'solid' ? 'var(--bg)' : 'transparent', props => props.value ? polished.rem('80px') : polished.rem('42px'), button.height, props => props.value ? `0 ${button.padding}` : 0, misc.transitionDuration, props => props.variant === 'solid' ? '' : 'var(--hover)', props => props.variant === 'solid' ? 'var(--hover)' : 'transparent', props => props.variant === 'solid' ? '' : 'var(--hover)', props => props.variant === 'solid' ? '' : 'var(--hover)', props => props.variant === 'solid' ? 'var(--bg)' : 'transparent', props => props.iconPosition === 'right' ? button.iconSpacing : 0, props => props.iconPosition === 'left' ? button.iconSpacing : 0, props => props.iconPosition === 'left' ? 1 : 2, props => props.variant === 'solid' ? '' : 'var(--button)', /*#__PURE__*/polished.rem(typography.defaultSize), typography.medium, /*#__PURE__*/polished.rem(typography.defaultSize), props => props.variant === 'solid' || props.variant === 'outline' ? 'var(--txt)' : 'var(--bg)', misc.transitionDuration, props => props.iconPosition === 'left' ? 2 : 1, props => props.iconPosition === 'left' ? 1 : 2, button.iconSize, button.iconSize, props => props.variant === 'solid' || props.variant === 'outline' ? 'var(--txt)' : 'var(--bg)', misc.transitionDuration);
|
|
267
258
|
|
|
268
259
|
const Button = props => {
|
|
269
260
|
const {
|
|
@@ -407,16 +398,7 @@ const ButtonDropdown = props => {
|
|
|
407
398
|
const ButtonLinkStyle = /*#__PURE__*/_styled__default.a.withConfig({
|
|
408
399
|
displayName: "styles__ButtonLinkStyle",
|
|
409
400
|
componentId: "sc-clge7v-0"
|
|
410
|
-
})(["--bg:", ";--txt:", ";--hover:", ";border-width:", ";border-style:solid;border-color:var(--bg);border-radius:", ";background-color:", ";width:min-content;min-width:", ";height:", ";display:flex;justify-content:center;align-items:center;padding:", ";white-space:nowrap;text-decoration:none;transition-duration:", ";cursor:pointer;&:hover{border-color:", ";background-color:", ";span{color:", ";}svg{fill:", ";}}> *:not(:last-child){margin-left:", ";margin-right:", ";}span{position:relative;font-size:", ";font-weight:", ";line-height:", ";color:", ";pointer-events:none;transition-duration:", ";order:", ";}svg{order:", ";width:", ";height:", ";fill:", ";transition:", ";}"], props => {
|
|
411
|
-
var _props$color;
|
|
412
|
-
return useColor((_props$color = props.color) != null ? _props$color : 'black').color;
|
|
413
|
-
}, props => {
|
|
414
|
-
var _props$color2, _props$txtColor;
|
|
415
|
-
return props.variant === 'outline' && !props.txtColor ? useColor((_props$color2 = props.color) != null ? _props$color2 : 'black').color : useColor((_props$txtColor = props.txtColor) != null ? _props$txtColor : 'white').color;
|
|
416
|
-
}, props => {
|
|
417
|
-
var _props$color3;
|
|
418
|
-
return props.color === 'white' ? colors.grey100 : props.color === 'black' ? colors.grey900 : useColor((_props$color3 = props.color) != null ? _props$color3 : 'black').hover;
|
|
419
|
-
}, props => props.variant === 'outline' ? button.borderWidth : 0, props => props.variant === 'text' ? 0 : props.rounded ? '999px' : button.borderRadius, props => props.variant === 'solid' ? 'var(--bg)' : 'transparent', props => props.value ? polished.rem('80px') : polished.rem('42px'), button.height, props => props.value ? `0 ${button.padding}` : 0, misc.transitionDuration, props => props.variant === 'solid' ? '' : 'var(--hover)', props => props.variant === 'solid' ? 'var(--hover)' : 'transparent', props => props.variant === 'solid' ? '' : 'var(--hover)', props => props.variant === 'solid' ? '' : 'var(--hover)', props => props.iconPosition === 'right' ? button.iconSpacing : 0, props => props.iconPosition === 'left' ? button.iconSpacing : 0, /*#__PURE__*/polished.rem(typography.defaultSize), typography.medium, /*#__PURE__*/polished.rem(typography.defaultSize), props => props.variant === 'solid' || props.variant === 'outline' ? 'var(--txt)' : 'var(--bg)', misc.transitionDuration, props => props.iconPosition === 'left' ? 2 : 1, props => props.iconPosition === 'left' ? 1 : 2, button.iconSize, button.iconSize, props => props.variant === 'solid' || props.variant === 'outline' ? 'var(--txt)' : 'var(--bg)', misc.transitionDuration);
|
|
401
|
+
})(["--bg:", ";--txt:", ";--hover:", ";border-width:", ";border-style:solid;border-color:var(--bg);border-radius:", ";background-color:", ";width:min-content;min-width:", ";height:", ";display:flex;justify-content:center;align-items:center;padding:", ";white-space:nowrap;text-decoration:none;transition-duration:", ";cursor:pointer;&:hover{border-color:", ";background-color:", ";span{color:", ";}svg{fill:", ";}}> *:not(:last-child){margin-left:", ";margin-right:", ";}span{position:relative;font-size:", ";font-weight:", ";line-height:", ";color:", ";pointer-events:none;transition-duration:", ";order:", ";}svg{order:", ";width:", ";height:", ";fill:", ";transition:", ";}"], props => useColor(props.color ?? 'black').color, props => props.variant === 'outline' && !props.txtColor ? useColor(props.color ?? 'black').color : useColor(props.txtColor ?? 'white').color, props => props.color === 'white' ? colors.grey100 : props.color === 'black' ? colors.grey900 : useColor(props.color ?? 'black').hover, props => props.variant === 'outline' ? button.borderWidth : 0, props => props.variant === 'text' ? 0 : props.rounded ? '999px' : button.borderRadius, props => props.variant === 'solid' ? 'var(--bg)' : 'transparent', props => props.value ? polished.rem('80px') : polished.rem('42px'), button.height, props => props.value ? `0 ${button.padding}` : 0, misc.transitionDuration, props => props.variant === 'solid' ? '' : 'var(--hover)', props => props.variant === 'solid' ? 'var(--hover)' : 'transparent', props => props.variant === 'solid' ? '' : 'var(--hover)', props => props.variant === 'solid' ? '' : 'var(--hover)', props => props.iconPosition === 'right' ? button.iconSpacing : 0, props => props.iconPosition === 'left' ? button.iconSpacing : 0, /*#__PURE__*/polished.rem(typography.defaultSize), typography.medium, /*#__PURE__*/polished.rem(typography.defaultSize), props => props.variant === 'solid' || props.variant === 'outline' ? 'var(--txt)' : 'var(--bg)', misc.transitionDuration, props => props.iconPosition === 'left' ? 2 : 1, props => props.iconPosition === 'left' ? 1 : 2, button.iconSize, button.iconSize, props => props.variant === 'solid' || props.variant === 'outline' ? 'var(--txt)' : 'var(--bg)', misc.transitionDuration);
|
|
420
402
|
|
|
421
403
|
const ButtonLink = props => {
|
|
422
404
|
const {
|
|
@@ -608,6 +590,7 @@ const icons = {
|
|
|
608
590
|
google: 'M16 0c8.837 0 16 7.163 16 16s-7.163 16-16 16c-8.836 0-16-7.163-16-16s7.163-16 16-16zM16 6.095c-5.471-0.001-9.906 4.434-9.905 9.905-0.002 1.639 0.404 3.252 1.181 4.694 1.673 3.103 4.952 5.212 8.724 5.212 2.256 0.003 4.444-0.767 6.2-2.181h0c1.779-1.427 3.011-3.425 3.488-5.656 0.142-0.667 0.216-1.36 0.216-2.068 0-0.633-0.059-1.251-0.173-1.851h-9.514v3.918h5.296c-0.477 1.266-1.373 2.33-2.541 3.014-1.821 1.064-4.072 1.073-5.902 0.024s-2.959-2.997-2.96-5.107c-0.001-0.651 0.107-1.297 0.318-1.913 0.584-1.696 1.909-3.034 3.599-3.634s3.562-0.398 5.085 0.55l3.209-2.627c-1.716-1.424-3.919-2.28-6.322-2.28z',
|
|
609
591
|
dribbble: 'M16 32c-8.835-0.006-15.994-7.169-15.994-16.004 0-6.586 3.978-12.243 9.663-14.699l0.104-0.040c1.838-0.798 3.979-1.262 6.228-1.262 8.839 0 16.004 7.165 16.004 16.004 0 6.59-3.983 12.249-9.672 14.703l-0.104 0.040c-1.829 0.795-3.959 1.257-6.197 1.257-0.011 0-0.022 0-0.033-0h0.002zM16 7.467c-0.608 0-1.202 0.063-1.774 0.183l0.056-0.010c-0.611 0.126-1.148 0.297-1.658 0.517l0.055-0.021c-0.557 0.238-1.033 0.501-1.48 0.806l0.029-0.019c-0.915 0.622-1.681 1.386-2.285 2.271l-0.019 0.029c-0.596 0.869-1.042 1.892-1.275 2.993l-0.010 0.056c-0.11 0.516-0.173 1.108-0.173 1.715s0.063 1.2 0.183 1.771l-0.010-0.056c0.243 1.157 0.689 2.179 1.304 3.078l-0.019-0.029c0.928 1.36 2.202 2.421 3.698 3.067l0.055 0.021c0.981 0.423 2.122 0.67 3.322 0.67s2.341-0.246 3.377-0.691l-0.056 0.021c0.557-0.238 1.033-0.501 1.479-0.805l-0.030 0.019c0.472-0.322 0.885-0.664 1.264-1.040l-0 0c0.377-0.378 0.719-0.79 1.022-1.232l0.019-0.030c0.287-0.416 0.55-0.892 0.766-1.393l0.021-0.054c0.425-0.979 0.672-2.119 0.672-3.317s-0.247-2.338-0.694-3.372l0.021 0.055c-0.236-0.555-0.5-1.031-0.805-1.476l0.018 0.028c-0.321-0.471-0.664-0.884-1.041-1.261l0 0c-0.378-0.376-0.791-0.717-1.232-1.019l-0.030-0.019c-0.87-0.597-1.895-1.043-2.998-1.274l-0.055-0.010c-0.517-0.11-1.11-0.174-1.718-0.174h-0z M16 23.265c-0.004 0-0.009 0-0.014 0-1.692 0-3.248-0.58-4.481-1.552l0.015 0.012c0.36-0.678 0.792-1.26 1.297-1.769l-0.001 0.001c1.201-1.234 2.684-2.187 4.346-2.754l0.078-0.023c0.016-0.006 0.032-0.011 0.048-0.016 0.63 1.567 1.169 3.421 1.528 5.338l0.029 0.187c-0.835 0.365-1.809 0.577-2.832 0.577-0.005 0-0.010 0-0.015 0h0.001zM20.072 22.024v0c-0.373-1.997-0.864-3.741-1.491-5.418l0.073 0.221c0.448-0.075 0.965-0.118 1.491-0.118 0.009 0 0.019 0 0.028 0h-0.001c0.009-0 0.019-0 0.029-0 1.067 0 2.098 0.159 3.069 0.453l-0.075-0.020c-0.341 2.042-1.488 3.766-3.097 4.864l-0.025 0.016zM10.58 20.851v0c-1.158-1.281-1.867-2.987-1.867-4.859 0-0.001 0-0.003 0-0.004v0c0-0.051 0-0.106 0.004-0.172l0.002-0.060c0.026 0 0.12 0.003 0.263 0.003 2.578-0.019 5.061-0.397 7.409-1.087l-0.19 0.048c0.219 0.428 0.416 0.844 0.591 1.236l-0.027 0.008c-0.076 0.022-0.17 0.049-0.26 0.079-1.753 0.607-3.243 1.591-4.43 2.862l-0.006 0.006c-0.554 0.569-1.046 1.204-1.461 1.891l-0.026 0.047zM23.284 15.914v0l-0.007-0.002c-1.017-0.209-2.187-0.331-3.385-0.334h-0.003c-0.011-0-0.024-0-0.037-0-0.579 0-1.149 0.036-1.709 0.106l0.067-0.007c-0.049-0.12-0.096-0.228-0.158-0.377-0.143-0.334-0.301-0.68-0.484-1.056 2.853-1.164 4.012-2.81 4.060-2.88 1.016 1.228 1.638 2.813 1.657 4.543l0 0.004zM8.991 14.489h-0.122c0.495-2.263 1.986-4.102 3.979-5.064l0.044-0.019 0.005 0.006c0.879 1.19 1.772 2.557 2.588 3.974l0.113 0.213c-1.975 0.539-4.247 0.862-6.59 0.889l-0.016 0zM17.007 13.16v0c-0.904-1.631-1.802-3.013-2.784-4.328l0.071 0.099-0.011-0.014c0.516-0.129 1.108-0.204 1.717-0.204h0c0.001 0 0.003 0 0.004 0 1.847 0 3.533 0.688 4.816 1.822l-0.008-0.007c-0.112 0.166-1.168 1.646-3.805 2.634z',
|
|
610
592
|
microsoft: 'M4.8 4.8h10.73v10.73h-10.73zM16.47 4.8h10.73v10.73h-10.73zM4.8 16.47h10.73v10.73h-10.73zM16.47 16.47h10.73v10.73h-10.73z',
|
|
593
|
+
x: 'M22.901 5h3.68l-8.04 9.19L28 26.693h-7.406l-5.8-7.584-6.638 7.584H4.474l8.6-9.83L4 5h7.594l5.243 6.932L22.901 5zM21.61 24.491h2.039L10.486 7.087H8.298L21.61 24.491z',
|
|
611
594
|
'twitter-n': 'M26.169 10.782c0.016 0.227 0.016 0.455 0.016 0.682 0 6.936-5.28 14.928-14.928 14.928-0.011 0-0.025 0-0.039 0-2.979 0-5.752-0.878-8.076-2.39l0.057 0.035c0.356 0.041 0.769 0.065 1.187 0.065 0.028 0 0.056-0 0.085-0l-0.004 0c0.008 0 0.018 0 0.028 0 2.457 0 4.718-0.844 6.507-2.257l-0.022 0.017c-2.286-0.043-4.212-1.539-4.895-3.601l-0.011-0.037c0.297 0.049 0.64 0.078 0.989 0.080h0.002c0.491-0.001 0.967-0.066 1.42-0.187l-0.039 0.009c-2.417-0.502-4.207-2.613-4.207-5.143 0-0.003 0-0.005 0-0.008v0-0.065c0.683 0.388 1.495 0.631 2.361 0.665l0.010 0c-1.418-0.956-2.339-2.556-2.339-4.371 0-0.975 0.266-1.888 0.728-2.671l-0.013 0.024c2.6 3.182 6.445 5.262 10.782 5.489l0.037 0.002c-0.080-0.36-0.127-0.774-0.13-1.198v-0.002c0.004-2.898 2.354-5.246 5.252-5.246 1.508 0 2.868 0.636 3.826 1.654l0.003 0.003c1.255-0.247 2.371-0.687 3.376-1.293l-0.046 0.026c-0.406 1.233-1.222 2.239-2.283 2.878l-0.024 0.013c1.12-0.131 2.141-0.418 3.088-0.84l-0.067 0.027c-0.732 1.057-1.603 1.954-2.6 2.691l-0.031 0.022z',
|
|
612
595
|
'facebook-n': 'M21.613 17.6l0.711-4.633h-4.446v-3.006c0-1.267 0.621-2.503 2.612-2.503h2.021v-3.945c-1.066-0.181-2.306-0.295-3.569-0.313l-0.018-0c-3.661 0-6.054 2.219-6.054 6.236v3.531h-4.070v4.633h4.070v11.2h5.009v-11.2z',
|
|
613
596
|
'instagram-n': 'M16.003 9.437c-3.623 0-6.56 2.937-6.56 6.56s2.937 6.56 6.56 6.56c3.623 0 6.56-2.937 6.56-6.56v0c0-0.002 0-0.005 0-0.008 0-3.619-2.933-6.552-6.552-6.552-0.003 0-0.006 0-0.008 0h0zM16.003 20.267c-0 0-0.001 0-0.001 0-2.357 0-4.267-1.91-4.267-4.267s1.911-4.267 4.267-4.267c2.357 0 4.267 1.911 4.267 4.267v0c-0.004 2.355-1.912 4.263-4.266 4.267h-0zM24.364 9.168c-0 0.845-0.685 1.53-1.53 1.53s-1.53-0.685-1.53-1.53 0.685-1.53 1.53-1.53v0c0.001 0 0.002 0 0.003 0 0.843 0 1.527 0.684 1.527 1.527 0 0.001 0 0.003 0 0.004v-0zM28.71 10.722c0.001-0.047 0.002-0.102 0.002-0.157 0-2.016-0.788-3.849-2.072-5.206l0.003 0.004c-1.361-1.282-3.199-2.069-5.222-2.069-0.049 0-0.097 0-0.145 0.001l0.007-0c-2.113-0.12-8.446-0.12-10.56 0-0.044-0.001-0.096-0.001-0.148-0.001-2.018 0-3.853 0.785-5.215 2.067l0.004-0.004c-1.281 1.357-2.069 3.193-2.069 5.212 0 0.052 0.001 0.104 0.002 0.156l-0-0.008c-0.12 2.114-0.12 8.449 0 10.56-0.001 0.047-0.002 0.102-0.002 0.157 0 2.016 0.788 3.849 2.072 5.206l-0.003-0.004c1.362 1.282 3.202 2.069 5.226 2.069 0.047 0 0.095-0 0.142-0.001l-0.007 0c2.113 0.12 8.446 0.12 10.56 0 0.047 0.001 0.102 0.002 0.158 0.002 2.016 0 3.849-0.788 5.206-2.073l-0.003 0.003c1.281-1.361 2.068-3.2 2.068-5.223 0-0.048-0-0.097-0.001-0.145l0 0.007c0.119-2.111 0.119-8.441 0-10.554zM25.98 23.546c-0.449 1.116-1.316 1.985-2.404 2.423l-0.029 0.010c-1.685 0.668-5.68 0.514-7.544 0.514s-5.863 0.148-7.543-0.514c-1.116-0.449-1.984-1.317-2.422-2.405l-0.010-0.029c-0.668-1.685-0.514-5.68-0.514-7.546s-0.149-5.866 0.514-7.546c0.449-1.116 1.317-1.984 2.404-2.422l0.029-0.010c1.685-0.668 5.68-0.514 7.544-0.514s5.866-0.149 7.544 0.514c1.116 0.449 1.983 1.317 2.422 2.404l0.010 0.029c0.668 1.685 0.514 5.68 0.514 7.546s0.154 5.866-0.514 7.546z',
|
|
@@ -979,13 +962,7 @@ const Spinner = props => {
|
|
|
979
962
|
const TagWrapper = /*#__PURE__*/_styled__default.span.withConfig({
|
|
980
963
|
displayName: "styles__TagWrapper",
|
|
981
964
|
componentId: "sc-1ghratr-0"
|
|
982
|
-
})(["--bg:", ";--txt:", ";display:inline-block;border:", " solid var(--bg);border-radius:", ";background-color:", ";padding:", " ", ";font-size:", ";font-weight:", ";text-transform:uppercase;letter-spacing:", ";line-height:1;color:", ";white-space:nowrap;"], props =>
|
|
983
|
-
var _props$color;
|
|
984
|
-
return useColor((_props$color = props.color) != null ? _props$color : 'black').color;
|
|
985
|
-
}, props => {
|
|
986
|
-
var _props$txtColor;
|
|
987
|
-
return useColor((_props$txtColor = props.txtColor) != null ? _props$txtColor : 'black').color;
|
|
988
|
-
}, /*#__PURE__*/polished.rem('2px'), /*#__PURE__*/polished.rem('4px'), props => props.variant === 'solid' ? 'var(--bg)' : 'transparent', /*#__PURE__*/polished.rem('3px'), /*#__PURE__*/polished.rem('8px'), /*#__PURE__*/polished.rem('12px'), typography.medium, /*#__PURE__*/polished.rem('1px'), props => props.variant === 'solid' ? 'var(--txt)' : 'var(--bg)');
|
|
965
|
+
})(["--bg:", ";--txt:", ";display:inline-block;border:", " solid var(--bg);border-radius:", ";background-color:", ";padding:", " ", ";font-size:", ";font-weight:", ";text-transform:uppercase;letter-spacing:", ";line-height:1;color:", ";white-space:nowrap;"], props => useColor(props.color ?? 'black').color, props => useColor(props.txtColor ?? 'black').color, /*#__PURE__*/polished.rem('2px'), /*#__PURE__*/polished.rem('4px'), props => props.variant === 'solid' ? 'var(--bg)' : 'transparent', /*#__PURE__*/polished.rem('3px'), /*#__PURE__*/polished.rem('8px'), /*#__PURE__*/polished.rem('12px'), typography.medium, /*#__PURE__*/polished.rem('1px'), props => props.variant === 'solid' ? 'var(--txt)' : 'var(--bg)');
|
|
989
966
|
|
|
990
967
|
const Tag = props => {
|
|
991
968
|
const {
|
|
@@ -1009,13 +986,7 @@ const Tag = props => {
|
|
|
1009
986
|
const TagWrapper$1 = /*#__PURE__*/_styled__default.div.withConfig({
|
|
1010
987
|
displayName: "styles__TagWrapper",
|
|
1011
988
|
componentId: "sc-db57da-0"
|
|
1012
|
-
})(["--bg:", ";--valueColor:", ";display:flex;border:", " solid var(--bg);border-radius:", ";line-height:1;max-width:100%;width:max-content;overflow:hidden;span{display:inline-block;padding:", " ", ";font-size:", ";font-weight:", ";letter-spacing:", ";&.label{flex:1;color:var(--bg);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-transform:uppercase;}&.value{background-color:var(--bg);color:var(--valueColor);}}&:not(:first-child){margin-left:", ";}"], props =>
|
|
1013
|
-
var _props$color;
|
|
1014
|
-
return useColor((_props$color = props.color) != null ? _props$color : 'black').color;
|
|
1015
|
-
}, props => {
|
|
1016
|
-
var _props$valueColor;
|
|
1017
|
-
return useColor((_props$valueColor = props.valueColor) != null ? _props$valueColor : 'black').color;
|
|
1018
|
-
}, /*#__PURE__*/polished.rem('2px'), /*#__PURE__*/polished.rem('3px'), /*#__PURE__*/polished.rem('3px'), /*#__PURE__*/polished.rem('8px'), /*#__PURE__*/polished.rem('12px'), typography.medium, /*#__PURE__*/polished.rem('1px'), /*#__PURE__*/polished.rem('5px'));
|
|
989
|
+
})(["--bg:", ";--valueColor:", ";display:flex;border:", " solid var(--bg);border-radius:", ";line-height:1;max-width:100%;width:max-content;overflow:hidden;span{display:inline-block;padding:", " ", ";font-size:", ";font-weight:", ";letter-spacing:", ";&.label{flex:1;color:var(--bg);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-transform:uppercase;}&.value{background-color:var(--bg);color:var(--valueColor);}}&:not(:first-child){margin-left:", ";}"], props => useColor(props.color ?? 'black').color, props => useColor(props.valueColor ?? 'black').color, /*#__PURE__*/polished.rem('2px'), /*#__PURE__*/polished.rem('3px'), /*#__PURE__*/polished.rem('3px'), /*#__PURE__*/polished.rem('8px'), /*#__PURE__*/polished.rem('12px'), typography.medium, /*#__PURE__*/polished.rem('1px'), /*#__PURE__*/polished.rem('5px'));
|
|
1019
990
|
|
|
1020
991
|
const TagNumber = props => {
|
|
1021
992
|
const {
|
|
@@ -1155,6 +1126,21 @@ const Select = props => {
|
|
|
1155
1126
|
}) : null);
|
|
1156
1127
|
};
|
|
1157
1128
|
|
|
1129
|
+
function _extends() {
|
|
1130
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
1131
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
1132
|
+
var source = arguments[i];
|
|
1133
|
+
for (var key in source) {
|
|
1134
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
1135
|
+
target[key] = source[key];
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
return target;
|
|
1140
|
+
};
|
|
1141
|
+
return _extends.apply(this, arguments);
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1158
1144
|
const SelectWrapper = _styled__default.div`
|
|
1159
1145
|
.select {
|
|
1160
1146
|
&-interactive {
|
|
@@ -1306,7 +1292,6 @@ const {
|
|
|
1306
1292
|
Option
|
|
1307
1293
|
} = Select$1.components;
|
|
1308
1294
|
const FormatGroupLabel = props => {
|
|
1309
|
-
var _props$options;
|
|
1310
1295
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
1311
1296
|
style: {
|
|
1312
1297
|
display: 'flex',
|
|
@@ -1316,10 +1301,10 @@ const FormatGroupLabel = props => {
|
|
|
1316
1301
|
}, /*#__PURE__*/React__default.createElement(SelectGroupLabel, {
|
|
1317
1302
|
className: "selective-options-group-label"
|
|
1318
1303
|
}, props.label), /*#__PURE__*/React__default.createElement(Tag, {
|
|
1319
|
-
value: `${
|
|
1304
|
+
value: `${props.options.length}`
|
|
1320
1305
|
}));
|
|
1321
1306
|
};
|
|
1322
|
-
const CustomSelectOption = (props, commonProps) => /*#__PURE__*/React__default.createElement(Option,
|
|
1307
|
+
const CustomSelectOption = (props, commonProps) => /*#__PURE__*/React__default.createElement(Option, _extends({}, props, commonProps), props.data.icon ? /*#__PURE__*/React__default.createElement(Icon, {
|
|
1323
1308
|
icon: props.data.icon
|
|
1324
1309
|
}) : props.data.customImage ? /*#__PURE__*/React__default.createElement("img", {
|
|
1325
1310
|
src: props.data.customImage,
|
|
@@ -1347,7 +1332,7 @@ const SelectInteractive = ({
|
|
|
1347
1332
|
onInputChange = () => {},
|
|
1348
1333
|
...rest
|
|
1349
1334
|
}) => {
|
|
1350
|
-
return /*#__PURE__*/React__default.createElement(SelectWrapper,
|
|
1335
|
+
return /*#__PURE__*/React__default.createElement(SelectWrapper, rest, /*#__PURE__*/React__default.createElement(Select$1__default, {
|
|
1351
1336
|
name: name,
|
|
1352
1337
|
value: value,
|
|
1353
1338
|
isMulti: multi,
|
|
@@ -1357,16 +1342,17 @@ const SelectInteractive = ({
|
|
|
1357
1342
|
isSearchable: search,
|
|
1358
1343
|
classNamePrefix: "select",
|
|
1359
1344
|
placeholder: placeholder,
|
|
1360
|
-
className: "select-interactive"
|
|
1345
|
+
className: "select-interactive"
|
|
1361
1346
|
// @ts-ignore
|
|
1362
|
-
|
|
1347
|
+
,
|
|
1348
|
+
onChange: e => onChange(e ?? []),
|
|
1363
1349
|
defaultMenuIsOpen: false,
|
|
1364
1350
|
onInputChange: onInputChange,
|
|
1365
1351
|
components: {
|
|
1366
1352
|
Option: CustomSelectOption,
|
|
1367
1353
|
SingleValue: CustomSelectValue
|
|
1368
1354
|
},
|
|
1369
|
-
formatGroupLabel: s => formatGroupLabel ? FormatGroupLabel
|
|
1355
|
+
formatGroupLabel: s => formatGroupLabel ? FormatGroupLabel(s) : undefined
|
|
1370
1356
|
}), error ? /*#__PURE__*/React__default.createElement(ErrorField, {
|
|
1371
1357
|
error: error
|
|
1372
1358
|
}) : null);
|
|
@@ -2102,7 +2088,7 @@ const Toggle = ({
|
|
|
2102
2088
|
React.useEffect(() => {
|
|
2103
2089
|
setState(checked);
|
|
2104
2090
|
}, [checked]);
|
|
2105
|
-
return /*#__PURE__*/React__default.createElement(Switcher,
|
|
2091
|
+
return /*#__PURE__*/React__default.createElement(Switcher, _extends({
|
|
2106
2092
|
disabled: disabled,
|
|
2107
2093
|
role: "radiogroup",
|
|
2108
2094
|
"aria-label": "toggle switcher"
|
|
@@ -2303,7 +2289,7 @@ const ActionMenuList = props => {
|
|
|
2303
2289
|
}) => /*#__PURE__*/React__default.createElement("li", {
|
|
2304
2290
|
key: id,
|
|
2305
2291
|
"data-testid": 'li-action-menu',
|
|
2306
|
-
className: type
|
|
2292
|
+
className: type ?? undefined
|
|
2307
2293
|
}, /*#__PURE__*/React__default.createElement("a", {
|
|
2308
2294
|
href: url,
|
|
2309
2295
|
onClick: e => {
|
|
@@ -2773,7 +2759,7 @@ const TableDnD = props => {
|
|
|
2773
2759
|
"data-testid": colDataTestId ? `th-${colDataTestId}` : null
|
|
2774
2760
|
}, value)))), /*#__PURE__*/React__default.createElement(reactBeautifulDnd.Droppable, {
|
|
2775
2761
|
droppableId: "droppable"
|
|
2776
|
-
}, (provided, snapshot) => /*#__PURE__*/React__default.createElement("tbody",
|
|
2762
|
+
}, (provided, snapshot) => /*#__PURE__*/React__default.createElement("tbody", _extends({}, provided.droppableProps, {
|
|
2777
2763
|
ref: provided.innerRef,
|
|
2778
2764
|
style: getListStyle(snapshot.isDraggingOver)
|
|
2779
2765
|
}), validValues.map((row, index) =>
|
|
@@ -2783,7 +2769,7 @@ const TableDnD = props => {
|
|
|
2783
2769
|
key: `${index}`,
|
|
2784
2770
|
draggableId: `${index}`,
|
|
2785
2771
|
index: index
|
|
2786
|
-
}, (provided, snapshot) => /*#__PURE__*/React__default.createElement(TableRow,
|
|
2772
|
+
}, (provided, snapshot) => /*#__PURE__*/React__default.createElement(TableRow, _extends({
|
|
2787
2773
|
ref: provided.innerRef,
|
|
2788
2774
|
key: row.id,
|
|
2789
2775
|
"data-testid": `row-${dataTestId}`,
|
|
@@ -2791,7 +2777,7 @@ const TableDnD = props => {
|
|
|
2791
2777
|
style: getItemStyle(snapshot.isDragging, provided.draggableProps.style)
|
|
2792
2778
|
}, provided.draggableProps), /*#__PURE__*/React__default.createElement("td", {
|
|
2793
2779
|
className: "thin drag-handle"
|
|
2794
|
-
}, /*#__PURE__*/React__default.createElement("div",
|
|
2780
|
+
}, /*#__PURE__*/React__default.createElement("div", provided.dragHandleProps, /*#__PURE__*/React__default.createElement(Icon, {
|
|
2795
2781
|
icon: "drag-handle"
|
|
2796
2782
|
}))), columns.map(({
|
|
2797
2783
|
id = '',
|
|
@@ -3118,7 +3104,7 @@ const Error = props => {
|
|
|
3118
3104
|
}, variant === 'default' ? /*#__PURE__*/React__default.createElement(Icon, {
|
|
3119
3105
|
icon: "warning",
|
|
3120
3106
|
fill: "hsl(354, 83%, 64%)"
|
|
3121
|
-
}) : /*#__PURE__*/React__default.createElement("span", null, "\
|
|
3107
|
+
}) : /*#__PURE__*/React__default.createElement("span", null, "\xAF\\\\_(\u30C4)_/\xAF"), value && /*#__PURE__*/React__default.createElement("span", null, value));
|
|
3122
3108
|
};
|
|
3123
3109
|
|
|
3124
3110
|
const Wrapper$b = _styled__default.div`
|
|
@@ -5357,27 +5343,56 @@ const FieldWidthButton = props => {
|
|
|
5357
5343
|
name,
|
|
5358
5344
|
placeholder,
|
|
5359
5345
|
value,
|
|
5346
|
+
onChange,
|
|
5360
5347
|
dataTestId,
|
|
5361
5348
|
buttonIcon,
|
|
5362
5349
|
buttonValue,
|
|
5363
5350
|
buttonAction,
|
|
5364
|
-
buttonDisabled
|
|
5351
|
+
buttonDisabled,
|
|
5352
|
+
disabled = true,
|
|
5353
|
+
clearFieldAfterSubmit = false
|
|
5365
5354
|
} = props;
|
|
5355
|
+
const [loading, setLoading] = React.useState(false);
|
|
5356
|
+
const [fieldValue, setFieldValue] = React.useState(value ?? null);
|
|
5357
|
+
const handleOnClickAction = async () => {
|
|
5358
|
+
if ((buttonAction === null || buttonAction === void 0 ? void 0 : buttonAction.constructor.name) !== 'AsyncFunction') {
|
|
5359
|
+
buttonAction === null || buttonAction === void 0 ? void 0 : buttonAction(fieldValue);
|
|
5360
|
+
} else {
|
|
5361
|
+
setLoading(true);
|
|
5362
|
+
await (buttonAction === null || buttonAction === void 0 ? void 0 : buttonAction(fieldValue));
|
|
5363
|
+
setLoading(false);
|
|
5364
|
+
}
|
|
5365
|
+
clearFieldAfterSubmit && setFieldValue('');
|
|
5366
|
+
};
|
|
5366
5367
|
return /*#__PURE__*/React__default.createElement(Wrapper$e, null, label && /*#__PURE__*/React__default.createElement(Label, {
|
|
5367
5368
|
value: label
|
|
5368
5369
|
}), /*#__PURE__*/React__default.createElement(Field, null, /*#__PURE__*/React__default.createElement(TextField, {
|
|
5369
5370
|
type: type,
|
|
5370
5371
|
name: name,
|
|
5371
|
-
|
|
5372
|
+
disabled: disabled,
|
|
5372
5373
|
placeholder: placeholder,
|
|
5373
5374
|
dataTestId: dataTestId,
|
|
5374
|
-
|
|
5375
|
+
value: fieldValue ?? undefined,
|
|
5376
|
+
onChange: e => {
|
|
5377
|
+
e.preventDefault();
|
|
5378
|
+
if (e.target.value === '' || e.target.value === ' ') {
|
|
5379
|
+
setFieldValue(null);
|
|
5380
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value);
|
|
5381
|
+
} else {
|
|
5382
|
+
setFieldValue(e.target.value);
|
|
5383
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value);
|
|
5384
|
+
}
|
|
5385
|
+
}
|
|
5375
5386
|
}), /*#__PURE__*/React__default.createElement(Button, {
|
|
5376
5387
|
color: "purple100",
|
|
5388
|
+
loading: loading,
|
|
5377
5389
|
icon: buttonIcon,
|
|
5378
5390
|
value: buttonValue,
|
|
5379
|
-
|
|
5380
|
-
|
|
5391
|
+
disabled: buttonDisabled,
|
|
5392
|
+
action: e => {
|
|
5393
|
+
e.preventDefault();
|
|
5394
|
+
handleOnClickAction();
|
|
5395
|
+
}
|
|
5381
5396
|
})));
|
|
5382
5397
|
};
|
|
5383
5398
|
|