@cwellt_software/cwellt-reactjs-lib 1.5.4 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/content/icons/IconLibrary.stories.tsx +18 -0
- package/dist/index.cjs.js +117 -93
- package/dist/index.css +2 -2
- package/dist/index.d.ts +63 -42
- package/dist/index.es.js +117 -93
- package/dist/src/common/styles/tokens/ColorContrast.stories.d.ts +11 -0
- package/dist/src/common/styles/tokens/ColorContrast.stories.d.ts.map +1 -0
- package/dist/src/common/styles/tokens/ColorPalette.stories.d.ts +22 -0
- package/dist/src/common/styles/tokens/ColorPalette.stories.d.ts.map +1 -0
- package/dist/src/common/styles/tokens/DarkModePreview.stories.d.ts +12 -0
- package/dist/src/common/styles/tokens/DarkModePreview.stories.d.ts.map +1 -0
- package/dist/src/components/control/action/button/CwButtonSplit.stories.d.ts +24 -0
- package/dist/src/components/control/action/button/CwButtonSplit.stories.d.ts.map +1 -0
- package/dist/src/components/control/action/button/CwButtonSwitch.stories.d.ts +39 -0
- package/dist/src/components/control/action/button/CwButtonSwitch.stories.d.ts.map +1 -0
- package/dist/src/components/control/action/contextmenu/CwAnchoredMenu.d.ts +1 -1
- package/dist/src/components/control/action/contextmenu/CwAnchoredMenu.d.ts.map +1 -1
- package/dist/src/components/control/action/contextmenu/CwAnchoredMenu.stories.d.ts +29 -0
- package/dist/src/components/control/action/contextmenu/CwAnchoredMenu.stories.d.ts.map +1 -0
- package/dist/src/components/control/action/contextmenu/CwContextMenu.d.ts +2 -3
- package/dist/src/components/control/action/contextmenu/CwContextMenu.d.ts.map +1 -1
- package/dist/src/components/control/action/contextmenu/CwContextMenu.stories.d.ts +24 -0
- package/dist/src/components/control/action/contextmenu/CwContextMenu.stories.d.ts.map +1 -0
- package/dist/src/components/control/action/search/CwSearchAsync.stories.d.ts +103 -0
- package/dist/src/components/control/action/search/CwSearchAsync.stories.d.ts.map +1 -0
- package/dist/src/components/control/action/search/CwSearchInput.stories.d.ts +452 -0
- package/dist/src/components/control/action/search/CwSearchInput.stories.d.ts.map +1 -0
- package/dist/src/components/control/choice/checkbox/CwCheck.stories.d.ts +47 -0
- package/dist/src/components/control/choice/checkbox/CwCheck.stories.d.ts.map +1 -0
- package/dist/src/components/control/choice/checkbox/CwCheckboxGroup.stories.d.ts +102 -0
- package/dist/src/components/control/choice/checkbox/CwCheckboxGroup.stories.d.ts.map +1 -0
- package/dist/src/components/control/choice/checkbox/CwRadioGroup.stories.d.ts +96 -0
- package/dist/src/components/control/choice/checkbox/CwRadioGroup.stories.d.ts.map +1 -0
- package/dist/src/components/control/choice/dropdown/CwDropdownFilter.d.ts +4 -0
- package/dist/src/components/control/choice/dropdown/CwDropdownFilter.d.ts.map +1 -1
- package/dist/src/components/control/choice/dropdown/CwPopoverButton.stories.d.ts +29 -0
- package/dist/src/components/control/choice/dropdown/CwPopoverButton.stories.d.ts.map +1 -0
- package/dist/src/components/control/choice/multi-filter/CwMultiFilter.stories.d.ts +53 -0
- package/dist/src/components/control/choice/multi-filter/CwMultiFilter.stories.d.ts.map +1 -0
- package/dist/src/components/control/choice/nav-menu/CwNavMenu.stories.d.ts +325 -0
- package/dist/src/components/control/choice/nav-menu/CwNavMenu.stories.d.ts.map +1 -0
- package/dist/src/components/control/choice/select/CwDropdown.stories.d.ts +653 -0
- package/dist/src/components/control/choice/select/CwDropdown.stories.d.ts.map +1 -0
- package/dist/src/components/control/choice/select/CwSelect.stories.d.ts +657 -0
- package/dist/src/components/control/choice/select/CwSelect.stories.d.ts.map +1 -0
- package/dist/src/components/control/choice/tag-selector/CwTagSelector.stories.d.ts +132 -0
- package/dist/src/components/control/choice/tag-selector/CwTagSelector.stories.d.ts.map +1 -0
- package/dist/src/components/control/choice/toggle/CwToggle.stories.d.ts +47 -0
- package/dist/src/components/control/choice/toggle/CwToggle.stories.d.ts.map +1 -0
- package/dist/src/components/control/choice/tree-view/CwTreeView.stories.d.ts +41 -0
- package/dist/src/components/control/choice/tree-view/CwTreeView.stories.d.ts.map +1 -0
- package/dist/src/components/control/input/any/CwInput.d.ts +4 -0
- package/dist/src/components/control/input/any/CwInput.d.ts.map +1 -1
- package/dist/src/components/control/input/color/CwColorPicker.d.ts +2 -3
- package/dist/src/components/control/input/color/CwColorPicker.d.ts.map +1 -1
- package/dist/src/components/control/input/color/CwColorPicker.stories.d.ts +31 -0
- package/dist/src/components/control/input/color/CwColorPicker.stories.d.ts.map +1 -0
- package/dist/src/components/control/input/color/CwInputColor.d.ts +1 -2
- package/dist/src/components/control/input/color/CwInputColor.d.ts.map +1 -1
- package/dist/src/components/control/input/color/CwInputColor.stories.d.ts +91 -0
- package/dist/src/components/control/input/color/CwInputColor.stories.d.ts.map +1 -0
- package/dist/src/components/control/input/date-text/CwInputDateText.d.ts +4 -0
- package/dist/src/components/control/input/date-text/CwInputDateText.d.ts.map +1 -1
- package/dist/src/components/control/input/digit/CwDigit.stories.d.ts +845 -0
- package/dist/src/components/control/input/digit/CwDigit.stories.d.ts.map +1 -0
- package/dist/src/components/control/input/file/CwFileUploadMultiple.d.ts +1 -2
- package/dist/src/components/control/input/file/CwFileUploadMultiple.d.ts.map +1 -1
- package/dist/src/components/control/input/file/CwFileUploadMultiple.stories.d.ts +78 -0
- package/dist/src/components/control/input/file/CwFileUploadMultiple.stories.d.ts.map +1 -0
- package/dist/src/components/control/input/image/CwInputImage.stories.d.ts +38 -0
- package/dist/src/components/control/input/image/CwInputImage.stories.d.ts.map +1 -0
- package/dist/src/components/control/input/image-area/CwImageArea.stories.d.ts +50 -0
- package/dist/src/components/control/input/image-area/CwImageArea.stories.d.ts.map +1 -0
- package/dist/src/components/control/input/new-dates/CwDatePicker.d.ts +0 -1
- package/dist/src/components/control/input/new-dates/CwDatePicker.d.ts.map +1 -1
- package/dist/src/components/control/input/new-dates/CwDatePicker.stories.d.ts +140 -0
- package/dist/src/components/control/input/new-dates/CwDatePicker.stories.d.ts.map +1 -0
- package/dist/src/components/control/input/new-dates/CwDatePickerTemporal.d.ts +0 -1
- package/dist/src/components/control/input/new-dates/CwDatePickerTemporal.d.ts.map +1 -1
- package/dist/src/components/control/input/new-dates/CwDateRangePicker.stories.d.ts +160 -0
- package/dist/src/components/control/input/new-dates/CwDateRangePicker.stories.d.ts.map +1 -0
- package/dist/src/components/control/input/new-dates/CwDateRangePickerTemporal.d.ts +0 -1
- package/dist/src/components/control/input/new-dates/CwDateRangePickerTemporal.d.ts.map +1 -1
- package/dist/src/components/control/input/new-dates/CwDateTimePicker.stories.d.ts +150 -0
- package/dist/src/components/control/input/new-dates/CwDateTimePicker.stories.d.ts.map +1 -0
- package/dist/src/components/control/input/new-dates/CwDateTimePickerCompact.d.ts +0 -1
- package/dist/src/components/control/input/new-dates/CwDateTimePickerCompact.d.ts.map +1 -1
- package/dist/src/components/control/input/new-dates/CwTimePicker.stories.d.ts +111 -0
- package/dist/src/components/control/input/new-dates/CwTimePicker.stories.d.ts.map +1 -0
- package/dist/src/components/control/input/phone/CwInputPhone.stories.d.ts +839 -0
- package/dist/src/components/control/input/phone/CwInputPhone.stories.d.ts.map +1 -0
- package/dist/src/components/control/input/text/CwInputText.d.ts +3 -4
- package/dist/src/components/control/input/text/CwInputText.d.ts.map +1 -1
- package/dist/src/components/control/input/text-area/CwTextArea.d.ts +1 -1
- package/dist/src/components/control/input/text-area/CwTextArea.d.ts.map +1 -1
- package/dist/src/components/control/input/text-area/CwTextArea.stories.d.ts +668 -0
- package/dist/src/components/control/input/text-area/CwTextArea.stories.d.ts.map +1 -0
- package/dist/src/components/control/input/weekday/CwWeekdaySelector.d.ts +1 -2
- package/dist/src/components/control/input/weekday/CwWeekdaySelector.d.ts.map +1 -1
- package/dist/src/components/control/input/weekday/CwWeekdaySelector.stories.d.ts +108 -0
- package/dist/src/components/control/input/weekday/CwWeekdaySelector.stories.d.ts.map +1 -0
- package/dist/src/components/custom/scheduler-new/presentation/Scheduler.stories.d.ts +41 -0
- package/dist/src/components/custom/scheduler-new/presentation/Scheduler.stories.d.ts.map +1 -0
- package/dist/src/components/display/data/accordion/CwAccordionContainer.d.ts +2 -4
- package/dist/src/components/display/data/accordion/CwAccordionContainer.d.ts.map +1 -1
- package/dist/src/components/display/data/accordion/CwAccordionContainer.stories.d.ts +27 -0
- package/dist/src/components/display/data/accordion/CwAccordionContainer.stories.d.ts.map +1 -0
- package/dist/src/components/display/data/generic_tooltip/CwGenericTooltip.d.ts +4 -0
- package/dist/src/components/display/data/generic_tooltip/CwGenericTooltip.d.ts.map +1 -1
- package/dist/src/components/display/data/table/CwTable.stories.d.ts +59 -0
- package/dist/src/components/display/data/table/CwTable.stories.d.ts.map +1 -0
- package/dist/src/components/display/data/table-serverside/CwTableServerSide.stories.d.ts +53 -0
- package/dist/src/components/display/data/table-serverside/CwTableServerSide.stories.d.ts.map +1 -0
- package/dist/src/components/display/data/table_sortable/CwSortableTable.stories.d.ts +45 -0
- package/dist/src/components/display/data/table_sortable/CwSortableTable.stories.d.ts.map +1 -0
- package/dist/src/components/display/data/tooltip_manager/CwTooltip.d.ts +1 -2
- package/dist/src/components/display/data/tooltip_manager/CwTooltip.d.ts.map +1 -1
- package/dist/src/components/display/data/tooltip_manager/CwTooltipNew.stories.d.ts +52 -0
- package/dist/src/components/display/data/tooltip_manager/CwTooltipNew.stories.d.ts.map +1 -0
- package/dist/src/components/display/graphics/icon/CwIcon.stories.d.ts +37 -0
- package/dist/src/components/display/graphics/icon/CwIcon.stories.d.ts.map +1 -0
- package/dist/src/components/display/graphics/image-gallery/CwImageGallery.stories.d.ts +24 -0
- package/dist/src/components/display/graphics/image-gallery/CwImageGallery.stories.d.ts.map +1 -0
- package/dist/src/components/display/graphics/image-zoom/CwImageZoom.stories.d.ts +23 -0
- package/dist/src/components/display/graphics/image-zoom/CwImageZoom.stories.d.ts.map +1 -0
- package/dist/src/components/display/graphics/loading/CwLoading.d.ts +1 -1
- package/dist/src/components/display/graphics/loading/CwLoading.d.ts.map +1 -1
- package/dist/src/components/display/graphics/loading/CwLoading.stories.d.ts +44 -0
- package/dist/src/components/display/graphics/loading/CwLoading.stories.d.ts.map +1 -0
- package/dist/src/components/display/graphics/progress/CwProgress.stories.d.ts +61 -0
- package/dist/src/components/display/graphics/progress/CwProgress.stories.d.ts.map +1 -0
- package/dist/src/components/display/graphics/skeleton/CwSkeleton.stories.d.ts +52 -0
- package/dist/src/components/display/graphics/skeleton/CwSkeleton.stories.d.ts.map +1 -0
- package/dist/src/components/display/text/badge/CwBadge.stories.d.ts +36 -0
- package/dist/src/components/display/text/badge/CwBadge.stories.d.ts.map +1 -0
- package/dist/src/components/display/text/heading/CwHeading.stories.d.ts +23 -0
- package/dist/src/components/display/text/heading/CwHeading.stories.d.ts.map +1 -0
- package/dist/src/components/display/text/label/CwLabel.stories.d.ts +31 -0
- package/dist/src/components/display/text/label/CwLabel.stories.d.ts.map +1 -0
- package/dist/src/components/display/text/message/CwMessage.stories.d.ts +38 -0
- package/dist/src/components/display/text/message/CwMessage.stories.d.ts.map +1 -0
- package/dist/src/components/display/text/tag/CwChip.d.ts +9 -9
- package/dist/src/components/display/text/tag/CwChip.d.ts.map +1 -1
- package/dist/src/components/layout/align/CwAlign.stories.d.ts +439 -0
- package/dist/src/components/layout/align/CwAlign.stories.d.ts.map +1 -0
- package/dist/src/components/layout/card/CwCard.d.ts +17 -17
- package/dist/src/components/layout/card/CwCard.d.ts.map +1 -1
- package/dist/src/components/layout/card/CwCard.stories.d.ts +75 -0
- package/dist/src/components/layout/card/CwCard.stories.d.ts.map +1 -0
- package/dist/src/components/layout/card/CwCardList.stories.d.ts +52 -0
- package/dist/src/components/layout/card/CwCardList.stories.d.ts.map +1 -0
- package/dist/src/components/layout/confirmation-popup/CwConfirmationPopup.d.ts +5 -0
- package/dist/src/components/layout/confirmation-popup/CwConfirmationPopup.d.ts.map +1 -1
- package/dist/src/components/layout/confirmation-popup/CwConfirmationPopup.stories.d.ts +55 -0
- package/dist/src/components/layout/confirmation-popup/CwConfirmationPopup.stories.d.ts.map +1 -0
- package/dist/src/components/layout/dialog/CwDialog.d.ts +1 -1
- package/dist/src/components/layout/dialog/CwDialog.d.ts.map +1 -1
- package/dist/src/components/layout/dialog/CwDialog.stories.d.ts +62 -0
- package/dist/src/components/layout/dialog/CwDialog.stories.d.ts.map +1 -0
- package/dist/src/components/layout/list/details/CwExpandable.d.ts +2 -1
- package/dist/src/components/layout/list/details/CwExpandable.d.ts.map +1 -1
- package/dist/src/components/layout/list/details/CwExpandable.stories.d.ts +35 -0
- package/dist/src/components/layout/list/details/CwExpandable.stories.d.ts.map +1 -0
- package/dist/src/components/layout/list/key-value/CwKeyValueList.stories.d.ts +84 -0
- package/dist/src/components/layout/list/key-value/CwKeyValueList.stories.d.ts.map +1 -0
- package/dist/src/components/layout/list/sortable/CwSortableList.stories.d.ts +49 -0
- package/dist/src/components/layout/list/sortable/CwSortableList.stories.d.ts.map +1 -0
- package/dist/src/components/layout/master-detail/CwMasterDetail.stories.d.ts +71 -0
- package/dist/src/components/layout/master-detail/CwMasterDetail.stories.d.ts.map +1 -0
- package/dist/src/components/layout/modal/hover/CwModalHover.d.ts +2 -1
- package/dist/src/components/layout/modal/hover/CwModalHover.d.ts.map +1 -1
- package/dist/src/components/layout/modal/hover/CwModalHover.stories.d.ts +404 -0
- package/dist/src/components/layout/modal/hover/CwModalHover.stories.d.ts.map +1 -0
- package/dist/src/components/layout/table/grouped/CwTableGrouped.d.ts +1 -0
- package/dist/src/components/layout/table/grouped/CwTableGrouped.d.ts.map +1 -1
- package/dist/src/components/layout/table/grouped/CwTableGrouped.stories.d.ts +31 -0
- package/dist/src/components/layout/table/grouped/CwTableGrouped.stories.d.ts.map +1 -0
- package/dist/src/components/layout/tabs/CwTabs.stories.d.ts +36 -0
- package/dist/src/components/layout/tabs/CwTabs.stories.d.ts.map +1 -0
- package/dist/src/content/icons/IconLibrary.stories.d.ts +20 -0
- package/dist/src/content/icons/IconLibrary.stories.d.ts.map +1 -0
- package/dist/src/playground/pages/ShadowRecipesPage.d.ts +3 -0
- package/dist/src/playground/pages/ShadowRecipesPage.d.ts.map +1 -0
- package/dist/src/storybook/PaletteAndComponentMappingDecorator.d.ts +28 -0
- package/dist/src/storybook/PaletteAndComponentMappingDecorator.d.ts.map +1 -0
- package/dist/src/storybook/PaletteDecorator.d.ts +12 -0
- package/dist/src/storybook/PaletteDecorator.d.ts.map +1 -0
- package/dist/src/storybook/StoryValue.d.ts +11 -0
- package/dist/src/storybook/StoryValue.d.ts.map +1 -0
- package/dist/src/storybook/componentMappings.d.ts +29 -0
- package/dist/src/storybook/componentMappings.d.ts.map +1 -0
- package/dist/src/storybook/cssVarOverrideStore.d.ts +23 -0
- package/dist/src/storybook/cssVarOverrideStore.d.ts.map +1 -0
- package/dist/src/storybook/groupLayoutStoryArgs.d.ts +77 -0
- package/dist/src/storybook/groupLayoutStoryArgs.d.ts.map +1 -0
- package/dist/src/storybook/needsRefactor.d.ts +15 -0
- package/dist/src/storybook/needsRefactor.d.ts.map +1 -0
- package/dist/src/storybook/palettes.d.ts +35 -0
- package/dist/src/storybook/palettes.d.ts.map +1 -0
- package/dist/src/storybook/pickerStoryArgs.d.ts +63 -0
- package/dist/src/storybook/pickerStoryArgs.d.ts.map +1 -0
- package/dist/src/storybook/sampleImages.d.ts +11 -0
- package/dist/src/storybook/sampleImages.d.ts.map +1 -0
- package/dist/src/storybook/sampleRows.d.ts +12 -0
- package/dist/src/storybook/sampleRows.d.ts.map +1 -0
- package/dist/src/storybook/storySource.d.ts +1 -1
- package/dist/src/storybook/storySource.d.ts.map +1 -1
- package/dist/src/storybook/useCssVarOverride.d.ts +17 -0
- package/dist/src/storybook/useCssVarOverride.d.ts.map +1 -0
- package/dist/test/storybook/cssVarOverrideStore.test.d.ts +2 -0
- package/dist/test/storybook/cssVarOverrideStore.test.d.ts.map +1 -0
- package/dist/test/storybook/groupLayoutStoryArgs.test.d.ts +2 -0
- package/dist/test/storybook/groupLayoutStoryArgs.test.d.ts.map +1 -0
- package/package.json +11 -3
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { type ProjectRow } from "../../../storybook/sampleRows";
|
|
3
|
+
import { type CwCardListProps } from "./CwCardList";
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: (props: CwCardListProps<ProjectRow>) => React.JSX.Element;
|
|
7
|
+
args: {
|
|
8
|
+
items: ProjectRow[];
|
|
9
|
+
renderCard: (row: ProjectRow) => import("react").JSX.Element;
|
|
10
|
+
keyExtractor: (row: ProjectRow) => string;
|
|
11
|
+
pageSize: number;
|
|
12
|
+
layout: "grid";
|
|
13
|
+
defaultCardWidth: number;
|
|
14
|
+
cardGap: number;
|
|
15
|
+
isLoading: false;
|
|
16
|
+
skeletonCards: number;
|
|
17
|
+
sortOptions: {
|
|
18
|
+
key: string;
|
|
19
|
+
label: string;
|
|
20
|
+
sortFn: (a: ProjectRow, b: ProjectRow) => number;
|
|
21
|
+
}[];
|
|
22
|
+
defaultSortKey: string;
|
|
23
|
+
};
|
|
24
|
+
argTypes: {
|
|
25
|
+
items: {
|
|
26
|
+
control: false;
|
|
27
|
+
};
|
|
28
|
+
renderCard: {
|
|
29
|
+
control: false;
|
|
30
|
+
};
|
|
31
|
+
keyExtractor: {
|
|
32
|
+
control: false;
|
|
33
|
+
};
|
|
34
|
+
sortOptions: {
|
|
35
|
+
control: false;
|
|
36
|
+
};
|
|
37
|
+
emptyState: {
|
|
38
|
+
control: false;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
render: (args: CwCardListProps<ProjectRow>) => import("react").JSX.Element;
|
|
42
|
+
};
|
|
43
|
+
export default meta;
|
|
44
|
+
type Story = StoryObj<typeof meta>;
|
|
45
|
+
/** A responsive grid of CwCards with a sort selector and pagination. `defaultCardWidth` sets the column minimum. */
|
|
46
|
+
export declare const Default: Story;
|
|
47
|
+
/** `layout="list"` stacks the cards in one column. */
|
|
48
|
+
export declare const List: Story;
|
|
49
|
+
/** Ghost cards in the same grid, so nothing shifts when the items arrive. */
|
|
50
|
+
export declare const Loading: Story;
|
|
51
|
+
export declare const Empty: Story;
|
|
52
|
+
//# sourceMappingURL=CwCardList.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CwCardList.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/card/CwCardList.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAA8B,KAAK,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE5F,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAUhE,QAAA,MAAM,IAAI;;eAGgB,CAAC,KAAK,EAAE,eAAe,CAAC,UAAU,CAAC,KAAK,KAAK,CAAC,GAAG,CAAC,OAAO;;;0BATnD,UAAU;4BAapB,UAAU;;;;;;;;;;wBAQa,UAAU,KAAK,UAAU;;;;;;;;;;;;;;;;;;;;;;CAczB,CAAC;AAE9C,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,oHAAoH;AACpH,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,sDAAsD;AACtD,eAAO,MAAM,IAAI,EAAE,KAElB,CAAC;AAEF,6EAA6E;AAC7E,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAEnB,CAAC"}
|
|
@@ -13,6 +13,11 @@ export interface ConfirmationPopupProps {
|
|
|
13
13
|
placement?: 'top' | 'right' | 'bottom' | 'left';
|
|
14
14
|
children: ReactNode;
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Small anchored confirmation for a destructive action.
|
|
18
|
+
*
|
|
19
|
+
* Preferably avoid using it, it needs a refactor.
|
|
20
|
+
*/
|
|
16
21
|
export declare function CwConfirmationPopup(props: ConfirmationPopupProps): React.JSX.Element;
|
|
17
22
|
export default CwConfirmationPopup;
|
|
18
23
|
//# sourceMappingURL=CwConfirmationPopup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CwConfirmationPopup.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/confirmation-popup/CwConfirmationPopup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAc,SAAS,EAA+B,MAAM,OAAO,CAAC;AAGlF,MAAM,WAAW,QAAQ;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,sBAAsB;IACtC,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAChD,QAAQ,EAAE,SAAS,CAAC;CACpB;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,sBAAsB,qBA6HhE;AAED,eAAe,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"CwConfirmationPopup.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/confirmation-popup/CwConfirmationPopup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAc,SAAS,EAA+B,MAAM,OAAO,CAAC;AAGlF,MAAM,WAAW,QAAQ;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,sBAAsB;IACtC,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAChD,QAAQ,EAAE,SAAS,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,sBAAsB,qBA6HhE;AAED,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { CwConfirmationPopup, type ConfirmationPopupProps } from "./CwConfirmationPopup";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof CwConfirmationPopup;
|
|
6
|
+
args: {
|
|
7
|
+
message: string;
|
|
8
|
+
confirmText: string;
|
|
9
|
+
cancelText: string;
|
|
10
|
+
placement: "bottom";
|
|
11
|
+
isOpen: false;
|
|
12
|
+
onConfirm: import("storybook/test").Mock<(...args: any[]) => any>;
|
|
13
|
+
onCancel: import("storybook/test").Mock<(...args: any[]) => any>;
|
|
14
|
+
children: null;
|
|
15
|
+
};
|
|
16
|
+
argTypes: {
|
|
17
|
+
placement: {
|
|
18
|
+
control: "inline-radio";
|
|
19
|
+
options: string[];
|
|
20
|
+
};
|
|
21
|
+
isOpen: {
|
|
22
|
+
control: false;
|
|
23
|
+
};
|
|
24
|
+
children: {
|
|
25
|
+
control: false;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
parameters: {
|
|
29
|
+
docs: {
|
|
30
|
+
description: {
|
|
31
|
+
component: string;
|
|
32
|
+
};
|
|
33
|
+
story: {
|
|
34
|
+
inline: boolean;
|
|
35
|
+
height: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
decorators: (import("@storybook/react").Decorator | ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react").ReactRenderer, {
|
|
40
|
+
isOpen: boolean;
|
|
41
|
+
onConfirm: () => void;
|
|
42
|
+
onCancel: () => void;
|
|
43
|
+
message?: string | undefined;
|
|
44
|
+
confirmText?: string | undefined;
|
|
45
|
+
cancelText?: string | undefined;
|
|
46
|
+
placement?: "top" | "right" | "bottom" | "left" | undefined;
|
|
47
|
+
children: import("react").ReactNode;
|
|
48
|
+
}>) => import("react").JSX.Element))[];
|
|
49
|
+
render: (args: ConfirmationPopupProps) => import("react").JSX.Element;
|
|
50
|
+
};
|
|
51
|
+
export default meta;
|
|
52
|
+
type Story = StoryObj<typeof meta>;
|
|
53
|
+
/** Click the button: the popup anchors to it on the chosen `placement`; clicking outside cancels. */
|
|
54
|
+
export declare const Default: Story;
|
|
55
|
+
//# sourceMappingURL=CwConfirmationPopup.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CwConfirmationPopup.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/confirmation-popup/CwConfirmationPopup.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAM5D,OAAO,EAAE,mBAAmB,EAAE,KAAK,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAmBzF,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCkC,CAAC;AAE7C,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,qGAAqG;AACrG,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
|
|
@@ -23,7 +23,7 @@ export interface CwDialogProps extends HTMLProps<PropsWithChildren<HTMLDialogEle
|
|
|
23
23
|
onClose?: () => void;
|
|
24
24
|
/** If true, the footer will not be displayed */
|
|
25
25
|
hideFooter?: boolean;
|
|
26
|
-
|
|
26
|
+
/** Reposition the dialog when content size changes after opening. For modals with slow loading content. Default: false */
|
|
27
27
|
autoReposition?: boolean;
|
|
28
28
|
/** If true, the save button will be disabled */
|
|
29
29
|
disableSave?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CwDialog.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/dialog/CwDialog.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,YAAY,EAAsE,KAAK,SAAS,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AA4C5J,MAAM,WAAW,aAAc,SAAQ,SAAS,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IACrF,2DAA2D;IAC3D,YAAY,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;IACnC,2DAA2D;IAC3D,YAAY,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;IACnC,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qFAAqF;IACrF,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,kIAAkI;IAClI,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,uEAAuE;IACvE,UAAU,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACnE,uFAAuF;IACvF,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,sDAAsD;IACtD,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,uDAAuD;IACvD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,gDAAgD;IAChD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,
|
|
1
|
+
{"version":3,"file":"CwDialog.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/dialog/CwDialog.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,YAAY,EAAsE,KAAK,SAAS,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AA4C5J,MAAM,WAAW,aAAc,SAAQ,SAAS,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IACrF,2DAA2D;IAC3D,YAAY,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;IACnC,2DAA2D;IAC3D,YAAY,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;IACnC,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qFAAqF;IACrF,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,kIAAkI;IAClI,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,uEAAuE;IACvE,UAAU,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACnE,uFAAuF;IACvF,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,sDAAsD;IACtD,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,uDAAuD;IACvD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,gDAAgD;IAChD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,0HAA0H;IAC1H,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,gDAAgD;IAChD,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB;AAWD,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAuYtC,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { type CwDialogProps } from "./CwDialog";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: import("react").FC<CwDialogProps>;
|
|
6
|
+
args: {
|
|
7
|
+
headline: string;
|
|
8
|
+
width: string;
|
|
9
|
+
scrim: true;
|
|
10
|
+
hideFooter: false;
|
|
11
|
+
disableSave: false;
|
|
12
|
+
autoReposition: false;
|
|
13
|
+
onClose: import("storybook/test").Mock<(...args: any[]) => any>;
|
|
14
|
+
onSave: import("storybook/test").Mock<(...args: any[]) => any>;
|
|
15
|
+
children: import("react").JSX.Element;
|
|
16
|
+
};
|
|
17
|
+
argTypes: {
|
|
18
|
+
width: {
|
|
19
|
+
control: "text";
|
|
20
|
+
};
|
|
21
|
+
height: {
|
|
22
|
+
control: "text";
|
|
23
|
+
};
|
|
24
|
+
children: {
|
|
25
|
+
control: false;
|
|
26
|
+
};
|
|
27
|
+
customFooter: {
|
|
28
|
+
control: false;
|
|
29
|
+
};
|
|
30
|
+
customHeader: {
|
|
31
|
+
control: false;
|
|
32
|
+
};
|
|
33
|
+
dialogSize: {
|
|
34
|
+
control: false;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
parameters: {
|
|
38
|
+
docs: {
|
|
39
|
+
source: {
|
|
40
|
+
transform: (_code: string, storyContext: {
|
|
41
|
+
args: Record<string, unknown>;
|
|
42
|
+
}) => string;
|
|
43
|
+
};
|
|
44
|
+
story: {
|
|
45
|
+
inline: boolean;
|
|
46
|
+
height: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
render: (args: CwDialogProps) => import("react").JSX.Element;
|
|
51
|
+
};
|
|
52
|
+
export default meta;
|
|
53
|
+
type Story = StoryObj<typeof meta>;
|
|
54
|
+
/** Header with headline and close button, scrollable section, footer with the save button. Movable and resizable. */
|
|
55
|
+
export declare const Default: Story;
|
|
56
|
+
/** `customFooter` replaces the save icon with the caller's own buttons. */
|
|
57
|
+
export declare const CustomFooter: Story;
|
|
58
|
+
/** A fixed `height` adds the vertical resize handles and scrolls the section when the content overflows. */
|
|
59
|
+
export declare const FixedHeight: Story;
|
|
60
|
+
/** `scrim={false}` leaves the page behind fully visible and clickable. */
|
|
61
|
+
export declare const NoScrim: Story;
|
|
62
|
+
//# sourceMappingURL=CwDialog.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CwDialog.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/dialog/CwDialog.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAM5D,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAqB1D,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCuB,CAAC;AAElC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,qHAAqH;AACrH,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,2EAA2E;AAC3E,eAAO,MAAM,YAAY,EAAE,KAO1B,CAAC;AAEF,4GAA4G;AAC5G,eAAO,MAAM,WAAW,EAAE,KAEzB,CAAC;AAEF,0EAA0E;AAC1E,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC"}
|
|
@@ -10,7 +10,8 @@ export interface CwExpandableProps extends Omit<HTMLProps<PropsWithChildren<HTML
|
|
|
10
10
|
onClose?: (ev: MouseEvent) => void;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* An expandable element with briefing and children displayed when clicked
|
|
13
|
+
* An expandable element with briefing and children displayed when clicked.
|
|
14
|
+
* Preferably avoid using it, it needs a refactor.
|
|
14
15
|
* @param briefing Title of the expandable
|
|
15
16
|
* @param onToggle Function to run when expandable is toggled open/closed
|
|
16
17
|
* @param onClose Function to run when expandable is closed
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CwExpandable.d.ts","sourceRoot":"","sources":["../../../../../../src/components/layout/list/details/CwExpandable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,iBAAiB,EAAqB,MAAM,OAAO,CAAC;AAEnF,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,CAAC,EAAE,WAAW,CAAC;IAC7G,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,8CAA8C;IAC9C,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE,UAAU,KAAK,IAAI,CAAC;IAClC,gDAAgD;IAChD,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,UAAU,KAAK,IAAI,CAAC;CACnC;AAED
|
|
1
|
+
{"version":3,"file":"CwExpandable.d.ts","sourceRoot":"","sources":["../../../../../../src/components/layout/list/details/CwExpandable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,iBAAiB,EAAqB,MAAM,OAAO,CAAC;AAEnF,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,CAAC,EAAE,WAAW,CAAC;IAC7G,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,8CAA8C;IAC9C,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE,UAAU,KAAK,IAAI,CAAC;IAClC,gDAAgD;IAChD,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,UAAU,KAAK,IAAI,CAAC;CACnC;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CA2B9C,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,EAE/B,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { type CwExpandableProps } from "./CwExpandable";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: import("react").FC<CwExpandableProps>;
|
|
6
|
+
args: {
|
|
7
|
+
briefing: string;
|
|
8
|
+
open: false;
|
|
9
|
+
onToggle: import("storybook/test").Mock<(...args: any[]) => any>;
|
|
10
|
+
children: import("react").JSX.Element;
|
|
11
|
+
};
|
|
12
|
+
argTypes: {
|
|
13
|
+
briefing: {
|
|
14
|
+
control: "text";
|
|
15
|
+
};
|
|
16
|
+
children: {
|
|
17
|
+
control: false;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
parameters: {
|
|
21
|
+
docs: {
|
|
22
|
+
description: {
|
|
23
|
+
component: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
decorators: import("@storybook/react").Decorator[];
|
|
28
|
+
render: (args: CwExpandableProps) => import("react").JSX.Element;
|
|
29
|
+
};
|
|
30
|
+
export default meta;
|
|
31
|
+
type Story = StoryObj<typeof meta>;
|
|
32
|
+
/** A native `details` with the chevron on the summary; the section shows under it when open. */
|
|
33
|
+
export declare const Default: Story;
|
|
34
|
+
export declare const Open: Story;
|
|
35
|
+
//# sourceMappingURL=CwExpandable.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CwExpandable.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/components/layout/list/details/CwExpandable.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAG5D,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEtE,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;CAqByB,CAAC;AAEpC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,gGAAgG;AAChG,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,IAAI,EAAE,KAElB,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { type GroupStoryArgs } from "../../../../storybook/groupLayoutStoryArgs";
|
|
3
|
+
import { type CwKeyValueListProps } from "./CwKeyValueList";
|
|
4
|
+
type Args = CwKeyValueListProps & GroupStoryArgs;
|
|
5
|
+
declare const meta: {
|
|
6
|
+
title: string;
|
|
7
|
+
component: import("react").FC<CwKeyValueListProps>;
|
|
8
|
+
args: {
|
|
9
|
+
labelText: string;
|
|
10
|
+
items: {
|
|
11
|
+
key: string;
|
|
12
|
+
label: string;
|
|
13
|
+
value: any;
|
|
14
|
+
suffix?: string;
|
|
15
|
+
}[];
|
|
16
|
+
emptyValue: string;
|
|
17
|
+
loading: false;
|
|
18
|
+
skeletonRows: number;
|
|
19
|
+
groupDirection: "default" | ("row" | "column");
|
|
20
|
+
groupAlign: "default" | ("start" | "center" | "end" | "stretch");
|
|
21
|
+
groupGap: "default" | ("none" | "small" | "medium" | "large");
|
|
22
|
+
itemDirection: "default" | ("row" | "column");
|
|
23
|
+
itemGap: "default" | ("none" | "small" | "medium" | "large");
|
|
24
|
+
feedbackType: "none" | "danger" | "success" | "neutral" | "warning" | "info";
|
|
25
|
+
feedbackMessage: string;
|
|
26
|
+
};
|
|
27
|
+
argTypes: {
|
|
28
|
+
labelText: {
|
|
29
|
+
table: {
|
|
30
|
+
disable: boolean;
|
|
31
|
+
};
|
|
32
|
+
control: false;
|
|
33
|
+
};
|
|
34
|
+
feedbackType: {
|
|
35
|
+
table: {
|
|
36
|
+
disable: boolean;
|
|
37
|
+
};
|
|
38
|
+
control: false;
|
|
39
|
+
};
|
|
40
|
+
feedbackMessage: {
|
|
41
|
+
table: {
|
|
42
|
+
disable: boolean;
|
|
43
|
+
};
|
|
44
|
+
control: false;
|
|
45
|
+
};
|
|
46
|
+
groupLayout: {
|
|
47
|
+
control: false;
|
|
48
|
+
};
|
|
49
|
+
itemLayout: {
|
|
50
|
+
control: false;
|
|
51
|
+
};
|
|
52
|
+
items: {
|
|
53
|
+
control: false;
|
|
54
|
+
};
|
|
55
|
+
emptyValue: {
|
|
56
|
+
control: "text";
|
|
57
|
+
};
|
|
58
|
+
groupDirection: import("storybook/internal/csf").InputType;
|
|
59
|
+
groupAlign: import("storybook/internal/csf").InputType;
|
|
60
|
+
groupGap: import("storybook/internal/csf").InputType;
|
|
61
|
+
itemDirection: import("storybook/internal/csf").InputType;
|
|
62
|
+
itemGap: import("storybook/internal/csf").InputType;
|
|
63
|
+
};
|
|
64
|
+
render: (args: Args) => import("react").JSX.Element;
|
|
65
|
+
parameters: {
|
|
66
|
+
docs: {
|
|
67
|
+
source: {
|
|
68
|
+
transform: (_code: string, storyContext: {
|
|
69
|
+
args: Record<string, unknown>;
|
|
70
|
+
}) => string;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
export default meta;
|
|
76
|
+
type Story = StoryObj<typeof meta>;
|
|
77
|
+
/** Label and value per row; an empty value shows `emptyValue`, a `suffix` follows the value. The list stacks its rows under 300px. */
|
|
78
|
+
export declare const Default: Story;
|
|
79
|
+
/** `groupLayout.direction="row"` flows the pairs into an auto-fit grid. */
|
|
80
|
+
export declare const Grid: Story;
|
|
81
|
+
/** `itemLayout.direction="column"` puts each label above its value. */
|
|
82
|
+
export declare const StackedItems: Story;
|
|
83
|
+
export declare const Loading: Story;
|
|
84
|
+
//# sourceMappingURL=CwKeyValueList.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CwKeyValueList.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/components/layout/list/key-value/CwKeyValueList.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAA6E,KAAK,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAE5J,OAAO,EAAkB,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5E,KAAK,IAAI,GAAG,mBAAmB,GAAG,cAAc,CAAC;AAcjD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BY,CAAC;AAEvB,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,sIAAsI;AACtI,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,2EAA2E;AAC3E,eAAO,MAAM,IAAI,EAAE,KAElB,CAAC;AAEF,uEAAuE;AACvE,eAAO,MAAM,YAAY,EAAE,KAE1B,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { type ProjectRow } from "../../../../storybook/sampleRows";
|
|
3
|
+
import { type CwSortableListProps } from "./CwSortableList";
|
|
4
|
+
type SortableProject = ProjectRow & {
|
|
5
|
+
id: string;
|
|
6
|
+
};
|
|
7
|
+
declare const meta: {
|
|
8
|
+
title: string;
|
|
9
|
+
component: (props: CwSortableListProps<SortableProject>) => React.JSX.Element;
|
|
10
|
+
args: {
|
|
11
|
+
items: SortableProject[];
|
|
12
|
+
renderItem: (item: SortableProject) => {
|
|
13
|
+
title: string;
|
|
14
|
+
extraContent: import("react").JSX.Element;
|
|
15
|
+
actions: import("react").JSX.Element;
|
|
16
|
+
expandedContent: import("react").JSX.Element | undefined;
|
|
17
|
+
};
|
|
18
|
+
onReorder: import("storybook/test").Mock<(...args: any[]) => any>;
|
|
19
|
+
readOnly: false;
|
|
20
|
+
maxHeight: string;
|
|
21
|
+
emptyMessage: string;
|
|
22
|
+
};
|
|
23
|
+
argTypes: {
|
|
24
|
+
items: {
|
|
25
|
+
control: false;
|
|
26
|
+
};
|
|
27
|
+
renderItem: {
|
|
28
|
+
control: false;
|
|
29
|
+
};
|
|
30
|
+
movedItems: {
|
|
31
|
+
control: false;
|
|
32
|
+
};
|
|
33
|
+
emptyMessage: {
|
|
34
|
+
control: "text";
|
|
35
|
+
};
|
|
36
|
+
maxHeight: {
|
|
37
|
+
control: "text";
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
render: (args: CwSortableListProps<SortableProject>) => import("react").JSX.Element;
|
|
41
|
+
};
|
|
42
|
+
export default meta;
|
|
43
|
+
type Story = StoryObj<typeof meta>;
|
|
44
|
+
/** Drag a row by its handle. A moved row gets the primary accent; a row with `expandedContent` shows a chevron instead of the handle. */
|
|
45
|
+
export declare const Default: Story;
|
|
46
|
+
/** `readOnly` hides the handles and disables dragging; the rows keep their actions. */
|
|
47
|
+
export declare const ReadOnly: Story;
|
|
48
|
+
export declare const Empty: Story;
|
|
49
|
+
//# sourceMappingURL=CwSortableList.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CwSortableList.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/components/layout/list/sortable/CwSortableList.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAIjF,OAAO,EAAkB,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAG5E,KAAK,eAAe,GAAG,UAAU,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AAiCnD,QAAA,MAAM,IAAI;;eAGoB,CAAC,KAAK,EAAE,mBAAmB,CAAC,eAAe,CAAC,KAAK,KAAK,CAAC,GAAG,CAAC,OAAO;;;2BAhCnE,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiDU,CAAC;AAEvD,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,yIAAyI;AACzI,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,uFAAuF;AACvF,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAEnB,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { type CwMasterDetailItem, type CwMasterDetailProps } from "./CwMasterDetail";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: import("react").FC<CwMasterDetailProps>;
|
|
6
|
+
args: {
|
|
7
|
+
items: CwMasterDetailItem[];
|
|
8
|
+
selectedKey: string;
|
|
9
|
+
onSelect: import("storybook/test").Mock<(...args: any[]) => any>;
|
|
10
|
+
onSearch: import("storybook/test").Mock<(...args: any[]) => any>;
|
|
11
|
+
searchPlaceholder: string;
|
|
12
|
+
masterFooter: string;
|
|
13
|
+
masterWidth: number;
|
|
14
|
+
minMasterWidth: number;
|
|
15
|
+
maxMasterWidth: number;
|
|
16
|
+
resizable: true;
|
|
17
|
+
showSearch: true;
|
|
18
|
+
loading: false;
|
|
19
|
+
skeletonRows: number;
|
|
20
|
+
emptyDetail: string;
|
|
21
|
+
};
|
|
22
|
+
argTypes: {
|
|
23
|
+
items: {
|
|
24
|
+
control: false;
|
|
25
|
+
};
|
|
26
|
+
detailContent: {
|
|
27
|
+
control: false;
|
|
28
|
+
};
|
|
29
|
+
masterHeader: {
|
|
30
|
+
control: false;
|
|
31
|
+
};
|
|
32
|
+
masterFooter: {
|
|
33
|
+
control: "text";
|
|
34
|
+
};
|
|
35
|
+
emptyDetail: {
|
|
36
|
+
control: "text";
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react").ReactRenderer, {
|
|
40
|
+
id?: string | undefined;
|
|
41
|
+
className?: string | undefined;
|
|
42
|
+
style?: React.CSSProperties | undefined;
|
|
43
|
+
items: CwMasterDetailItem[];
|
|
44
|
+
selectedKey?: string | undefined;
|
|
45
|
+
onSelect?: ((key: string) => void) | undefined;
|
|
46
|
+
detailContent?: import("react").ReactNode;
|
|
47
|
+
emptyDetail?: import("react").ReactNode;
|
|
48
|
+
searchPlaceholder?: string | undefined;
|
|
49
|
+
onSearch?: ((value: string) => void) | undefined;
|
|
50
|
+
masterHeader?: import("react").ReactNode;
|
|
51
|
+
masterFooter?: import("react").ReactNode;
|
|
52
|
+
masterWidth?: number | undefined;
|
|
53
|
+
minMasterWidth?: number | undefined;
|
|
54
|
+
maxMasterWidth?: number | undefined;
|
|
55
|
+
resizable?: boolean | undefined;
|
|
56
|
+
showSearch?: boolean | undefined;
|
|
57
|
+
loading?: boolean | undefined;
|
|
58
|
+
skeletonRows?: number | undefined;
|
|
59
|
+
}>) => import("react").JSX.Element)[];
|
|
60
|
+
render: (args: CwMasterDetailProps) => import("react").JSX.Element;
|
|
61
|
+
};
|
|
62
|
+
export default meta;
|
|
63
|
+
type Story = StoryObj<typeof meta>;
|
|
64
|
+
/** Search, list and footer on the left, detail on the right; drag the divider to resize the master panel. A disabled item is dimmed. */
|
|
65
|
+
export declare const Default: Story;
|
|
66
|
+
/** No selection yet: the detail panel shows `emptyDetail`. */
|
|
67
|
+
export declare const NothingSelected: Story;
|
|
68
|
+
/** `showSearch={false}` and `resizable={false}` for a fixed list without filtering. */
|
|
69
|
+
export declare const Plain: Story;
|
|
70
|
+
export declare const Loading: Story;
|
|
71
|
+
//# sourceMappingURL=CwMasterDetail.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CwMasterDetail.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/master-detail/CwMasterDetail.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAM5D,OAAO,EAAkB,KAAK,kBAAkB,EAAE,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AA+CrG,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmC2B,CAAC;AAEtC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,wIAAwI;AACxI,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,8DAA8D;AAC9D,eAAO,MAAM,eAAe,EAAE,KAE7B,CAAC;AAEF,uFAAuF;AACvF,eAAO,MAAM,KAAK,EAAE,KAEnB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC"}
|
|
@@ -6,7 +6,8 @@ export interface CwModalHoverProps extends Omit<HTMLProps<HTMLDialogElement>, "c
|
|
|
6
6
|
hovereable: JSX.Element;
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
|
-
* A modal that appears when an element is hovered
|
|
9
|
+
* A modal that appears when an element is hovered.
|
|
10
|
+
* Preferably avoid using it, it needs a refactor.
|
|
10
11
|
* @param children Contents of the modal
|
|
11
12
|
* @param hovereable Element to hover to display the modal
|
|
12
13
|
* @param onFirstOpened Function to run only once when the modal opens for the first time
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CwModalHover.d.ts","sourceRoot":"","sources":["../../../../../../src/components/layout/modal/hover/CwModalHover.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,SAAS,EAAqB,MAAM,OAAO,CAAC;AAEzD,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,EAAE,WAAW,CAAC;IACzF,yEAAyE;IACzE,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,6CAA6C;IAC7C,UAAU,EAAE,GAAG,CAAC,OAAO,CAAC;CACxB;AAED
|
|
1
|
+
{"version":3,"file":"CwModalHover.d.ts","sourceRoot":"","sources":["../../../../../../src/components/layout/modal/hover/CwModalHover.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,SAAS,EAAqB,MAAM,OAAO,CAAC;AAEzD,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,EAAE,WAAW,CAAC;IACzF,yEAAyE;IACzE,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,6CAA6C;IAC7C,UAAU,EAAE,GAAG,CAAC,OAAO,CAAC;CACxB;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAsE9C,CAAC"}
|