grommet 2.44.0 → 2.45.1
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/all/stories/AllComponents.js +1 -1
- package/components/Accordion/Accordion.js +1 -1
- package/components/Accordion/stories/CustomThemed/Custom.js +1 -1
- package/components/Accordion/stories/Simple.js +1 -1
- package/components/AccordionPanel/AccordionPanel.js +1 -1
- package/components/Anchor/Anchor.js +3 -2
- package/components/Avatar/Avatar.js +1 -1
- package/components/Box/Box.js +1 -1
- package/components/Button/Button.js +1 -1
- package/components/Calendar/Calendar.js +1 -1
- package/components/Card/stories/CustomThemed/Clickable.js +1 -1
- package/components/Card/stories/CustomThemed/Themed.js +1 -1
- package/components/Cards/Cards.js +1 -1
- package/components/Carousel/Carousel.js +1 -1
- package/components/Carousel/stories/CustomThemed/Custom.js +1 -1
- package/components/Chart/Chart.js +1 -1
- package/components/CheckBox/CheckBox.js +1 -1
- package/components/CheckBox/stories/NoLabel.js +1 -1
- package/components/CheckBox/stories/Simple.js +1 -1
- package/components/CheckBoxGroup/CheckBoxGroup.js +1 -1
- package/components/Clock/Analog.js +1 -1
- package/components/Clock/Clock.js +1 -1
- package/components/Clock/Digital.js +1 -1
- package/components/Collapsible/stories/Nested.js +1 -1
- package/components/Data/Data.js +1 -1
- package/components/Data/DataForm.js +1 -1
- package/components/Data/stories/Inline.js +1 -1
- package/components/DataChart/DataChart.js +1 -1
- package/components/DataChart/XAxis.js +1 -1
- package/components/DataClearFilters/DataClearFilters.js +1 -1
- package/components/DataFilter/DataFilter.js +1 -1
- package/components/DataFilters/DataFilters.js +1 -1
- package/components/DataSearch/DataSearch.js +1 -1
- package/components/DataSort/DataSort.js +1 -1
- package/components/DataSummary/DataSummary.js +1 -1
- package/components/DataTable/Body.js +1 -1
- package/components/DataTable/Cell.js +1 -1
- package/components/DataTable/DataTable.js +1 -1
- package/components/DataTable/ExpanderCell.js +1 -1
- package/components/DataTable/Footer.js +1 -1
- package/components/DataTable/GroupedBody.js +1 -1
- package/components/DataTable/Header.js +2 -2
- package/components/DataTable/StyledDataTable.js +20 -12
- package/components/DataTable/stories/CustomThemed/Custom.js +8 -0
- package/components/DataTableColumns/DataTableColumns.js +1 -1
- package/components/DataTableGroupBy/DataTableGroupBy.js +1 -1
- package/components/DataView/DataView.js +1 -1
- package/components/DateInput/DateInput.js +1 -1
- package/components/Diagram/Diagram.js +1 -1
- package/components/Diagram/stories/Progressing.js +1 -1
- package/components/Distribution/Distribution.js +1 -1
- package/components/Drop/Drop.js +1 -1
- package/components/Drop/DropContainer.js +1 -1
- package/components/DropButton/DropButton.js +1 -1
- package/components/FileInput/FileInput.js +1 -1
- package/components/FocusedContainer.js +1 -1
- package/components/Form/Form.js +1 -1
- package/components/FormField/FormField.js +73 -18
- package/components/Grid/Grid.js +1 -1
- package/components/Grid/stories/CustomThemed/Responsive.js +1 -1
- package/components/Grommet/Grommet.js +1 -1
- package/components/Header/Header.js +1 -1
- package/components/Heading/Heading.js +1 -1
- package/components/Image/Image.js +1 -1
- package/components/Keyboard/Keyboard.js +1 -1
- package/components/Layer/LayerContainer.js +1 -1
- package/components/Layer/StyledLayer.js +2 -1
- package/components/List/List.js +1 -1
- package/components/Markdown/Markdown.js +1 -1
- package/components/MaskedInput/MaskedInput.js +1 -1
- package/components/Menu/Menu.js +6 -5
- package/components/Menu/stories/CustomThemed/Themed.tsx +4 -0
- package/components/Meter/Bar.js +1 -1
- package/components/Meter/Circle.js +1 -1
- package/components/Meter/Meter.js +1 -1
- package/components/Meter/StyledMeter.js +2 -1
- package/components/NameValueList/NameValueList.js +1 -1
- package/components/Nav/stories/CustomThemed/JustifySidebar.js +1 -1
- package/components/Nav/stories/Sidebar.js +1 -1
- package/components/Notification/Notification.js +38 -27
- package/components/Page/Page.js +1 -1
- package/components/PageContent/PageContent.js +1 -1
- package/components/PageHeader/PageHeader.js +1 -1
- package/components/Pagination/PageControl.js +1 -1
- package/components/Pagination/Pagination.js +1 -1
- package/components/Pagination/PaginationStep.js +1 -1
- package/components/Pagination/PaginationSummary.js +1 -1
- package/components/Paragraph/Paragraph.js +1 -1
- package/components/RadioButton/RadioButton.js +1 -1
- package/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
- package/components/RadioButtonGroup/stories/CustomThemed/CustomTheme.js +1 -1
- package/components/RadioButtonGroup/stories/Disabled.js +1 -1
- package/components/RangeInput/RangeInput.js +1 -1
- package/components/RangeSelector/EdgeControl.js +1 -1
- package/components/RangeSelector/RangeSelector.js +1 -1
- package/components/RangeSelector/stories/CustomThemed/Custom.js +1 -1
- package/components/RangeSelector/stories/CustomThemed/CustomEdgeControl.js +1 -1
- package/components/RangeSelector/stories/Step.js +1 -1
- package/components/RangeSelector/stories/Vertical.js +1 -1
- package/components/RoutedAnchor/RoutedAnchor.js +1 -1
- package/components/RoutedButton/RoutedButton.js +1 -1
- package/components/Select/DefaultSelectTextInput.js +1 -1
- package/components/Select/Select.js +1 -1
- package/components/Select/SelectContainer.js +2 -1
- package/components/Select/StyledSelect.js +4 -1
- package/components/Select/stories/components/SearchBorderBox.js +1 -1
- package/components/Select/stories/components/SearchInput.js +1 -1
- package/components/SelectMultiple/SelectMultiple.js +1 -1
- package/components/SelectMultiple/SelectMultipleContainer.js +2 -1
- package/components/Sidebar/Sidebar.js +1 -1
- package/components/Sidebar/stories/Labels.js +1 -1
- package/components/Skeleton/Skeleton.js +1 -1
- package/components/Skeleton/stories/GridContainer.js +1 -1
- package/components/Skeleton/stories/Individual.js +1 -1
- package/components/SkipLink/SkipLink.js +1 -1
- package/components/SkipLinkTarget/SkipLinkTarget.js +1 -1
- package/components/Spinner/Spinner.js +1 -1
- package/components/Stack/Stack.js +1 -1
- package/components/StarRating/StarRating.js +1 -1
- package/components/Tab/Tab.js +1 -1
- package/components/Table/Table.js +1 -1
- package/components/TableCell/TableCell.js +1 -1
- package/components/Tabs/Tabs.js +1 -1
- package/components/Tag/Tag.js +1 -1
- package/components/Text/Text.js +1 -1
- package/components/Text/TextSkeleton.js +1 -1
- package/components/TextArea/TextArea.js +1 -1
- package/components/TextInput/TextInput.js +1 -1
- package/components/TextInput/stories/WithTags.js +1 -1
- package/components/ToggleGroup/StyledToggleGroup.js +9 -1
- package/components/ToggleGroup/ToggleGroup.js +2 -2
- package/components/Toolbar/Toolbar.js +1 -1
- package/components/Video/Video.js +1 -1
- package/components/WorldMap/WorldMap.js +1 -1
- package/contexts/ResponsiveContext/stories/ResponsiveGrid.js +1 -1
- package/es6/all/stories/AllComponents.js +1 -1
- package/es6/components/Accordion/Accordion.js +1 -1
- package/es6/components/Accordion/stories/CustomThemed/Custom.js +1 -1
- package/es6/components/Accordion/stories/Simple.js +1 -1
- package/es6/components/AccordionPanel/AccordionPanel.js +1 -1
- package/es6/components/Anchor/Anchor.js +3 -2
- package/es6/components/Avatar/Avatar.js +1 -1
- package/es6/components/Box/Box.js +1 -1
- package/es6/components/Button/Button.js +1 -1
- package/es6/components/Calendar/Calendar.js +1 -1
- package/es6/components/Card/stories/CustomThemed/Clickable.js +1 -1
- package/es6/components/Card/stories/CustomThemed/Themed.js +1 -1
- package/es6/components/Cards/Cards.js +1 -1
- package/es6/components/Carousel/Carousel.js +1 -1
- package/es6/components/Carousel/stories/CustomThemed/Custom.js +1 -1
- package/es6/components/Chart/Chart.js +1 -1
- package/es6/components/CheckBox/CheckBox.js +1 -1
- package/es6/components/CheckBox/stories/NoLabel.js +1 -1
- package/es6/components/CheckBox/stories/Simple.js +1 -1
- package/es6/components/CheckBoxGroup/CheckBoxGroup.js +1 -1
- package/es6/components/Clock/Analog.js +1 -1
- package/es6/components/Clock/Clock.js +1 -1
- package/es6/components/Clock/Digital.js +1 -1
- package/es6/components/Collapsible/stories/Nested.js +1 -1
- package/es6/components/Data/Data.js +1 -1
- package/es6/components/Data/DataForm.js +1 -1
- package/es6/components/Data/stories/Inline.js +1 -1
- package/es6/components/DataChart/DataChart.js +1 -1
- package/es6/components/DataChart/XAxis.js +1 -1
- package/es6/components/DataClearFilters/DataClearFilters.js +1 -1
- package/es6/components/DataFilter/DataFilter.js +1 -1
- package/es6/components/DataFilters/DataFilters.js +1 -1
- package/es6/components/DataSearch/DataSearch.js +1 -1
- package/es6/components/DataSort/DataSort.js +1 -1
- package/es6/components/DataSummary/DataSummary.js +1 -1
- package/es6/components/DataTable/Body.js +1 -1
- package/es6/components/DataTable/Cell.js +1 -1
- package/es6/components/DataTable/DataTable.js +1 -1
- package/es6/components/DataTable/ExpanderCell.js +1 -1
- package/es6/components/DataTable/Footer.js +1 -1
- package/es6/components/DataTable/GroupedBody.js +1 -1
- package/es6/components/DataTable/Header.js +3 -3
- package/es6/components/DataTable/StyledDataTable.js +20 -12
- package/es6/components/DataTable/stories/CustomThemed/Custom.js +8 -0
- package/es6/components/DataTableColumns/DataTableColumns.js +1 -1
- package/es6/components/DataTableGroupBy/DataTableGroupBy.js +1 -1
- package/es6/components/DataView/DataView.js +1 -1
- package/es6/components/DateInput/DateInput.js +1 -1
- package/es6/components/Diagram/Diagram.js +1 -1
- package/es6/components/Diagram/stories/Progressing.js +1 -1
- package/es6/components/Distribution/Distribution.js +1 -1
- package/es6/components/Drop/Drop.js +1 -1
- package/es6/components/Drop/DropContainer.js +1 -1
- package/es6/components/DropButton/DropButton.js +1 -1
- package/es6/components/FileInput/FileInput.js +1 -1
- package/es6/components/FocusedContainer.js +1 -1
- package/es6/components/Form/Form.js +1 -1
- package/es6/components/FormField/FormField.js +73 -18
- package/es6/components/Grid/Grid.js +1 -1
- package/es6/components/Grid/stories/CustomThemed/Responsive.js +1 -1
- package/es6/components/Grommet/Grommet.js +1 -1
- package/es6/components/Header/Header.js +1 -1
- package/es6/components/Heading/Heading.js +1 -1
- package/es6/components/Image/Image.js +1 -1
- package/es6/components/Keyboard/Keyboard.js +1 -1
- package/es6/components/Layer/LayerContainer.js +1 -1
- package/es6/components/Layer/StyledLayer.js +2 -1
- package/es6/components/List/List.js +1 -1
- package/es6/components/Markdown/Markdown.js +1 -1
- package/es6/components/MaskedInput/MaskedInput.js +1 -1
- package/es6/components/Menu/Menu.js +6 -5
- package/es6/components/Menu/stories/CustomThemed/Themed.tsx +4 -0
- package/es6/components/Meter/Bar.js +1 -1
- package/es6/components/Meter/Circle.js +1 -1
- package/es6/components/Meter/Meter.js +1 -1
- package/es6/components/Meter/StyledMeter.js +3 -1
- package/es6/components/NameValueList/NameValueList.js +1 -1
- package/es6/components/Nav/stories/CustomThemed/JustifySidebar.js +1 -1
- package/es6/components/Nav/stories/Sidebar.js +1 -1
- package/es6/components/Notification/Notification.js +38 -27
- package/es6/components/Page/Page.js +1 -1
- package/es6/components/PageContent/PageContent.js +1 -1
- package/es6/components/PageHeader/PageHeader.js +1 -1
- package/es6/components/Pagination/PageControl.js +1 -1
- package/es6/components/Pagination/Pagination.js +1 -1
- package/es6/components/Pagination/PaginationStep.js +1 -1
- package/es6/components/Pagination/PaginationSummary.js +1 -1
- package/es6/components/Paragraph/Paragraph.js +1 -1
- package/es6/components/RadioButton/RadioButton.js +1 -1
- package/es6/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
- package/es6/components/RadioButtonGroup/stories/CustomThemed/CustomTheme.js +1 -1
- package/es6/components/RadioButtonGroup/stories/Disabled.js +1 -1
- package/es6/components/RangeInput/RangeInput.js +1 -1
- package/es6/components/RangeSelector/EdgeControl.js +1 -1
- package/es6/components/RangeSelector/RangeSelector.js +1 -1
- package/es6/components/RangeSelector/stories/CustomThemed/Custom.js +1 -1
- package/es6/components/RangeSelector/stories/CustomThemed/CustomEdgeControl.js +1 -1
- package/es6/components/RangeSelector/stories/Step.js +1 -1
- package/es6/components/RangeSelector/stories/Vertical.js +1 -1
- package/es6/components/RoutedAnchor/RoutedAnchor.js +1 -1
- package/es6/components/RoutedButton/RoutedButton.js +1 -1
- package/es6/components/Select/DefaultSelectTextInput.js +1 -1
- package/es6/components/Select/Select.js +1 -1
- package/es6/components/Select/SelectContainer.js +2 -1
- package/es6/components/Select/StyledSelect.js +4 -1
- package/es6/components/Select/stories/components/SearchBorderBox.js +1 -1
- package/es6/components/Select/stories/components/SearchInput.js +1 -1
- package/es6/components/SelectMultiple/SelectMultiple.js +1 -1
- package/es6/components/SelectMultiple/SelectMultipleContainer.js +2 -1
- package/es6/components/Sidebar/Sidebar.js +1 -1
- package/es6/components/Sidebar/stories/Labels.js +1 -1
- package/es6/components/Skeleton/Skeleton.js +1 -1
- package/es6/components/Skeleton/stories/GridContainer.js +1 -1
- package/es6/components/Skeleton/stories/Individual.js +1 -1
- package/es6/components/SkipLink/SkipLink.js +1 -1
- package/es6/components/SkipLinkTarget/SkipLinkTarget.js +1 -1
- package/es6/components/Spinner/Spinner.js +1 -1
- package/es6/components/Stack/Stack.js +1 -1
- package/es6/components/StarRating/StarRating.js +1 -1
- package/es6/components/Tab/Tab.js +1 -1
- package/es6/components/Table/Table.js +1 -1
- package/es6/components/TableCell/TableCell.js +1 -1
- package/es6/components/Tabs/Tabs.js +1 -1
- package/es6/components/Tag/Tag.js +1 -1
- package/es6/components/Text/Text.js +1 -1
- package/es6/components/Text/TextSkeleton.js +1 -1
- package/es6/components/TextArea/TextArea.js +1 -1
- package/es6/components/TextInput/TextInput.js +1 -1
- package/es6/components/TextInput/stories/WithTags.js +1 -1
- package/es6/components/ToggleGroup/StyledToggleGroup.js +8 -0
- package/es6/components/ToggleGroup/ToggleGroup.js +3 -3
- package/es6/components/Toolbar/Toolbar.js +1 -1
- package/es6/components/Video/Video.js +1 -1
- package/es6/components/WorldMap/WorldMap.js +1 -1
- package/es6/contexts/ResponsiveContext/stories/ResponsiveGrid.js +1 -1
- package/es6/themes/base.d.ts +49 -5
- package/es6/themes/base.js +39 -9
- package/es6/utils/pagination.js +1 -1
- package/es6/utils/responsive.js +1 -0
- package/es6/utils/styles.js +49 -14
- package/grommet.min.js +1 -1
- package/grommet.min.js.map +1 -1
- package/package.json +25 -25
- package/themes/base.d.ts +49 -5
- package/themes/base.js +39 -9
- package/utils/pagination.js +1 -1
- package/utils/responsive.js +1 -0
- package/utils/styles.js +49 -14
package/es6/themes/base.d.ts
CHANGED
|
@@ -282,6 +282,12 @@ type DigitalTexts =
|
|
|
282
282
|
| 'xxlarge'
|
|
283
283
|
| string;
|
|
284
284
|
|
|
285
|
+
type ContainerExtend = {
|
|
286
|
+
container?: {
|
|
287
|
+
extend?: ExtendType;
|
|
288
|
+
};
|
|
289
|
+
};
|
|
290
|
+
|
|
285
291
|
export interface ThemeType {
|
|
286
292
|
global?: {
|
|
287
293
|
active?: {
|
|
@@ -314,18 +320,21 @@ export interface ThemeType {
|
|
|
314
320
|
value?: number;
|
|
315
321
|
borderSize?: BreakpointBorderSize;
|
|
316
322
|
edgeSize?: BreakpointEdgeSize;
|
|
323
|
+
radius?: BreakpointEdgeSize;
|
|
317
324
|
size?: BreakpointSize;
|
|
318
325
|
};
|
|
319
326
|
medium?: {
|
|
320
327
|
value?: number;
|
|
321
328
|
borderSize?: BreakpointBorderSize;
|
|
322
329
|
edgeSize?: BreakpointEdgeSize;
|
|
330
|
+
radius?: BreakpointEdgeSize;
|
|
323
331
|
size?: BreakpointSize;
|
|
324
332
|
};
|
|
325
333
|
large?: {
|
|
326
334
|
value?: number;
|
|
327
335
|
borderSize?: BreakpointBorderSize;
|
|
328
336
|
edgeSize?: BreakpointEdgeSize;
|
|
337
|
+
radius?: BreakpointEdgeSize;
|
|
329
338
|
size?: BreakpointSize;
|
|
330
339
|
};
|
|
331
340
|
[x: string]:
|
|
@@ -333,6 +342,7 @@ export interface ThemeType {
|
|
|
333
342
|
value?: number;
|
|
334
343
|
borderSize?: BreakpointBorderSize;
|
|
335
344
|
edgeSize?: BreakpointEdgeSize;
|
|
345
|
+
radius?: BreakpointEdgeSize;
|
|
336
346
|
size?: BreakpointSize;
|
|
337
347
|
}
|
|
338
348
|
| undefined;
|
|
@@ -403,13 +413,16 @@ export interface ThemeType {
|
|
|
403
413
|
outline?: {
|
|
404
414
|
color?: ColorType;
|
|
405
415
|
size?: string;
|
|
416
|
+
offset?: string;
|
|
406
417
|
};
|
|
407
418
|
shadow?:
|
|
408
419
|
| string
|
|
409
420
|
| {
|
|
410
421
|
color?: ColorType;
|
|
411
422
|
size?: string;
|
|
423
|
+
blur?: string;
|
|
412
424
|
};
|
|
425
|
+
twoColor?: boolean;
|
|
413
426
|
};
|
|
414
427
|
font?: {
|
|
415
428
|
face?: string;
|
|
@@ -457,6 +470,7 @@ export interface ThemeType {
|
|
|
457
470
|
medium?: number;
|
|
458
471
|
weak?: number;
|
|
459
472
|
};
|
|
473
|
+
radius?: BreakpointEdgeSize;
|
|
460
474
|
selected?: {
|
|
461
475
|
background?: BackgroundType;
|
|
462
476
|
color?: ColorType;
|
|
@@ -514,12 +528,14 @@ export interface ThemeType {
|
|
|
514
528
|
color?: ColorType;
|
|
515
529
|
fontWeight?: number;
|
|
516
530
|
textDecoration?: string;
|
|
531
|
+
gap?: GapType;
|
|
517
532
|
};
|
|
518
533
|
[x: string]:
|
|
519
534
|
| {
|
|
520
535
|
color?: ColorType;
|
|
521
536
|
fontWeight?: number;
|
|
522
537
|
textDecoration?: string;
|
|
538
|
+
gap?: GapType;
|
|
523
539
|
}
|
|
524
540
|
| undefined;
|
|
525
541
|
};
|
|
@@ -798,6 +814,9 @@ export interface ThemeType {
|
|
|
798
814
|
dataTable?: {
|
|
799
815
|
body?: {
|
|
800
816
|
extend?: ExtendType;
|
|
817
|
+
row?: {
|
|
818
|
+
extend?: ExtendType;
|
|
819
|
+
};
|
|
801
820
|
selected?: {
|
|
802
821
|
background?: BackgroundType;
|
|
803
822
|
};
|
|
@@ -917,9 +936,6 @@ export interface ThemeType {
|
|
|
917
936
|
margin?: MarginType;
|
|
918
937
|
pad?: PadType;
|
|
919
938
|
};
|
|
920
|
-
checkBox?: {
|
|
921
|
-
pad?: PadType;
|
|
922
|
-
};
|
|
923
939
|
disabled?: {
|
|
924
940
|
background?: BackgroundType;
|
|
925
941
|
border?: {
|
|
@@ -928,12 +944,19 @@ export interface ThemeType {
|
|
|
928
944
|
label?: {
|
|
929
945
|
color?: ColorType;
|
|
930
946
|
};
|
|
947
|
+
help?: {
|
|
948
|
+
color?: ColorType;
|
|
949
|
+
};
|
|
950
|
+
info?: {
|
|
951
|
+
color?: ColorType;
|
|
952
|
+
};
|
|
931
953
|
};
|
|
932
954
|
focus?: {
|
|
933
955
|
background?: BackgroundType;
|
|
934
956
|
border?: {
|
|
935
957
|
color?: ColorType;
|
|
936
958
|
};
|
|
959
|
+
containerFocus?: boolean;
|
|
937
960
|
};
|
|
938
961
|
error?: {
|
|
939
962
|
background?: BackgroundType;
|
|
@@ -968,6 +991,20 @@ export interface ThemeType {
|
|
|
968
991
|
color?: ColorType;
|
|
969
992
|
};
|
|
970
993
|
};
|
|
994
|
+
checkBox?: ContainerExtend & { pad?: PadType };
|
|
995
|
+
checkBoxGroup?: ContainerExtend;
|
|
996
|
+
textArea?: ContainerExtend;
|
|
997
|
+
textInput?: ContainerExtend;
|
|
998
|
+
select?: ContainerExtend;
|
|
999
|
+
maskedInput?: ContainerExtend;
|
|
1000
|
+
selectMultiple?: ContainerExtend;
|
|
1001
|
+
dateInput?: ContainerExtend;
|
|
1002
|
+
fileInput?: ContainerExtend;
|
|
1003
|
+
radioButton?: ContainerExtend;
|
|
1004
|
+
radioButtonGroup?: ContainerExtend;
|
|
1005
|
+
rangeSelector?: ContainerExtend;
|
|
1006
|
+
starRating?: ContainerExtend;
|
|
1007
|
+
thumbsRating?: ContainerExtend;
|
|
971
1008
|
};
|
|
972
1009
|
grommet?: {
|
|
973
1010
|
extend?: ExtendType;
|
|
@@ -1199,6 +1236,7 @@ export interface ThemeType {
|
|
|
1199
1236
|
};
|
|
1200
1237
|
drop?: DropType;
|
|
1201
1238
|
extend?: ExtendType;
|
|
1239
|
+
container?: BoxProps;
|
|
1202
1240
|
group?: {
|
|
1203
1241
|
container?: BoxProps;
|
|
1204
1242
|
separator?: {
|
|
@@ -1235,7 +1273,7 @@ export interface ThemeType {
|
|
|
1235
1273
|
iconContainer?: BoxProps;
|
|
1236
1274
|
textContainer?: BoxProps;
|
|
1237
1275
|
title?: TextProps;
|
|
1238
|
-
message?: TextProps;
|
|
1276
|
+
message?: TextProps & { fill?: boolean };
|
|
1239
1277
|
close?: {
|
|
1240
1278
|
icon?: React.ReactNode | Icon;
|
|
1241
1279
|
color?: ColorType;
|
|
@@ -1660,6 +1698,9 @@ export interface ThemeType {
|
|
|
1660
1698
|
up?: React.ReactNode | Icon;
|
|
1661
1699
|
margin?: MarginType;
|
|
1662
1700
|
};
|
|
1701
|
+
listbox?: {
|
|
1702
|
+
extend?: ExtendType;
|
|
1703
|
+
};
|
|
1663
1704
|
options?: {
|
|
1664
1705
|
container?: PropsOf<typeof Box>;
|
|
1665
1706
|
text?: PropsOf<typeof Text>;
|
|
@@ -1670,6 +1711,9 @@ export interface ThemeType {
|
|
|
1670
1711
|
};
|
|
1671
1712
|
selectMultiple?: {
|
|
1672
1713
|
maxInline?: number;
|
|
1714
|
+
listbox?: {
|
|
1715
|
+
extend?: ExtendType;
|
|
1716
|
+
};
|
|
1673
1717
|
};
|
|
1674
1718
|
skeleton?: BoxProps & { colors?: SkeletonColorsType; extend?: ExtendType };
|
|
1675
1719
|
skipLinks?: {
|
|
@@ -1934,7 +1978,7 @@ export interface ThemeType {
|
|
|
1934
1978
|
};
|
|
1935
1979
|
pad?: PadType;
|
|
1936
1980
|
};
|
|
1937
|
-
container?: BoxProps;
|
|
1981
|
+
container?: BoxProps & { extend?: ExtendType };
|
|
1938
1982
|
divider?:
|
|
1939
1983
|
| {
|
|
1940
1984
|
color?: ColorType;
|
package/es6/themes/base.js
CHANGED
|
@@ -186,6 +186,7 @@ export var generate = function generate(baseSpacing, scale) {
|
|
|
186
186
|
// 24
|
|
187
187
|
xlarge: baseSpacing * 2 + "px" // 48
|
|
188
188
|
},
|
|
189
|
+
// radius: {},
|
|
189
190
|
size: {
|
|
190
191
|
xxsmall: baseSpacing + "px",
|
|
191
192
|
// 24
|
|
@@ -292,7 +293,8 @@ export var generate = function generate(baseSpacing, scale) {
|
|
|
292
293
|
shadow: {
|
|
293
294
|
color: 'focus',
|
|
294
295
|
size: '2px'
|
|
295
|
-
}
|
|
296
|
+
},
|
|
297
|
+
twoColor: undefined
|
|
296
298
|
},
|
|
297
299
|
font: _extends({}, fontSizing(0)),
|
|
298
300
|
hover: {
|
|
@@ -329,6 +331,7 @@ export var generate = function generate(baseSpacing, scale) {
|
|
|
329
331
|
medium: 0.4,
|
|
330
332
|
weak: 0.1
|
|
331
333
|
},
|
|
334
|
+
// radius: {},
|
|
332
335
|
selected: {
|
|
333
336
|
background: 'selected',
|
|
334
337
|
color: 'white'
|
|
@@ -413,6 +416,7 @@ export var generate = function generate(baseSpacing, scale) {
|
|
|
413
416
|
// color: undefined,
|
|
414
417
|
// fontWeight: undefined,
|
|
415
418
|
// textDecoration: undefined,
|
|
419
|
+
// gap: undefined,
|
|
416
420
|
// },
|
|
417
421
|
// },
|
|
418
422
|
// extend: undefined,
|
|
@@ -940,6 +944,9 @@ export var generate = function generate(baseSpacing, scale) {
|
|
|
940
944
|
dataTable: {
|
|
941
945
|
// body: {
|
|
942
946
|
// extend: undefined,
|
|
947
|
+
// row: {
|
|
948
|
+
// extend: undefined,
|
|
949
|
+
// }
|
|
943
950
|
// selected: undefined,
|
|
944
951
|
// },
|
|
945
952
|
pinned: {
|
|
@@ -1067,6 +1074,11 @@ export var generate = function generate(baseSpacing, scale) {
|
|
|
1067
1074
|
// extend: undefined,
|
|
1068
1075
|
},
|
|
1069
1076
|
formField: {
|
|
1077
|
+
// [inputname]: {
|
|
1078
|
+
// container: {
|
|
1079
|
+
// extend: undefined,
|
|
1080
|
+
// }
|
|
1081
|
+
// }
|
|
1070
1082
|
border: {
|
|
1071
1083
|
color: 'border',
|
|
1072
1084
|
error: {
|
|
@@ -1096,15 +1108,22 @@ export var generate = function generate(baseSpacing, scale) {
|
|
|
1096
1108
|
// label: {
|
|
1097
1109
|
// color: undefined,
|
|
1098
1110
|
// },
|
|
1111
|
+
// help: {
|
|
1112
|
+
// color: undefined,
|
|
1113
|
+
// },
|
|
1114
|
+
// info: {
|
|
1115
|
+
// color: undefined,
|
|
1116
|
+
// },
|
|
1117
|
+
},
|
|
1118
|
+
focus: {
|
|
1119
|
+
containerFocus: true
|
|
1120
|
+
// background: {
|
|
1121
|
+
// color: undefined,
|
|
1122
|
+
// },
|
|
1123
|
+
// border: {
|
|
1124
|
+
// color: undefined,
|
|
1125
|
+
// },
|
|
1099
1126
|
},
|
|
1100
|
-
// focus: {
|
|
1101
|
-
// background: {
|
|
1102
|
-
// color: undefined,
|
|
1103
|
-
// },
|
|
1104
|
-
// border: {
|
|
1105
|
-
// color: undefined,
|
|
1106
|
-
// },
|
|
1107
|
-
// },
|
|
1108
1127
|
error: {
|
|
1109
1128
|
color: 'status-critical',
|
|
1110
1129
|
margin: {
|
|
@@ -1314,6 +1333,9 @@ export var generate = function generate(baseSpacing, scale) {
|
|
|
1314
1333
|
}
|
|
1315
1334
|
// any drop props
|
|
1316
1335
|
},
|
|
1336
|
+
// container: {
|
|
1337
|
+
// // any box props
|
|
1338
|
+
// },
|
|
1317
1339
|
group: {
|
|
1318
1340
|
container: {
|
|
1319
1341
|
pad: {
|
|
@@ -1431,6 +1453,7 @@ export var generate = function generate(baseSpacing, scale) {
|
|
|
1431
1453
|
message: {
|
|
1432
1454
|
// any text props
|
|
1433
1455
|
margin: 'none'
|
|
1456
|
+
// fill: undefined,
|
|
1434
1457
|
},
|
|
1435
1458
|
close: {
|
|
1436
1459
|
icon: FormClose
|
|
@@ -1968,6 +1991,9 @@ export var generate = function generate(baseSpacing, scale) {
|
|
|
1968
1991
|
down: FormDown
|
|
1969
1992
|
// up: undefined
|
|
1970
1993
|
},
|
|
1994
|
+
// listbox: {
|
|
1995
|
+
// extend: undefined,
|
|
1996
|
+
// },
|
|
1971
1997
|
options: {
|
|
1972
1998
|
container: {
|
|
1973
1999
|
align: 'start',
|
|
@@ -1982,6 +2008,9 @@ export var generate = function generate(baseSpacing, scale) {
|
|
|
1982
2008
|
},
|
|
1983
2009
|
selectMultiple: {
|
|
1984
2010
|
maxInline: 5
|
|
2011
|
+
// listbox: {
|
|
2012
|
+
// extend: () => undefined,
|
|
2013
|
+
// },
|
|
1985
2014
|
},
|
|
1986
2015
|
skeleton: {
|
|
1987
2016
|
border: false,
|
|
@@ -2279,6 +2308,7 @@ export var generate = function generate(baseSpacing, scale) {
|
|
|
2279
2308
|
container: {
|
|
2280
2309
|
round: 'xsmall',
|
|
2281
2310
|
border: true
|
|
2311
|
+
// extend: undefined,
|
|
2282
2312
|
},
|
|
2283
2313
|
divider: {
|
|
2284
2314
|
color: 'border'
|
package/es6/utils/pagination.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["data", "page", "step"];
|
|
2
2
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
3
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
4
4
|
import { useMemo, useState } from 'react';
|
|
5
5
|
export var normalizeShow = function normalizeShow(showProp, step) {
|
|
6
6
|
var page;
|
package/es6/utils/responsive.js
CHANGED
|
@@ -25,6 +25,7 @@ export var getBreakpointStyle = function getBreakpointStyle(theme, breakpointSiz
|
|
|
25
25
|
var breakpoint = breakpointSize && theme.global.breakpoints[breakpointSize] || {};
|
|
26
26
|
if (!breakpoint.edgeSize) breakpoint.edgeSize = theme.global.edgeSize;
|
|
27
27
|
if (!breakpoint.borderSize) breakpoint.borderSize = theme.global.borderSize;
|
|
28
|
+
if (!breakpoint.radius) breakpoint.radius = theme.global.radius;
|
|
28
29
|
if (!breakpoint.size) breakpoint.size = theme.global.size;
|
|
29
30
|
return breakpoint;
|
|
30
31
|
};
|
package/es6/utils/styles.js
CHANGED
|
@@ -96,6 +96,7 @@ var focusStyles = function focusStyles(props, _temp) {
|
|
|
96
96
|
forceOutline = _ref.forceOutline,
|
|
97
97
|
justBorder = _ref.justBorder;
|
|
98
98
|
var focus = props.theme.global.focus;
|
|
99
|
+
var compoundFocusStyle = '';
|
|
99
100
|
if (!focus || forceOutline && !focus.outline) {
|
|
100
101
|
var color = normalizeColor('focus', props.theme);
|
|
101
102
|
if (color) return "outline: 2px solid " + color + ";";
|
|
@@ -105,9 +106,15 @@ var focusStyles = function focusStyles(props, _temp) {
|
|
|
105
106
|
if (typeof focus.outline === 'object') {
|
|
106
107
|
var _color = normalizeColor(focus.outline.color || 'focus', props.theme);
|
|
107
108
|
var size = focus.outline.size || '2px';
|
|
108
|
-
|
|
109
|
+
var offset = focus.outline.offset || '0px';
|
|
110
|
+
var outlineStyle = "\n outline-offset: " + offset + ";\n outline: " + size + " solid " + _color + ";\n ";
|
|
111
|
+
compoundFocusStyle += outlineStyle;
|
|
112
|
+
if (!focus.twoColor) return outlineStyle;
|
|
113
|
+
} else {
|
|
114
|
+
var _outlineStyle = "outline: " + focus.outline + ";";
|
|
115
|
+
compoundFocusStyle += _outlineStyle;
|
|
116
|
+
if (!focus.twoColor) return _outlineStyle;
|
|
109
117
|
}
|
|
110
|
-
return "outline: " + focus.outline + ";";
|
|
111
118
|
}
|
|
112
119
|
if (focus.shadow && (!focus.border || !justBorder)) {
|
|
113
120
|
if (typeof focus.shadow === 'object') {
|
|
@@ -116,14 +123,24 @@ var focusStyles = function focusStyles(props, _temp) {
|
|
|
116
123
|
// This is for backwards compatibility in v2.
|
|
117
124
|
focus.border && focus.border.color || focus.shadow.color || 'focus', props.theme);
|
|
118
125
|
var _size = focus.shadow.size || '2px'; // backwards compatible default
|
|
119
|
-
|
|
126
|
+
var blur = focus.shadow.blur || _size; // backwards compatible default
|
|
127
|
+
var inset = focus.shadow.inset ? 'inset ' : '';
|
|
128
|
+
var shadowStyle = "box-shadow: 0 0 " + blur + " " + _size + " " + _color2 + (inset ? " " + inset : '') + ";";
|
|
129
|
+
compoundFocusStyle += shadowStyle;
|
|
130
|
+
if (!focus.twoColor) return "\n outline: none;\n " + shadowStyle;
|
|
131
|
+
} else {
|
|
132
|
+
var _shadowStyle = "box-shadow: " + focus.shadow + ";";
|
|
133
|
+
compoundFocusStyle += _shadowStyle;
|
|
134
|
+
if (!focus.twoColor) return "outline: none; " + _shadowStyle;
|
|
120
135
|
}
|
|
121
|
-
return "\n outline: none;\n box-shadow: " + focus.shadow + ";\n ";
|
|
122
136
|
}
|
|
123
137
|
if (focus.border) {
|
|
124
138
|
var _color3 = normalizeColor(focus.border.color || 'focus', props.theme);
|
|
125
|
-
|
|
139
|
+
var borderStyle = "border-color: " + _color3 + ";";
|
|
140
|
+
compoundFocusStyle += borderStyle;
|
|
141
|
+
if (!focus.twoColor) return "outline: none; " + borderStyle;
|
|
126
142
|
}
|
|
143
|
+
if (focus.twoColor && compoundFocusStyle.length) return compoundFocusStyle;
|
|
127
144
|
return ''; // defensive
|
|
128
145
|
};
|
|
129
146
|
var unfocusStyles = function unfocusStyles(props, _temp2) {
|
|
@@ -131,6 +148,7 @@ var unfocusStyles = function unfocusStyles(props, _temp2) {
|
|
|
131
148
|
forceOutline = _ref2.forceOutline,
|
|
132
149
|
justBorder = _ref2.justBorder;
|
|
133
150
|
var focus = props.theme.global.focus;
|
|
151
|
+
var compoundFocusStyle = '';
|
|
134
152
|
if (!focus || forceOutline && !focus.outline) {
|
|
135
153
|
var color = normalizeColor('focus', props.theme);
|
|
136
154
|
if (color) return "outline: none;";
|
|
@@ -138,19 +156,32 @@ var unfocusStyles = function unfocusStyles(props, _temp2) {
|
|
|
138
156
|
}
|
|
139
157
|
if (focus.outline && (!focus.border || !justBorder)) {
|
|
140
158
|
if (typeof focus.outline === 'object') {
|
|
141
|
-
|
|
159
|
+
var outlineStyle = "\n outline-offset: 0px;\n outline: none;\n ";
|
|
160
|
+
compoundFocusStyle += outlineStyle;
|
|
161
|
+
if (!focus.twoColor) return "\n outline-offset: 0px;\n outline: none;\n ";
|
|
162
|
+
} else {
|
|
163
|
+
var _outlineStyle2 = "outline: none;";
|
|
164
|
+
compoundFocusStyle += _outlineStyle2;
|
|
165
|
+
if (!focus.twoColor) return _outlineStyle2;
|
|
142
166
|
}
|
|
143
|
-
return "outline: none;";
|
|
144
167
|
}
|
|
145
168
|
if (focus.shadow && (!focus.border || !justBorder)) {
|
|
146
169
|
if (typeof focus.shadow === 'object') {
|
|
147
|
-
|
|
170
|
+
var shadowStyle = "\n outline: none;\n box-shadow: none;\n ";
|
|
171
|
+
compoundFocusStyle += shadowStyle;
|
|
172
|
+
if (!focus.twoColor) return shadowStyle;
|
|
173
|
+
} else {
|
|
174
|
+
var _shadowStyle2 = "\n outline: none;\n box-shadow: none;\n ";
|
|
175
|
+
compoundFocusStyle += _shadowStyle2;
|
|
176
|
+
if (!focus.twoColor) return _shadowStyle2;
|
|
148
177
|
}
|
|
149
|
-
return "\n outline: none;\n box-shadow: none;\n ";
|
|
150
178
|
}
|
|
151
179
|
if (focus.border) {
|
|
152
|
-
|
|
180
|
+
var borderStyle = "\n outline: none;\n border-color: none;\n ";
|
|
181
|
+
compoundFocusStyle += borderStyle;
|
|
182
|
+
if (!focus.twoColor) return borderStyle;
|
|
153
183
|
}
|
|
184
|
+
if (focus.twoColor && compoundFocusStyle.length) return compoundFocusStyle;
|
|
154
185
|
return ''; // defensive
|
|
155
186
|
};
|
|
156
187
|
|
|
@@ -334,10 +365,13 @@ var ROUND_MAP = {
|
|
|
334
365
|
};
|
|
335
366
|
export var roundStyle = function roundStyle(data, responsive, theme) {
|
|
336
367
|
var breakpoint = getBreakpointStyle(theme, theme.box.responsiveBreakpoint);
|
|
368
|
+
// fallback to edgeSize for backwards compatibility
|
|
369
|
+
var radius = theme.global.radius ? 'radius' : 'edgeSize';
|
|
337
370
|
var styles = [];
|
|
338
371
|
if (typeof data === 'object') {
|
|
339
|
-
var
|
|
340
|
-
var
|
|
372
|
+
var _breakpoint$radius;
|
|
373
|
+
var size = ROUND_MAP[data.size] || theme.global[radius][data.size || 'medium'] || data.size;
|
|
374
|
+
var responsiveSize = responsive && breakpoint && ((_breakpoint$radius = breakpoint[radius]) == null ? void 0 : _breakpoint$radius[data.size]) && (breakpoint[radius][data.size] || data.size);
|
|
341
375
|
if (data.corner === 'top') {
|
|
342
376
|
styles.push(css(["border-top-left-radius:", ";border-top-right-radius:", ";"], size, size));
|
|
343
377
|
if (responsiveSize) {
|
|
@@ -370,9 +404,10 @@ export var roundStyle = function roundStyle(data, responsive, theme) {
|
|
|
370
404
|
}
|
|
371
405
|
}
|
|
372
406
|
} else {
|
|
407
|
+
var _theme$global$radius, _breakpoint$radius2;
|
|
373
408
|
var _size2 = data === true ? 'medium' : data;
|
|
374
|
-
styles.push(css(["border-radius:", ";"], ROUND_MAP[_size2] || theme.global
|
|
375
|
-
var _responsiveSize = responsive && breakpoint && breakpoint
|
|
409
|
+
styles.push(css(["border-radius:", ";"], ROUND_MAP[_size2] || ((_theme$global$radius = theme.global[radius]) == null ? void 0 : _theme$global$radius[_size2]) || _size2));
|
|
410
|
+
var _responsiveSize = responsive && breakpoint && ((_breakpoint$radius2 = breakpoint[radius]) == null ? void 0 : _breakpoint$radius2[_size2]);
|
|
376
411
|
if (_responsiveSize) {
|
|
377
412
|
styles.push(breakpointStyle(breakpoint, "\n border-radius: " + _responsiveSize + ";\n "));
|
|
378
413
|
}
|