@digital-ai/dot-components 2.12.1 → 2.14.0
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/CHANGE_LOG.md +49 -14
- package/index.d.ts +1 -0
- package/index.esm.js +40 -25
- package/index.umd.js +46 -26
- package/lib/components/auto-complete/AutoComplete.d.ts +2 -1
- package/lib/components/auto-complete/AutoComplete.stories.d.ts +1 -1
- package/lib/components/date-picker/DatePicker.d.ts +1 -1
- package/lib/components/input-form-fields/InputFormFields.propTypes.d.ts +3 -1
- package/lib/components/input-form-fields/InputFormFields.styles.d.ts +1 -0
- package/lib/components/input-form-fields/InputText.d.ts +2 -2
- package/lib/components/input-form-fields/InputText.stories.d.ts +3 -1
- package/lib/components/input-form-fields/common.styles.d.ts +4 -3
- package/lib/components/table/Table.d.ts +5 -1
- package/lib/components/table/Table.stories.d.ts +2 -1
- package/lib/components/time-picker/TimePicker.d.ts +1 -1
- package/lib/theme-provider/ThemeProvider.d.ts +13 -10
- package/lib/theme-provider/interfaces.d.ts +56 -0
- package/package.json +1 -1
package/CHANGE_LOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.14.0](https://www.npmjs.com/package/@digital-ai/dot-components) (08/25/2023)
|
|
4
|
+
|
|
5
|
+
[Full Changelog](https://digital-ai.github.io/dot-components/?path=/story/introduction--page/digital-ai/dot-components/compare/2.13.0...2.14.0)
|
|
6
|
+
|
|
7
|
+
**Features:**
|
|
8
|
+
|
|
9
|
+
- S-85164: `DotInputText` - support native `min` and `max` properties [\#1593](https://github.com/digital-ai/dot-components/pull/1593) ([dmiletic85](https://github.com/dmiletic85))
|
|
10
|
+
- S-95238 `DotAutocomplete` - Expose native `isOptionEqualToValue` [\#1592](https://github.com/digital-ai/dot-components/pull/1592) ([dmiletic85](https://github.com/dmiletic85))
|
|
11
|
+
|
|
12
|
+
**Fixed bugs:**
|
|
13
|
+
|
|
14
|
+
- D-26285: Fix DotDraggable items: wrong position [\#1599](https://github.com/digital-ai/dot-components/pull/1599) ([angel-git](https://github.com/angel-git))
|
|
15
|
+
- D-26238 `DotTable`, `DotTableActions`: duplicated actions and incorrect `onRowClick` triggering [\#1591](https://github.com/digital-ai/dot-components/pull/1591) ([dmiletic85](https://github.com/dmiletic85))
|
|
16
|
+
- D-23137: update read-only styles for various input fields [\#1580](https://github.com/digital-ai/dot-components/pull/1580) ([CWSites](https://github.com/CWSites))
|
|
17
|
+
|
|
18
|
+
**Misc:**
|
|
19
|
+
|
|
20
|
+
- S-94771: modifying placement of modules and interfaces [\#1588](https://github.com/digital-ai/dot-components/pull/1588) ([CWSites](https://github.com/CWSites))
|
|
21
|
+
|
|
22
|
+
## [2.13.0](https://www.npmjs.com/package/@digital-ai/dot-components) (08/13/2023)
|
|
23
|
+
|
|
24
|
+
[Full Changelog](https://digital-ai.github.io/dot-components/?path=/story/introduction--page/digital-ai/dot-components/compare/2.12.1...2.13.0)
|
|
25
|
+
|
|
26
|
+
**Features:**
|
|
27
|
+
|
|
28
|
+
- S-95094: `DotTable` - Expose `rowsPerPageOptions` and `labelRowsPerPage` [\#1583](https://github.com/digital-ai/dot-components/pull/1583) ([dmiletic85](https://github.com/dmiletic85))
|
|
29
|
+
|
|
30
|
+
**Fixed bugs:**
|
|
31
|
+
|
|
32
|
+
- D-26200: `DotMenu` has an extra empty space [\#1585](https://github.com/digital-ai/dot-components/pull/1585) ([dmiletic85](https://github.com/dmiletic85))
|
|
33
|
+
- D-26197: `DotTable`, `DotTableActions`: Hovered action buttons are not displayed properly within list item [\#1584](https://github.com/digital-ai/dot-components/pull/1584) ([dmiletic85](https://github.com/dmiletic85))
|
|
34
|
+
|
|
3
35
|
## [2.12.1](https://www.npmjs.com/package/@digital-ai/dot-components) (08/07/2023)
|
|
4
36
|
|
|
5
37
|
[Full Changelog](https://digital-ai.github.io/dot-components/?path=/story/introduction--page/digital-ai/dot-components/compare/2.12.0...2.12.1)
|
|
@@ -513,6 +545,7 @@
|
|
|
513
545
|
- S-88324: Updated the Brand logo for dark theme [\#1315](https://github.com/digital-ai/dot-components/pull/1315) ([csmathguy](https://github.com/csmathguy))
|
|
514
546
|
- D-23353: `DotMenu` items inside the menu should have 14px font size [\#1314](https://github.com/digital-ai/dot-components/pull/1314) ([dmiletic85](https://github.com/dmiletic85))
|
|
515
547
|
- D-23298: `NavigationRail` Fix badges issue [\#1303](https://github.com/digital-ai/dot-components/pull/1303) ([dmiletic85](https://github.com/dmiletic85))
|
|
548
|
+
- D-23069: add react-router-dom as a dependency for developing Storybook [\#1293](https://github.com/digital-ai/dot-components/pull/1293) ([CWSites](https://github.com/CWSites))
|
|
516
549
|
|
|
517
550
|
**Misc:**
|
|
518
551
|
|
|
@@ -535,7 +568,6 @@
|
|
|
535
568
|
- D-23289: \[DOT 2.0\] Double checkbox on `DotSwitch` [\#1299](https://github.com/digital-ai/dot-components/pull/1299) ([dmiletic85](https://github.com/dmiletic85))
|
|
536
569
|
- D-21921: `DotTabs` color and border styles [\#1296](https://github.com/digital-ai/dot-components/pull/1296) ([CWSites](https://github.com/CWSites))
|
|
537
570
|
- D-23229: update icon colors to inherit properly from various components [\#1295](https://github.com/digital-ai/dot-components/pull/1295) ([CWSites](https://github.com/CWSites))
|
|
538
|
-
- D-23069: add react-router-dom as a dependency for developing Storybook [\#1293](https://github.com/digital-ai/dot-components/pull/1293) ([CWSites](https://github.com/CWSites))
|
|
539
571
|
|
|
540
572
|
## [2.0.0](https://www.npmjs.com/package/@digital-ai/dot-components) (11/02/2022)
|
|
541
573
|
|
|
@@ -614,7 +646,6 @@
|
|
|
614
646
|
**Fixed bugs:**
|
|
615
647
|
|
|
616
648
|
- S-86692: component cleanup [\#1238](https://github.com/digital-ai/dot-components/pull/1238) ([CWSites](https://github.com/CWSites))
|
|
617
|
-
- S-84151: fix e2e tests for Release 2.0 [\#1146](https://github.com/digital-ai/dot-components/pull/1146) ([CWSites](https://github.com/CWSites))
|
|
618
649
|
|
|
619
650
|
**Misc:**
|
|
620
651
|
|
|
@@ -641,6 +672,7 @@
|
|
|
641
672
|
- S-86128: `DotAutocomplete`: Support error/warning icons with the tooltip [\#1237](https://github.com/digital-ai/dot-components/pull/1237) ([dmiletic85](https://github.com/dmiletic85))
|
|
642
673
|
- S-86683: `DotAutocomplete`: expose `onBlur` [\#1236](https://github.com/digital-ai/dot-components/pull/1236) ([dmiletic85](https://github.com/dmiletic85))
|
|
643
674
|
- S-86581: `DotAutocomplete` should allow to pass `readOnly` property into the inner `TextField` [\#1235](https://github.com/digital-ai/dot-components/pull/1235) ([dmiletic85](https://github.com/dmiletic85))
|
|
675
|
+
- Issue \#1210: add prop for noMargin to typography [\#1222](https://github.com/digital-ai/dot-components/pull/1222) ([CWSites](https://github.com/CWSites))
|
|
644
676
|
|
|
645
677
|
**Fixed bugs:**
|
|
646
678
|
|
|
@@ -660,7 +692,6 @@
|
|
|
660
692
|
|
|
661
693
|
- S-86369: input field success [\#1226](https://github.com/digital-ai/dot-components/pull/1226) ([CWSites](https://github.com/CWSites))
|
|
662
694
|
- S-84069: expose shrink prop to input fields [\#1223](https://github.com/digital-ai/dot-components/pull/1223) ([CWSites](https://github.com/CWSites))
|
|
663
|
-
- Issue \#1210: add prop for noMargin to typography [\#1222](https://github.com/digital-ai/dot-components/pull/1222) ([CWSites](https://github.com/CWSites))
|
|
664
695
|
- S-83952: persistent label for text field and select field [\#1219](https://github.com/digital-ai/dot-components/pull/1219) ([CWSites](https://github.com/CWSites))
|
|
665
696
|
- S-85811: `NavigationRail` Allow badges [\#1215](https://github.com/digital-ai/dot-components/pull/1215) ([dmiletic85](https://github.com/dmiletic85))
|
|
666
697
|
|
|
@@ -688,7 +719,6 @@
|
|
|
688
719
|
**Features:**
|
|
689
720
|
|
|
690
721
|
- S-85293: `SplitButton` Improvements [\#1201](https://github.com/digital-ai/dot-components/pull/1201) ([dmiletic85](https://github.com/dmiletic85))
|
|
691
|
-
- S-85283: `InlineEdit` component should provide a tooltip out the box [\#1181](https://github.com/digital-ai/dot-components/pull/1181) ([dmiletic85](https://github.com/dmiletic85))
|
|
692
722
|
|
|
693
723
|
**Fixed bugs:**
|
|
694
724
|
|
|
@@ -720,6 +750,7 @@
|
|
|
720
750
|
**Features:**
|
|
721
751
|
|
|
722
752
|
- S-84117: As a customer admin, I want the IdP creation flow to be more intuitive, as I find the existing user flow a little overwhelming [\#1185](https://github.com/digital-ai/dot-components/pull/1185) ([ryangamble](https://github.com/ryangamble))
|
|
753
|
+
- S-85283: `InlineEdit` component should provide a tooltip out the box [\#1181](https://github.com/digital-ai/dot-components/pull/1181) ([dmiletic85](https://github.com/dmiletic85))
|
|
723
754
|
|
|
724
755
|
**Fixed bugs:**
|
|
725
756
|
|
|
@@ -730,10 +761,6 @@
|
|
|
730
761
|
|
|
731
762
|
[Full Changelog](https://digital-ai.github.io/dot-components/?path=/story/introduction--page/digital-ai/dot-components/compare/1.17.0...1.17.1)
|
|
732
763
|
|
|
733
|
-
## [1.17.0](https://www.npmjs.com/package/@digital-ai/dot-components) (05/18/2022)
|
|
734
|
-
|
|
735
|
-
[Full Changelog](https://digital-ai.github.io/dot-components/?path=/story/introduction--page/digital-ai/dot-components/compare/1.16.1...1.17.0)
|
|
736
|
-
|
|
737
764
|
**Features:**
|
|
738
765
|
|
|
739
766
|
- S-84947: `DotButtonToggle`: Add tooltip support [\#1166](https://github.com/digital-ai/dot-components/pull/1166) ([dmiletic85](https://github.com/dmiletic85))
|
|
@@ -741,6 +768,13 @@
|
|
|
741
768
|
**Fixed bugs:**
|
|
742
769
|
|
|
743
770
|
- D-21287: `DotButtonToggle`: Button size is not respected after tooltip change [\#1171](https://github.com/digital-ai/dot-components/pull/1171) ([dmiletic85](https://github.com/dmiletic85))
|
|
771
|
+
|
|
772
|
+
## [1.17.0](https://www.npmjs.com/package/@digital-ai/dot-components) (05/18/2022)
|
|
773
|
+
|
|
774
|
+
[Full Changelog](https://digital-ai.github.io/dot-components/?path=/story/introduction--page/digital-ai/dot-components/compare/1.16.1...1.17.0)
|
|
775
|
+
|
|
776
|
+
**Fixed bugs:**
|
|
777
|
+
|
|
744
778
|
- D-21265: `helperText` on input fields shouldn't be bold [\#1167](https://github.com/digital-ai/dot-components/pull/1167) ([dmiletic85](https://github.com/dmiletic85))
|
|
745
779
|
|
|
746
780
|
**Misc:**
|
|
@@ -755,6 +789,7 @@
|
|
|
755
789
|
|
|
756
790
|
- S-84816: `InlineEdit`: Disable Save button when value contains only spaces [\#1156](https://github.com/digital-ai/dot-components/pull/1156) ([dmiletic85](https://github.com/dmiletic85))
|
|
757
791
|
- D-20958: Safari animation jitter [\#1154](https://github.com/digital-ai/dot-components/pull/1154) ([CWSites](https://github.com/CWSites))
|
|
792
|
+
- S-84151: fix e2e tests for Release 2.0 [\#1146](https://github.com/digital-ai/dot-components/pull/1146) ([CWSites](https://github.com/CWSites))
|
|
758
793
|
|
|
759
794
|
**Misc:**
|
|
760
795
|
|
|
@@ -809,6 +844,10 @@
|
|
|
809
844
|
|
|
810
845
|
[Full Changelog](https://digital-ai.github.io/dot-components/?path=/story/introduction--page/digital-ai/dot-components/compare/1.12.0...1.13.0)
|
|
811
846
|
|
|
847
|
+
**Breaking changes:**
|
|
848
|
+
|
|
849
|
+
- S-82342: Upgrade MUI to v5 [\#1079](https://github.com/digital-ai/dot-components/pull/1079) ([CWSites](https://github.com/CWSites))
|
|
850
|
+
|
|
812
851
|
**Features:**
|
|
813
852
|
|
|
814
853
|
- S-82940: `DotProgress`: Add more Storybook examples [\#1098](https://github.com/digital-ai/dot-components/pull/1098) ([dmiletic85](https://github.com/dmiletic85))
|
|
@@ -1050,6 +1089,7 @@
|
|
|
1050
1089
|
- D-19378: `AutoComplete` doesn't have `required` property [\#914](https://github.com/digital-ai/dot-components/pull/914) ([dmiletic85](https://github.com/dmiletic85))
|
|
1051
1090
|
- D-19376: `Menu`: `maxVisibleItems` prop does not control visible items anymore [\#911](https://github.com/digital-ai/dot-components/pull/911) ([dmiletic85](https://github.com/dmiletic85))
|
|
1052
1091
|
- D-19366: `Menu`: Circular dependency [\#909](https://github.com/digital-ai/dot-components/pull/909) ([dmiletic85](https://github.com/dmiletic85))
|
|
1092
|
+
- D-19355: `Breadcrumbs`: invalid combination of props [\#907](https://github.com/digital-ai/dot-components/pull/907) ([dmiletic85](https://github.com/dmiletic85))
|
|
1053
1093
|
- D-19129: `Table`: Cells in the Table component should be wrapped by `DotTypography` [\#900](https://github.com/digital-ai/dot-components/pull/900) ([dmiletic85](https://github.com/dmiletic85))
|
|
1054
1094
|
|
|
1055
1095
|
## [1.5.4](https://www.npmjs.com/package/@digital-ai/dot-components) (12/28/2021)
|
|
@@ -1064,7 +1104,6 @@
|
|
|
1064
1104
|
|
|
1065
1105
|
**Fixed bugs:**
|
|
1066
1106
|
|
|
1067
|
-
- D-19355: `Breadcrumbs`: invalid combination of props [\#907](https://github.com/digital-ai/dot-components/pull/907) ([dmiletic85](https://github.com/dmiletic85))
|
|
1068
1107
|
- D-19337: `List`: Circular dependency [\#897](https://github.com/digital-ai/dot-components/pull/897) ([dmiletic85](https://github.com/dmiletic85))
|
|
1069
1108
|
- D-19330: `AppToolbar` shouldn't have grey dividers [\#891](https://github.com/digital-ai/dot-components/pull/891) ([dmiletic85](https://github.com/dmiletic85))
|
|
1070
1109
|
- D-19200: `List` Nested list drawer is not rendering correctly [\#869](https://github.com/digital-ai/dot-components/pull/869) ([dmiletic85](https://github.com/dmiletic85))
|
|
@@ -1495,6 +1534,7 @@
|
|
|
1495
1534
|
- S-76838: address Sonarcloud code issues [\#608](https://github.com/digital-ai/dot-components/pull/608) ([CWSites](https://github.com/CWSites))
|
|
1496
1535
|
- S-77317: Add 'height' prop to DotDrawer component [\#603](https://github.com/digital-ai/dot-components/pull/603) ([selsemore](https://github.com/selsemore))
|
|
1497
1536
|
- Update GitHub prerelease [\#599](https://github.com/digital-ai/dot-components/pull/599) ([CWSites](https://github.com/CWSites))
|
|
1537
|
+
- S-76917: remove progressionBoard styles from theme provider [\#597](https://github.com/digital-ai/dot-components/pull/597) ([CWSites](https://github.com/CWSites))
|
|
1498
1538
|
|
|
1499
1539
|
## [1.0.3](https://www.npmjs.com/package/@digital-ai/dot-components) (07/27/2021)
|
|
1500
1540
|
|
|
@@ -1504,17 +1544,12 @@
|
|
|
1504
1544
|
|
|
1505
1545
|
[Full Changelog](https://digital-ai.github.io/dot-components/?path=/story/introduction--page/digital-ai/dot-components/compare/1.0.1...1.0.2)
|
|
1506
1546
|
|
|
1507
|
-
**Breaking changes:**
|
|
1508
|
-
|
|
1509
|
-
- S-76919: cleaning up props used with various form elements [\#606](https://github.com/digital-ai/dot-components/pull/606) ([CWSites](https://github.com/CWSites))
|
|
1510
|
-
|
|
1511
1547
|
**Features:**
|
|
1512
1548
|
|
|
1513
1549
|
- S-76914: optional prop for truncating accordion summary to one line [\#590](https://github.com/digital-ai/dot-components/pull/590) ([CWSites](https://github.com/CWSites))
|
|
1514
1550
|
|
|
1515
1551
|
**Misc:**
|
|
1516
1552
|
|
|
1517
|
-
- S-76917: remove progressionBoard styles from theme provider [\#597](https://github.com/digital-ai/dot-components/pull/597) ([CWSites](https://github.com/CWSites))
|
|
1518
1553
|
- S-76905: add disablePortal prop to SplitButton and set z-index for SplitButton menu [\#596](https://github.com/digital-ai/dot-components/pull/596) ([selsemore](https://github.com/selsemore))
|
|
1519
1554
|
- S-76905: fix error upon selection of split button option with non-numeric key [\#595](https://github.com/digital-ai/dot-components/pull/595) ([selsemore](https://github.com/selsemore))
|
|
1520
1555
|
- updating github workflow to default to patch release [\#593](https://github.com/digital-ai/dot-components/pull/593) ([CWSites](https://github.com/CWSites))
|
package/index.d.ts
CHANGED
|
@@ -3,3 +3,4 @@ export * as lightColors from './lib/theme-provider/colors/light-theme-colors';
|
|
|
3
3
|
export * as themeVariables from './lib/theme-provider/common/variables';
|
|
4
4
|
export type { ThemeProviderProps } from './lib/theme-provider/ThemeProvider';
|
|
5
5
|
export { avatarColors, DotThemeProvider, typographyOptions, } from './lib/theme-provider/ThemeProvider';
|
|
6
|
+
export * from './lib/theme-provider/interfaces';
|
package/index.esm.js
CHANGED
|
@@ -212,6 +212,7 @@ const DotAccordion = ({
|
|
|
212
212
|
const formHelperTextRootStyles = theme => css(["font-family:", ";font-size:", "px;font-weight:400;margin:", ";display:flex;align-items:flex-end;&:not(.Mui-error){color:", ";}&.read-only .MuiOutlinedInput-root:hover > fieldset{border-color:", ";}"], theme.typography.fontFamily, theme.typography.body2.fontSize, theme.spacing(0.5, 0, 0, 1.5), theme.palette.grey[400], theme.palette.layer.n200);
|
|
213
213
|
const adornmentIconStyles = () => css(["font-size:24px;height:24px;padding:0;width:24px;"]);
|
|
214
214
|
const pickerInputStyles = theme => css(["label:not(.MuiInputLabel-shrink){top:-5px;}.MuiInputBase-root{margin-bottom:0;.dot-error-icon{margin-right:", ";color:", ";}.dot-icon{", ";}}.MuiInputBase-input{height:", ";padding:", ";}.MuiFormHelperText-root{", ";}"], theme.spacing(0.5), theme.palette.error.main, adornmentIconStyles(), theme.spacing(2), theme.spacing(1.5, 0, 1.5, 2), formHelperTextRootStyles(theme));
|
|
215
|
+
const readOnlyStyles = theme => css(["background:", ";color:", ";border-color:", ";-webkit-text-fill-color:", ";input.Mui-disabled{-webkit-text-fill-color:", ";}.dot-chip{background:", ";opacity:1;}"], theme.palette.grey[50], theme.palette.grey[500], theme.palette.grey[300], theme.palette.grey[500], theme.palette.grey[500], theme.palette.layer.n0);
|
|
215
216
|
|
|
216
217
|
const rootClassName$13 = 'dot-text-field';
|
|
217
218
|
const rootSelectClassName = 'dot-select-field';
|
|
@@ -221,6 +222,7 @@ const warningClassName = 'dot-warning';
|
|
|
221
222
|
const successClassName = 'dot-success';
|
|
222
223
|
const adornmentIconClassName = 'dot-adornment-icon';
|
|
223
224
|
const fieldsetClassName = 'MuiOutlinedInput-notchedOutline';
|
|
225
|
+
const readOnlyClassName$1 = 'read-only';
|
|
224
226
|
const StyledAdornment = styled(InputAdornment).withConfig({
|
|
225
227
|
displayName: "InputFormFieldsstyles__StyledAdornment",
|
|
226
228
|
componentId: "sc-1mbn9f0-0"
|
|
@@ -230,7 +232,7 @@ const StyledInputLabel = styled(InputLabel).withConfig({
|
|
|
230
232
|
componentId: "sc-1mbn9f0-1"
|
|
231
233
|
})(["", ""], ({
|
|
232
234
|
theme
|
|
233
|
-
}) => css(["&.", "{margin-bottom:", ";transform:none;&.Mui-disabled .dot-typography{color:
|
|
235
|
+
}) => css(["&.", "{margin-bottom:", ";transform:none;&.Mui-disabled .dot-typography{color:", ";}&.Mui-error .dot-typography{color:", ";}.dot-typography{display:inline;}}"], labelClassName, theme.spacing(0.5), theme.palette.layer.n700, theme.palette.error.main));
|
|
234
236
|
const StyledTextFieldContainer = styled.div.withConfig({
|
|
235
237
|
displayName: "InputFormFieldsstyles__StyledTextFieldContainer",
|
|
236
238
|
componentId: "sc-1mbn9f0-2"
|
|
@@ -241,7 +243,7 @@ const StyledTextField = styled(TextField).withConfig({
|
|
|
241
243
|
})(["", ""], ({
|
|
242
244
|
theme,
|
|
243
245
|
InputProps
|
|
244
|
-
}) => css(["&.", "{.MuiInputBase-root{margin-bottom:0;}.MuiInputBase-input{box-sizing:content-box;}.MuiOutlinedInput-input{padding:", ";}.MuiInputBase-inputSizeSmall{padding-top:10.5px;padding-bottom:10.5px;&:not(textarea){height:19px;}}.MuiInputBase-inputMultiline{padding:0;}}&.", " .", "{margin-right:", ";}&.", ",&.", "{.", "{color:", ";p{font-size:", "px;margin:0;}.dot-icon i{margin-top:-2px;}}.MuiInputBase-root{margin-bottom:0;}.MuiInputBase-inputSizeSmall:not(textarea){height:19px;padding-top:10.5px;padding-bottom:10.5px;}select.dot-select{padding-left:", ";}.MuiSelect-select:focus{background-color:transparent;}.MuiSelect-icon{right:", ";}&.", "{.MuiOutlinedInput-notchedOutline{border-color:", ";}.MuiFormLabel-root.Mui-focused{color:", ";}.", " .dot-icon{color:", ";}}&.", "{.MuiInputLabel-outlined.MuiInputLabel-shrink{color:", ";}.", " .dot-icon{color:", ";}}&.", "{.MuiOutlinedInput-notchedOutline{border-color:", ";}.MuiInputLabel-outlined.MuiInputLabel-shrink{color:", ";}.", " .dot-icon{color:", ";}}.MuiOutlinedInput-adornedStart{padding-left:12px;&.", " .", "{border-color:", ";}}.MuiInputLabel-outlined.MuiInputLabel-shrink{color:", ";}.MuiInputBase-inputAdornedStart{padding-left:12px;}.MuiInputBase-inputAdornedEnd{padding-right:12px;}.MuiFormHelperText-root{", ";}}"], rootClassName$13, InputProps.startAdornment ? `18px 12px 18px 0px` : `18px 12px`, rootSelectClassName, adornmentIconClassName, theme.spacing(2), rootSelectClassName, rootClassName$13, adornmentIconClassName, theme.palette.layer.n700, theme.typography.body2.fontSize, theme.spacing(1.5), InputProps.endAdornment ? `44px` : `12px`, successClassName, theme.palette.secondary.main, theme.palette.grey[700], adornmentIconClassName, theme.palette.secondary.main, errorClassName, theme.palette.error.main, adornmentIconClassName, theme.palette.error.main, warningClassName, theme.palette.warning.main, theme.palette.grey[700], adornmentIconClassName, theme.palette.warning.main, warningClassName, fieldsetClassName, theme.palette.warning[500], theme.palette.grey[700], formHelperTextRootStyles(theme)));
|
|
246
|
+
}) => css(["&.", "{.MuiInputBase-root{margin-bottom:0;}.MuiInputBase-input{box-sizing:content-box;}.MuiOutlinedInput-input{padding:", ";}.MuiInputBase-inputSizeSmall{padding-top:10.5px;padding-bottom:10.5px;&:not(textarea){height:19px;}}.MuiInputBase-inputMultiline{padding:0;}.MuiInputLabel-root.Mui-disabled{color:", ";}}.dot-select,.dot-input{&.", ",&.Mui-disabled{", ";}}&.", " .", "{margin-right:", ";}&.", ",&.", "{.", "{color:", ";p{font-size:", "px;margin:0;}.dot-icon i{margin-top:-2px;}}.MuiInputBase-root{margin-bottom:0;}.MuiInputBase-inputSizeSmall:not(textarea){height:19px;padding-top:10.5px;padding-bottom:10.5px;}select.dot-select{padding-left:", ";}.MuiSelect-select:focus:not(.", "){background-color:transparent;}.MuiSelect-icon{right:", ";}&.", "{.MuiOutlinedInput-notchedOutline{border-color:", ";}.MuiFormLabel-root.Mui-focused{color:", ";}.", " .dot-icon{color:", ";}}&.", "{.MuiInputLabel-outlined.MuiInputLabel-shrink{color:", ";}.", " .dot-icon{color:", ";}}&.", "{.MuiOutlinedInput-notchedOutline{border-color:", ";}.MuiInputLabel-outlined.MuiInputLabel-shrink{color:", ";}.", " .dot-icon{color:", ";}}.MuiOutlinedInput-adornedStart{padding-left:12px;&.", " .", "{border-color:", ";}}.MuiInputLabel-outlined.MuiInputLabel-shrink{color:", ";}.MuiInputBase-inputAdornedStart{padding-left:12px;}.MuiInputBase-inputAdornedEnd{padding-right:12px;}.MuiFormHelperText-root{", ";}}"], rootClassName$13, InputProps.startAdornment ? `18px 12px 18px 0px` : `18px 12px`, theme.palette.layer.n500, readOnlyClassName$1, readOnlyStyles(theme), rootSelectClassName, adornmentIconClassName, theme.spacing(2), rootSelectClassName, rootClassName$13, adornmentIconClassName, theme.palette.layer.n700, theme.typography.body2.fontSize, theme.spacing(1.5), readOnlyClassName$1, InputProps.endAdornment ? `44px` : `12px`, successClassName, theme.palette.secondary.main, theme.palette.grey[700], adornmentIconClassName, theme.palette.secondary.main, errorClassName, theme.palette.error.main, adornmentIconClassName, theme.palette.error.main, warningClassName, theme.palette.warning.main, theme.palette.grey[700], adornmentIconClassName, theme.palette.warning.main, warningClassName, fieldsetClassName, theme.palette.warning[500], theme.palette.grey[700], formHelperTextRootStyles(theme)));
|
|
245
247
|
|
|
246
248
|
const rootClassName$12 = 'dot-action-toolbar';
|
|
247
249
|
const StyledToolbar = styled(Toolbar).withConfig({
|
|
@@ -2051,8 +2053,7 @@ const calculateMaxHeight = ({
|
|
|
2051
2053
|
height
|
|
2052
2054
|
}) => {
|
|
2053
2055
|
const customItemHeight = height ? height : itemHeight;
|
|
2054
|
-
|
|
2055
|
-
maxHeight += customItemHeight + 3;
|
|
2056
|
+
maxHeight += customItemHeight;
|
|
2056
2057
|
});
|
|
2057
2058
|
return maxHeight;
|
|
2058
2059
|
};
|
|
@@ -2937,7 +2938,9 @@ const DotInputText = ({
|
|
|
2937
2938
|
id,
|
|
2938
2939
|
inputRef,
|
|
2939
2940
|
label,
|
|
2941
|
+
max,
|
|
2940
2942
|
maxRows,
|
|
2943
|
+
min,
|
|
2941
2944
|
minRows,
|
|
2942
2945
|
multiline: _multiline = false,
|
|
2943
2946
|
name,
|
|
@@ -2964,7 +2967,7 @@ const DotInputText = ({
|
|
|
2964
2967
|
const hasEndAdornmentIcon = endIcon || _error || hasWarning || hasSuccess;
|
|
2965
2968
|
// This state is used only with debounce feature enabled
|
|
2966
2969
|
const [inputTextState, setInputTextState] = useState(hasDebounce && getInitialState(value));
|
|
2967
|
-
const rootStyles = useStylesWithRootClass(rootClassName$13, hasError, hasWarning, hasSuccess, _readOnly
|
|
2970
|
+
const rootStyles = useStylesWithRootClass(rootClassName$13, hasError, hasWarning, hasSuccess, _readOnly && readOnlyClassName$1);
|
|
2968
2971
|
// Used to control text value from the consumer component
|
|
2969
2972
|
// when debounce feature is enabled
|
|
2970
2973
|
useEffect(() => {
|
|
@@ -3017,6 +3020,7 @@ const DotInputText = ({
|
|
|
3017
3020
|
}), void 0);
|
|
3018
3021
|
};
|
|
3019
3022
|
const wrapperClassName = useStylesWithRootClass(_fullWidth !== false ? 'dot-input-text--fullwidth' : '', className);
|
|
3023
|
+
const inputClassName = useStylesWithRootClass('dot-input', _readOnly && readOnlyClassName$1);
|
|
3020
3024
|
return jsxs(StyledTextFieldContainer, Object.assign({
|
|
3021
3025
|
className: wrapperClassName
|
|
3022
3026
|
}, {
|
|
@@ -3040,7 +3044,6 @@ const DotInputText = ({
|
|
|
3040
3044
|
defaultValue: defaultInputValue,
|
|
3041
3045
|
disabled: _disabled,
|
|
3042
3046
|
error: _error,
|
|
3043
|
-
focused: _readOnly ? false : undefined,
|
|
3044
3047
|
fullWidth: _fullWidth,
|
|
3045
3048
|
helperText: helperText,
|
|
3046
3049
|
id: id,
|
|
@@ -3049,8 +3052,10 @@ const DotInputText = ({
|
|
|
3049
3052
|
},
|
|
3050
3053
|
inputProps: {
|
|
3051
3054
|
'data-testid': dataTestId,
|
|
3052
|
-
className:
|
|
3053
|
-
readOnly: _readOnly
|
|
3055
|
+
className: inputClassName,
|
|
3056
|
+
readOnly: _readOnly,
|
|
3057
|
+
max,
|
|
3058
|
+
min
|
|
3054
3059
|
},
|
|
3055
3060
|
inputRef: inputRef,
|
|
3056
3061
|
label: persistentLabel ? null : label,
|
|
@@ -4299,7 +4304,7 @@ const StyledAutocomplete = styled(Autocomplete).withConfig({
|
|
|
4299
4304
|
componentId: "j2sgjy-0"
|
|
4300
4305
|
})(["", ""], ({
|
|
4301
4306
|
theme
|
|
4302
|
-
}) => css(["&.", "{&.", " .dot-text-field .", "{height:56px;padding-left:", ";}.", "{padding-top:", ";padding-bottom:", ";}.dot-chip:first-child{margin-left:", ";}.dot-text-field{.", "{min-height:", ";}.warning-icon{color:", ";}.error-icon{color:", ";}}}"], rootClassName$I, inputMediumClassName, inputRootClassName, theme.spacing(2), inputRootClassName, theme.spacing(0), theme.spacing(0), theme.spacing(0), inputRootClassName, theme.spacing(5), theme.palette.warning.main, theme.palette.error.main));
|
|
4307
|
+
}) => css(["&.", "{&.", " .dot-text-field .", "{height:56px;padding-left:", ";}.MuiInputBase-root.Mui-disabled,.", "{", ";}.", "{padding-top:", ";padding-bottom:", ";}.dot-chip:first-child{margin-left:", ";}.dot-text-field{.", "{min-height:", ";}.warning-icon{color:", ";}.error-icon{color:", ";}}}"], rootClassName$I, inputMediumClassName, inputRootClassName, theme.spacing(2), readOnlyClassName$1, readOnlyStyles(theme), inputRootClassName, theme.spacing(0), theme.spacing(0), theme.spacing(0), inputRootClassName, theme.spacing(5), theme.palette.warning.main, theme.palette.error.main));
|
|
4303
4308
|
|
|
4304
4309
|
const rootClassName$H = 'dot-chip';
|
|
4305
4310
|
const StyledChip = styled(Chip).withConfig({
|
|
@@ -4441,6 +4446,7 @@ const DotAutoComplete = ({
|
|
|
4441
4446
|
inputId,
|
|
4442
4447
|
inputRef,
|
|
4443
4448
|
inputValue,
|
|
4449
|
+
isOptionEqualToValue,
|
|
4444
4450
|
label,
|
|
4445
4451
|
loading,
|
|
4446
4452
|
maxHeight,
|
|
@@ -4474,7 +4480,7 @@ const DotAutoComplete = ({
|
|
|
4474
4480
|
const preventDuplicateInsertion = actionItem === null || actionItem === void 0 ? void 0 : actionItem.preventDuplicateInsertion;
|
|
4475
4481
|
const textFieldWarningClassName = !_error && _warning && warningClassName;
|
|
4476
4482
|
const rootClasses = useStylesWithRootClass(rootClassName$I, _size === 'medium' && inputMediumClassName, className);
|
|
4477
|
-
const textFieldRootClasses = useStylesWithRootClass(rootClassName$13, _readOnly &&
|
|
4483
|
+
const textFieldRootClasses = useStylesWithRootClass(rootClassName$13, _readOnly && readOnlyClassName$1, textFieldWarningClassName);
|
|
4478
4484
|
const inputRootClasses = useStylesWithRootClass(inputRootClassName, !_dense && inputMediumClassName);
|
|
4479
4485
|
let highlightedOption = null;
|
|
4480
4486
|
let textFieldInput;
|
|
@@ -4660,6 +4666,7 @@ const DotAutoComplete = ({
|
|
|
4660
4666
|
getOptionDisabled: checkIfOptionDisabled,
|
|
4661
4667
|
groupBy: _group ? option => option.group : undefined,
|
|
4662
4668
|
inputValue: inputValue,
|
|
4669
|
+
isOptionEqualToValue: isOptionEqualToValue,
|
|
4663
4670
|
ListboxComponent: ListboxComponent,
|
|
4664
4671
|
loading: loading,
|
|
4665
4672
|
multiple: _multiple,
|
|
@@ -4712,7 +4719,6 @@ const DotAutoComplete = ({
|
|
|
4712
4719
|
root: textFieldRootClasses
|
|
4713
4720
|
},
|
|
4714
4721
|
error: _error,
|
|
4715
|
-
focused: _readOnly ? false : undefined,
|
|
4716
4722
|
helperText: helperText,
|
|
4717
4723
|
id: inputId,
|
|
4718
4724
|
inputProps: Object.assign(Object.assign({}, inputProps), {
|
|
@@ -6214,7 +6220,8 @@ const DotInputSelect = ({
|
|
|
6214
6220
|
const hasWarning = !_error && _warning && warningClassName;
|
|
6215
6221
|
const hasSuccess = !_error && !_warning && success && successClassName;
|
|
6216
6222
|
const endAdornment = endIcon || endText;
|
|
6217
|
-
const
|
|
6223
|
+
const inputStyles = useStylesWithRootClass('dot-select', _readOnly && readOnlyClassName$1);
|
|
6224
|
+
const rootStyles = useStylesWithRootClass(rootSelectClassName, hasSuccess, hasWarning);
|
|
6218
6225
|
const getOption = option => {
|
|
6219
6226
|
return typeof option === 'string' ? option : option.option;
|
|
6220
6227
|
};
|
|
@@ -6250,12 +6257,12 @@ const DotInputSelect = ({
|
|
|
6250
6257
|
readOnly: _readOnly,
|
|
6251
6258
|
open: _readOnly ? false : undefined
|
|
6252
6259
|
},
|
|
6260
|
+
"aria-label": ariaLabel || label,
|
|
6253
6261
|
autoFocus: autoFocus,
|
|
6254
6262
|
className: rootStyles,
|
|
6255
6263
|
defaultValue: defaultValue,
|
|
6256
6264
|
disabled: _disabled,
|
|
6257
6265
|
error: _error,
|
|
6258
|
-
focused: _readOnly ? false : undefined,
|
|
6259
6266
|
fullWidth: _fullWidth,
|
|
6260
6267
|
helperText: helperText,
|
|
6261
6268
|
id: id,
|
|
@@ -6265,7 +6272,7 @@ const DotInputSelect = ({
|
|
|
6265
6272
|
inputProps: {
|
|
6266
6273
|
'aria-label': ariaLabel,
|
|
6267
6274
|
'data-testid': dataTestId,
|
|
6268
|
-
className:
|
|
6275
|
+
className: inputStyles,
|
|
6269
6276
|
readOnly: _readOnly
|
|
6270
6277
|
},
|
|
6271
6278
|
inputRef: inputRef,
|
|
@@ -6277,6 +6284,7 @@ const DotInputSelect = ({
|
|
|
6277
6284
|
onFocus: onFocus,
|
|
6278
6285
|
onKeyDown: onKeyDown,
|
|
6279
6286
|
required: required,
|
|
6287
|
+
role: "textbox",
|
|
6280
6288
|
select: true,
|
|
6281
6289
|
size: _size,
|
|
6282
6290
|
value: value,
|
|
@@ -7424,7 +7432,7 @@ const DotInlineEdit = ({
|
|
|
7424
7432
|
onKeyDown: !readOnly ? event => handleKeyPress(event) : undefined,
|
|
7425
7433
|
ref: inlineEditRef,
|
|
7426
7434
|
role: _ariaRole,
|
|
7427
|
-
tabIndex:
|
|
7435
|
+
tabIndex: _tabIndex,
|
|
7428
7436
|
typography: _typography
|
|
7429
7437
|
}, {
|
|
7430
7438
|
children: editing ? renderEditMode() : renderViewMode()
|
|
@@ -8844,6 +8852,7 @@ const DotTable = ({
|
|
|
8844
8852
|
emptyMessage,
|
|
8845
8853
|
footerTypography: _footerTypography = TABLE_TYPOGRAPHY_VARIANT,
|
|
8846
8854
|
headerTypography: _headerTypography = TABLE_TYPOGRAPHY_VARIANT,
|
|
8855
|
+
labelRowsPerPage,
|
|
8847
8856
|
loading: _loading = false,
|
|
8848
8857
|
maxHeight,
|
|
8849
8858
|
multiSelect,
|
|
@@ -8853,6 +8862,7 @@ const DotTable = ({
|
|
|
8853
8862
|
onUpdateData,
|
|
8854
8863
|
page: _page = 0,
|
|
8855
8864
|
rowsPerPage,
|
|
8865
|
+
rowsPerPageOptions,
|
|
8856
8866
|
stickyHeader: _stickyHeader = true,
|
|
8857
8867
|
sortable: _sortable = true,
|
|
8858
8868
|
toolbar
|
|
@@ -9007,10 +9017,12 @@ const DotTable = ({
|
|
|
9007
9017
|
}), void 0)
|
|
9008
9018
|
}), void 0), rowsPerPage && jsx(DotTablePagination, {
|
|
9009
9019
|
count: getTotalCount(),
|
|
9020
|
+
labelRowsPerPage: labelRowsPerPage,
|
|
9010
9021
|
onPageChange: onPageChange,
|
|
9011
9022
|
onRowsPerPageChange: onRowsPerPageChange,
|
|
9012
9023
|
page: tablePage,
|
|
9013
9024
|
rowsPerPage: tableRowsPerPage,
|
|
9025
|
+
rowsPerPageOptions: rowsPerPageOptions,
|
|
9014
9026
|
typography: _footerTypography
|
|
9015
9027
|
}, void 0)]
|
|
9016
9028
|
}), void 0);
|
|
@@ -9025,7 +9037,6 @@ const getMenuItem = action => {
|
|
|
9025
9037
|
"data-testid": action['data-testid'],
|
|
9026
9038
|
disabled: action.disabled,
|
|
9027
9039
|
startIcon: startIcon,
|
|
9028
|
-
onClick: action.onClick,
|
|
9029
9040
|
type: "text"
|
|
9030
9041
|
}, {
|
|
9031
9042
|
children: action.label
|
|
@@ -9058,9 +9069,7 @@ const TableActionsContainer = styled.div.withConfig({
|
|
|
9058
9069
|
const StyledMenu = styled(DotMenu).withConfig({
|
|
9059
9070
|
displayName: "TableActionsstyles__StyledMenu",
|
|
9060
9071
|
componentId: "sc-8lo813-1"
|
|
9061
|
-
})(["", ""], ({
|
|
9062
|
-
theme
|
|
9063
|
-
}) => css(["&.dot-menu .table-menu-button{margin-left:0;padding-left:0;&:hover{background-color:", ";}}"], theme.palette.grey[50]));
|
|
9072
|
+
})(["", ""], () => css(["&.dot-menu .table-menu-button{margin-left:0;padding-left:0;&:hover{background-color:transparent;}}"]));
|
|
9064
9073
|
|
|
9065
9074
|
const DotTableActions = ({
|
|
9066
9075
|
actions,
|
|
@@ -9100,21 +9109,27 @@ const DotTableActions = ({
|
|
|
9100
9109
|
}
|
|
9101
9110
|
};
|
|
9102
9111
|
const toggleMenu = event => {
|
|
9112
|
+
event.stopPropagation();
|
|
9103
9113
|
setAnchorEl(event.currentTarget);
|
|
9104
9114
|
setMenuOpen(!menuOpen);
|
|
9105
9115
|
};
|
|
9106
|
-
const onSelect = (
|
|
9116
|
+
const onSelect = (event, _menuId, itemKey) => {
|
|
9117
|
+
event.stopPropagation();
|
|
9107
9118
|
selectionMap[itemKey].onClick(null);
|
|
9108
9119
|
};
|
|
9109
9120
|
const onLeave = () => {
|
|
9110
9121
|
setMenuOpen(false);
|
|
9111
9122
|
};
|
|
9123
|
+
const handleTableActionClick = (event, action) => {
|
|
9124
|
+
event.stopPropagation();
|
|
9125
|
+
action.onClick(event);
|
|
9126
|
+
};
|
|
9112
9127
|
const renderTableActions = () => {
|
|
9113
9128
|
return actions && actions.map((action, index) => index < 2 && jsx(DotTableAction, {
|
|
9114
9129
|
iconId: action.iconId,
|
|
9115
9130
|
label: action.label,
|
|
9116
9131
|
tooltip: action.tooltip || action.label,
|
|
9117
|
-
onClick: action
|
|
9132
|
+
onClick: e => handleTableActionClick(e, action)
|
|
9118
9133
|
}, `action-${index}`));
|
|
9119
9134
|
};
|
|
9120
9135
|
return jsxs(Fragment, {
|
|
@@ -9125,6 +9140,7 @@ const DotTableActions = ({
|
|
|
9125
9140
|
children: [!showMenu && renderTableActions(), (showMenu || actions.length > 2) && jsx(DotIconButton, {
|
|
9126
9141
|
ariaLabel: "more options",
|
|
9127
9142
|
className: "dot-table-action-icon",
|
|
9143
|
+
"data-testid": "dot-table-action-icon",
|
|
9128
9144
|
iconId: "options",
|
|
9129
9145
|
iconSize: "small",
|
|
9130
9146
|
onClick: toggleMenu,
|
|
@@ -9579,7 +9595,7 @@ const StyledDraggableList = styled.div.withConfig({
|
|
|
9579
9595
|
})(["", ""], ({
|
|
9580
9596
|
theme,
|
|
9581
9597
|
draggableHandle
|
|
9582
|
-
}) => css(["&.", "{padding:", ";.", "{.dot-icon{color:", ";}&.react-draggable-dragging{background-color:", ";}&.with-default-cursor{cursor:default;}&.with-handle-grab-cursor ", "{cursor:grab;}}}"], rootClassName$3, theme.spacing(1, 0), listItemClassName, theme.palette.layer.n700, theme.palette.grey[50], draggableHandle));
|
|
9598
|
+
}) => css(["&.", "{padding:", ";position:relative;.", "{.dot-icon{color:", ";}&.react-draggable-dragging{background-color:", ";}&.with-default-cursor{cursor:default;}&.with-handle-grab-cursor ", "{cursor:grab;}}}"], rootClassName$3, theme.spacing(1, 0), listItemClassName, theme.palette.layer.n700, theme.palette.grey[50], draggableHandle));
|
|
9583
9599
|
|
|
9584
9600
|
const getOrderedListItems = (layout, listItems) => {
|
|
9585
9601
|
if (!listItems || !layout) return [];
|
|
@@ -9732,7 +9748,7 @@ const StyledDatePicker = styled(DatePicker).withConfig({
|
|
|
9732
9748
|
componentId: "sc-1to4suu-1"
|
|
9733
9749
|
})(["", ""], ({
|
|
9734
9750
|
theme
|
|
9735
|
-
}) => css(["&.", "{", ";}"], rootClassName$1, pickerInputStyles(theme)));
|
|
9751
|
+
}) => css(["&.", "{", ";.Mui-disabled.MuiInputBase-root,&.read-only .MuiInputBase-root{", ";}.MuiFormLabel-root{color:", ";}}"], rootClassName$1, pickerInputStyles(theme), readOnlyStyles(theme), theme.palette.layer.n500));
|
|
9736
9752
|
const StyledPickersDay = styled(PickersDay).withConfig({
|
|
9737
9753
|
displayName: "DatePickerstyles__StyledPickersDay",
|
|
9738
9754
|
componentId: "sc-1to4suu-2"
|
|
@@ -10015,7 +10031,7 @@ const StyledTimePicker = styled(TimePicker).withConfig({
|
|
|
10015
10031
|
componentId: "sc-17aptuh-1"
|
|
10016
10032
|
})(["", ""], ({
|
|
10017
10033
|
theme
|
|
10018
|
-
}) => css(["&.", "{", ";}"], rootClassName, pickerInputStyles(theme)));
|
|
10034
|
+
}) => css(["&.", "{", ";.Mui-disabled.MuiInputBase-root,&.read-only .MuiInputBase-root{", ";}.MuiFormLabel-root{color:", ";}}"], rootClassName, pickerInputStyles(theme), readOnlyStyles(theme), theme.palette.layer.n500));
|
|
10019
10035
|
|
|
10020
10036
|
dayjs.extend(utc);
|
|
10021
10037
|
const DEFAULT_PICKER_TIME_FORMAT = 'HH:mm';
|
|
@@ -10312,7 +10328,6 @@ const DotTimePicker = ({
|
|
|
10312
10328
|
required: _required,
|
|
10313
10329
|
helperText,
|
|
10314
10330
|
error,
|
|
10315
|
-
focused: isComponentReadOnly ? false : undefined,
|
|
10316
10331
|
InputProps: {
|
|
10317
10332
|
endAdornment: jsxs(Fragment, {
|
|
10318
10333
|
children: [error && jsx(DotIcon, {
|
package/index.umd.js
CHANGED
|
@@ -360,7 +360,10 @@
|
|
|
360
360
|
var pickerInputStyles = function pickerInputStyles(theme) {
|
|
361
361
|
return styled.css(templateObject_3$d || (templateObject_3$d = __makeTemplateObject(["\n label:not(.MuiInputLabel-shrink) {\n top: -5px;\n }\n\n .MuiInputBase-root {\n margin-bottom: 0;\n\n .dot-error-icon {\n margin-right: ", ";\n color: ", ";\n }\n\n .dot-icon {\n ", ";\n }\n }\n\n .MuiInputBase-input {\n height: ", ";\n padding: ", ";\n }\n\n .MuiFormHelperText-root {\n ", ";\n }\n"], ["\n label:not(.MuiInputLabel-shrink) {\n top: -5px;\n }\n\n .MuiInputBase-root {\n margin-bottom: 0;\n\n .dot-error-icon {\n margin-right: ", ";\n color: ", ";\n }\n\n .dot-icon {\n ", ";\n }\n }\n\n .MuiInputBase-input {\n height: ", ";\n padding: ", ";\n }\n\n .MuiFormHelperText-root {\n ", ";\n }\n"])), theme.spacing(0.5), theme.palette.error.main, adornmentIconStyles(), theme.spacing(2), theme.spacing(1.5, 0, 1.5, 2), formHelperTextRootStyles(theme));
|
|
362
362
|
};
|
|
363
|
-
var
|
|
363
|
+
var readOnlyStyles = function readOnlyStyles(theme) {
|
|
364
|
+
return styled.css(templateObject_4$b || (templateObject_4$b = __makeTemplateObject(["\n background: ", ";\n color: ", ";\n border-color: ", ";\n -webkit-text-fill-color: ", ";\n\n input.Mui-disabled {\n -webkit-text-fill-color: ", ";\n }\n\n .dot-chip {\n background: ", ";\n opacity: 1;\n }\n"], ["\n background: ", ";\n color: ", ";\n border-color: ", ";\n -webkit-text-fill-color: ", ";\n\n input.Mui-disabled {\n -webkit-text-fill-color: ", ";\n }\n\n .dot-chip {\n background: ", ";\n opacity: 1;\n }\n"])), theme.palette.grey[50], theme.palette.grey[500], theme.palette.grey[300], theme.palette.grey[500], theme.palette.grey[500], theme.palette.layer.n0);
|
|
365
|
+
};
|
|
366
|
+
var templateObject_1$1a, templateObject_2$15, templateObject_3$d, templateObject_4$b;
|
|
364
367
|
|
|
365
368
|
var rootClassName$13 = 'dot-text-field';
|
|
366
369
|
var rootSelectClassName = 'dot-select-field';
|
|
@@ -370,6 +373,7 @@
|
|
|
370
373
|
var successClassName = 'dot-success';
|
|
371
374
|
var adornmentIconClassName = 'dot-adornment-icon';
|
|
372
375
|
var fieldsetClassName = 'MuiOutlinedInput-notchedOutline';
|
|
376
|
+
var readOnlyClassName$1 = 'read-only';
|
|
373
377
|
var StyledAdornment = styled__default["default"](material.InputAdornment).withConfig({
|
|
374
378
|
displayName: "InputFormFieldsstyles__StyledAdornment",
|
|
375
379
|
componentId: "sc-1mbn9f0-0"
|
|
@@ -379,7 +383,7 @@
|
|
|
379
383
|
componentId: "sc-1mbn9f0-1"
|
|
380
384
|
})(templateObject_3$c || (templateObject_3$c = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
381
385
|
var theme = _a.theme;
|
|
382
|
-
return styled.css(templateObject_2$14 || (templateObject_2$14 = __makeTemplateObject(["\n &.", " {\n margin-bottom: ", ";\n transform: none;\n\n &.Mui-disabled .dot-typography {\n color:
|
|
386
|
+
return styled.css(templateObject_2$14 || (templateObject_2$14 = __makeTemplateObject(["\n &.", " {\n margin-bottom: ", ";\n transform: none;\n\n &.Mui-disabled .dot-typography {\n color: ", ";\n }\n\n &.Mui-error .dot-typography {\n color: ", ";\n }\n\n .dot-typography {\n display: inline;\n }\n }\n "], ["\n &.", " {\n margin-bottom: ", ";\n transform: none;\n\n &.Mui-disabled .dot-typography {\n color: ", ";\n }\n\n &.Mui-error .dot-typography {\n color: ", ";\n }\n\n .dot-typography {\n display: inline;\n }\n }\n "])), labelClassName, theme.spacing(0.5), theme.palette.layer.n700, theme.palette.error.main);
|
|
383
387
|
});
|
|
384
388
|
var StyledTextFieldContainer = styled__default["default"].div.withConfig({
|
|
385
389
|
displayName: "InputFormFieldsstyles__StyledTextFieldContainer",
|
|
@@ -391,7 +395,7 @@
|
|
|
391
395
|
})(templateObject_6$1 || (templateObject_6$1 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
392
396
|
var theme = _a.theme,
|
|
393
397
|
InputProps = _a.InputProps;
|
|
394
|
-
return styled.css(templateObject_5$3 || (templateObject_5$3 = __makeTemplateObject(["\n &.", " {\n .MuiInputBase-root {\n margin-bottom: 0;\n }\n .MuiInputBase-input {\n box-sizing: content-box;\n }\n .MuiOutlinedInput-input {\n padding: ", ";\n }\n .MuiInputBase-inputSizeSmall {\n padding-top: 10.5px;\n padding-bottom: 10.5px;\n\n &:not(textarea) {\n /* padding above and below together is 21px, and total height should be 40px */\n height: 19px;\n }\n }\n .MuiInputBase-inputMultiline {\n padding: 0;\n }\n }\n\n &.", " .", " {\n // inputSelect has an arrow so we need spacing for end adornment\n margin-right: ", ";\n }\n\n &.", ", &.", " {\n .", " {\n color: ", ";\n p {\n font-size: ", "px;\n margin: 0;\n }\n\n .dot-icon i {\n margin-top: -2px;\n }\n }\n\n .MuiInputBase-root {\n margin-bottom: 0;\n }\n\n .MuiInputBase-inputSizeSmall:not(textarea) {\n height: 19px;\n padding-top: 10.5px;\n padding-bottom: 10.5px;\n }\n\n select.dot-select {\n padding-left: ", ";\n }\n\n .MuiSelect-select:focus {\n background-color: transparent;\n }\n\n .MuiSelect-icon {\n right: ", ";\n }\n\n &.", " {\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n\n .MuiFormLabel-root.Mui-focused {\n color: ", ";\n }\n\n .", " .dot-icon {\n color: ", ";\n }\n }\n\n &.", " {\n .MuiInputLabel-outlined.MuiInputLabel-shrink {\n color: ", ";\n }\n\n .", " .dot-icon {\n color: ", ";\n }\n }\n\n &.", " {\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n\n .MuiInputLabel-outlined.MuiInputLabel-shrink {\n color: ", ";\n }\n\n .", " .dot-icon {\n color: ", ";\n }\n }\n\n .MuiOutlinedInput-adornedStart {\n padding-left: 12px;\n\n &.", " .", " {\n border-color: ", ";\n }\n }\n\n .MuiInputLabel-outlined.MuiInputLabel-shrink {\n color: ", ";\n }\n\n .MuiInputBase-inputAdornedStart {\n padding-left: 12px;\n }\n .MuiInputBase-inputAdornedEnd {\n padding-right: 12px;\n }\n .MuiFormHelperText-root {\n ", ";\n }\n }\n "], ["\n &.", " {\n .MuiInputBase-root {\n margin-bottom: 0;\n }\n .MuiInputBase-input {\n box-sizing: content-box;\n }\n .MuiOutlinedInput-input {\n padding: ", ";\n }\n .MuiInputBase-inputSizeSmall {\n padding-top: 10.5px;\n padding-bottom: 10.5px;\n\n &:not(textarea) {\n /* padding above and below together is 21px, and total height should be 40px */\n height: 19px;\n }\n }\n .MuiInputBase-inputMultiline {\n padding: 0;\n }\n }\n\n &.", " .", " {\n // inputSelect has an arrow so we need spacing for end adornment\n margin-right: ", ";\n }\n\n &.", ", &.", " {\n .", " {\n color: ", ";\n p {\n font-size: ", "px;\n margin: 0;\n }\n\n .dot-icon i {\n margin-top: -2px;\n }\n }\n\n .MuiInputBase-root {\n margin-bottom: 0;\n }\n\n .MuiInputBase-inputSizeSmall:not(textarea) {\n height: 19px;\n padding-top: 10.5px;\n padding-bottom: 10.5px;\n }\n\n select.dot-select {\n padding-left: ", ";\n }\n\n .MuiSelect-select:focus {\n background-color: transparent;\n }\n\n .MuiSelect-icon {\n right: ", ";\n }\n\n &.", " {\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n\n .MuiFormLabel-root.Mui-focused {\n color: ", ";\n }\n\n .", " .dot-icon {\n color: ", ";\n }\n }\n\n &.", " {\n .MuiInputLabel-outlined.MuiInputLabel-shrink {\n color: ", ";\n }\n\n .", " .dot-icon {\n color: ", ";\n }\n }\n\n &.", " {\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n\n .MuiInputLabel-outlined.MuiInputLabel-shrink {\n color: ", ";\n }\n\n .", " .dot-icon {\n color: ", ";\n }\n }\n\n .MuiOutlinedInput-adornedStart {\n padding-left: 12px;\n\n &.", " .", " {\n border-color: ", ";\n }\n }\n\n .MuiInputLabel-outlined.MuiInputLabel-shrink {\n color: ", ";\n }\n\n .MuiInputBase-inputAdornedStart {\n padding-left: 12px;\n }\n .MuiInputBase-inputAdornedEnd {\n padding-right: 12px;\n }\n .MuiFormHelperText-root {\n ", ";\n }\n }\n "])), rootClassName$13, InputProps.startAdornment ? "18px 12px 18px 0px" : "18px 12px", rootSelectClassName, adornmentIconClassName, theme.spacing(2), rootSelectClassName, rootClassName$13, adornmentIconClassName, theme.palette.layer.n700, theme.typography.body2.fontSize, theme.spacing(1.5), InputProps.endAdornment ? "44px" : "12px", successClassName, theme.palette.secondary.main, theme.palette.grey[700], adornmentIconClassName, theme.palette.secondary.main, errorClassName, theme.palette.error.main, adornmentIconClassName, theme.palette.error.main, warningClassName, theme.palette.warning.main, theme.palette.grey[700], adornmentIconClassName, theme.palette.warning.main, warningClassName, fieldsetClassName, theme.palette.warning[500], theme.palette.grey[700], formHelperTextRootStyles(theme));
|
|
398
|
+
return styled.css(templateObject_5$3 || (templateObject_5$3 = __makeTemplateObject(["\n &.", " {\n .MuiInputBase-root {\n margin-bottom: 0;\n }\n .MuiInputBase-input {\n box-sizing: content-box;\n }\n .MuiOutlinedInput-input {\n padding: ", ";\n }\n .MuiInputBase-inputSizeSmall {\n padding-top: 10.5px;\n padding-bottom: 10.5px;\n\n &:not(textarea) {\n /* padding above and below together is 21px, and total height should be 40px */\n height: 19px;\n }\n }\n .MuiInputBase-inputMultiline {\n padding: 0;\n }\n .MuiInputLabel-root.Mui-disabled {\n color: ", ";\n }\n }\n\n .dot-select,\n .dot-input {\n &.", ", &.Mui-disabled {\n ", ";\n }\n }\n\n &.", " .", " {\n // inputSelect has an arrow so we need spacing for end adornment\n margin-right: ", ";\n }\n\n &.", ", &.", " {\n .", " {\n color: ", ";\n p {\n font-size: ", "px;\n margin: 0;\n }\n\n .dot-icon i {\n margin-top: -2px;\n }\n }\n\n .MuiInputBase-root {\n margin-bottom: 0;\n }\n\n .MuiInputBase-inputSizeSmall:not(textarea) {\n height: 19px;\n padding-top: 10.5px;\n padding-bottom: 10.5px;\n }\n\n select.dot-select {\n padding-left: ", ";\n }\n\n .MuiSelect-select:focus:not(.", ") {\n background-color: transparent;\n }\n\n .MuiSelect-icon {\n right: ", ";\n }\n\n &.", " {\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n\n .MuiFormLabel-root.Mui-focused {\n color: ", ";\n }\n\n .", " .dot-icon {\n color: ", ";\n }\n }\n\n &.", " {\n .MuiInputLabel-outlined.MuiInputLabel-shrink {\n color: ", ";\n }\n\n .", " .dot-icon {\n color: ", ";\n }\n }\n\n &.", " {\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n\n .MuiInputLabel-outlined.MuiInputLabel-shrink {\n color: ", ";\n }\n\n .", " .dot-icon {\n color: ", ";\n }\n }\n\n .MuiOutlinedInput-adornedStart {\n padding-left: 12px;\n\n &.", " .", " {\n border-color: ", ";\n }\n }\n\n .MuiInputLabel-outlined.MuiInputLabel-shrink {\n color: ", ";\n }\n\n .MuiInputBase-inputAdornedStart {\n padding-left: 12px;\n }\n .MuiInputBase-inputAdornedEnd {\n padding-right: 12px;\n }\n .MuiFormHelperText-root {\n ", ";\n }\n }\n "], ["\n &.", " {\n .MuiInputBase-root {\n margin-bottom: 0;\n }\n .MuiInputBase-input {\n box-sizing: content-box;\n }\n .MuiOutlinedInput-input {\n padding: ", ";\n }\n .MuiInputBase-inputSizeSmall {\n padding-top: 10.5px;\n padding-bottom: 10.5px;\n\n &:not(textarea) {\n /* padding above and below together is 21px, and total height should be 40px */\n height: 19px;\n }\n }\n .MuiInputBase-inputMultiline {\n padding: 0;\n }\n .MuiInputLabel-root.Mui-disabled {\n color: ", ";\n }\n }\n\n .dot-select,\n .dot-input {\n &.", ", &.Mui-disabled {\n ", ";\n }\n }\n\n &.", " .", " {\n // inputSelect has an arrow so we need spacing for end adornment\n margin-right: ", ";\n }\n\n &.", ", &.", " {\n .", " {\n color: ", ";\n p {\n font-size: ", "px;\n margin: 0;\n }\n\n .dot-icon i {\n margin-top: -2px;\n }\n }\n\n .MuiInputBase-root {\n margin-bottom: 0;\n }\n\n .MuiInputBase-inputSizeSmall:not(textarea) {\n height: 19px;\n padding-top: 10.5px;\n padding-bottom: 10.5px;\n }\n\n select.dot-select {\n padding-left: ", ";\n }\n\n .MuiSelect-select:focus:not(.", ") {\n background-color: transparent;\n }\n\n .MuiSelect-icon {\n right: ", ";\n }\n\n &.", " {\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n\n .MuiFormLabel-root.Mui-focused {\n color: ", ";\n }\n\n .", " .dot-icon {\n color: ", ";\n }\n }\n\n &.", " {\n .MuiInputLabel-outlined.MuiInputLabel-shrink {\n color: ", ";\n }\n\n .", " .dot-icon {\n color: ", ";\n }\n }\n\n &.", " {\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n\n .MuiInputLabel-outlined.MuiInputLabel-shrink {\n color: ", ";\n }\n\n .", " .dot-icon {\n color: ", ";\n }\n }\n\n .MuiOutlinedInput-adornedStart {\n padding-left: 12px;\n\n &.", " .", " {\n border-color: ", ";\n }\n }\n\n .MuiInputLabel-outlined.MuiInputLabel-shrink {\n color: ", ";\n }\n\n .MuiInputBase-inputAdornedStart {\n padding-left: 12px;\n }\n .MuiInputBase-inputAdornedEnd {\n padding-right: 12px;\n }\n .MuiFormHelperText-root {\n ", ";\n }\n }\n "])), rootClassName$13, InputProps.startAdornment ? "18px 12px 18px 0px" : "18px 12px", theme.palette.layer.n500, readOnlyClassName$1, readOnlyStyles(theme), rootSelectClassName, adornmentIconClassName, theme.spacing(2), rootSelectClassName, rootClassName$13, adornmentIconClassName, theme.palette.layer.n700, theme.typography.body2.fontSize, theme.spacing(1.5), readOnlyClassName$1, InputProps.endAdornment ? "44px" : "12px", successClassName, theme.palette.secondary.main, theme.palette.grey[700], adornmentIconClassName, theme.palette.secondary.main, errorClassName, theme.palette.error.main, adornmentIconClassName, theme.palette.error.main, warningClassName, theme.palette.warning.main, theme.palette.grey[700], adornmentIconClassName, theme.palette.warning.main, warningClassName, fieldsetClassName, theme.palette.warning[500], theme.palette.grey[700], formHelperTextRootStyles(theme));
|
|
395
399
|
});
|
|
396
400
|
var templateObject_1$19, templateObject_2$14, templateObject_3$c, templateObject_4$a, templateObject_5$3, templateObject_6$1;
|
|
397
401
|
|
|
@@ -2312,8 +2316,7 @@
|
|
|
2312
2316
|
visibleItems.forEach(function (_a) {
|
|
2313
2317
|
var height = _a.height;
|
|
2314
2318
|
var customItemHeight = height ? height : itemHeight;
|
|
2315
|
-
|
|
2316
|
-
maxHeight += customItemHeight + 3;
|
|
2319
|
+
maxHeight += customItemHeight;
|
|
2317
2320
|
});
|
|
2318
2321
|
return maxHeight;
|
|
2319
2322
|
};
|
|
@@ -3267,7 +3270,9 @@
|
|
|
3267
3270
|
id = _a.id,
|
|
3268
3271
|
inputRef = _a.inputRef,
|
|
3269
3272
|
label = _a.label,
|
|
3273
|
+
max = _a.max,
|
|
3270
3274
|
maxRows = _a.maxRows,
|
|
3275
|
+
min = _a.min,
|
|
3271
3276
|
minRows = _a.minRows,
|
|
3272
3277
|
_f = _a.multiline,
|
|
3273
3278
|
multiline = _f === void 0 ? false : _f,
|
|
@@ -3301,7 +3306,7 @@
|
|
|
3301
3306
|
var _m = React.useState(hasDebounce && getInitialState(value)),
|
|
3302
3307
|
inputTextState = _m[0],
|
|
3303
3308
|
setInputTextState = _m[1];
|
|
3304
|
-
var rootStyles = useStylesWithRootClass(rootClassName$13, hasError, hasWarning, hasSuccess, readOnly
|
|
3309
|
+
var rootStyles = useStylesWithRootClass(rootClassName$13, hasError, hasWarning, hasSuccess, readOnly && readOnlyClassName$1);
|
|
3305
3310
|
// Used to control text value from the consumer component
|
|
3306
3311
|
// when debounce feature is enabled
|
|
3307
3312
|
React.useEffect(function () {
|
|
@@ -3356,6 +3361,7 @@
|
|
|
3356
3361
|
}), void 0);
|
|
3357
3362
|
};
|
|
3358
3363
|
var wrapperClassName = useStylesWithRootClass(fullWidth !== false ? 'dot-input-text--fullwidth' : '', className);
|
|
3364
|
+
var inputClassName = useStylesWithRootClass('dot-input', readOnly && readOnlyClassName$1);
|
|
3359
3365
|
return jsxRuntime.jsxs(StyledTextFieldContainer, __assign({
|
|
3360
3366
|
className: wrapperClassName
|
|
3361
3367
|
}, {
|
|
@@ -3379,7 +3385,6 @@
|
|
|
3379
3385
|
defaultValue: defaultInputValue,
|
|
3380
3386
|
disabled: disabled,
|
|
3381
3387
|
error: error,
|
|
3382
|
-
focused: readOnly ? false : undefined,
|
|
3383
3388
|
fullWidth: fullWidth,
|
|
3384
3389
|
helperText: helperText,
|
|
3385
3390
|
id: id,
|
|
@@ -3388,8 +3393,10 @@
|
|
|
3388
3393
|
},
|
|
3389
3394
|
inputProps: {
|
|
3390
3395
|
'data-testid': dataTestId,
|
|
3391
|
-
className:
|
|
3392
|
-
readOnly: readOnly
|
|
3396
|
+
className: inputClassName,
|
|
3397
|
+
readOnly: readOnly,
|
|
3398
|
+
max: max,
|
|
3399
|
+
min: min
|
|
3393
3400
|
},
|
|
3394
3401
|
inputRef: inputRef,
|
|
3395
3402
|
label: persistentLabel ? null : label,
|
|
@@ -4728,7 +4735,7 @@
|
|
|
4728
4735
|
componentId: "j2sgjy-0"
|
|
4729
4736
|
})(templateObject_2$I || (templateObject_2$I = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
4730
4737
|
var theme = _a.theme;
|
|
4731
|
-
return styled.css(templateObject_1$L || (templateObject_1$L = __makeTemplateObject(["\n &.", " {\n &.", " .dot-text-field .", " {\n height: 56px;\n padding-left: ", ";\n }\n\n .", " {\n /* Override only top/bottom, but preserve left/right padding */\n padding-top: ", ";\n padding-bottom: ", ";\n }\n\n .dot-chip:first-child {\n margin-left: ", ";\n }\n\n .dot-text-field {\n .", " {\n min-height: ", ";\n }\n\n .warning-icon {\n color: ", ";\n }\n .error-icon {\n color: ", ";\n }\n }\n }\n "], ["\n &.", " {\n &.", " .dot-text-field .", " {\n height: 56px;\n padding-left: ", ";\n }\n\n .", " {\n /* Override only top/bottom, but preserve left/right padding */\n padding-top: ", ";\n padding-bottom: ", ";\n }\n\n .dot-chip:first-child {\n margin-left: ", ";\n }\n\n .dot-text-field {\n .", " {\n min-height: ", ";\n }\n\n .warning-icon {\n color: ", ";\n }\n .error-icon {\n color: ", ";\n }\n }\n }\n "])), rootClassName$I, inputMediumClassName, inputRootClassName, theme.spacing(2), inputRootClassName, theme.spacing(0), theme.spacing(0), theme.spacing(0), inputRootClassName, theme.spacing(5), theme.palette.warning.main, theme.palette.error.main);
|
|
4738
|
+
return styled.css(templateObject_1$L || (templateObject_1$L = __makeTemplateObject(["\n &.", " {\n &.", " .dot-text-field .", " {\n height: 56px;\n padding-left: ", ";\n }\n\n .MuiInputBase-root.Mui-disabled,\n .", " {\n ", ";\n }\n\n .", " {\n /* Override only top/bottom, but preserve left/right padding */\n padding-top: ", ";\n padding-bottom: ", ";\n }\n\n .dot-chip:first-child {\n margin-left: ", ";\n }\n\n .dot-text-field {\n .", " {\n min-height: ", ";\n }\n\n .warning-icon {\n color: ", ";\n }\n .error-icon {\n color: ", ";\n }\n }\n }\n "], ["\n &.", " {\n &.", " .dot-text-field .", " {\n height: 56px;\n padding-left: ", ";\n }\n\n .MuiInputBase-root.Mui-disabled,\n .", " {\n ", ";\n }\n\n .", " {\n /* Override only top/bottom, but preserve left/right padding */\n padding-top: ", ";\n padding-bottom: ", ";\n }\n\n .dot-chip:first-child {\n margin-left: ", ";\n }\n\n .dot-text-field {\n .", " {\n min-height: ", ";\n }\n\n .warning-icon {\n color: ", ";\n }\n .error-icon {\n color: ", ";\n }\n }\n }\n "])), rootClassName$I, inputMediumClassName, inputRootClassName, theme.spacing(2), readOnlyClassName$1, readOnlyStyles(theme), inputRootClassName, theme.spacing(0), theme.spacing(0), theme.spacing(0), inputRootClassName, theme.spacing(5), theme.palette.warning.main, theme.palette.error.main);
|
|
4732
4739
|
});
|
|
4733
4740
|
var templateObject_1$L, templateObject_2$I;
|
|
4734
4741
|
|
|
@@ -4895,6 +4902,7 @@
|
|
|
4895
4902
|
inputId = _a.inputId,
|
|
4896
4903
|
inputRef = _a.inputRef,
|
|
4897
4904
|
inputValue = _a.inputValue,
|
|
4905
|
+
isOptionEqualToValue = _a.isOptionEqualToValue,
|
|
4898
4906
|
label = _a.label,
|
|
4899
4907
|
loading = _a.loading,
|
|
4900
4908
|
maxHeight = _a.maxHeight,
|
|
@@ -4939,7 +4947,7 @@
|
|
|
4939
4947
|
var preventDuplicateInsertion = actionItem === null || actionItem === void 0 ? void 0 : actionItem.preventDuplicateInsertion;
|
|
4940
4948
|
var textFieldWarningClassName = !error && warning && warningClassName;
|
|
4941
4949
|
var rootClasses = useStylesWithRootClass(rootClassName$I, size === 'medium' && inputMediumClassName, className);
|
|
4942
|
-
var textFieldRootClasses = useStylesWithRootClass(rootClassName$13, readOnly &&
|
|
4950
|
+
var textFieldRootClasses = useStylesWithRootClass(rootClassName$13, readOnly && readOnlyClassName$1, textFieldWarningClassName);
|
|
4943
4951
|
var inputRootClasses = useStylesWithRootClass(inputRootClassName, !dense && inputMediumClassName);
|
|
4944
4952
|
var highlightedOption = null;
|
|
4945
4953
|
var textFieldInput;
|
|
@@ -5132,6 +5140,7 @@
|
|
|
5132
5140
|
return option.group;
|
|
5133
5141
|
} : undefined,
|
|
5134
5142
|
inputValue: inputValue,
|
|
5143
|
+
isOptionEqualToValue: isOptionEqualToValue,
|
|
5135
5144
|
ListboxComponent: ListboxComponent,
|
|
5136
5145
|
loading: loading,
|
|
5137
5146
|
multiple: multiple,
|
|
@@ -5186,7 +5195,6 @@
|
|
|
5186
5195
|
root: textFieldRootClasses
|
|
5187
5196
|
},
|
|
5188
5197
|
error: error,
|
|
5189
|
-
focused: readOnly ? false : undefined,
|
|
5190
5198
|
helperText: helperText,
|
|
5191
5199
|
id: inputId,
|
|
5192
5200
|
inputProps: __assign(__assign({}, inputProps), {
|
|
@@ -6763,7 +6771,8 @@
|
|
|
6763
6771
|
var hasWarning = !error && warning && warningClassName;
|
|
6764
6772
|
var hasSuccess = !error && !warning && success && successClassName;
|
|
6765
6773
|
var endAdornment = endIcon || endText;
|
|
6766
|
-
var
|
|
6774
|
+
var inputStyles = useStylesWithRootClass('dot-select', readOnly && readOnlyClassName$1);
|
|
6775
|
+
var rootStyles = useStylesWithRootClass(rootSelectClassName, hasSuccess, hasWarning);
|
|
6767
6776
|
var getOption = function getOption(option) {
|
|
6768
6777
|
return typeof option === 'string' ? option : option.option;
|
|
6769
6778
|
};
|
|
@@ -6799,12 +6808,12 @@
|
|
|
6799
6808
|
readOnly: readOnly,
|
|
6800
6809
|
open: readOnly ? false : undefined
|
|
6801
6810
|
},
|
|
6811
|
+
"aria-label": ariaLabel || label,
|
|
6802
6812
|
autoFocus: autoFocus,
|
|
6803
6813
|
className: rootStyles,
|
|
6804
6814
|
defaultValue: defaultValue,
|
|
6805
6815
|
disabled: disabled,
|
|
6806
6816
|
error: error,
|
|
6807
|
-
focused: readOnly ? false : undefined,
|
|
6808
6817
|
fullWidth: fullWidth,
|
|
6809
6818
|
helperText: helperText,
|
|
6810
6819
|
id: id,
|
|
@@ -6814,7 +6823,7 @@
|
|
|
6814
6823
|
inputProps: {
|
|
6815
6824
|
'aria-label': ariaLabel,
|
|
6816
6825
|
'data-testid': dataTestId,
|
|
6817
|
-
className:
|
|
6826
|
+
className: inputStyles,
|
|
6818
6827
|
readOnly: readOnly
|
|
6819
6828
|
},
|
|
6820
6829
|
inputRef: inputRef,
|
|
@@ -6826,6 +6835,7 @@
|
|
|
6826
6835
|
onFocus: onFocus,
|
|
6827
6836
|
onKeyDown: onKeyDown,
|
|
6828
6837
|
required: required,
|
|
6838
|
+
role: "textbox",
|
|
6829
6839
|
select: true,
|
|
6830
6840
|
size: size,
|
|
6831
6841
|
value: value,
|
|
@@ -8059,7 +8069,7 @@
|
|
|
8059
8069
|
} : undefined,
|
|
8060
8070
|
ref: inlineEditRef,
|
|
8061
8071
|
role: ariaRole,
|
|
8062
|
-
tabIndex:
|
|
8072
|
+
tabIndex: tabIndex,
|
|
8063
8073
|
typography: typography
|
|
8064
8074
|
}, {
|
|
8065
8075
|
children: editing ? renderEditMode() : renderViewMode()
|
|
@@ -9600,6 +9610,7 @@
|
|
|
9600
9610
|
footerTypography = _c === void 0 ? TABLE_TYPOGRAPHY_VARIANT : _c,
|
|
9601
9611
|
_d = _a.headerTypography,
|
|
9602
9612
|
headerTypography = _d === void 0 ? TABLE_TYPOGRAPHY_VARIANT : _d,
|
|
9613
|
+
labelRowsPerPage = _a.labelRowsPerPage,
|
|
9603
9614
|
_e = _a.loading,
|
|
9604
9615
|
loading = _e === void 0 ? false : _e,
|
|
9605
9616
|
maxHeight = _a.maxHeight,
|
|
@@ -9612,6 +9623,7 @@
|
|
|
9612
9623
|
_g = _a.page,
|
|
9613
9624
|
page = _g === void 0 ? 0 : _g,
|
|
9614
9625
|
rowsPerPage = _a.rowsPerPage,
|
|
9626
|
+
rowsPerPageOptions = _a.rowsPerPageOptions,
|
|
9615
9627
|
_h = _a.stickyHeader,
|
|
9616
9628
|
stickyHeader = _h === void 0 ? true : _h,
|
|
9617
9629
|
_j = _a.sortable,
|
|
@@ -9777,10 +9789,12 @@
|
|
|
9777
9789
|
}), void 0)
|
|
9778
9790
|
}), void 0), rowsPerPage && jsxRuntime.jsx(DotTablePagination, {
|
|
9779
9791
|
count: getTotalCount(),
|
|
9792
|
+
labelRowsPerPage: labelRowsPerPage,
|
|
9780
9793
|
onPageChange: onPageChange,
|
|
9781
9794
|
onRowsPerPageChange: onRowsPerPageChange,
|
|
9782
9795
|
page: tablePage,
|
|
9783
9796
|
rowsPerPage: tableRowsPerPage,
|
|
9797
|
+
rowsPerPageOptions: rowsPerPageOptions,
|
|
9784
9798
|
typography: footerTypography
|
|
9785
9799
|
}, void 0)]
|
|
9786
9800
|
}), void 0);
|
|
@@ -9795,7 +9809,6 @@
|
|
|
9795
9809
|
"data-testid": action['data-testid'],
|
|
9796
9810
|
disabled: action.disabled,
|
|
9797
9811
|
startIcon: startIcon,
|
|
9798
|
-
onClick: action.onClick,
|
|
9799
9812
|
type: "text"
|
|
9800
9813
|
}, {
|
|
9801
9814
|
children: action.label
|
|
@@ -9828,9 +9841,8 @@
|
|
|
9828
9841
|
var StyledMenu = styled__default["default"](DotMenu).withConfig({
|
|
9829
9842
|
displayName: "TableActionsstyles__StyledMenu",
|
|
9830
9843
|
componentId: "sc-8lo813-1"
|
|
9831
|
-
})(templateObject_3$3 || (templateObject_3$3 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (
|
|
9832
|
-
|
|
9833
|
-
return styled.css(templateObject_2$7 || (templateObject_2$7 = __makeTemplateObject(["\n &.dot-menu .table-menu-button {\n margin-left: 0;\n padding-left: 0;\n &:hover {\n background-color: ", ";\n }\n }\n "], ["\n &.dot-menu .table-menu-button {\n margin-left: 0;\n padding-left: 0;\n &:hover {\n background-color: ", ";\n }\n }\n "])), theme.palette.grey[50]);
|
|
9844
|
+
})(templateObject_3$3 || (templateObject_3$3 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function () {
|
|
9845
|
+
return styled.css(templateObject_2$7 || (templateObject_2$7 = __makeTemplateObject(["\n &.dot-menu .table-menu-button {\n margin-left: 0;\n padding-left: 0;\n &:hover {\n background-color: transparent;\n }\n }\n "], ["\n &.dot-menu .table-menu-button {\n margin-left: 0;\n padding-left: 0;\n &:hover {\n background-color: transparent;\n }\n }\n "])));
|
|
9834
9846
|
});
|
|
9835
9847
|
var templateObject_1$8, templateObject_2$7, templateObject_3$3;
|
|
9836
9848
|
|
|
@@ -9883,22 +9895,30 @@
|
|
|
9883
9895
|
}
|
|
9884
9896
|
};
|
|
9885
9897
|
var toggleMenu = function toggleMenu(event) {
|
|
9898
|
+
event.stopPropagation();
|
|
9886
9899
|
setAnchorEl(event.currentTarget);
|
|
9887
9900
|
setMenuOpen(!menuOpen);
|
|
9888
9901
|
};
|
|
9889
|
-
var onSelect = function onSelect(
|
|
9902
|
+
var onSelect = function onSelect(event, _menuId, itemKey) {
|
|
9903
|
+
event.stopPropagation();
|
|
9890
9904
|
selectionMap[itemKey].onClick(null);
|
|
9891
9905
|
};
|
|
9892
9906
|
var onLeave = function onLeave() {
|
|
9893
9907
|
setMenuOpen(false);
|
|
9894
9908
|
};
|
|
9909
|
+
var handleTableActionClick = function handleTableActionClick(event, action) {
|
|
9910
|
+
event.stopPropagation();
|
|
9911
|
+
action.onClick(event);
|
|
9912
|
+
};
|
|
9895
9913
|
var renderTableActions = function renderTableActions() {
|
|
9896
9914
|
return actions && actions.map(function (action, index) {
|
|
9897
9915
|
return index < 2 && jsxRuntime.jsx(DotTableAction, {
|
|
9898
9916
|
iconId: action.iconId,
|
|
9899
9917
|
label: action.label,
|
|
9900
9918
|
tooltip: action.tooltip || action.label,
|
|
9901
|
-
onClick:
|
|
9919
|
+
onClick: function (e) {
|
|
9920
|
+
return handleTableActionClick(e, action);
|
|
9921
|
+
}
|
|
9902
9922
|
}, "action-" + index);
|
|
9903
9923
|
});
|
|
9904
9924
|
};
|
|
@@ -9910,6 +9930,7 @@
|
|
|
9910
9930
|
children: [!showMenu && renderTableActions(), (showMenu || actions.length > 2) && jsxRuntime.jsx(DotIconButton, {
|
|
9911
9931
|
ariaLabel: "more options",
|
|
9912
9932
|
className: "dot-table-action-icon",
|
|
9933
|
+
"data-testid": "dot-table-action-icon",
|
|
9913
9934
|
iconId: "options",
|
|
9914
9935
|
iconSize: "small",
|
|
9915
9936
|
onClick: toggleMenu,
|
|
@@ -10416,7 +10437,7 @@
|
|
|
10416
10437
|
})(templateObject_2$2 || (templateObject_2$2 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
10417
10438
|
var theme = _a.theme,
|
|
10418
10439
|
draggableHandle = _a.draggableHandle;
|
|
10419
|
-
return styled.css(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n &.", " {\n padding: ", ";\n\n .", " {\n .dot-icon {\n color: ", ";\n }\n\n &.react-draggable-dragging {\n background-color: ", ";\n }\n\n &.with-default-cursor {\n cursor: default;\n }\n\n &.with-handle-grab-cursor ", " {\n cursor: grab;\n }\n }\n }\n "], ["\n &.", " {\n padding: ", ";\n\n .", " {\n .dot-icon {\n color: ", ";\n }\n\n &.react-draggable-dragging {\n background-color: ", ";\n }\n\n &.with-default-cursor {\n cursor: default;\n }\n\n &.with-handle-grab-cursor ", " {\n cursor: grab;\n }\n }\n }\n "])), rootClassName$3, theme.spacing(1, 0), listItemClassName, theme.palette.layer.n700, theme.palette.grey[50], draggableHandle);
|
|
10440
|
+
return styled.css(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n &.", " {\n padding: ", ";\n position: relative;\n\n .", " {\n .dot-icon {\n color: ", ";\n }\n\n &.react-draggable-dragging {\n background-color: ", ";\n }\n\n &.with-default-cursor {\n cursor: default;\n }\n\n &.with-handle-grab-cursor ", " {\n cursor: grab;\n }\n }\n }\n "], ["\n &.", " {\n padding: ", ";\n position: relative;\n\n .", " {\n .dot-icon {\n color: ", ";\n }\n\n &.react-draggable-dragging {\n background-color: ", ";\n }\n\n &.with-default-cursor {\n cursor: default;\n }\n\n &.with-handle-grab-cursor ", " {\n cursor: grab;\n }\n }\n }\n "])), rootClassName$3, theme.spacing(1, 0), listItemClassName, theme.palette.layer.n700, theme.palette.grey[50], draggableHandle);
|
|
10420
10441
|
});
|
|
10421
10442
|
var templateObject_1$3, templateObject_2$2;
|
|
10422
10443
|
|
|
@@ -10588,7 +10609,7 @@
|
|
|
10588
10609
|
componentId: "sc-1to4suu-1"
|
|
10589
10610
|
})(templateObject_3$1 || (templateObject_3$1 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
10590
10611
|
var theme = _a.theme;
|
|
10591
|
-
return styled.css(templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject(["\n &.", " {\n ", ";\n }\n "], ["\n &.", " {\n ", ";\n }\n "])), rootClassName$1, pickerInputStyles(theme));
|
|
10612
|
+
return styled.css(templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject(["\n &.", " {\n ", ";\n\n .Mui-disabled.MuiInputBase-root,\n &.read-only .MuiInputBase-root {\n ", ";\n }\n\n .MuiFormLabel-root {\n color: ", ";\n }\n }\n "], ["\n &.", " {\n ", ";\n\n .Mui-disabled.MuiInputBase-root,\n &.read-only .MuiInputBase-root {\n ", ";\n }\n\n .MuiFormLabel-root {\n color: ", ";\n }\n }\n "])), rootClassName$1, pickerInputStyles(theme), readOnlyStyles(theme), theme.palette.layer.n500);
|
|
10592
10613
|
});
|
|
10593
10614
|
var StyledPickersDay = styled__default["default"](xDatePickers.PickersDay).withConfig({
|
|
10594
10615
|
displayName: "DatePickerstyles__StyledPickersDay",
|
|
@@ -10911,7 +10932,7 @@
|
|
|
10911
10932
|
componentId: "sc-17aptuh-1"
|
|
10912
10933
|
})(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
10913
10934
|
var theme = _a.theme;
|
|
10914
|
-
return styled.css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n &.", " {\n ", ";\n }\n "], ["\n &.", " {\n ", ";\n }\n "])), rootClassName, pickerInputStyles(theme));
|
|
10935
|
+
return styled.css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n &.", " {\n ", ";\n\n .Mui-disabled.MuiInputBase-root,\n &.read-only .MuiInputBase-root {\n ", ";\n }\n\n .MuiFormLabel-root {\n color: ", ";\n }\n }\n "], ["\n &.", " {\n ", ";\n\n .Mui-disabled.MuiInputBase-root,\n &.read-only .MuiInputBase-root {\n ", ";\n }\n\n .MuiFormLabel-root {\n color: ", ";\n }\n }\n "])), rootClassName, pickerInputStyles(theme), readOnlyStyles(theme), theme.palette.layer.n500);
|
|
10915
10936
|
});
|
|
10916
10937
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
10917
10938
|
|
|
@@ -11244,7 +11265,6 @@
|
|
|
11244
11265
|
required: required,
|
|
11245
11266
|
helperText: helperText,
|
|
11246
11267
|
error: error,
|
|
11247
|
-
focused: isComponentReadOnly ? false : undefined,
|
|
11248
11268
|
InputProps: {
|
|
11249
11269
|
endAdornment: jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
11250
11270
|
children: [error && jsxRuntime.jsx(DotIcon, {
|
|
@@ -44,6 +44,7 @@ export interface AutoCompleteProps<T extends AutoCompleteOption = AutoCompleteOp
|
|
|
44
44
|
inputRef?: Ref<HTMLInputElement>;
|
|
45
45
|
/** The value of the input field. */
|
|
46
46
|
inputValue?: string;
|
|
47
|
+
isOptionEqualToValue?: (option: T, value: T) => boolean;
|
|
47
48
|
/** Label displayed above the input field */
|
|
48
49
|
label?: string;
|
|
49
50
|
/** If true, the component will be in a loading state. */
|
|
@@ -85,4 +86,4 @@ export interface AutoCompleteProps<T extends AutoCompleteOption = AutoCompleteOp
|
|
|
85
86
|
/** If true, the label will be displayed in a warning state. */
|
|
86
87
|
warning?: boolean;
|
|
87
88
|
}
|
|
88
|
-
export declare const DotAutoComplete: <T extends AutoCompleteOption>({ ListboxComponent, actionItem, ariaLabel, autoFocus, className, "data-testid": dataTestId, defaultValue, dense, disabled, disablePortal, endAdornmentTooltip, error, filterOptions, filterSelectedOptions, freesolo, checkIfOptionDisabled, group, helperText, inputId, inputRef, inputValue, label, loading, maxHeight, multiple, onBlur, onChange, onClose, onInputChange, onOpen, open, options, persistentLabel, placeholder, readOnly, renderOption, renderTags, required, size, value, warning, }: AutoCompleteProps<T>) => JSX.Element;
|
|
89
|
+
export declare const DotAutoComplete: <T extends AutoCompleteOption>({ ListboxComponent, actionItem, ariaLabel, autoFocus, className, "data-testid": dataTestId, defaultValue, dense, disabled, disablePortal, endAdornmentTooltip, error, filterOptions, filterSelectedOptions, freesolo, checkIfOptionDisabled, group, helperText, inputId, inputRef, inputValue, isOptionEqualToValue, label, loading, maxHeight, multiple, onBlur, onChange, onClose, onInputChange, onOpen, open, options, persistentLabel, placeholder, readOnly, renderOption, renderTags, required, size, value, warning, }: AutoCompleteProps<T>) => JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { ComponentMeta, Story } from '@storybook/react';
|
|
|
2
2
|
import { AutoCompleteProps } from './AutoComplete';
|
|
3
3
|
import { AutoCompleteOption } from './utils/interface';
|
|
4
4
|
import { AutoCompleteWithRenderOption } from './Autocomplete.stories.data';
|
|
5
|
-
declare const _default: ComponentMeta<(<T extends AutoCompleteOption>({ ListboxComponent, actionItem, ariaLabel, autoFocus, className, "data-testid": dataTestId, defaultValue, dense, disabled, disablePortal, endAdornmentTooltip, error, filterOptions, filterSelectedOptions, freesolo, checkIfOptionDisabled, group, helperText, inputId, inputRef, inputValue, label, loading, maxHeight, multiple, onBlur, onChange, onClose, onInputChange, onOpen, open, options, persistentLabel, placeholder, readOnly, renderOption, renderTags, required, size, value, warning, }: AutoCompleteProps<T>) => JSX.Element)>;
|
|
5
|
+
declare const _default: ComponentMeta<(<T extends AutoCompleteOption>({ ListboxComponent, actionItem, ariaLabel, autoFocus, className, "data-testid": dataTestId, defaultValue, dense, disabled, disablePortal, endAdornmentTooltip, error, filterOptions, filterSelectedOptions, freesolo, checkIfOptionDisabled, group, helperText, inputId, inputRef, inputValue, isOptionEqualToValue, label, loading, maxHeight, multiple, onBlur, onChange, onClose, onInputChange, onOpen, open, options, persistentLabel, placeholder, readOnly, renderOption, renderTags, required, size, value, warning, }: AutoCompleteProps<T>) => JSX.Element)>;
|
|
6
6
|
export default _default;
|
|
7
7
|
export declare const Default: any;
|
|
8
8
|
export declare const WithActionItem: any;
|
|
@@ -18,7 +18,7 @@ export interface DatePickerProps extends CommonProps {
|
|
|
18
18
|
disablePast?: boolean;
|
|
19
19
|
/** Disable the portal behavior. If true, children stay within parent DOM hierarchy. */
|
|
20
20
|
disablePortal?: boolean;
|
|
21
|
-
/** If `true`, the picker and text field are disabled. */
|
|
21
|
+
/** If `true`, the picker and text field are disabled. DOES NOT WORK WITH SCREEN READERS, we recommend using `readOnly` instead. */
|
|
22
22
|
disabled?: boolean;
|
|
23
23
|
/** If `true`, 'Clear' button will be displayed in the calendar popper. `True` by default. */
|
|
24
24
|
displayClearButton?: boolean;
|
|
@@ -6,7 +6,7 @@ export interface InputProps extends CommonProps {
|
|
|
6
6
|
autoFocus?: boolean;
|
|
7
7
|
/** default value of the input element */
|
|
8
8
|
defaultValue?: string;
|
|
9
|
-
/** If true, the input will be disabled. */
|
|
9
|
+
/** If true, the input will be disabled. DOES NOT WORK WITH SCREEN READERS, we recommend using `readOnly` instead. */
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
/** Icon placed after the children. */
|
|
12
12
|
endIcon?: ReactNode;
|
|
@@ -27,6 +27,8 @@ export interface InputProps extends CommonProps {
|
|
|
27
27
|
inputRef?: Ref<HTMLInputElement>;
|
|
28
28
|
/** The label content. */
|
|
29
29
|
label?: string;
|
|
30
|
+
max?: number | string;
|
|
31
|
+
min?: number | string;
|
|
30
32
|
/** The name of input element */
|
|
31
33
|
name: string;
|
|
32
34
|
/** A function that should be executed when the input loses focus */
|
|
@@ -7,6 +7,7 @@ export declare const warningClassName = "dot-warning";
|
|
|
7
7
|
export declare const successClassName = "dot-success";
|
|
8
8
|
export declare const adornmentIconClassName = "dot-adornment-icon";
|
|
9
9
|
export declare const fieldsetClassName = "MuiOutlinedInput-notchedOutline";
|
|
10
|
+
export declare const readOnlyClassName = "read-only";
|
|
10
11
|
export declare const StyledAdornment: import("styled-components").StyledComponent<import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").InputAdornmentTypeMap<{}, "div">>, any, {}, never>;
|
|
11
12
|
export declare const StyledInputLabel: import("styled-components").StyledComponent<import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").InputLabelTypeMap<{}, "label">>, any, {}, never>;
|
|
12
13
|
export declare const StyledTextFieldContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -9,7 +9,7 @@ export interface InputTextProps extends InputProps {
|
|
|
9
9
|
**/
|
|
10
10
|
autoComplete?: string;
|
|
11
11
|
endAdornmentTooltip?: string;
|
|
12
|
-
/** If true, the input will use debounce functionality.
|
|
12
|
+
/** If true, the input will use debounce functionality. */
|
|
13
13
|
hasDebounce?: boolean;
|
|
14
14
|
/** max of rows for multiline line */
|
|
15
15
|
maxRows?: number;
|
|
@@ -31,4 +31,4 @@ export interface EndIconProps {
|
|
|
31
31
|
success?: boolean;
|
|
32
32
|
warning?: boolean;
|
|
33
33
|
}
|
|
34
|
-
export declare const DotInputText: ({ autoComplete, autoFocus, className, defaultValue, "data-testid": dataTestId, disabled, error, endAdornmentTooltip, fullWidth, hasDebounce, helperText, endIcon, endText, id, inputRef, label, maxRows, minRows, multiline, name, onBlur, onChange, onFocus, onKeyDown, onMouseUp, persistentLabel, placeholder, readOnly, required, shrink, startIcon, size, success, type, value, warning, }: InputTextProps) => JSX.Element;
|
|
34
|
+
export declare const DotInputText: ({ autoComplete, autoFocus, className, defaultValue, "data-testid": dataTestId, disabled, error, endAdornmentTooltip, fullWidth, hasDebounce, helperText, endIcon, endText, id, inputRef, label, max, maxRows, min, minRows, multiline, name, onBlur, onChange, onFocus, onKeyDown, onMouseUp, persistentLabel, placeholder, readOnly, required, shrink, startIcon, size, success, type, value, warning, }: InputTextProps) => JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentMeta, Story } from '@storybook/react';
|
|
2
2
|
import { InputTextProps } from './InputText';
|
|
3
|
-
declare const _default: ComponentMeta<({ autoComplete, autoFocus, className, defaultValue, "data-testid": dataTestId, disabled, error, endAdornmentTooltip, fullWidth, hasDebounce, helperText, endIcon, endText, id, inputRef, label, maxRows, minRows, multiline, name, onBlur, onChange, onFocus, onKeyDown, onMouseUp, persistentLabel, placeholder, readOnly, required, shrink, startIcon, size, success, type, value, warning, }: InputTextProps) => JSX.Element>;
|
|
3
|
+
declare const _default: ComponentMeta<({ autoComplete, autoFocus, className, defaultValue, "data-testid": dataTestId, disabled, error, endAdornmentTooltip, fullWidth, hasDebounce, helperText, endIcon, endText, id, inputRef, label, max, maxRows, min, minRows, multiline, name, onBlur, onChange, onFocus, onKeyDown, onMouseUp, persistentLabel, placeholder, readOnly, required, shrink, startIcon, size, success, type, value, warning, }: InputTextProps) => JSX.Element>;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const Default: Story<InputTextProps>;
|
|
6
6
|
export declare const WithPersistentLabel: Story<InputTextProps>;
|
|
@@ -13,3 +13,5 @@ export declare const WithWarningTooltip: Story<InputTextProps>;
|
|
|
13
13
|
export declare const WithReadOnly: Story<InputTextProps>;
|
|
14
14
|
export declare const WithMultiline: Story<InputTextProps>;
|
|
15
15
|
export declare const WithEndText: Story<InputTextProps>;
|
|
16
|
+
export declare const WithMinMaxNumber: Story<InputTextProps>;
|
|
17
|
+
export declare const WithMinMaxDate: Story<InputTextProps>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Theme } from '
|
|
2
|
-
export declare const formHelperTextRootStyles: (theme: Theme) => import("styled-components").FlattenSimpleInterpolation;
|
|
1
|
+
import { lightTheme as Theme } from '../../../lib/theme-provider/ThemeProvider';
|
|
2
|
+
export declare const formHelperTextRootStyles: (theme: typeof Theme) => import("styled-components").FlattenSimpleInterpolation;
|
|
3
3
|
export declare const adornmentIconStyles: () => import("styled-components").FlattenSimpleInterpolation;
|
|
4
|
-
export declare const pickerInputStyles: (theme: Theme) => import("styled-components").FlattenSimpleInterpolation;
|
|
4
|
+
export declare const pickerInputStyles: (theme: typeof Theme) => import("styled-components").FlattenSimpleInterpolation;
|
|
5
|
+
export declare const readOnlyStyles: (theme: typeof Theme) => import("styled-components").FlattenSimpleInterpolation;
|
|
@@ -32,6 +32,8 @@ export interface TableProps extends CommonProps {
|
|
|
32
32
|
footerTypography?: TypographyVariant;
|
|
33
33
|
/** Typography variant which will be used for table header cell values **/
|
|
34
34
|
headerTypography?: TypographyVariant;
|
|
35
|
+
/** Customize the rows per page label. Default is 'Rows per page:' */
|
|
36
|
+
labelRowsPerPage?: ReactNode;
|
|
35
37
|
/** Table is loading */
|
|
36
38
|
loading?: boolean;
|
|
37
39
|
/** Maximum height of table container */
|
|
@@ -50,6 +52,8 @@ export interface TableProps extends CommonProps {
|
|
|
50
52
|
page?: number;
|
|
51
53
|
/** Rows per page for paginated table */
|
|
52
54
|
rowsPerPage?: RowsPerPageOption;
|
|
55
|
+
/** Customizes the options of the rows per page select field. Default: [10, 25, 50, 100, 150, 200] */
|
|
56
|
+
rowsPerPageOptions?: number[];
|
|
53
57
|
/** Table is sortable */
|
|
54
58
|
sortable?: boolean;
|
|
55
59
|
/** Table header is sticky */
|
|
@@ -64,4 +68,4 @@ export declare function stableSort<T>(array: T[], comparator: (order: T, orderBy
|
|
|
64
68
|
* A wrapper component around the Table component from @material-ui. This component can be used for
|
|
65
69
|
* creating a common structure for tables in the system.
|
|
66
70
|
*/
|
|
67
|
-
export declare const DotTable: ({ ariaLabel, bodyTypography, className, columns, count, data, "data-testid": dataTestId, emptyMessage, footerTypography, headerTypography, loading, maxHeight, multiSelect, order, orderBy, onRowClick, onUpdateData, page, rowsPerPage, stickyHeader, sortable, toolbar, }: TableProps) => JSX.Element;
|
|
71
|
+
export declare const DotTable: ({ ariaLabel, bodyTypography, className, columns, count, data, "data-testid": dataTestId, emptyMessage, footerTypography, headerTypography, labelRowsPerPage, loading, maxHeight, multiSelect, order, orderBy, onRowClick, onUpdateData, page, rowsPerPage, rowsPerPageOptions, stickyHeader, sortable, toolbar, }: TableProps) => JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Story, ComponentMeta } from '@storybook/react';
|
|
2
2
|
import { TableProps } from './Table';
|
|
3
|
-
declare const _default: ComponentMeta<({ ariaLabel, bodyTypography, className, columns, count, data, "data-testid": dataTestId, emptyMessage, footerTypography, headerTypography, loading, maxHeight, multiSelect, order, orderBy, onRowClick, onUpdateData, page, rowsPerPage, stickyHeader, sortable, toolbar, }: TableProps) => JSX.Element>;
|
|
3
|
+
declare const _default: ComponentMeta<({ ariaLabel, bodyTypography, className, columns, count, data, "data-testid": dataTestId, emptyMessage, footerTypography, headerTypography, labelRowsPerPage, loading, maxHeight, multiSelect, order, orderBy, onRowClick, onUpdateData, page, rowsPerPage, rowsPerPageOptions, stickyHeader, sortable, toolbar, }: TableProps) => JSX.Element>;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const Default: Story;
|
|
6
6
|
export declare const LocallyPaginatedTable: Story;
|
|
@@ -8,3 +8,4 @@ export declare const RemotelyPaginatedTable: Story;
|
|
|
8
8
|
export declare const WithActionMenu: Story;
|
|
9
9
|
export declare const WithCheckboxSelection: Story;
|
|
10
10
|
export declare const EmptyTable: Story;
|
|
11
|
+
export declare const WithCustomPaginationOptions: Story;
|
|
@@ -13,7 +13,7 @@ export interface TimePickerProps extends CommonProps {
|
|
|
13
13
|
disableClickAwayListener?: boolean;
|
|
14
14
|
/** If `true`, the open picker button will not be rendered (renders only the field). */
|
|
15
15
|
disableOpenPicker?: boolean;
|
|
16
|
-
/** If `true`, the picker and text field are disabled. */
|
|
16
|
+
/** If `true`, the picker and text field are disabled. DOES NOT WORK WITH SCREEN READERS, we recommend using `readOnly` instead. */
|
|
17
17
|
disabled?: boolean;
|
|
18
18
|
/** If true, the label will be displayed in an error state. */
|
|
19
19
|
error?: boolean;
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { Theme } from '@mui/material';
|
|
3
3
|
import { TypographyOptions } from '@mui/material/styles/createTypography';
|
|
4
|
-
import { AvatarPaletteColorOptions } from '
|
|
4
|
+
import { AvatarPaletteColorOptions, IconPaletteColorOptions, LayerPaletteColorOptions } from './interfaces';
|
|
5
|
+
declare module '@mui/material/styles/createPalette' {
|
|
6
|
+
interface Palette {
|
|
7
|
+
layer: LayerPaletteColorOptions;
|
|
8
|
+
purple?: PaletteColorOptions;
|
|
9
|
+
}
|
|
10
|
+
interface PaletteOptions {
|
|
11
|
+
avatarColors: AvatarPaletteColorOptions;
|
|
12
|
+
icon: IconPaletteColorOptions;
|
|
13
|
+
layer: LayerPaletteColorOptions;
|
|
14
|
+
purple?: PaletteColorOptions;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
5
17
|
export declare type ThemeOptions = 'light' | 'dark';
|
|
6
18
|
export declare const typographyOptions: TypographyOptions;
|
|
7
19
|
export declare const avatarColors: AvatarPaletteColorOptions;
|
|
@@ -17,12 +29,3 @@ declare module '@mui/material/LinearProgress' {
|
|
|
17
29
|
purple: true;
|
|
18
30
|
}
|
|
19
31
|
}
|
|
20
|
-
declare module '@mui/material/styles/createPalette' {
|
|
21
|
-
interface Palette {
|
|
22
|
-
layer: LayerPaletteColorOptions;
|
|
23
|
-
purple?: PaletteColorOptions;
|
|
24
|
-
}
|
|
25
|
-
interface PaletteOptions {
|
|
26
|
-
purple?: PaletteColorOptions;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export interface AvatarPaletteColorOption {
|
|
2
|
+
backgroundColor: string;
|
|
3
|
+
color: string;
|
|
4
|
+
}
|
|
5
|
+
export interface AvatarPaletteColorOptions {
|
|
6
|
+
blue: AvatarPaletteColorOption;
|
|
7
|
+
darkGrey: AvatarPaletteColorOption;
|
|
8
|
+
default: AvatarPaletteColorOption;
|
|
9
|
+
green: AvatarPaletteColorOption;
|
|
10
|
+
inherit: AvatarPaletteColorOption;
|
|
11
|
+
lightGrey: AvatarPaletteColorOption;
|
|
12
|
+
orange: AvatarPaletteColorOption;
|
|
13
|
+
purple: AvatarPaletteColorOption;
|
|
14
|
+
red: AvatarPaletteColorOption;
|
|
15
|
+
transparent: AvatarPaletteColorOption;
|
|
16
|
+
white: AvatarPaletteColorOption;
|
|
17
|
+
yellow: AvatarPaletteColorOption;
|
|
18
|
+
}
|
|
19
|
+
export interface BreakpointOptions {
|
|
20
|
+
values: {
|
|
21
|
+
lg: number;
|
|
22
|
+
md: number;
|
|
23
|
+
sm: number;
|
|
24
|
+
xl: number;
|
|
25
|
+
xs: number;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export interface AvatarPaletteColorOption {
|
|
29
|
+
backgroundColor: string;
|
|
30
|
+
color: string;
|
|
31
|
+
}
|
|
32
|
+
export interface LayerPaletteColorOptions {
|
|
33
|
+
n0: string;
|
|
34
|
+
n100: string;
|
|
35
|
+
n200: string;
|
|
36
|
+
n300: string;
|
|
37
|
+
n400: string;
|
|
38
|
+
n50: string;
|
|
39
|
+
n500: string;
|
|
40
|
+
n600: string;
|
|
41
|
+
n700: string;
|
|
42
|
+
n800: string;
|
|
43
|
+
n900: string;
|
|
44
|
+
}
|
|
45
|
+
export interface IconPaletteColorOptions {
|
|
46
|
+
checkOutline: string;
|
|
47
|
+
emphasized: string;
|
|
48
|
+
fileDotted: string;
|
|
49
|
+
improve: string;
|
|
50
|
+
improveHover: string;
|
|
51
|
+
maintain: string;
|
|
52
|
+
maintainHover: string;
|
|
53
|
+
rogueCommits: string;
|
|
54
|
+
unknown: string;
|
|
55
|
+
unknownHover: string;
|
|
56
|
+
}
|