@cratis/components 1.2.0 → 1.4.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/cjs/CommandForm/fields/CalendarField.js +13 -0
- package/dist/cjs/CommandForm/fields/CalendarField.js.map +1 -0
- package/dist/cjs/CommandForm/fields/ChipsField.js +18 -0
- package/dist/cjs/CommandForm/fields/ChipsField.js.map +1 -0
- package/dist/cjs/CommandForm/fields/ColorPickerField.js +13 -0
- package/dist/cjs/CommandForm/fields/ColorPickerField.js.map +1 -0
- package/dist/cjs/CommandForm/fields/MultiSelectField.js +18 -0
- package/dist/cjs/CommandForm/fields/MultiSelectField.js.map +1 -0
- package/dist/cjs/CommandForm/index.js +8 -0
- package/dist/cjs/CommandForm/index.js.map +1 -1
- package/dist/cjs/Toolbar/Toolbar.css +27 -0
- package/dist/cjs/Toolbar/ToolbarButton.js +10 -2
- package/dist/cjs/Toolbar/ToolbarButton.js.map +1 -1
- package/dist/cjs/Toolbar/ToolbarSeparator.js +8 -0
- package/dist/cjs/Toolbar/ToolbarSeparator.js.map +1 -0
- package/dist/cjs/Toolbar/index.js +2 -0
- package/dist/cjs/Toolbar/index.js.map +1 -1
- package/dist/cjs/tailwind-utilities.css +6 -0
- package/dist/esm/CommandForm/fields/CalendarField.d.ts +17 -0
- package/dist/esm/CommandForm/fields/CalendarField.d.ts.map +1 -0
- package/dist/esm/CommandForm/fields/CalendarField.js +11 -0
- package/dist/esm/CommandForm/fields/CalendarField.js.map +1 -0
- package/dist/esm/CommandForm/fields/ChipsField.d.ts +15 -0
- package/dist/esm/CommandForm/fields/ChipsField.d.ts.map +1 -0
- package/dist/esm/CommandForm/fields/ChipsField.js +16 -0
- package/dist/esm/CommandForm/fields/ChipsField.js.map +1 -0
- package/dist/esm/CommandForm/fields/ColorPickerField.d.ts +12 -0
- package/dist/esm/CommandForm/fields/ColorPickerField.d.ts.map +1 -0
- package/dist/esm/CommandForm/fields/ColorPickerField.js +11 -0
- package/dist/esm/CommandForm/fields/ColorPickerField.js.map +1 -0
- package/dist/esm/CommandForm/fields/Fields.stories.d.ts +4 -0
- package/dist/esm/CommandForm/fields/Fields.stories.d.ts.map +1 -1
- package/dist/esm/CommandForm/fields/Fields.stories.js +45 -3
- package/dist/esm/CommandForm/fields/Fields.stories.js.map +1 -1
- package/dist/esm/CommandForm/fields/MultiSelectField.d.ts +18 -0
- package/dist/esm/CommandForm/fields/MultiSelectField.d.ts.map +1 -0
- package/dist/esm/CommandForm/fields/MultiSelectField.js +16 -0
- package/dist/esm/CommandForm/fields/MultiSelectField.js.map +1 -0
- package/dist/esm/CommandForm/fields/index.d.ts +4 -0
- package/dist/esm/CommandForm/fields/index.d.ts.map +1 -1
- package/dist/esm/CommandForm/fields/index.js +4 -0
- package/dist/esm/CommandForm/fields/index.js.map +1 -1
- package/dist/esm/CommandForm/index.js +4 -0
- package/dist/esm/CommandForm/index.js.map +1 -1
- package/dist/esm/Toolbar/Toolbar.css +27 -0
- package/dist/esm/Toolbar/Toolbar.stories.d.ts +2 -0
- package/dist/esm/Toolbar/Toolbar.stories.d.ts.map +1 -1
- package/dist/esm/Toolbar/Toolbar.stories.js +16 -0
- package/dist/esm/Toolbar/Toolbar.stories.js.map +1 -1
- package/dist/esm/Toolbar/ToolbarButton.d.ts +3 -2
- package/dist/esm/Toolbar/ToolbarButton.d.ts.map +1 -1
- package/dist/esm/Toolbar/ToolbarButton.js +10 -2
- package/dist/esm/Toolbar/ToolbarButton.js.map +1 -1
- package/dist/esm/Toolbar/ToolbarSeparator.d.ts +5 -0
- package/dist/esm/Toolbar/ToolbarSeparator.d.ts.map +1 -0
- package/dist/esm/Toolbar/ToolbarSeparator.js +6 -0
- package/dist/esm/Toolbar/ToolbarSeparator.js.map +1 -0
- package/dist/esm/Toolbar/index.d.ts +2 -0
- package/dist/esm/Toolbar/index.d.ts.map +1 -1
- package/dist/esm/Toolbar/index.js +1 -0
- package/dist/esm/Toolbar/index.js.map +1 -1
- package/dist/esm/tailwind-utilities.css +6 -0
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { asCommandFormField } from '@cratis/arc.react/commands';
|
|
3
|
+
import { MultiSelect } from 'primereact/multiselect';
|
|
4
|
+
|
|
5
|
+
const MultiSelectField = asCommandFormField((props) => (jsx(MultiSelect, { value: props.value, onChange: (e) => props.onChange(e.value ?? []), onBlur: props.onBlur, options: props.options, optionValue: props.optionValue, optionLabel: props.optionLabel, placeholder: props.placeholder, display: props.display, maxSelectedLabels: props.maxSelectedLabels, filter: props.filter, showClear: props.showClear, invalid: props.invalid, className: "w-full" })), {
|
|
6
|
+
defaultValue: [],
|
|
7
|
+
extractValue: (e) => {
|
|
8
|
+
if (!Array.isArray(e)) {
|
|
9
|
+
return [];
|
|
10
|
+
}
|
|
11
|
+
return e.filter((item) => typeof item === 'string' || typeof item === 'number');
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export { MultiSelectField };
|
|
16
|
+
//# sourceMappingURL=MultiSelectField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MultiSelectField.js","sources":["../../../../CommandForm/fields/MultiSelectField.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { asCommandFormField, WrappedFieldProps } from '@cratis/arc.react/commands';\nimport { MultiSelect } from 'primereact/multiselect';\nimport React from 'react';\n\ninterface MultiSelectFieldComponentProps extends WrappedFieldProps<Array<string | number>> {\n options: Array<Record<string, unknown>>;\n optionValue?: string;\n optionLabel?: string;\n placeholder?: string;\n display?: 'comma' | 'chip';\n maxSelectedLabels?: number;\n filter?: boolean;\n showClear?: boolean;\n}\n\nexport const MultiSelectField = asCommandFormField<MultiSelectFieldComponentProps>(\n (props) => (\n <MultiSelect\n value={props.value}\n onChange={(e: { value: Array<string | number> | undefined }) => props.onChange(e.value ?? [])}\n onBlur={props.onBlur}\n options={props.options}\n optionValue={props.optionValue}\n optionLabel={props.optionLabel}\n placeholder={props.placeholder}\n display={props.display}\n maxSelectedLabels={props.maxSelectedLabels}\n filter={props.filter}\n showClear={props.showClear}\n invalid={props.invalid}\n className=\"w-full\"\n />\n ),\n {\n defaultValue: [],\n extractValue: (e: unknown) => {\n if (!Array.isArray(e)) {\n return [];\n }\n\n return e.filter((item): item is string | number => typeof item === 'string' || typeof item === 'number');\n }\n }\n);\n"],"names":["_jsx"],"mappings":";;;;MAkBa,gBAAgB,GAAG,kBAAkB,CAC9C,CAAC,KAAK,MACFA,GAAA,CAAC,WAAW,EAAA,EACR,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,QAAQ,EAAE,CAAC,CAAgD,KAAK,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,EAC7F,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,iBAAiB,EAAE,KAAK,CAAC,iBAAiB,EAC1C,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,SAAS,EAAC,QAAQ,EAAA,CACpB,CACL,EACD;AACI,IAAA,YAAY,EAAE,EAAE;AAChB,IAAA,YAAY,EAAE,CAAC,CAAU,KAAI;QACzB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;AACnB,YAAA,OAAO,EAAE;QACb;AAEA,QAAA,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,KAA8B,OAAO,IAAI,KAAK,QAAQ,IAAI,OAAO,IAAI,KAAK,QAAQ,CAAC;IAC5G;AACH,CAAA;;;;"}
|
|
@@ -4,4 +4,8 @@ export * from './CheckboxField';
|
|
|
4
4
|
export * from './TextAreaField';
|
|
5
5
|
export * from './DropdownField';
|
|
6
6
|
export * from './SliderField';
|
|
7
|
+
export * from './CalendarField';
|
|
8
|
+
export * from './ColorPickerField';
|
|
9
|
+
export * from './MultiSelectField';
|
|
10
|
+
export * from './ChipsField';
|
|
7
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../CommandForm/fields/index.ts"],"names":[],"mappings":"AAGA,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../CommandForm/fields/index.ts"],"names":[],"mappings":"AAGA,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC"}
|
|
@@ -4,4 +4,8 @@ export * from './CheckboxField';
|
|
|
4
4
|
export * from './TextAreaField';
|
|
5
5
|
export * from './DropdownField';
|
|
6
6
|
export * from './SliderField';
|
|
7
|
+
export * from './CalendarField';
|
|
8
|
+
export * from './ColorPickerField';
|
|
9
|
+
export * from './MultiSelectField';
|
|
10
|
+
export * from './ChipsField';
|
|
7
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../CommandForm/fields/index.ts"],"names":[],"mappings":"AAGA,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../CommandForm/fields/index.ts"],"names":[],"mappings":"AAGA,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC"}
|
|
@@ -5,4 +5,8 @@ export { CheckboxField } from './fields/CheckboxField.js';
|
|
|
5
5
|
export { TextAreaField } from './fields/TextAreaField.js';
|
|
6
6
|
export { DropdownField } from './fields/DropdownField.js';
|
|
7
7
|
export { SliderField } from './fields/SliderField.js';
|
|
8
|
+
export { CalendarField } from './fields/CalendarField.js';
|
|
9
|
+
export { ColorPickerField } from './fields/ColorPickerField.js';
|
|
10
|
+
export { MultiSelectField } from './fields/MultiSelectField.js';
|
|
11
|
+
export { ChipsField } from './fields/ChipsField.js';
|
|
8
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
|
|
@@ -31,6 +31,13 @@
|
|
|
31
31
|
color: var(--primary-color-text);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
.toolbar-button__text {
|
|
35
|
+
font-size: 0.875rem;
|
|
36
|
+
font-weight: 600;
|
|
37
|
+
line-height: 1;
|
|
38
|
+
white-space: nowrap;
|
|
39
|
+
}
|
|
40
|
+
|
|
34
41
|
/* ── Toolbar project name label ──────────────────────────────────────────── */
|
|
35
42
|
.toolbar-project-name {
|
|
36
43
|
padding: 0 8px;
|
|
@@ -77,6 +84,26 @@
|
|
|
77
84
|
pointer-events: none;
|
|
78
85
|
}
|
|
79
86
|
|
|
87
|
+
/* ── Toolbar separator ───────────────────────────────────────────────────── */
|
|
88
|
+
|
|
89
|
+
.toolbar-separator {
|
|
90
|
+
background: var(--surface-border);
|
|
91
|
+
flex-shrink: 0;
|
|
92
|
+
align-self: stretch;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* Separator inside a vertical toolbar — renders as a horizontal rule */
|
|
96
|
+
.toolbar-separator--in-vertical {
|
|
97
|
+
height: 1px;
|
|
98
|
+
margin: 0.125rem 0.25rem;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* Separator inside a horizontal toolbar — renders as a vertical rule */
|
|
102
|
+
.toolbar-separator--in-horizontal {
|
|
103
|
+
width: 1px;
|
|
104
|
+
margin: 0.25rem 0.125rem;
|
|
105
|
+
}
|
|
106
|
+
|
|
80
107
|
/* ── Toolbar fan-out item ────────────────────────────────────────────────── */
|
|
81
108
|
|
|
82
109
|
/*
|
|
@@ -7,5 +7,7 @@ export declare const Default: Story;
|
|
|
7
7
|
export declare const MultipleGroups: Story;
|
|
8
8
|
export declare const WithActiveButton: Story;
|
|
9
9
|
export declare const WithContexts: Story;
|
|
10
|
+
export declare const WithSeparators: Story;
|
|
11
|
+
export declare const ZoomBar: Story;
|
|
10
12
|
export declare const WithFanOut: Story;
|
|
11
13
|
//# sourceMappingURL=Toolbar.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toolbar.stories.d.ts","sourceRoot":"","sources":["../../../Toolbar/Toolbar.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"Toolbar.stories.d.ts","sourceRoot":"","sources":["../../../Toolbar/Toolbar.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOpC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,OAAO,CAM9B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,OAAO,CAAC,CAAC;AAGtC,eAAO,MAAM,OAAO,EAAE,KAUrB,CAAC;AAGF,eAAO,MAAM,cAAc,EAAE,KAgB5B,CAAC;AAGF,eAAO,MAAM,gBAAgB,EAAE,KAqC9B,CAAC;AASF,eAAO,MAAM,YAAY,EAAE,KAoD1B,CAAC;AASF,eAAO,MAAM,cAAc,EAAE,KAW5B,CAAC;AAMF,eAAO,MAAM,OAAO,EAAE,KAwBrB,CAAC;AAQF,eAAO,MAAM,UAAU,EAAE,KA+CxB,CAAC"}
|
|
@@ -5,6 +5,7 @@ import { ToolbarButton } from './ToolbarButton';
|
|
|
5
5
|
import { ToolbarContext } from './ToolbarContext';
|
|
6
6
|
import { ToolbarFanOutItem } from './ToolbarFanOutItem';
|
|
7
7
|
import { ToolbarSection } from './ToolbarSection';
|
|
8
|
+
import { ToolbarSeparator } from './ToolbarSeparator';
|
|
8
9
|
const meta = {
|
|
9
10
|
title: 'Components/Toolbar',
|
|
10
11
|
component: Toolbar,
|
|
@@ -41,6 +42,21 @@ export const WithContexts = {
|
|
|
41
42
|
return _jsx(WithContextsDemo, {});
|
|
42
43
|
},
|
|
43
44
|
};
|
|
45
|
+
export const WithSeparators = {
|
|
46
|
+
render: () => (_jsxs(Toolbar, { orientation: 'horizontal', children: [_jsx(ToolbarButton, { icon: 'pi pi-th-large', tooltip: 'Overview', tooltipPosition: 'bottom' }), _jsx(ToolbarSeparator, { orientation: 'horizontal' }), _jsx(ToolbarButton, { icon: 'pi pi-minus', tooltip: 'Zoom out', tooltipPosition: 'bottom' }), _jsx(ToolbarButton, { icon: 'pi pi-plus', tooltip: 'Zoom in', tooltipPosition: 'bottom' }), _jsx(ToolbarSeparator, { orientation: 'horizontal' }), _jsx(ToolbarButton, { icon: 'pi pi-question-circle', tooltip: 'Help', tooltipPosition: 'bottom' })] })),
|
|
47
|
+
};
|
|
48
|
+
export const ZoomBar = {
|
|
49
|
+
render: () => {
|
|
50
|
+
const ZoomBarDemo = () => {
|
|
51
|
+
const [zoom, setZoom] = useState(120);
|
|
52
|
+
const zoomOut = () => setZoom(current => Math.max(50, current - 10));
|
|
53
|
+
const zoomIn = () => setZoom(current => Math.min(300, current + 10));
|
|
54
|
+
const resetZoom = () => setZoom(100);
|
|
55
|
+
return (_jsxs(Toolbar, { orientation: 'horizontal', children: [_jsx(ToolbarButton, { icon: 'pi pi-th-large', tooltip: 'Overview', tooltipPosition: 'bottom' }), _jsx(ToolbarSeparator, { orientation: 'horizontal' }), _jsx(ToolbarButton, { icon: 'pi pi-minus', tooltip: 'Zoom out', tooltipPosition: 'bottom', onClick: zoomOut }), _jsx(ToolbarButton, { text: `${zoom}%`, tooltip: 'Reset zoom', tooltipPosition: 'bottom', onClick: resetZoom }), _jsx(ToolbarButton, { icon: 'pi pi-plus', tooltip: 'Zoom in', tooltipPosition: 'bottom', onClick: zoomIn }), _jsx(ToolbarSeparator, { orientation: 'horizontal' }), _jsx(ToolbarButton, { icon: 'pi pi-question-circle', tooltip: 'Help', tooltipPosition: 'bottom' })] }));
|
|
56
|
+
};
|
|
57
|
+
return _jsx(ZoomBarDemo, {});
|
|
58
|
+
},
|
|
59
|
+
};
|
|
44
60
|
export const WithFanOut = {
|
|
45
61
|
render: () => {
|
|
46
62
|
const WithFanOutDemo = () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toolbar.stories.js","sourceRoot":"","sources":["../../../Toolbar/Toolbar.stories.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"Toolbar.stories.js","sourceRoot":"","sources":["../../../Toolbar/Toolbar.stories.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,MAAM,IAAI,GAAyB;IAC/B,KAAK,EAAE,oBAAoB;IAC3B,SAAS,EAAE,OAAO;IAClB,UAAU,EAAE;QACR,MAAM,EAAE,UAAU;KACrB;CACJ,CAAC;AAEF,eAAe,IAAI,CAAC;AAKpB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC1B,MAAM,EAAE,GAAG,EAAE,CAAC,CACV,MAAC,OAAO,eACJ,KAAC,aAAa,IAAC,IAAI,EAAC,qBAAqB,EAAC,OAAO,EAAC,QAAQ,GAAG,EA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|
2
2
|
export interface ToolbarButtonProps {
|
|
3
|
-
icon
|
|
3
|
+
icon?: string;
|
|
4
|
+
text?: string;
|
|
4
5
|
tooltip: string;
|
|
5
6
|
active?: boolean;
|
|
6
7
|
onClick?: () => void;
|
|
7
8
|
tooltipPosition?: TooltipPosition;
|
|
8
9
|
}
|
|
9
|
-
export declare const ToolbarButton: ({ icon, tooltip, active, onClick, tooltipPosition }: ToolbarButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const ToolbarButton: ({ icon, text, tooltip, active, onClick, tooltipPosition }: ToolbarButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
//# sourceMappingURL=ToolbarButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolbarButton.d.ts","sourceRoot":"","sources":["../../../Toolbar/ToolbarButton.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGzD,MAAM,WAAW,kBAAkB;IAE/B,IAAI,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"ToolbarButton.d.ts","sourceRoot":"","sources":["../../../Toolbar/ToolbarButton.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGzD,MAAM,WAAW,kBAAkB;IAE/B,IAAI,CAAC,EAAE,MAAM,CAAC;IAGd,IAAI,CAAC,EAAE,MAAM,CAAC;IAGd,OAAO,EAAE,MAAM,CAAC;IAGhB,MAAM,CAAC,EAAE,OAAO,CAAC;IAGjB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAGrB,eAAe,CAAC,EAAE,eAAe,CAAC;CACrC;AAMD,eAAO,MAAM,aAAa,GAAI,2DAA6E,kBAAkB,4CAuB5H,CAAC"}
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { Tooltip } from '../Common/Tooltip.js';
|
|
3
3
|
|
|
4
|
-
const ToolbarButton = ({ icon, tooltip, active = false, onClick, tooltipPosition = 'right' }) => {
|
|
4
|
+
const ToolbarButton = ({ icon, text, tooltip, active = false, onClick, tooltipPosition = 'right' }) => {
|
|
5
5
|
const activeClass = active ? 'toolbar-button--active' : '';
|
|
6
|
-
|
|
6
|
+
const hasText = typeof text === 'string' && text.length > 0;
|
|
7
|
+
const hasIcon = typeof icon === 'string' && icon.length > 0;
|
|
8
|
+
const buttonContent = hasText
|
|
9
|
+
? jsx("span", { className: 'toolbar-button__text', children: text })
|
|
10
|
+
: hasIcon
|
|
11
|
+
? jsx("i", { className: `${icon} text-lg` })
|
|
12
|
+
: null;
|
|
13
|
+
const buttonSizeClass = hasText ? 'h-10 px-3 min-w-[4rem]' : 'w-10 h-10';
|
|
14
|
+
return (jsx(Tooltip, { content: tooltip, position: tooltipPosition, children: jsx("button", { type: 'button', "aria-label": tooltip, onClick: onClick, className: `toolbar-button ${buttonSizeClass} flex items-center justify-center rounded-lg cursor-pointer ${activeClass}`, children: buttonContent }) }));
|
|
7
15
|
};
|
|
8
16
|
|
|
9
17
|
export { ToolbarButton };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolbarButton.js","sources":["../../../Toolbar/ToolbarButton.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Tooltip } from '../Common/Tooltip';\nimport type { TooltipPosition } from '../Common/Tooltip';\n\n/** Props for the {@link ToolbarButton} component. */\nexport interface ToolbarButtonProps {\n /** The PrimeIcons CSS class to use as the icon (e.g. 'pi pi-home'). */\n icon
|
|
1
|
+
{"version":3,"file":"ToolbarButton.js","sources":["../../../Toolbar/ToolbarButton.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Tooltip } from '../Common/Tooltip';\nimport type { TooltipPosition } from '../Common/Tooltip';\n\n/** Props for the {@link ToolbarButton} component. */\nexport interface ToolbarButtonProps {\n /** The PrimeIcons CSS class to use as the icon (e.g. 'pi pi-home'). */\n icon?: string;\n\n /** Optional text to render inside the button (e.g. '120%'). */\n text?: string;\n\n /** Tooltip text shown when the user hovers over the button. */\n tooltip: string;\n\n /** Whether the button is currently in the active/selected state. */\n active?: boolean;\n\n /** Callback invoked when the button is clicked. */\n onClick?: () => void;\n\n /** Position of the tooltip relative to the button (default: 'right'). */\n tooltipPosition?: TooltipPosition;\n}\n\n/**\n * An icon button with a tooltip, intended to be placed inside a {@link Toolbar}.\n * Uses the shared {@link Tooltip} component for consistent hover labels.\n */\nexport const ToolbarButton = ({ icon, text, tooltip, active = false, onClick, tooltipPosition = 'right' }: ToolbarButtonProps) => {\n const activeClass = active ? 'toolbar-button--active' : '';\n const hasText = typeof text === 'string' && text.length > 0;\n const hasIcon = typeof icon === 'string' && icon.length > 0;\n const buttonContent = hasText\n ? <span className='toolbar-button__text'>{text}</span>\n : hasIcon\n ? <i className={`${icon} text-lg`} />\n : null;\n const buttonSizeClass = hasText ? 'h-10 px-3 min-w-[4rem]' : 'w-10 h-10';\n\n return (\n <Tooltip content={tooltip} position={tooltipPosition}>\n <button\n type='button'\n aria-label={tooltip}\n onClick={onClick}\n className={`toolbar-button ${buttonSizeClass} flex items-center justify-center rounded-lg cursor-pointer ${activeClass}`}\n >\n {buttonContent}\n </button>\n </Tooltip>\n );\n};\n"],"names":["_jsx"],"mappings":";;;MA+Ba,aAAa,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,KAAK,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,EAAsB,KAAI;IAC7H,MAAM,WAAW,GAAG,MAAM,GAAG,wBAAwB,GAAG,EAAE;AAC1D,IAAA,MAAM,OAAO,GAAG,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC;AAC3D,IAAA,MAAM,OAAO,GAAG,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC;IAC3D,MAAM,aAAa,GAAG;AAClB,UAAEA,GAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAC,sBAAsB,EAAA,QAAA,EAAE,IAAI,EAAA;AAC9C,UAAE;AACE,cAAEA,GAAA,CAAA,GAAA,EAAA,EAAG,SAAS,EAAE,CAAA,EAAG,IAAI,UAAU,EAAA;cAC/B,IAAI;IACd,MAAM,eAAe,GAAG,OAAO,GAAG,wBAAwB,GAAG,WAAW;AAExE,IAAA,QACIA,GAAA,CAAC,OAAO,EAAA,EAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAA,QAAA,EAChDA,GAAA,CAAA,QAAA,EAAA,EACI,IAAI,EAAC,QAAQ,EAAA,YAAA,EACD,OAAO,EACnB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,CAAA,eAAA,EAAkB,eAAe,CAAA,4DAAA,EAA+D,WAAW,EAAE,EAAA,QAAA,EAEvH,aAAa,EAAA,CACT,EAAA,CACH;AAElB;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToolbarSeparator.d.ts","sourceRoot":"","sources":["../../../Toolbar/ToolbarSeparator.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,qBAAqB;IAElC,WAAW,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;CAC3C;AAQD,eAAO,MAAM,gBAAgB,GAAI,iBAA8B,qBAAqB,4CAMnF,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
const ToolbarSeparator = ({ orientation = 'vertical' }) => (jsx("div", { role: 'separator', "aria-orientation": orientation === 'horizontal' ? 'vertical' : 'horizontal', className: orientation === 'horizontal' ? 'toolbar-separator toolbar-separator--in-horizontal' : 'toolbar-separator toolbar-separator--in-vertical' }));
|
|
4
|
+
|
|
5
|
+
export { ToolbarSeparator };
|
|
6
|
+
//# sourceMappingURL=ToolbarSeparator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToolbarSeparator.js","sources":["../../../Toolbar/ToolbarSeparator.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/** Props for the {@link ToolbarSeparator} component. */\nexport interface ToolbarSeparatorProps {\n /** Layout direction matching the parent {@link Toolbar} (default: 'vertical'). */\n orientation?: 'vertical' | 'horizontal';\n}\n\n/**\n * A visual divider for use inside a {@link Toolbar}.\n *\n * In a vertical toolbar (default) the separator renders as a horizontal rule.\n * In a horizontal toolbar it renders as a vertical rule.\n */\nexport const ToolbarSeparator = ({ orientation = 'vertical' }: ToolbarSeparatorProps) => (\n <div\n role='separator'\n aria-orientation={orientation === 'horizontal' ? 'vertical' : 'horizontal'}\n className={orientation === 'horizontal' ? 'toolbar-separator toolbar-separator--in-horizontal' : 'toolbar-separator toolbar-separator--in-vertical'}\n />\n);\n"],"names":["_jsx"],"mappings":";;MAea,gBAAgB,GAAG,CAAC,EAAE,WAAW,GAAG,UAAU,EAAyB,MAChFA,GAAA,CAAA,KAAA,EAAA,EACI,IAAI,EAAC,WAAW,EAAA,kBAAA,EACE,WAAW,KAAK,YAAY,GAAG,UAAU,GAAG,YAAY,EAC1E,SAAS,EAAE,WAAW,KAAK,YAAY,GAAG,oDAAoD,GAAG,kDAAkD,EAAA,CACrJ;;;;"}
|
|
@@ -6,6 +6,8 @@ export { ToolbarContext } from './ToolbarContext';
|
|
|
6
6
|
export type { ToolbarContextProps } from './ToolbarContext';
|
|
7
7
|
export { ToolbarSection } from './ToolbarSection';
|
|
8
8
|
export type { ToolbarSectionProps } from './ToolbarSection';
|
|
9
|
+
export { ToolbarSeparator } from './ToolbarSeparator';
|
|
10
|
+
export type { ToolbarSeparatorProps } from './ToolbarSeparator';
|
|
9
11
|
export { ToolbarFanOutItem } from './ToolbarFanOutItem';
|
|
10
12
|
export type { ToolbarFanOutItemProps } from './ToolbarFanOutItem';
|
|
11
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../Toolbar/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../Toolbar/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -2,5 +2,6 @@ export { Toolbar } from './Toolbar.js';
|
|
|
2
2
|
export { ToolbarButton } from './ToolbarButton.js';
|
|
3
3
|
export { ToolbarContext } from './ToolbarContext.js';
|
|
4
4
|
export { ToolbarSection } from './ToolbarSection.js';
|
|
5
|
+
export { ToolbarSeparator } from './ToolbarSeparator.js';
|
|
5
6
|
export { ToolbarFanOutItem } from './ToolbarFanOutItem.js';
|
|
6
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -340,6 +340,9 @@
|
|
|
340
340
|
.hidden {
|
|
341
341
|
display: none;
|
|
342
342
|
}
|
|
343
|
+
.inline {
|
|
344
|
+
display: inline;
|
|
345
|
+
}
|
|
343
346
|
.inline-flex {
|
|
344
347
|
display: inline-flex;
|
|
345
348
|
}
|
|
@@ -358,6 +361,9 @@
|
|
|
358
361
|
.w-full {
|
|
359
362
|
width: 100%;
|
|
360
363
|
}
|
|
364
|
+
.min-w-\[4rem\] {
|
|
365
|
+
min-width: 4rem;
|
|
366
|
+
}
|
|
361
367
|
.flex-1 {
|
|
362
368
|
flex: 1;
|
|
363
369
|
}
|