@indico-data/design-system 2.19.0 → 2.21.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.
Files changed (40) hide show
  1. package/lib/index.css +58 -3
  2. package/lib/index.d.ts +18 -1
  3. package/lib/index.esm.css +58 -3
  4. package/lib/index.esm.js +1567 -8
  5. package/lib/index.esm.js.map +1 -1
  6. package/lib/index.js +1567 -6
  7. package/lib/index.js.map +1 -1
  8. package/lib/src/components/index.d.ts +2 -0
  9. package/lib/src/components/menu/Menu.d.ts +5 -0
  10. package/lib/src/components/menu/Menu.stories.d.ts +6 -0
  11. package/lib/src/components/menu/Menu.test.d.ts +1 -0
  12. package/lib/src/components/menu/index.d.ts +1 -0
  13. package/lib/src/components/popper/Popper.d.ts +12 -0
  14. package/lib/src/components/popper/Popper.stories.d.ts +6 -0
  15. package/lib/src/components/popper/Popper.test.d.ts +1 -0
  16. package/lib/src/components/popper/index.d.ts +1 -0
  17. package/lib/src/hooks/useClickOutside.d.ts +2 -0
  18. package/lib/src/index.d.ts +2 -0
  19. package/package.json +2 -1
  20. package/src/components/index.ts +2 -0
  21. package/src/components/menu/Menu.mdx +15 -0
  22. package/src/components/menu/Menu.stories.tsx +56 -0
  23. package/src/components/menu/Menu.test.tsx +88 -0
  24. package/src/components/menu/Menu.tsx +20 -0
  25. package/src/components/menu/index.ts +1 -0
  26. package/src/components/menu/styles/Menu.scss +19 -0
  27. package/src/components/menu/styles/_variables.scss +15 -0
  28. package/src/components/popper/Popper.mdx +79 -0
  29. package/src/components/popper/Popper.stories.tsx +161 -0
  30. package/src/components/popper/Popper.test.tsx +68 -0
  31. package/src/components/popper/Popper.tsx +57 -0
  32. package/src/components/popper/index.ts +1 -0
  33. package/src/components/popper/styles/Popper.scss +11 -0
  34. package/src/components/popper/styles/_variables.scss +15 -0
  35. package/src/hooks/useClickOutside.tsx +22 -0
  36. package/src/index.ts +2 -0
  37. package/src/legacy/components/buttons/commonStyles.ts +0 -4
  38. package/src/styles/_typography.scss +1 -1
  39. package/src/styles/index.scss +2 -0
  40. package/src/styles/variables/_typography.scss +2 -4
package/lib/index.css CHANGED
@@ -14,7 +14,7 @@
14
14
  --pf-font-size-subtitle: var(--pf-font-size-base);
15
15
  --pf-font-size-subtitle2: calc(0.875 * var(--pf-font-size-base));
16
16
  --pf-font-size-button: var(--pf-font-size-base);
17
- --pf-font-size-overine: calc(0.75 * var(--pf-font-size-base));
17
+ --pf-font-size-overline: calc(0.75 * var(--pf-font-size-base));
18
18
  --pf-font-weight-thin: 100;
19
19
  --pf-font-weight-light: 300;
20
20
  --pf-font-weight-regular: 400;
@@ -1609,6 +1609,61 @@ form {
1609
1609
  box-shadow: var(--pf-dropshadow);
1610
1610
  }
1611
1611
 
1612
+ :root,
1613
+ :root [data-theme=light],
1614
+ :root [data-theme=dark] {
1615
+ --pf-menu-rounded: var(--pf-rounded);
1616
+ --pf-menu-item-hover-color: var(--pf-primary-color-100);
1617
+ --pf-menu-item-background-color: var(--pf-white-color);
1618
+ --pf-menu-item-color: var(--pf-gray-color);
1619
+ }
1620
+
1621
+ :root [data-theme=dark] {
1622
+ --pf-menu-item-hover-color: var(--pf-primary-color-300);
1623
+ --pf-menu-item-background-color: var(--pf-primary-color-600);
1624
+ --pf-menu-item-color: var(--pf-gray-color-100);
1625
+ }
1626
+
1627
+ .menu {
1628
+ border-radius: var(--pf-menu-rounded);
1629
+ }
1630
+ .menu .menu-item {
1631
+ width: 100%;
1632
+ background: var(--pf-menu-item-background-color);
1633
+ color: var(--pf-menu-item-color);
1634
+ display: block;
1635
+ width: 100%;
1636
+ text-align: left;
1637
+ border: none;
1638
+ }
1639
+ .menu .menu-item:hover {
1640
+ background: var(--pf-menu-item-hover-color);
1641
+ }
1642
+
1643
+ :root,
1644
+ :root [data-theme=light],
1645
+ :root [data-theme=dark] {
1646
+ --pf-popper-background-color: var(--pf-white-color);
1647
+ --pf-popper-border-color: var(--pf-gray-color-900);
1648
+ --pf-popper-border-radius: var(--pf-rounded);
1649
+ --pf-popper-padding: var(--pf-padding-2);
1650
+ }
1651
+
1652
+ :root [data-theme=dark] {
1653
+ --pf-popper-background-color: var(--pf-primary-color-600);
1654
+ --pf-popper-border-color: var(--pf-gray-color);
1655
+ }
1656
+
1657
+ .popper-container {
1658
+ z-index: 99;
1659
+ }
1660
+
1661
+ .popper-content {
1662
+ border-radius: var(--pf-popper-border-radius);
1663
+ border: 1px solid var(--pf-popper-border-color);
1664
+ background: var(--pf-popper-background-color);
1665
+ }
1666
+
1612
1667
  .rdp {
1613
1668
  --rdp-cell-size: 40px;
1614
1669
  --rdp-accent-color: #6833d0;
@@ -2052,7 +2107,7 @@ form {
2052
2107
  --pf-font-size-subtitle: var(--pf-font-size-base);
2053
2108
  --pf-font-size-subtitle2: calc(0.875 * var(--pf-font-size-base));
2054
2109
  --pf-font-size-button: var(--pf-font-size-base);
2055
- --pf-font-size-overine: calc(0.75 * var(--pf-font-size-base));
2110
+ --pf-font-size-overline: calc(0.75 * var(--pf-font-size-base));
2056
2111
  --pf-font-weight-thin: 100;
2057
2112
  --pf-font-weight-light: 300;
2058
2113
  --pf-font-weight-regular: 400;
@@ -2140,7 +2195,7 @@ p,
2140
2195
  }
2141
2196
 
2142
2197
  .text-overline {
2143
- font-size: var(--pf-font-size-overine);
2198
+ font-size: var(--pf-font-size-overline);
2144
2199
  }
2145
2200
 
2146
2201
  .text-capitalize {
package/lib/index.d.ts CHANGED
@@ -8,6 +8,7 @@ import { DateRange } from 'react-day-picker';
8
8
  import { ContainerProps, RowProps, ColProps } from 'react-grid-system';
9
9
  import { TableProps as TableProps$1, Direction as Direction$1, Alignment as Alignment$1 } from 'react-data-table-component';
10
10
  import { Props as Props$r } from 'react-select';
11
+ import { Placement } from '@floating-ui/react-dom';
11
12
 
12
13
  declare const GlobalStyles: () => react_jsx_runtime.JSX.Element;
13
14
 
@@ -1049,4 +1050,20 @@ type Props = {
1049
1050
  };
1050
1051
  declare const Card: React$1.FC<Props>;
1051
1052
 
1052
- export { animation as ANIMATION, Radio$1 as AbstractRadio, RadioGroup as AbstractRadioGroup, Accordion, breakpoints as BREAKPOINT, BarSpinner, BorderSelect, Button, allColors as COLORS, Card, Checkbox, CirclePulse, CircleSpinner, Col, ConfirmModal, Container, DatePicker, EditableInput, Form, GlobalStyles, Icon, IconButton, LabeledInput as Input, Button$1 as LegacyButton, ListTable, LoadingAwareContainer, LoadingList, margin as MARGINS, MATH, mediaQueries as MEDIA_QUERIES, ModalBase, MultiCombobox, NoInputDatePicker, NumberInput, padding as PADDINGS, Pagination, LabeledPasswordInput as PasswordInput, PercentageRing, Radio$2 as Radio, RadioGroup$1 as RadioGroup, Radio as RadioInput, RandomLoadingMessage, Row, spacings as SPACING, SearchInput, Section, SectionBlock, SectionBody, SectionHeader, SectionTable, Select$1 as Select, Select as SelectInput, Shrug, SingleCombobox, Skeleton, typography as TYPOGRAPHY, Table, TextInput, TextTruncate, LabeledTextarea as Textarea, Toggle$1 as Toggle, Toggle as ToggleInput, Tooltip, color as colorUtils, number as numberUtils, string as stringUtils };
1053
+ type PopperProps = {
1054
+ children: React$1.ReactNode;
1055
+ referenceElement: HTMLElement | null;
1056
+ isOpen: boolean;
1057
+ onClose: () => void;
1058
+ ariaLabel: string;
1059
+ placement?: Placement;
1060
+ offsetValue?: number;
1061
+ };
1062
+ declare function Popper({ children, referenceElement, isOpen, onClose, ariaLabel, placement, offsetValue, }: PopperProps): react_jsx_runtime.JSX.Element | null;
1063
+
1064
+ type MenuProps = {
1065
+ children: React$1.ReactNode;
1066
+ };
1067
+ declare function Menu({ children }: MenuProps): react_jsx_runtime.JSX.Element;
1068
+
1069
+ export { animation as ANIMATION, Radio$1 as AbstractRadio, RadioGroup as AbstractRadioGroup, Accordion, breakpoints as BREAKPOINT, BarSpinner, BorderSelect, Button, allColors as COLORS, Card, Checkbox, CirclePulse, CircleSpinner, Col, ConfirmModal, Container, DatePicker, EditableInput, Form, GlobalStyles, Icon, IconButton, LabeledInput as Input, Button$1 as LegacyButton, ListTable, LoadingAwareContainer, LoadingList, margin as MARGINS, MATH, mediaQueries as MEDIA_QUERIES, Menu, ModalBase, MultiCombobox, NoInputDatePicker, NumberInput, padding as PADDINGS, Pagination, LabeledPasswordInput as PasswordInput, PercentageRing, Popper, Radio$2 as Radio, RadioGroup$1 as RadioGroup, Radio as RadioInput, RandomLoadingMessage, Row, spacings as SPACING, SearchInput, Section, SectionBlock, SectionBody, SectionHeader, SectionTable, Select$1 as Select, Select as SelectInput, Shrug, SingleCombobox, Skeleton, typography as TYPOGRAPHY, Table, TextInput, TextTruncate, LabeledTextarea as Textarea, Toggle$1 as Toggle, Toggle as ToggleInput, Tooltip, color as colorUtils, number as numberUtils, string as stringUtils };
package/lib/index.esm.css CHANGED
@@ -14,7 +14,7 @@
14
14
  --pf-font-size-subtitle: var(--pf-font-size-base);
15
15
  --pf-font-size-subtitle2: calc(0.875 * var(--pf-font-size-base));
16
16
  --pf-font-size-button: var(--pf-font-size-base);
17
- --pf-font-size-overine: calc(0.75 * var(--pf-font-size-base));
17
+ --pf-font-size-overline: calc(0.75 * var(--pf-font-size-base));
18
18
  --pf-font-weight-thin: 100;
19
19
  --pf-font-weight-light: 300;
20
20
  --pf-font-weight-regular: 400;
@@ -1609,6 +1609,61 @@ form {
1609
1609
  box-shadow: var(--pf-dropshadow);
1610
1610
  }
1611
1611
 
1612
+ :root,
1613
+ :root [data-theme=light],
1614
+ :root [data-theme=dark] {
1615
+ --pf-menu-rounded: var(--pf-rounded);
1616
+ --pf-menu-item-hover-color: var(--pf-primary-color-100);
1617
+ --pf-menu-item-background-color: var(--pf-white-color);
1618
+ --pf-menu-item-color: var(--pf-gray-color);
1619
+ }
1620
+
1621
+ :root [data-theme=dark] {
1622
+ --pf-menu-item-hover-color: var(--pf-primary-color-300);
1623
+ --pf-menu-item-background-color: var(--pf-primary-color-600);
1624
+ --pf-menu-item-color: var(--pf-gray-color-100);
1625
+ }
1626
+
1627
+ .menu {
1628
+ border-radius: var(--pf-menu-rounded);
1629
+ }
1630
+ .menu .menu-item {
1631
+ width: 100%;
1632
+ background: var(--pf-menu-item-background-color);
1633
+ color: var(--pf-menu-item-color);
1634
+ display: block;
1635
+ width: 100%;
1636
+ text-align: left;
1637
+ border: none;
1638
+ }
1639
+ .menu .menu-item:hover {
1640
+ background: var(--pf-menu-item-hover-color);
1641
+ }
1642
+
1643
+ :root,
1644
+ :root [data-theme=light],
1645
+ :root [data-theme=dark] {
1646
+ --pf-popper-background-color: var(--pf-white-color);
1647
+ --pf-popper-border-color: var(--pf-gray-color-900);
1648
+ --pf-popper-border-radius: var(--pf-rounded);
1649
+ --pf-popper-padding: var(--pf-padding-2);
1650
+ }
1651
+
1652
+ :root [data-theme=dark] {
1653
+ --pf-popper-background-color: var(--pf-primary-color-600);
1654
+ --pf-popper-border-color: var(--pf-gray-color);
1655
+ }
1656
+
1657
+ .popper-container {
1658
+ z-index: 99;
1659
+ }
1660
+
1661
+ .popper-content {
1662
+ border-radius: var(--pf-popper-border-radius);
1663
+ border: 1px solid var(--pf-popper-border-color);
1664
+ background: var(--pf-popper-background-color);
1665
+ }
1666
+
1612
1667
  .rdp {
1613
1668
  --rdp-cell-size: 40px;
1614
1669
  --rdp-accent-color: #6833d0;
@@ -2052,7 +2107,7 @@ form {
2052
2107
  --pf-font-size-subtitle: var(--pf-font-size-base);
2053
2108
  --pf-font-size-subtitle2: calc(0.875 * var(--pf-font-size-base));
2054
2109
  --pf-font-size-button: var(--pf-font-size-base);
2055
- --pf-font-size-overine: calc(0.75 * var(--pf-font-size-base));
2110
+ --pf-font-size-overline: calc(0.75 * var(--pf-font-size-base));
2056
2111
  --pf-font-weight-thin: 100;
2057
2112
  --pf-font-weight-light: 300;
2058
2113
  --pf-font-weight-regular: 400;
@@ -2140,7 +2195,7 @@ p,
2140
2195
  }
2141
2196
 
2142
2197
  .text-overline {
2143
- font-size: var(--pf-font-size-overine);
2198
+ font-size: var(--pf-font-size-overline);
2144
2199
  }
2145
2200
 
2146
2201
  .text-capitalize {