@luscii-healthtech/web-ui 18.0.2 → 18.1.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.
@@ -0,0 +1,42 @@
1
+ import React from "react";
2
+ export declare const weekdayValues: readonly ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"];
3
+ export type Weekday = (typeof weekdayValues)[number];
4
+ /**
5
+ * The previous implementation of this component used the index of the
6
+ * weekday to indicate which days were selected. This function converts
7
+ * the `Weekday` value from the new API to the `number` value of the
8
+ * old API, for ease of migration.
9
+ */
10
+ declare function weekdayNameToIndex(weekday: Weekday): 0 | 1 | 2 | 3 | 4 | 5 | 6;
11
+ declare function weekdayNameToIndex(weekdays: Weekday[]): 0 | 1 | 2 | 3 | 4 | 5 | 6;
12
+ /**
13
+ * The previous implementation of this component used the index of the
14
+ * weekday to indicate which days were selected. This function converts
15
+ * the `number` value from the old API to the `Weekday` value of the
16
+ * new API, for ease of migration.
17
+ */
18
+ declare function indexToWeekdayName(index: number): Weekday;
19
+ declare function indexToWeekdayName(indexes: number[]): Weekday[];
20
+ export type Props = React.HTMLAttributes<HTMLDivElement> & {
21
+ /**
22
+ * The locale in which the weekday letters are displayed. Also
23
+ * affects the screen reader text.
24
+ */
25
+ locale: string;
26
+ /**
27
+ * This component is controlled, so it needs to be fed in
28
+ * state. The result of `onChange` can be passed back in here
29
+ * to make the component function as a controlled component.
30
+ */
31
+ selectedOptions: Weekday[];
32
+ onChange: (weekdayValues: Weekday[]) => void;
33
+ };
34
+ type StaticProperties = {
35
+ weekdayNameToIndex: typeof weekdayNameToIndex;
36
+ indexToWeekdayName: typeof indexToWeekdayName;
37
+ };
38
+ /**
39
+ * A component that allows the user to select multiple weekdays.
40
+ */
41
+ export declare const WeekdaysPicker: React.FC<Props> & StaticProperties;
42
+ export {};
package/dist/index.d.ts CHANGED
@@ -78,4 +78,5 @@ export { FullPageModal } from "./components/Modal/FullPageModal";
78
78
  export { Card, type Props as CardProps } from "./components/Card/Card";
79
79
  export { Dropzone, DropzoneProps } from "./components/Dropzone";
80
80
  export { FilterBar, FilterBarUtils } from "./components/FilterBar";
81
+ export { type Weekday, WeekdaysPicker, } from "./components/WeekdaysPicker/WeekdaysPicker";
81
82
  export { default as DragHandle, DragHandleProps, } from "./components/DragHandle";
@@ -25,6 +25,7 @@ var pick = require('lodash/pick');
25
25
  var index_ie11 = require('react-hook-form/dist/index.ie11');
26
26
  var react = require('@headlessui/react');
27
27
  var solid = require('@heroicons/react/20/solid');
28
+ var ToggleGroup = require('@radix-ui/react-toggle-group');
28
29
 
29
30
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
30
31
 
@@ -60,6 +61,7 @@ var groupBy__default = /*#__PURE__*/_interopDefault(groupBy);
60
61
  var debounce__default = /*#__PURE__*/_interopDefault(debounce);
61
62
  var ReactQuill__default = /*#__PURE__*/_interopDefault(ReactQuill);
62
63
  var pick__default = /*#__PURE__*/_interopDefault(pick);
64
+ var ToggleGroup__namespace = /*#__PURE__*/_interopNamespace(ToggleGroup);
63
65
 
64
66
  /******************************************************************************
65
67
  Copyright (c) Microsoft Corporation.
@@ -4376,7 +4378,7 @@ RadioGroup.propTypes = {
4376
4378
  onChange: PropTypes__default.default.func
4377
4379
  };
4378
4380
 
4379
- var css_248z$4 = "/**\n * --- DEPRECATED ---\n * DON'T USE ANYTHING FROM THIS FILE IN FUTURE CHANGES. WE SHOULD BE\n * USING TAILWIND CLASSES DIRECTLY IN OUR COMPONENTS.\n */\n.cweb-section .cweb-button:last-of-type {\n margin-right: 24px;\n}\n.cweb-section .cweb-button:not(:last-of-type) {\n margin-right: 8px;\n}\n.cweb-section .cweb-button.add-button, .cweb-section .cweb-button.edit-button, .cweb-section .cweb-button.delete-button {\n margin-left: auto;\n width: 32px;\n height: 32px;\n}\n.cweb-section .cweb-button.add-button {\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2244%22 height%3D%2244%22 viewBox%3D%220 0 44 44%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Ccircle cx%3D%2222%22 cy%3D%2222%22 r%3D%2222%22 fill%3D%22white%22%2F%3E%3Crect x%3D%220.5%22 y%3D%220.5%22 width%3D%2243%22 height%3D%2243%22 rx%3D%2221.5%22 stroke%3D%22%23009FE3%22%2F%3E%3Cpath fill-rule%3D%22evenodd%22 clip-rule%3D%22evenodd%22 d%3D%22M22 32C23.1046 32 24 31.1046 24 30L24 24H30C31.1046 24 32 23.1046 32 22C32 20.8954 31.1046 20 30 20H24L24 14C24 12.8954 23.1046 12 22 12C20.8954 12 20 12.8954 20 14L20 20H14C12.8954 20 12 20.8954 12 22C12 23.1046 12.8954 24 14 24H20L20 30C20 31.1046 20.8954 32 22 32Z%22 fill%3D%22%23009FE3%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n.cweb-section .cweb-button.add-button:hover, .cweb-section .cweb-button.add-button:active, .cweb-section .cweb-button.add-button:focus {\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2244%22 height%3D%2244%22 viewBox%3D%220 0 44 44%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect x%3D%220.5%22 y%3D%220.5%22 width%3D%2243%22 height%3D%2243%22 rx%3D%2221.5%22 stroke%3D%22%230A78B2%22%2F%3E%3Cpath fill-rule%3D%22evenodd%22 clip-rule%3D%22evenodd%22 d%3D%22M21 12C19.8954 12 19 12.8954 19 14V19L14 19C12.8954 19 12 19.8954 12 21V23C12 24.1046 12.8954 25 14 25H19V30C19 31.1046 19.8954 32 21 32H23C24.1046 32 25 31.1046 25 30V25H30C31.1046 25 32 24.1046 32 23V21C32 19.8954 31.1046 19 30 19L25 19V14C25 12.8954 24.1046 12 23 12H21Z%22 fill%3D%22%23007BBB%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n.cweb-section .cweb-button.edit-button {\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2244%22 height%3D%2244%22 viewBox%3D%220 0 44 44%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect x%3D%220.5%22 y%3D%220.5%22 width%3D%2243%22 height%3D%2243%22 rx%3D%2221.5%22 stroke%3D%22%23009FE3%22%2F%3E%3Cpath d%3D%22M13.5643 27.1001C13.4169 26.9527 13.1433 27.0159 13.1012 27.2266L12.0065 31.6507C11.9644 31.8614 12.1328 32.051 12.3433 31.9878L16.7851 30.9134C16.9956 30.8712 17.0799 30.5973 16.9114 30.4499L13.5643 27.1001Z%22 fill%3D%22%23009FE3%22%2F%3E%3Cpath d%3D%22M26.2161 14.1222C26.1109 14.0169 25.9214 14.0169 25.8161 14.1222L14.4484 25.4987C14.3432 25.604 14.3432 25.7936 14.4484 25.8989L18.1114 29.5647C18.2166 29.67 18.4061 29.67 18.5113 29.5647L29.879 18.1882C29.9843 18.0829 29.9843 17.8933 29.879 17.788L26.2161 14.1222Z%22 fill%3D%22%23009FE3%22%2F%3E%3Cpath d%3D%22M31.1633 12.8374C30.0475 11.7209 28.2161 11.7209 27.1004 12.8374C27.0583 12.8796 27.0583 12.9217 27.1004 12.9638L31.037 16.9035C31.0791 16.9456 31.1212 16.9456 31.1633 16.9035C32.279 15.7869 32.279 13.954 31.1633 12.8374Z%22 fill%3D%22%23009FE3%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n.cweb-section .cweb-button.edit-button:hover, .cweb-section .cweb-button.edit-button:active, .cweb-section .cweb-button.edit-button:focus {\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2244%22 height%3D%2244%22 viewBox%3D%220 0 44 44%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect x%3D%220.5%22 y%3D%220.5%22 width%3D%2243%22 height%3D%2243%22 rx%3D%2221.5%22 stroke%3D%22%23007BBB%22%2F%3E%3Cpath d%3D%22M13.5643 27.1001C13.4169 26.9527 13.1433 27.0159 13.1012 27.2266L12.0065 31.6507C11.9644 31.8614 12.1328 32.051 12.3433 31.9878L16.7851 30.9134C16.9956 30.8712 17.0799 30.5973 16.9114 30.4499L13.5643 27.1001Z%22 fill%3D%22%230A78B2%22%2F%3E%3Cpath d%3D%22M26.2161 14.1222C26.1109 14.0169 25.9214 14.0169 25.8161 14.1222L14.4484 25.4987C14.3432 25.604 14.3432 25.7936 14.4484 25.8989L18.1114 29.5647C18.2166 29.67 18.4061 29.67 18.5113 29.5647L29.879 18.1882C29.9843 18.0829 29.9843 17.8933 29.879 17.788L26.2161 14.1222Z%22 fill%3D%22%230A78B2%22%2F%3E%3Cpath d%3D%22M31.1633 12.8374C30.0475 11.7209 28.2161 11.7209 27.1004 12.8374C27.0583 12.8796 27.0583 12.9217 27.1004 12.9638L31.037 16.9035C31.0791 16.9456 31.1212 16.9456 31.1633 16.9035C32.279 15.7869 32.279 13.954 31.1633 12.8374Z%22 fill%3D%22%230A78B2%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n.cweb-section .cweb-button.delete-button {\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2244%22 height%3D%2244%22 viewBox%3D%220 0 44 44%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect x%3D%220.5%22 y%3D%220.5%22 width%3D%2243%22 height%3D%2243%22 rx%3D%2221.5%22 stroke%3D%22%23FF6266%22%2F%3E%3Cpath fill-rule%3D%22evenodd%22 clip-rule%3D%22evenodd%22 d%3D%22M13 12C12.4477 12 12 12.4477 12 13C12 13.5523 12.4477 14 13 14H31C31.5523 14 32 13.5523 32 13C32 12.4477 31.5523 12 31 12H13ZM14 16H30V30C30 31.1046 29.1046 32 28 32H16C14.8954 32 14 31.1046 14 30V16ZM17 18H19V30H17V18ZM21 18H23V30H21V18ZM27 18H25V30H27V18Z%22 fill%3D%22%23FF6266%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n.cweb-section .cweb-button.delete-button:hover, .cweb-section .cweb-button.delete-button:active, .cweb-section .cweb-button.delete-button:focus {\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2244%22 height%3D%2244%22 viewBox%3D%220 0 44 44%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath fill-rule%3D%22evenodd%22 clip-rule%3D%22evenodd%22 d%3D%22M13 12C12.4477 12 12 12.4477 12 13C12 13.5523 12.4477 14 13 14H31C31.5523 14 32 13.5523 32 13C32 12.4477 31.5523 12 31 12H13ZM14 16H30V30C30 31.1046 29.1046 32 28 32H16C14.8954 32 14 31.1046 14 30V16ZM17 18H19V30H17V18ZM21 18H23V30H21V18ZM27 18H25V30H27V18Z%22 fill%3D%22%23FC494E%22%2F%3E%3Crect x%3D%220.5%22 y%3D%220.5%22 width%3D%2243%22 height%3D%2243%22 rx%3D%2221.5%22 stroke%3D%22%23FC494E%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n.cweb-section > .cweb-section-header {\n display: flex;\n justify-content: space-between;\n flex-direction: row;\n align-items: center;\n border-bottom: 1px solid #eeeeee;\n width: 100%;\n padding: 18px 24px;\n}\n.cweb-section > .cweb-section-footer {\n display: flex;\n justify-content: space-between;\n flex-direction: row;\n align-items: center;\n border-top: 1px solid #eeeeee;\n width: 100%;\n padding: 1rem 24px 1rem 24px;\n}\n.cweb-section > .cweb-section-footer img {\n width: 32px;\n height: 32px;\n}";
4381
+ var css_248z$4 = "/**\n * --- DEPRECATED ---\n * DON'T USE ANYTHING FROM THIS FILE IN FUTURE CHANGES. WE SHOULD BE\n * USING TAILWIND CLASSES DIRECTLY IN OUR COMPONENTS.\n */\n.cweb-section .cweb-button:last-of-type {\n margin-right: 24px;\n}\n.cweb-section .cweb-button:not(:last-of-type) {\n margin-right: 8px;\n}\n.cweb-section .cweb-button.add-button, .cweb-section .cweb-button.edit-button, .cweb-section .cweb-button.delete-button {\n margin-left: auto;\n width: 32px;\n height: 32px;\n}\n.cweb-section .cweb-button.add-button {\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2244%22 height%3D%2244%22 viewBox%3D%220 0 44 44%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Ccircle cx%3D%2222%22 cy%3D%2222%22 r%3D%2222%22 fill%3D%22white%22%2F%3E%3Crect x%3D%220.5%22 y%3D%220.5%22 width%3D%2243%22 height%3D%2243%22 rx%3D%2221.5%22 stroke%3D%22%23009FE3%22%2F%3E%3Cpath fill-rule%3D%22evenodd%22 clip-rule%3D%22evenodd%22 d%3D%22M22 32C23.1046 32 24 31.1046 24 30L24 24H30C31.1046 24 32 23.1046 32 22C32 20.8954 31.1046 20 30 20H24L24 14C24 12.8954 23.1046 12 22 12C20.8954 12 20 12.8954 20 14L20 20H14C12.8954 20 12 20.8954 12 22C12 23.1046 12.8954 24 14 24H20L20 30C20 31.1046 20.8954 32 22 32Z%22 fill%3D%22%23009FE3%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n.cweb-section .cweb-button.add-button:hover, .cweb-section .cweb-button.add-button:active, .cweb-section .cweb-button.add-button:focus {\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2244%22 height%3D%2244%22 viewBox%3D%220 0 44 44%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect x%3D%220.5%22 y%3D%220.5%22 width%3D%2243%22 height%3D%2243%22 rx%3D%2221.5%22 stroke%3D%22%230A78B2%22%2F%3E%3Cpath fill-rule%3D%22evenodd%22 clip-rule%3D%22evenodd%22 d%3D%22M21 12C19.8954 12 19 12.8954 19 14V19L14 19C12.8954 19 12 19.8954 12 21V23C12 24.1046 12.8954 25 14 25H19V30C19 31.1046 19.8954 32 21 32H23C24.1046 32 25 31.1046 25 30V25H30C31.1046 25 32 24.1046 32 23V21C32 19.8954 31.1046 19 30 19L25 19V14C25 12.8954 24.1046 12 23 12H21Z%22 fill%3D%22%23007BBB%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n.cweb-section .cweb-button.edit-button {\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2244%22 height%3D%2244%22 viewBox%3D%220 0 44 44%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect x%3D%220.5%22 y%3D%220.5%22 width%3D%2243%22 height%3D%2243%22 rx%3D%2221.5%22 stroke%3D%22%23009FE3%22%2F%3E%3Cpath d%3D%22M13.5643 27.1001C13.4169 26.9527 13.1433 27.0159 13.1012 27.2266L12.0065 31.6507C11.9644 31.8614 12.1328 32.051 12.3433 31.9878L16.7851 30.9134C16.9956 30.8712 17.0799 30.5973 16.9114 30.4499L13.5643 27.1001Z%22 fill%3D%22%23009FE3%22%2F%3E%3Cpath d%3D%22M26.2161 14.1222C26.1109 14.0169 25.9214 14.0169 25.8161 14.1222L14.4484 25.4987C14.3432 25.604 14.3432 25.7936 14.4484 25.8989L18.1114 29.5647C18.2166 29.67 18.4061 29.67 18.5113 29.5647L29.879 18.1882C29.9843 18.0829 29.9843 17.8933 29.879 17.788L26.2161 14.1222Z%22 fill%3D%22%23009FE3%22%2F%3E%3Cpath d%3D%22M31.1633 12.8374C30.0475 11.7209 28.2161 11.7209 27.1004 12.8374C27.0583 12.8796 27.0583 12.9217 27.1004 12.9638L31.037 16.9035C31.0791 16.9456 31.1212 16.9456 31.1633 16.9035C32.279 15.7869 32.279 13.954 31.1633 12.8374Z%22 fill%3D%22%23009FE3%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n.cweb-section .cweb-button.edit-button:hover, .cweb-section .cweb-button.edit-button:active, .cweb-section .cweb-button.edit-button:focus {\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2244%22 height%3D%2244%22 viewBox%3D%220 0 44 44%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect x%3D%220.5%22 y%3D%220.5%22 width%3D%2243%22 height%3D%2243%22 rx%3D%2221.5%22 stroke%3D%22%23007BBB%22%2F%3E%3Cpath d%3D%22M13.5643 27.1001C13.4169 26.9527 13.1433 27.0159 13.1012 27.2266L12.0065 31.6507C11.9644 31.8614 12.1328 32.051 12.3433 31.9878L16.7851 30.9134C16.9956 30.8712 17.0799 30.5973 16.9114 30.4499L13.5643 27.1001Z%22 fill%3D%22%230A78B2%22%2F%3E%3Cpath d%3D%22M26.2161 14.1222C26.1109 14.0169 25.9214 14.0169 25.8161 14.1222L14.4484 25.4987C14.3432 25.604 14.3432 25.7936 14.4484 25.8989L18.1114 29.5647C18.2166 29.67 18.4061 29.67 18.5113 29.5647L29.879 18.1882C29.9843 18.0829 29.9843 17.8933 29.879 17.788L26.2161 14.1222Z%22 fill%3D%22%230A78B2%22%2F%3E%3Cpath d%3D%22M31.1633 12.8374C30.0475 11.7209 28.2161 11.7209 27.1004 12.8374C27.0583 12.8796 27.0583 12.9217 27.1004 12.9638L31.037 16.9035C31.0791 16.9456 31.1212 16.9456 31.1633 16.9035C32.279 15.7869 32.279 13.954 31.1633 12.8374Z%22 fill%3D%22%230A78B2%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n.cweb-section .cweb-button.delete-button {\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2244%22 height%3D%2244%22 viewBox%3D%220 0 44 44%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect x%3D%220.5%22 y%3D%220.5%22 width%3D%2243%22 height%3D%2243%22 rx%3D%2221.5%22 stroke%3D%22%23FF6266%22%2F%3E%3Cpath fill-rule%3D%22evenodd%22 clip-rule%3D%22evenodd%22 d%3D%22M13 12C12.4477 12 12 12.4477 12 13C12 13.5523 12.4477 14 13 14H31C31.5523 14 32 13.5523 32 13C32 12.4477 31.5523 12 31 12H13ZM14 16H30V30C30 31.1046 29.1046 32 28 32H16C14.8954 32 14 31.1046 14 30V16ZM17 18H19V30H17V18ZM21 18H23V30H21V18ZM27 18H25V30H27V18Z%22 fill%3D%22%23FF6266%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n.cweb-section .cweb-button.delete-button:hover, .cweb-section .cweb-button.delete-button:active, .cweb-section .cweb-button.delete-button:focus {\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2244%22 height%3D%2244%22 viewBox%3D%220 0 44 44%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath fill-rule%3D%22evenodd%22 clip-rule%3D%22evenodd%22 d%3D%22M13 12C12.4477 12 12 12.4477 12 13C12 13.5523 12.4477 14 13 14H31C31.5523 14 32 13.5523 32 13C32 12.4477 31.5523 12 31 12H13ZM14 16H30V30C30 31.1046 29.1046 32 28 32H16C14.8954 32 14 31.1046 14 30V16ZM17 18H19V30H17V18ZM21 18H23V30H21V18ZM27 18H25V30H27V18Z%22 fill%3D%22%23FC494E%22%2F%3E%3Crect x%3D%220.5%22 y%3D%220.5%22 width%3D%2243%22 height%3D%2243%22 rx%3D%2221.5%22 stroke%3D%22%23FC494E%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n.cweb-section > .cweb-section-footer img {\n width: 32px;\n height: 32px;\n}";
4380
4382
  styleInject(css_248z$4);
4381
4383
 
4382
4384
  function Section$1(_a) {
@@ -4386,7 +4388,7 @@ function Section$1(_a) {
4386
4388
  Object.assign({}, restProps, { className: classNames__default.default("cweb-section", "ui-flex ui-flex-col ui-items-start ui-justify-start", "ui-rounded-lg", "ui-mx-0 ui-my-4", "ui-bg-white", "ui-w-full", className) }),
4387
4389
  (title || buttons) && React__namespace.default.createElement(
4388
4390
  "div",
4389
- { className: "cweb-section-header ui-gap-3", "data-test-id": "section-header" },
4391
+ { className: "cweb-section-header ui-flex ui-w-full ui-items-center ui-justify-between ui-gap-3 ui-p-4", "data-test-id": "section-header" },
4390
4392
  title && React__namespace.default.createElement(
4391
4393
  "div",
4392
4394
  { className: "ui-flex ui-flex-1 ui-flex-row ui-items-center ui-gap-3" },
@@ -4396,8 +4398,10 @@ function Section$1(_a) {
4396
4398
  buttons && buttons.length > 0 && React__namespace.default.createElement("div", { className: classNames__default.default("cweb-section-header-buttons-container", "ui-flex ui-flex-row ui-space-x-3") }, buttons.map((button) => React__namespace.default.createElement(Button, Object.assign({}, button, { key: button.key || button.id || button.text })))),
4397
4399
  headerAside && React__namespace.default.createElement("div", null, headerAside)
4398
4400
  ),
4399
- React__namespace.default.createElement("div", { className: "cweb-section-content ui-w-full" }, !isLoading && children),
4400
- footer && React__namespace.default.createElement("div", { className: "cweb-section-footer" }, footer)
4401
+ React__namespace.default.createElement("div", { className: classNames__default.default("cweb-section-content ui-w-full", {
4402
+ "ui-border-t-1 ui-border-t-slate-200": children
4403
+ }) }, !isLoading && children),
4404
+ footer && React__namespace.default.createElement("div", { className: "ui-flex ui-w-full ui-flex-row ui-items-center ui-justify-between ui-border-t-slate-200 ui-p-4" }, footer)
4401
4405
  );
4402
4406
  }
4403
4407
 
@@ -5610,6 +5614,100 @@ var FilterBar_utils = /*#__PURE__*/Object.freeze({
5610
5614
  getFilterGroups: getFilterGroups
5611
5615
  });
5612
5616
 
5617
+ const getLocalizedWeekdays = (args) => {
5618
+ const dates = [
5619
+ new Date(Date.UTC(2e3, 4, 1)),
5620
+ new Date(Date.UTC(2e3, 4, 2)),
5621
+ new Date(Date.UTC(2e3, 4, 3)),
5622
+ new Date(Date.UTC(2e3, 4, 4)),
5623
+ new Date(Date.UTC(2e3, 4, 5)),
5624
+ new Date(Date.UTC(2e3, 4, 6)),
5625
+ new Date(Date.UTC(2e3, 4, 7))
5626
+ // sunday
5627
+ ];
5628
+ const formatDayToEnglishName = (date) => new Intl.DateTimeFormat("en-US", { weekday: "long" }).format(date);
5629
+ const formatDateToLocalizedWeekdayLetter = (date) => new Intl.DateTimeFormat(args.locale, { weekday: "narrow" }).format(date);
5630
+ const formatDateToLocalizedFullWeekdayName = (date) => new Intl.DateTimeFormat(args.locale, { weekday: "long" }).format(date);
5631
+ return dates.map((date) => ({
5632
+ /**
5633
+ * The en-US name of the weekday. We'll use this as the value of the checkbox.
5634
+ */
5635
+ englishName: formatDayToEnglishName(date).toLowerCase(),
5636
+ /**
5637
+ * The localized name of the weekday. We'll use this for the screen reader.
5638
+ */
5639
+ localizedFullWeekdayName: formatDateToLocalizedFullWeekdayName(date),
5640
+ /**
5641
+ * The localized single letter indicator of the weekday. We'll use this for the visual indicator.
5642
+ */
5643
+ localizedWeekdayLetter: formatDateToLocalizedWeekdayLetter(date)
5644
+ }));
5645
+ };
5646
+ const oldApiDayToIndexMapping = {
5647
+ sunday: 0,
5648
+ monday: 1,
5649
+ tuesday: 2,
5650
+ wednesday: 3,
5651
+ thursday: 4,
5652
+ friday: 5,
5653
+ saturday: 6
5654
+ };
5655
+ const oldApiIndexToDayMapping = {
5656
+ 0: "sunday",
5657
+ 1: "monday",
5658
+ 2: "tuesday",
5659
+ 3: "wednesday",
5660
+ 4: "thursday",
5661
+ 5: "friday",
5662
+ 6: "saturday"
5663
+ };
5664
+ function weekdayNameToIndex(w) {
5665
+ if (Array.isArray(w)) {
5666
+ return w.map((weekday) => oldApiDayToIndexMapping[weekday]);
5667
+ } else {
5668
+ return oldApiDayToIndexMapping[w];
5669
+ }
5670
+ }
5671
+ function indexToWeekdayName(idx) {
5672
+ if (Array.isArray(idx)) {
5673
+ return idx.map((index) => oldApiIndexToDayMapping[index]);
5674
+ } else {
5675
+ return oldApiIndexToDayMapping[idx];
5676
+ }
5677
+ }
5678
+ const WeekdaysPicker = (props) => {
5679
+ const {
5680
+ locale,
5681
+ selectedOptions,
5682
+ onChange,
5683
+ className,
5684
+ id,
5685
+ /**
5686
+ * Filter out some attributes of `div` that are incompatible with
5687
+ * the type of `ToggleGroup.Root`.
5688
+ */
5689
+ children: _,
5690
+ defaultValue: __,
5691
+ dir: ___
5692
+ } = props, rest = __rest(props, ["locale", "selectedOptions", "onChange", "className", "id", "children", "defaultValue", "dir"]);
5693
+ const options = getLocalizedWeekdays({ locale });
5694
+ return React__namespace.default.createElement(ToggleGroup__namespace.Root, Object.assign({}, rest, { id, className: classNames__default.default("ui-flex ui-gap-2", className), type: "multiple", value: selectedOptions, onValueChange: onChange }), options.map(({ englishName, localizedFullWeekdayName, localizedWeekdayLetter }) => {
5695
+ return React__namespace.default.createElement(ToggleGroup__namespace.Item, { key: englishName, value: englishName, "aria-label": localizedFullWeekdayName, className: classNames__default.default(
5696
+ "ui-transition-[color,background_color,border-color,transform] ui-duration-150 ui-ease-out",
5697
+ "ui-flex ui-h-11 ui-w-11 ui-select-none ui-items-center ui-justify-center ui-rounded-full",
5698
+ /**
5699
+ * Only keyboard users will see this. Black is properly visible
5700
+ * on both selected/unselected states.
5701
+ **/
5702
+ "ui-outline-1 ui-outline-black",
5703
+ "ui-bg-slate-200 hover:ui-bg-slate-300 active:ui-scale-95",
5704
+ "data-[state=on]:ui-bg-blue-800 data-[state=on]:ui-text-white data-[state=on]:hover:ui-bg-blue-900"
5705
+ ) }, localizedWeekdayLetter);
5706
+ }));
5707
+ };
5708
+ WeekdaysPicker.weekdayNameToIndex = weekdayNameToIndex;
5709
+ WeekdaysPicker.indexToWeekdayName = indexToWeekdayName;
5710
+
5613
5711
  exports.AccordionList = AccordionList;
5614
5712
  exports.AddIcon = AddIcon;
5615
5713
  exports.AlertsIcon = AlertsIcon;
@@ -5738,6 +5836,7 @@ exports.UList = UnorderedList;
5738
5836
  exports.UnorderedList = UnorderedList;
5739
5837
  exports.ViewItem = ViewItem;
5740
5838
  exports.WarningIcon = WarningIcon;
5839
+ exports.WeekdaysPicker = WeekdaysPicker;
5741
5840
  exports.getDndListItemProps = getDndListItemProps;
5742
5841
  exports.toast = toast;
5743
5842
  //# sourceMappingURL=index.development.js.map