@sebgroup/green-react 3.8.0 → 3.9.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"];
|
|
@@ -2000,15 +2002,18 @@ var InPageWizardStepCard = function InPageWizardStepCard(_ref) {
|
|
|
2000
2002
|
|
|
2001
2003
|
var Link = function Link(_a) {
|
|
2002
2004
|
var button = _a.button,
|
|
2005
|
+
secondary = _a.secondary,
|
|
2003
2006
|
children = _a.children,
|
|
2004
2007
|
className = _a.className,
|
|
2005
2008
|
role = _a.role,
|
|
2006
|
-
otherProps = __rest(_a, ["button", "children", "className", "role"]);
|
|
2007
|
-
var
|
|
2009
|
+
otherProps = __rest(_a, ["button", "secondary", "children", "className", "role"]);
|
|
2010
|
+
var linkClassName = classNames(className, {
|
|
2008
2011
|
button: button
|
|
2009
|
-
}, button
|
|
2012
|
+
}, button, {
|
|
2013
|
+
'link gds-link-arrow': secondary
|
|
2014
|
+
});
|
|
2010
2015
|
return jsx("a", Object.assign({
|
|
2011
|
-
className:
|
|
2016
|
+
className: linkClassName,
|
|
2012
2017
|
role: button ? 'button' : role
|
|
2013
2018
|
}, otherProps, {
|
|
2014
2019
|
children: children
|
|
@@ -3285,4 +3290,35 @@ var BreadcrumbItem = function BreadcrumbItem(props) {
|
|
|
3285
3290
|
return jsx("li", Object.assign({}, props));
|
|
3286
3291
|
};
|
|
3287
3292
|
|
|
3288
|
-
|
|
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.9.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';
|
package/src/lib/link/link.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { HTMLProps, PropsWithChildren } from 'react';
|
|
|
2
2
|
import { ButtonVariant } from '@sebgroup/extract';
|
|
3
3
|
interface LinkProps extends HTMLProps<HTMLAnchorElement> {
|
|
4
4
|
button?: boolean | ButtonVariant;
|
|
5
|
+
secondary?: boolean;
|
|
5
6
|
}
|
|
6
|
-
export declare const Link: ({ button, children, className, role, ...otherProps }: PropsWithChildren<LinkProps>) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const Link: ({ button, secondary, children, className, role, ...otherProps }: PropsWithChildren<LinkProps>) => import("react/jsx-runtime").JSX.Element;
|
|
7
8
|
export default Link;
|
|
@@ -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 };
|