@activecollab/components 2.0.195 → 2.0.196

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.
@@ -0,0 +1,85 @@
1
+ import styled, { css } from "styled-components";
2
+ import { IconButton } from "../IconButton";
3
+ import { ArrowDownLongIcon, ArrowUpLongIcon, SortGeneralIcon } from "../Icons";
4
+ import { List, ListItem } from "../List";
5
+ import { ValueButton } from "../ValueButton";
6
+ export const StyledSortWrapper = styled.div.withConfig({
7
+ displayName: "Styles__StyledSortWrapper",
8
+ componentId: "sc-11r5ac9-0"
9
+ })(["", ";"], {
10
+ "width": "fit-content"
11
+ });
12
+ StyledSortWrapper.displayName = "StyledSortWrapper";
13
+ export const StyledValueButton = styled(ValueButton).withConfig({
14
+ displayName: "Styles__StyledValueButton",
15
+ componentId: "sc-11r5ac9-1"
16
+ })(["", ";"], {
17
+ "display": "none",
18
+ "alignItems": "center",
19
+ "@media (min-width: 768px)": {
20
+ "display": "flex"
21
+ }
22
+ });
23
+ StyledValueButton.displayName = "StyledValueButton";
24
+ export const StyledIconButton = styled(IconButton).withConfig({
25
+ displayName: "Styles__StyledIconButton",
26
+ componentId: "sc-11r5ac9-2"
27
+ })(["", ";"], {
28
+ "display": "flex",
29
+ "alignItems": "center",
30
+ ":hover": {
31
+ "color": "var(--color-primary)"
32
+ },
33
+ "@media (min-width: 768px)": {
34
+ "display": "none"
35
+ }
36
+ });
37
+ StyledIconButton.displayName = "StyledIconButton";
38
+ export const StyledSortIcon = styled(SortGeneralIcon).withConfig({
39
+ displayName: "Styles__StyledSortIcon",
40
+ componentId: "sc-11r5ac9-3"
41
+ })(["", ";"], {
42
+ "marginTop": "0px"
43
+ });
44
+ StyledSortIcon.displayName = "StyledSortIcon";
45
+ export const StyledSortIconDown = styled(ArrowDownLongIcon).withConfig({
46
+ displayName: "Styles__StyledSortIconDown",
47
+ componentId: "sc-11r5ac9-4"
48
+ })(["", ";"], {
49
+ "flexShrink": "0"
50
+ });
51
+ StyledSortIconDown.displayName = "StyledSortIconDown";
52
+ export const StyledSortIconUp = styled(ArrowUpLongIcon).withConfig({
53
+ displayName: "Styles__StyledSortIconUp",
54
+ componentId: "sc-11r5ac9-5"
55
+ })(["", ";"], {
56
+ "flexShrink": "0"
57
+ });
58
+ StyledSortIconUp.displayName = "StyledSortIconUp";
59
+ export const StyledList = styled(List).withConfig({
60
+ displayName: "Styles__StyledList",
61
+ componentId: "sc-11r5ac9-6"
62
+ })(["", ";"], {
63
+ "paddingTop": "0.5rem",
64
+ "paddingBottom": "0.5rem"
65
+ });
66
+ StyledList.displayName = "StyledList";
67
+ export const StyledListItem = styled(ListItem).withConfig({
68
+ displayName: "Styles__StyledListItem",
69
+ componentId: "sc-11r5ac9-7"
70
+ })(["", ";svg{visibility:hidden;}&:hover svg{fill:var(--color-theme-500);visibility:visible;}", ""], {
71
+ "justifyContent": "space-between"
72
+ }, props => props.$active && css(["", ";svg{fill:var(--color-primary);visibility:visible;}&:hover svg{fill:var(--color-primary);visibility:visible;}"], {
73
+ "color": "var(--color-primary)"
74
+ }));
75
+ StyledListItem.displayName = "StyledListItem";
76
+ export const StyledListItemName = styled.span.withConfig({
77
+ displayName: "Styles__StyledListItemName",
78
+ componentId: "sc-11r5ac9-8"
79
+ })(["", ";"], {
80
+ "overflow": "hidden",
81
+ "textOverflow": "ellipsis",
82
+ "whiteSpace": "nowrap"
83
+ });
84
+ StyledListItemName.displayName = "StyledListItemName";
85
+ //# sourceMappingURL=Styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Styles.js","names":["styled","css","IconButton","ArrowDownLongIcon","ArrowUpLongIcon","SortGeneralIcon","List","ListItem","ValueButton","StyledSortWrapper","div","withConfig","displayName","componentId","StyledValueButton","StyledIconButton","StyledSortIcon","StyledSortIconDown","StyledSortIconUp","StyledList","StyledListItem","props","$active","StyledListItemName","span"],"sources":["../../../../src/components/Sort/Styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\nimport tw from \"twin.macro\";\n\nimport { IconButton } from \"../IconButton\";\nimport { ArrowDownLongIcon, ArrowUpLongIcon, SortGeneralIcon } from \"../Icons\";\nimport { List, ListItem, ListItemProps } from \"../List\";\nimport { ValueButton } from \"../ValueButton\";\n\nexport const StyledSortWrapper = styled.div`\n ${tw`tw-w-fit`};\n`;\n\nStyledSortWrapper.displayName = \"StyledSortWrapper\";\n\nexport const StyledValueButton = styled(ValueButton)`\n ${tw`tw-hidden md:tw-flex tw-items-center`};\n`;\n\nStyledValueButton.displayName = \"StyledValueButton\";\n\nexport const StyledIconButton = styled(IconButton)`\n ${tw`tw-flex tw-items-center md:tw-hidden hover:tw-text-primary`};\n`;\n\nStyledIconButton.displayName = \"StyledIconButton\";\n\nexport const StyledSortIcon = styled(SortGeneralIcon)`\n ${tw`tw-mt-0`};\n`;\n\nStyledSortIcon.displayName = \"StyledSortIcon\";\n\nexport const StyledSortIconDown = styled(ArrowDownLongIcon)`\n ${tw`tw-shrink-0`};\n`;\n\nStyledSortIconDown.displayName = \"StyledSortIconDown\";\n\nexport const StyledSortIconUp = styled(ArrowUpLongIcon)`\n ${tw`tw-shrink-0`};\n`;\n\nStyledSortIconUp.displayName = \"StyledSortIconUp\";\n\nexport const StyledList = styled(List)`\n ${tw`tw-py-2`};\n`;\n\nStyledList.displayName = \"StyledList\";\n\ninterface StyledListItemProps extends ListItemProps {\n $active?: boolean;\n}\n\nexport const StyledListItem = styled(ListItem)<StyledListItemProps>`\n ${tw`tw-justify-between`};\n svg {\n visibility: hidden;\n }\n &:hover svg {\n fill: var(--color-theme-500);\n visibility: visible;\n }\n\n ${(props) =>\n props.$active &&\n css`\n ${tw`tw-text-primary`};\n\n svg {\n fill: var(--color-primary);\n visibility: visible;\n }\n &:hover svg {\n fill: var(--color-primary);\n visibility: visible;\n }\n `}\n`;\n\nStyledListItem.displayName = \"StyledListItem\";\n\nexport const StyledListItemName = styled.span`\n ${tw`tw-truncate`};\n`;\n\nStyledListItemName.displayName = \"Sty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AAGlB,MAAM,CAACI,eAAe,CAAC,CAAAO,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,cACjD;EAAA;AAAY,CAAC,CAClB;AAEDK,gBAAgB,CAACN,WAAW,GAAG,kBAAkB;AAEjD,OAAO,MAAMO,UAAU,GAAGnB,MAAM,CAACM,IAAI,CAAC,CAAAK,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,cAChC;EAAA;EAAA;AAAQ,CAAC,CACd;AAEDM,UAAU,CAACP,WAAW,GAAG,YAAY;AAMrC,OAAO,MAAMQ,cAAc,GAAGpB,MAAM,CAACO,QAAQ,CAAC,CAAAI,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,qGACxC;EAAA;AAAmB,CAAC,EASrBQ,KAAK,IACNA,KAAK,CAACC,OAAO,IACbrB,GAAG,wHACG;EAAA;AAAgB,CAAC,CAUtB,CACJ;AAEDmB,cAAc,CAACR,WAAW,GAAG,gBAAgB;AAE7C,OAAO,MAAMW,kBAAkB,GAAGvB,MAAM,CAACwB,IAAI,CAAAb,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,cACvC;EAAA;EAAA;EAAA;AAAY,CAAC,CAClB;AAEDU,kBAAkB,CAACX,WAAW,GAAG,oBAAoB"}
@@ -0,0 +1,2 @@
1
+ export * from "./Sort";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Sort/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./Sort";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/Sort/index.ts"],"sourcesContent":["export * from \"./Sort\";\n"],"mappings":"AAAA,cAAc,QAAQ"}
@@ -80,4 +80,5 @@ export * from "./CommandPalette";
80
80
  export * from "./EmptySlate";
81
81
  export * from "./Toolbar";
82
82
  export * from "./InfoBox";
83
+ export * from "./Sort";
83
84
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC;AACrC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;A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C;AAC3B,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC"}
@@ -80,4 +80,5 @@ export * from "./CommandPalette";
80
80
  export * from "./EmptySlate";
81
81
  export * from "./Toolbar";
82
82
  export * from "./InfoBox";
83
+ export * from "./Sort";
83
84
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/components/index.ts"],"sourcesContent":["export * from \"./Button\";\nexport * from \"./ButtonGroup\";\nexport * from \"./Breadcrumbs\";\nexport * from \"./CounterButton\";\nexport * from \"./Steppers\";\nexport * from \"./Tables\";\nexport * from \"./CompleteCheckbox\";\nexport * from \"./Paper\";\nexport * from \"./ScaleBar\";\nexport * from \"./Card\";\nexport * from \"./EntityCard\";\nexport * from \"./EntitiesHeader\";\nexport * from \"./Signifier\";\nexport * from \"./Avatar\";\nexport * from \"./Tag\";\nexport * from \"./Loaders\";\nexport * from \"./Nav\";\nexport * from \"./Bubble\";\nexport * from \"./Input\";\nexport * from \"./Display\";\nexport * from \"./Menu\";\nexport * from \"./Expanders\";\nexport * from \"./Pickers\";\nexport * from \"./DatePicker\";\nexport * from \"./List\";\nexport * from \"./MenuSelector\";\nexport * from \"./MultiAvatar\";\nexport * from \"./RadioButton\";\nexport * from \"./ScrollShadow\";\nexport * from \"./Icons\";\nexport * from \"./Textarea\";\nexport * from \"./Modal\";\nexport * from \"./Sheet\";\nexport * from \"./Header\";\nexport * from \"./AutoResizeTextarea\";\nexport * from \"./Overlay\";\nexport * from \"./Accordion\";\nexport * from \"./Choose\";\nexport * from \"./Links\";\nexport * from \"./SelectDate\";\nexport * from \"./Popper\";\nexport * from \"./ToastMessage\";\nexport * from \"./Tooltip\";\nexport * from \"./Transitions\";\nexport * from \"./Window\";\nexport * from \"./ValueButton\";\nexport * from \"./Select\";\nexport * from \"./SelectTrigger\";\nexport * from \"./SelectTime\";\nexport * from \"./Dialog\";\nexport * from \"./ConfirmDialog\";\nexport * from \"./Checkbox\";\nexport * from \"./Toggle\";\nexport * from \"./Typography\";\nexport * from \"./Autocomplete\";\nexport * from \"./ComboBox\";\nexport * from \"./Button/AddToListButton\";\nexport * from \"./ProgressBar\";\nexport * from \"./ProgressPie\";\nexport * from \"./Reactions\";\nexport * from \"./Label\";\nexport * from \"./GlobalStyle\";\nexport * from \"./ProgressRing\";\nexport * from \"./EditableContent\";\nexport * from \"./EditableText\";\nexport * from \"./EditableHours\";\nexport * from \"./EditableCurrency\";\nexport * from \"./Folder\";\nexport * from \"./Chip\";\nexport * from \"./Trigger\";\nexport * from \"./Dot\";\nexport * from \"./Entity\";\nexport * from \"./Filter\";\nexport * from \"./Wizard\";\nexport * from \"./IconButton\";\nexport * from \"./Typography\";\nexport * from \"./Badge\";\nexport * from \"./AvatarGroup\";\nexport * from \"./CommandPalette\";\nexport * from \"./EmptySlate\";\nexport * from \"./Toolbar\";\nexport * from \"./InfoBox\";\n"],"mappings":"AAAA,cAAc,UAAU;AAC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B,cAAc,iBAAiB;AAC/B,cAAc,oBAAoB;AAClC,cAAc,UAAU;AACxB,cAAc,QAAQ;AACtB,cAAc,WAAW;AACzB,cAAc,OAAO;AACrB,cAAc,UAAU;AACxB,cAAc,UAAU;AACxB,cAAc,UAAU;AACxB,cAAc,cAAc;AAC5B,cAAc,cAAc;AAC5B,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B,cAAc,kBAAkB;AAChC,cAAc,cAAc;AAC5B,cAAc,WAAW;AACzB,cAAc,WAAW"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/components/index.ts"],"sourcesContent":["export * from \"./Button\";\nexport * from \"./ButtonGroup\";\nexport * from \"./Breadcrumbs\";\nexport * from \"./CounterButton\";\nexport * from \"./Steppers\";\nexport * from \"./Tables\";\nexport * from \"./CompleteCheckbox\";\nexport * from \"./Paper\";\nexport * from \"./ScaleBar\";\nexport * from \"./Card\";\nexport * from \"./EntityCard\";\nexport * from \"./EntitiesHeader\";\nexport * from \"./Signifier\";\nexport * from \"./Avatar\";\nexport * from \"./Tag\";\nexport * from \"./Loaders\";\nexport * from \"./Nav\";\nexport * from \"./Bubble\";\nexport * from \"./Input\";\nexport * from \"./Display\";\nexport * from \"./Menu\";\nexport * from \"./Expanders\";\nexport * from \"./Pickers\";\nexport * from \"./DatePicker\";\nexport * from \"./List\";\nexport * from \"./MenuSelector\";\nexport * from \"./MultiAvatar\";\nexport * from \"./RadioButton\";\nexport * from \"./ScrollShadow\";\nexport * from \"./Icons\";\nexport * from \"./Textarea\";\nexport * from \"./Modal\";\nexport * from \"./Sheet\";\nexport * from \"./Header\";\nexport * from \"./AutoResizeTextarea\";\nexport * from \"./Overlay\";\nexport * from \"./Accordion\";\nexport * from \"./Choose\";\nexport * from \"./Links\";\nexport * from \"./SelectDate\";\nexport * from \"./Popper\";\nexport * from \"./ToastMessage\";\nexport * from \"./Tooltip\";\nexport * from \"./Transitions\";\nexport * from \"./Window\";\nexport * from \"./ValueButton\";\nexport * from \"./Select\";\nexport * from \"./SelectTrigger\";\nexport * from \"./SelectTime\";\nexport * from \"./Dialog\";\nexport * from \"./ConfirmDialog\";\nexport * from \"./Checkbox\";\nexport * from \"./Toggle\";\nexport * from \"./Typography\";\nexport * from \"./Autocomplete\";\nexport * from \"./ComboBox\";\nexport * from \"./Button/AddToListButton\";\nexport * from \"./ProgressBar\";\nexport * from \"./ProgressPie\";\nexport * from \"./Reactions\";\nexport * from \"./Label\";\nexport * from \"./GlobalStyle\";\nexport * from \"./ProgressRing\";\nexport * from \"./EditableContent\";\nexport * from \"./EditableText\";\nexport * from \"./EditableHours\";\nexport * from \"./EditableCurrency\";\nexport * from \"./Folder\";\nexport * from \"./Chip\";\nexport * from \"./Trigger\";\nexport * from \"./Dot\";\nexport * from \"./Entity\";\nexport * from \"./Filter\";\nexport * from \"./Wizard\";\nexport * from \"./IconButton\";\nexport * from \"./Typography\";\nexport * from \"./Badge\";\nexport * from \"./AvatarGroup\";\nexport * from \"./CommandPalette\";\nexport * from \"./EmptySlate\";\nexport * from \"./Toolbar\";\nexport * from \"./InfoBox\";\nexport * from \"./Sort\";\n"],"mappings":"AAAA,cAAc,UAAU;AACxB,cAAc,eAAe;AAC7B,cAAc,eAAe;AAC7B,cAAc,iBAAiB;AAC/B,cAAc,YAAY;AAC1B,cAAc,UAAU;AACxB,cAAc,oBAAoB;AAClC,cAAc,SAAS;AACvB,cAAc,YAAY;AAC1B,cAAc,QAAQ;AACtB,cAAc,cAAc;AAC5B,cAAc,kBAAkB;AAChC,cAAc,aAAa;AAC3B,cAAc,UAAU;AACxB,cAAc,OAAO;AACrB,cAAc,WAAW;AACzB,cAAc,OAAO;AACrB,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,WAAW;AACzB,cAAc,QAAQ;AACtB,cAAc,aAAa;AAC3B,cAAc,WAAW;AACzB,cAAc,cAAc;AAC5B,cAAc,QAAQ;AACtB,cAAc,gBAAgB;AAC9B,cAAc,eAAe;AAC7B,cAAc,eAAe;AAC7B,cAAc,gBAAgB;AAC9B,cAAc,SAAS;AACvB,cAAc,YAAY;AAC1B,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,sBAAsB;AACpC,cAAc,WAAW;AACzB,cAAc,aAAa;AAC3B,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,cAAc;AAC5B,cAAc,UAAU;AACxB,cAAc,gBAAgB;AAC9B,cAAc,WAAW;AACzB,cAAc,eAAe;AAC7B,cAAc,UAAU;AACxB,cAAc,eAAe;AAC7B,cAAc,UAAU;AACxB,cAAc,iBAAiB;AAC/B,cAAc,cAAc;AAC5B,cAAc,UAAU;AACxB,cAAc,iBAAiB;AAC/B,cAAc,YAAY;AAC1B,cAAc,UAAU;AACxB,cAAc,cAAc;AAC5B,cAAc,gBAAgB;AAC9B,cAAc,YAAY;AAC1B,cAAc,0BAA0B;AACxC,cAAc,eAAe;AAC7B,cAAc,eAAe;AAC7B,cAAc,aAAa;AAC3B,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B,cAAc,gBAAgB;AAC9B,cAAc,mBAAmB;AACjC,cAAc,gBAAgB;AAC9B,cAAc,iBAAiB;AAC/B,cAAc,oBAAoB;AAClC,cAAc,UAAU;AACxB,cAAc,QAAQ;AACtB,cAAc,WAAW;AACzB,cAAc,OAAO;AACrB,cAAc,UAAU;AACxB,cAAc,UAAU;AACxB,cAAc,UAAU;AACxB,cAAc,cAAc;AAC5B,cAAc,cAAc;AAC5B,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B,cAAc,kBAAkB;AAChC,cAAc,cAAc;AAC5B,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,QAAQ"}
package/dist/index.js CHANGED
@@ -362,16 +362,16 @@
362
362
  });
363
363
  ButtonGroup.displayName = "ButtonGroup";
364
364
 
365
- var StyledList = styled__default["default"].ul.withConfig({
365
+ var StyledList$1 = styled__default["default"].ul.withConfig({
366
366
  displayName: "Styles__StyledList",
367
367
  componentId: "sc-dv1w0m-0"
368
368
  })(["list-style-type:none;margin:0;padding:0;"]);
369
- StyledList.displayName = "StyledList";
370
- var StyledListItem = styled__default["default"].li.withConfig({
369
+ StyledList$1.displayName = "StyledList";
370
+ var StyledListItem$1 = styled__default["default"].li.withConfig({
371
371
  displayName: "Styles__StyledListItem",
372
372
  componentId: "sc-dv1w0m-1"
373
373
  })(["", " ", " display:flex;flex-direction:row;align-items:center;cursor:pointer;padding:0 1rem;margin:0.25rem 0;font-size:0.875rem;user-select:none;color:var(--color-theme-900);line-height:28px;> svg:first-child{margin-right:8px;}&:hover,&:focus-visible{background-color:var(--color-theme-200);outline:none;}"], BoxSizingStyle, FontStyle);
374
- StyledListItem.displayName = "StyledListItem";
374
+ StyledListItem$1.displayName = "StyledListItem";
375
375
  var StyledListSeparator$1 = styled__default["default"].div.withConfig({
376
376
  displayName: "Styles__StyledListSeparator",
377
377
  componentId: "sc-dv1w0m-2"
@@ -383,7 +383,7 @@
383
383
  var children = _ref.children,
384
384
  className = _ref.className,
385
385
  props = _objectWithoutProperties(_ref, _excluded$1z);
386
- return /*#__PURE__*/React__default["default"].createElement(StyledListItem, _extends({
386
+ return /*#__PURE__*/React__default["default"].createElement(StyledListItem$1, _extends({
387
387
  className: classNames__default["default"]("c-list-item", className),
388
388
  ref: ref,
389
389
  tabIndex: 0
@@ -406,7 +406,7 @@
406
406
  var children = _ref.children,
407
407
  className = _ref.className,
408
408
  props = _objectWithoutProperties(_ref, _excluded$1x);
409
- return /*#__PURE__*/React__default["default"].createElement(StyledList, _extends({
409
+ return /*#__PURE__*/React__default["default"].createElement(StyledList$1, _extends({
410
410
  className: className,
411
411
  ref: ref,
412
412
  tabIndex: -1
@@ -877,7 +877,7 @@
877
877
  return time === undefined || /^([01]\d|2[0-3]):([0-5]\d)$/.test(time);
878
878
  };
879
879
 
880
- var StyledIconButton = styled__default["default"](Button).withConfig({
880
+ var StyledIconButton$1 = styled__default["default"](Button).withConfig({
881
881
  displayName: "Styles__StyledIconButton",
882
882
  componentId: "sc-1teza2f-0"
883
883
  })(["display:inline-flex;justify-content:center;align-items:center;padding:0;width:32px;", " ", ""], function (_ref) {
@@ -919,7 +919,7 @@
919
919
  size = _ref.size,
920
920
  active = _ref.active,
921
921
  args = _objectWithoutProperties(_ref, _excluded$1w);
922
- return /*#__PURE__*/React__default["default"].createElement(StyledIconButton, _extends({
922
+ return /*#__PURE__*/React__default["default"].createElement(StyledIconButton$1, _extends({
923
923
  className: className,
924
924
  variant: variant,
925
925
  size: size,
@@ -19485,7 +19485,7 @@
19485
19485
  componentId: "sc-7n59oz-1"
19486
19486
  })([""]);
19487
19487
  StyledValueButtonValue.displayName = "StyledValueButtonValue";
19488
- var StyledValueButton = styled__default["default"](Button).withConfig({
19488
+ var StyledValueButton$1 = styled__default["default"](Button).withConfig({
19489
19489
  displayName: "Styles__StyledValueButton",
19490
19490
  componentId: "sc-7n59oz-2"
19491
19491
  })(["", " ", ""], function (props) {
@@ -19497,7 +19497,7 @@
19497
19497
  "pointerEvents": "none"
19498
19498
  });
19499
19499
  });
19500
- StyledValueButton.displayName = "StyledValueButton";
19500
+ StyledValueButton$1.displayName = "StyledValueButton";
19501
19501
 
19502
19502
  var _excluded$o = ["active", "alwaysShowIcon", "icon", "label", "value"];
19503
19503
  var ValueButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
@@ -19509,7 +19509,7 @@
19509
19509
  label = _ref.label,
19510
19510
  value = _ref.value,
19511
19511
  args = _objectWithoutProperties(_ref, _excluded$o);
19512
- return /*#__PURE__*/React__default["default"].createElement(StyledValueButton, _extends({
19512
+ return /*#__PURE__*/React__default["default"].createElement(StyledValueButton$1, _extends({
19513
19513
  className: "c-value-button"
19514
19514
  }, args, {
19515
19515
  ref: ref,
@@ -22167,6 +22167,163 @@
22167
22167
  }, title) : title, action), children)));
22168
22168
  };
22169
22169
 
22170
+ var StyledSortWrapper = styled__default["default"].div.withConfig({
22171
+ displayName: "Styles__StyledSortWrapper",
22172
+ componentId: "sc-11r5ac9-0"
22173
+ })(["", ";"], {
22174
+ "width": "fit-content"
22175
+ });
22176
+ StyledSortWrapper.displayName = "StyledSortWrapper";
22177
+ var StyledValueButton = styled__default["default"](ValueButton).withConfig({
22178
+ displayName: "Styles__StyledValueButton",
22179
+ componentId: "sc-11r5ac9-1"
22180
+ })(["", ";"], {
22181
+ "display": "none",
22182
+ "alignItems": "center",
22183
+ "@media (min-width: 768px)": {
22184
+ "display": "flex"
22185
+ }
22186
+ });
22187
+ StyledValueButton.displayName = "StyledValueButton";
22188
+ var StyledIconButton = styled__default["default"](IconButton).withConfig({
22189
+ displayName: "Styles__StyledIconButton",
22190
+ componentId: "sc-11r5ac9-2"
22191
+ })(["", ";"], {
22192
+ "display": "flex",
22193
+ "alignItems": "center",
22194
+ ":hover": {
22195
+ "color": "var(--color-primary)"
22196
+ },
22197
+ "@media (min-width: 768px)": {
22198
+ "display": "none"
22199
+ }
22200
+ });
22201
+ StyledIconButton.displayName = "StyledIconButton";
22202
+ var StyledSortIcon = styled__default["default"](SortGeneralIcon$1).withConfig({
22203
+ displayName: "Styles__StyledSortIcon",
22204
+ componentId: "sc-11r5ac9-3"
22205
+ })(["", ";"], {
22206
+ "marginTop": "0px"
22207
+ });
22208
+ StyledSortIcon.displayName = "StyledSortIcon";
22209
+ var StyledSortIconDown = styled__default["default"](ArrowDownLongIcon$1).withConfig({
22210
+ displayName: "Styles__StyledSortIconDown",
22211
+ componentId: "sc-11r5ac9-4"
22212
+ })(["", ";"], {
22213
+ "flexShrink": "0"
22214
+ });
22215
+ StyledSortIconDown.displayName = "StyledSortIconDown";
22216
+ var StyledSortIconUp = styled__default["default"](ArrowUpLongIcon$1).withConfig({
22217
+ displayName: "Styles__StyledSortIconUp",
22218
+ componentId: "sc-11r5ac9-5"
22219
+ })(["", ";"], {
22220
+ "flexShrink": "0"
22221
+ });
22222
+ StyledSortIconUp.displayName = "StyledSortIconUp";
22223
+ var StyledList = styled__default["default"](List).withConfig({
22224
+ displayName: "Styles__StyledList",
22225
+ componentId: "sc-11r5ac9-6"
22226
+ })(["", ";"], {
22227
+ "paddingTop": "0.5rem",
22228
+ "paddingBottom": "0.5rem"
22229
+ });
22230
+ StyledList.displayName = "StyledList";
22231
+ var StyledListItem = styled__default["default"](ListItem).withConfig({
22232
+ displayName: "Styles__StyledListItem",
22233
+ componentId: "sc-11r5ac9-7"
22234
+ })(["", ";svg{visibility:hidden;}&:hover svg{fill:var(--color-theme-500);visibility:visible;}", ""], {
22235
+ "justifyContent": "space-between"
22236
+ }, function (props) {
22237
+ return props.$active && styled.css(["", ";svg{fill:var(--color-primary);visibility:visible;}&:hover svg{fill:var(--color-primary);visibility:visible;}"], {
22238
+ "color": "var(--color-primary)"
22239
+ });
22240
+ });
22241
+ StyledListItem.displayName = "StyledListItem";
22242
+ var StyledListItemName = styled__default["default"].span.withConfig({
22243
+ displayName: "Styles__StyledListItemName",
22244
+ componentId: "sc-11r5ac9-8"
22245
+ })(["", ";"], {
22246
+ "overflow": "hidden",
22247
+ "textOverflow": "ellipsis",
22248
+ "whiteSpace": "nowrap"
22249
+ });
22250
+ StyledListItemName.displayName = "StyledListItemName";
22251
+
22252
+ var Sort = function Sort(_ref) {
22253
+ var label = _ref.label,
22254
+ icon = _ref.icon,
22255
+ options = _ref.options,
22256
+ selected = _ref.selected,
22257
+ onChange = _ref.onChange,
22258
+ target = _ref.target,
22259
+ className = _ref.className;
22260
+ var _useState = React.useState(false),
22261
+ _useState2 = _slicedToArray(_useState, 2),
22262
+ open = _useState2[0],
22263
+ setOpen = _useState2[1];
22264
+ var handleClose = React.useCallback(function () {
22265
+ return setOpen(false);
22266
+ }, []);
22267
+ var handleOpen = React.useCallback(function () {
22268
+ return setOpen(true);
22269
+ }, []);
22270
+ var handleOnChange = React.useCallback(function (event) {
22271
+ var nextSortBy = event.currentTarget.dataset.id;
22272
+ var nextOrder = selected.sortDirection === "desc" ? "asc" : "desc";
22273
+ if (nextSortBy !== selected.sortBy) {
22274
+ var _options$find;
22275
+ nextOrder = ((_options$find = options.find(function (opt) {
22276
+ return opt.id === nextSortBy;
22277
+ })) === null || _options$find === void 0 ? void 0 : _options$find.defaultDirection) || "asc";
22278
+ }
22279
+ onChange({
22280
+ sortBy: nextSortBy,
22281
+ sortDirection: nextOrder
22282
+ });
22283
+ }, [onChange, selected, options]);
22284
+ var labelText = React.useMemo(function () {
22285
+ var _options$find$name, _options$find2;
22286
+ return (_options$find$name = (_options$find2 = options.find(function (opt) {
22287
+ return opt.id === selected.sortBy;
22288
+ })) === null || _options$find2 === void 0 ? void 0 : _options$find2.name) !== null && _options$find$name !== void 0 ? _options$find$name : "";
22289
+ }, [selected.sortBy, options]);
22290
+ if (!labelText) {
22291
+ console.warn("Cannot find selected id in options.");
22292
+ }
22293
+ return /*#__PURE__*/React__default["default"].createElement(Menu, {
22294
+ onOpen: handleOpen,
22295
+ onClose: handleClose,
22296
+ position: "bottom-end",
22297
+ target: target || /*#__PURE__*/React__default["default"].createElement(StyledSortWrapper, {
22298
+ className: className
22299
+ }, /*#__PURE__*/React__default["default"].createElement(StyledValueButton, {
22300
+ active: open,
22301
+ value: labelText,
22302
+ label: label,
22303
+ "data-testid": "sort-button"
22304
+ }), /*#__PURE__*/React__default["default"].createElement(StyledIconButton, {
22305
+ active: open,
22306
+ variant: "text gray",
22307
+ "data-testid": "sort-icon-button"
22308
+ }, icon || /*#__PURE__*/React__default["default"].createElement(StyledSortIcon, null)))
22309
+ }, /*#__PURE__*/React__default["default"].createElement(StyledList, null, options.map(function (_ref2) {
22310
+ var id = _ref2.id,
22311
+ name = _ref2.name,
22312
+ defaultDirection = _ref2.defaultDirection;
22313
+ var showDownArrow = selected.sortDirection === "asc";
22314
+ if (selected.sortBy !== id) {
22315
+ showDownArrow = defaultDirection === "asc";
22316
+ }
22317
+ return /*#__PURE__*/React__default["default"].createElement(StyledListItem, {
22318
+ key: id,
22319
+ onClick: handleOnChange,
22320
+ "data-id": id,
22321
+ "data-testid": id,
22322
+ $active: id === selected.sortBy
22323
+ }, /*#__PURE__*/React__default["default"].createElement(StyledListItemName, null, name), showDownArrow ? /*#__PURE__*/React__default["default"].createElement(StyledSortIconDown, null) : /*#__PURE__*/React__default["default"].createElement(StyledSortIconUp, null));
22324
+ })));
22325
+ };
22326
+
22170
22327
  exports.AccessLogIcon = AccessLogIcon$1;
22171
22328
  exports.Accordion = Accordion;
22172
22329
  exports.AccordionContext = AccordionContext;
@@ -22462,6 +22619,7 @@
22462
22619
  exports.SlideFromTop = SlideFromTop;
22463
22620
  exports.SlideLeftRightTransition = SlideLeftRightTransition;
22464
22621
  exports.SmileIcon = SmileIcon$1;
22622
+ exports.Sort = Sort;
22465
22623
  exports.SortDirection = SortDirection;
22466
22624
  exports.SortGeneralIcon = SortGeneralIcon$1;
22467
22625
  exports.SortIcon = SortIcon$1;