@sebgroup/green-react 3.8.1 → 3.10.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/index.esm.js
CHANGED
|
@@ -9,6 +9,8 @@ import { GdsDropdown, GdsOption } from '@sebgroup/green-core/components/dropdown
|
|
|
9
9
|
import { GdsContextMenu, GdsMenuItem, GdsMenuHeading } from '@sebgroup/green-core/components/context-menu/index.js';
|
|
10
10
|
import classNames from 'classnames';
|
|
11
11
|
import { GdsGroupedList, GdsListItem } from '@sebgroup/green-core/components/grouped-list/index.js';
|
|
12
|
+
import { GdsSegmentedControl } from '@sebgroup/green-core/components/segmented-control/index.js';
|
|
13
|
+
import { GdsSegment } from '@sebgroup/green-core/components/segmented-control/segment/index.js';
|
|
12
14
|
|
|
13
15
|
function _iterableToArrayLimit(r, l) {
|
|
14
16
|
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
@@ -439,7 +441,7 @@ var AccordionItem = function AccordionItem(_ref) {
|
|
|
439
441
|
label = item.label,
|
|
440
442
|
subLabel = item.subLabel,
|
|
441
443
|
content = item.content;
|
|
442
|
-
var _useState = useState(false),
|
|
444
|
+
var _useState = useState(item.defaultOpen || false),
|
|
443
445
|
_useState2 = _slicedToArray(_useState, 2),
|
|
444
446
|
isOpen = _useState2[0],
|
|
445
447
|
setIsOpen = _useState2[1];
|
|
@@ -3288,4 +3290,35 @@ var BreadcrumbItem = function BreadcrumbItem(props) {
|
|
|
3288
3290
|
return jsx("li", Object.assign({}, props));
|
|
3289
3291
|
};
|
|
3290
3292
|
|
|
3291
|
-
|
|
3293
|
+
registerTransitionalStyles();
|
|
3294
|
+
var CoreSegementedControl = createComponent({
|
|
3295
|
+
tagName: getScopedTagName('gds-segmented-control'),
|
|
3296
|
+
elementClass: GdsSegmentedControl,
|
|
3297
|
+
events: {
|
|
3298
|
+
onchange: 'change'
|
|
3299
|
+
},
|
|
3300
|
+
react: React
|
|
3301
|
+
});
|
|
3302
|
+
var CoreSegment = createComponent({
|
|
3303
|
+
tagName: getScopedTagName('gds-segment'),
|
|
3304
|
+
elementClass: GdsSegment,
|
|
3305
|
+
react: React
|
|
3306
|
+
});
|
|
3307
|
+
var SegmentedControl = function SegmentedControl(_a) {
|
|
3308
|
+
var onChange = _a.onChange,
|
|
3309
|
+
className = _a.className,
|
|
3310
|
+
props = __rest(_a, ["onChange", "className"]);
|
|
3311
|
+
return jsx(CoreSegementedControl, Object.assign({
|
|
3312
|
+
onchange: onChange,
|
|
3313
|
+
className: classNames(className)
|
|
3314
|
+
}, props));
|
|
3315
|
+
};
|
|
3316
|
+
var Segment = function Segment(_a) {
|
|
3317
|
+
var className = _a.className,
|
|
3318
|
+
props = __rest(_a, ["className"]);
|
|
3319
|
+
return jsx(CoreSegment, Object.assign({
|
|
3320
|
+
className: classNames(className)
|
|
3321
|
+
}, props));
|
|
3322
|
+
};
|
|
3323
|
+
|
|
3324
|
+
export { Accordion, AlertRibbon as Alert, AlertRibbon, Badge, BankId, Breadcrumb, BreadcrumbItem, Button, ButtonGroup, Card, Check, Checkbox, ChevronDown, ContextMenu, CoreDatepicker, CoreDropdown, CoreMenuHeading, CoreOption, CoreSegementedControl, CoreSegment, Datepicker, Dropdown, Edit, EmailInput, Flexbox, Form, FormItem, FormItems, Group, GroupedList, IconButton, InPageWizardStepCard, InfoCircle, Input, Link, List$1 as List, ListItem, MenuItem, Modal, Navbar, NumberInput, Option, OptionGroup, RadioButton, RadioGroup, Segment, SegmentedControl, Select, Slider, SortDirection, SquareExclamation, SquareInfo, Stepper, Tab, Table, TableBody, TableCell, TableContext, TableHeader, TableHeaderCell, TableRow, Tabs, Text, TextArea, TextInput, Times, valueList$1 as ValueList, filterArrayByColumns, onRowSelect, paginate, searchTextByColumns, sortArray, sumCols, useTableContext };
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sebgroup/green-react",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.10.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"react": "^17 || ^18",
|
|
6
6
|
"react-dom": "^17 || ^18"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@sebgroup/green-core": "^1.
|
|
9
|
+
"@sebgroup/green-core": "^1.29.0",
|
|
10
10
|
"@sebgroup/chlorophyll": "^3.4.1",
|
|
11
11
|
"@sebgroup/extract": "^3.0.1",
|
|
12
12
|
"@lit/react": "^1.0.2",
|
package/src/index.d.ts
CHANGED
|
@@ -22,4 +22,5 @@ export * from './types';
|
|
|
22
22
|
export * from './lib/table/components';
|
|
23
23
|
export * from './lib/icons';
|
|
24
24
|
export * from './lib/breadcrumb/breadcrumb';
|
|
25
|
+
export * from './lib/segmented-control/segmented-control';
|
|
25
26
|
export { AlertRibbon as Alert } from './lib/alert-ribbon/alert-ribbon';
|
|
@@ -12,6 +12,7 @@ export interface AccordionItemInterface {
|
|
|
12
12
|
onClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
13
13
|
onOpen?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
14
14
|
onClose?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
15
|
+
defaultOpen?: boolean;
|
|
15
16
|
}
|
|
16
17
|
declare const AccordionItem: ({ item, index, uuid }: AccordionItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
18
|
export default AccordionItem;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { GdsSegmentedControl } from '@sebgroup/green-core/components/segmented-control/index.js';
|
|
3
|
+
import { GdsSegment } from '@sebgroup/green-core/components/segmented-control/segment/index.js';
|
|
4
|
+
export declare const CoreSegementedControl: import("@lit/react").ReactWebComponent<GdsSegmentedControl<any>, {
|
|
5
|
+
onchange: string;
|
|
6
|
+
}>;
|
|
7
|
+
export declare const CoreSegment: import("@lit/react").ReactWebComponent<GdsSegment<any>, {}>;
|
|
8
|
+
export interface SegmentedControlProps {
|
|
9
|
+
value?: string;
|
|
10
|
+
segMinWidth?: number;
|
|
11
|
+
size?: 'small' | 'medium';
|
|
12
|
+
onChange?: (event: Event) => void;
|
|
13
|
+
className?: string;
|
|
14
|
+
children?: ReactNode | ReactNode[];
|
|
15
|
+
}
|
|
16
|
+
export interface SegmentProps {
|
|
17
|
+
value?: string;
|
|
18
|
+
className?: string;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
children?: ReactNode | ReactNode[];
|
|
21
|
+
}
|
|
22
|
+
declare const SegmentedControl: React.FC<SegmentedControlProps>;
|
|
23
|
+
declare const Segment: React.FC<SegmentProps>;
|
|
24
|
+
export { SegmentedControl, Segment };
|