@uniformdev/design-system 19.81.1 → 19.82.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.
- package/dist/esm/index.js +21 -5
- package/dist/index.d.mts +16 -13
- package/dist/index.d.ts +16 -13
- package/dist/index.js +21 -5
- package/package.json +4 -4
package/dist/esm/index.js
CHANGED
|
@@ -19665,7 +19665,13 @@ var useCurrentTab = () => {
|
|
|
19665
19665
|
}
|
|
19666
19666
|
return context;
|
|
19667
19667
|
};
|
|
19668
|
-
var Tabs = ({
|
|
19668
|
+
var Tabs = ({
|
|
19669
|
+
children,
|
|
19670
|
+
onSelectedIdChange,
|
|
19671
|
+
useHashForState,
|
|
19672
|
+
selectedId,
|
|
19673
|
+
...props
|
|
19674
|
+
}) => {
|
|
19669
19675
|
const selected = useMemo6(() => {
|
|
19670
19676
|
if (selectedId)
|
|
19671
19677
|
return selectedId;
|
|
@@ -19675,12 +19681,15 @@ var Tabs = ({ children, onSelectedIdChange, useHashForState, selectedId, ...prop
|
|
|
19675
19681
|
useEffect16(() => {
|
|
19676
19682
|
var _a;
|
|
19677
19683
|
const selectedValueWithoutNull = (_a = tab.selectedId) != null ? _a : void 0;
|
|
19684
|
+
if (selectedValueWithoutNull === selected) {
|
|
19685
|
+
return;
|
|
19686
|
+
}
|
|
19678
19687
|
onSelectedIdChange == null ? void 0 : onSelectedIdChange(selectedValueWithoutNull);
|
|
19679
19688
|
if (useHashForState && typeof window !== "undefined" && window.history) {
|
|
19680
19689
|
const hashValue = selectedValueWithoutNull ? `#${selectedValueWithoutNull}` : "";
|
|
19681
|
-
window.history.
|
|
19690
|
+
window.history.replaceState(null, "", hashValue);
|
|
19682
19691
|
}
|
|
19683
|
-
}, [tab.selectedId, onSelectedIdChange, useHashForState]);
|
|
19692
|
+
}, [selected, tab.selectedId, onSelectedIdChange, useHashForState]);
|
|
19684
19693
|
useEffect16(() => {
|
|
19685
19694
|
if (selected && selected !== tab.selectedId) {
|
|
19686
19695
|
tab.setSelectedId(selected);
|
|
@@ -19692,11 +19701,18 @@ var TabButtonGroup = ({ children, ...props }) => {
|
|
|
19692
19701
|
const currentTab = useCurrentTab();
|
|
19693
19702
|
return /* @__PURE__ */ jsx116(ReakitTabList, { ...props, ...currentTab, css: tabButtonGroupStyles, children });
|
|
19694
19703
|
};
|
|
19695
|
-
var TabButton = ({
|
|
19704
|
+
var TabButton = ({
|
|
19705
|
+
children,
|
|
19706
|
+
id,
|
|
19707
|
+
...props
|
|
19708
|
+
}) => {
|
|
19696
19709
|
const currentTab = useCurrentTab();
|
|
19697
19710
|
return /* @__PURE__ */ jsx116(ReakitTab, { type: "button", id, ...currentTab, ...props, css: tabButtonStyles, children });
|
|
19698
19711
|
};
|
|
19699
|
-
var TabContent = ({
|
|
19712
|
+
var TabContent = ({
|
|
19713
|
+
children,
|
|
19714
|
+
...props
|
|
19715
|
+
}) => {
|
|
19700
19716
|
const currentTab = useCurrentTab();
|
|
19701
19717
|
return /* @__PURE__ */ jsx116(ReakitTabPanel, { ...props, ...currentTab, children });
|
|
19702
19718
|
};
|
package/dist/index.d.mts
CHANGED
|
@@ -22909,26 +22909,29 @@ declare const TableCellHead: React$1.ForwardRefExoticComponent<Omit<React$1.Deta
|
|
|
22909
22909
|
declare const TableCellData: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, "ref"> & React$1.RefAttributes<HTMLTableCellElement>>;
|
|
22910
22910
|
|
|
22911
22911
|
declare const useCurrentTab: () => TabState;
|
|
22912
|
-
|
|
22912
|
+
type TabsProps<TTabName extends string = string> = {
|
|
22913
22913
|
children: React__default.ReactNode;
|
|
22914
|
-
selectedId?:
|
|
22914
|
+
selectedId?: TTabName;
|
|
22915
22915
|
manual?: boolean;
|
|
22916
22916
|
orientation?: TabState['orientation'];
|
|
22917
|
-
onSelectedIdChange?: (tabName:
|
|
22917
|
+
onSelectedIdChange?: (tabName: TTabName | undefined) => void;
|
|
22918
|
+
/**
|
|
22919
|
+
* @deprecated you can control the route state on the application level.
|
|
22920
|
+
*/
|
|
22918
22921
|
useHashForState?: boolean;
|
|
22919
|
-
}
|
|
22920
|
-
declare const Tabs: ({ children, onSelectedIdChange, useHashForState, selectedId, ...props }: TabsProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
22922
|
+
};
|
|
22923
|
+
declare const Tabs: <TTabName extends string = string>({ children, onSelectedIdChange, useHashForState, selectedId, ...props }: TabsProps<TTabName>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
22921
22924
|
declare const TabButtonGroup: ({ children, ...props }: Partial<TabListProps>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
22922
|
-
|
|
22923
|
-
id:
|
|
22925
|
+
type TabButtonProps<TTabName extends string = string> = Partial<TabProps> & {
|
|
22926
|
+
id: TTabName;
|
|
22924
22927
|
children: React__default.ReactNode;
|
|
22925
|
-
}
|
|
22926
|
-
declare const TabButton: ({ children, id, ...props }: TabButtonProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
22927
|
-
|
|
22928
|
-
|
|
22928
|
+
};
|
|
22929
|
+
declare const TabButton: <TTabName extends string = string>({ children, id, ...props }: TabButtonProps<TTabName>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
22930
|
+
type TabContentProps<TTabName extends string = string> = Partial<TabPanelProps> & {
|
|
22931
|
+
tabId?: TTabName;
|
|
22929
22932
|
children: React__default.ReactNode;
|
|
22930
|
-
}
|
|
22931
|
-
declare const TabContent: ({ children, ...props }: TabContentProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
22933
|
+
};
|
|
22934
|
+
declare const TabContent: <TTabName extends string = string>({ children, ...props }: TabContentProps<TTabName>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
22932
22935
|
|
|
22933
22936
|
type CreateTeamIntegrationTileProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
22934
22937
|
/** (optional) sets the title value
|
package/dist/index.d.ts
CHANGED
|
@@ -22909,26 +22909,29 @@ declare const TableCellHead: React$1.ForwardRefExoticComponent<Omit<React$1.Deta
|
|
|
22909
22909
|
declare const TableCellData: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, "ref"> & React$1.RefAttributes<HTMLTableCellElement>>;
|
|
22910
22910
|
|
|
22911
22911
|
declare const useCurrentTab: () => TabState;
|
|
22912
|
-
|
|
22912
|
+
type TabsProps<TTabName extends string = string> = {
|
|
22913
22913
|
children: React__default.ReactNode;
|
|
22914
|
-
selectedId?:
|
|
22914
|
+
selectedId?: TTabName;
|
|
22915
22915
|
manual?: boolean;
|
|
22916
22916
|
orientation?: TabState['orientation'];
|
|
22917
|
-
onSelectedIdChange?: (tabName:
|
|
22917
|
+
onSelectedIdChange?: (tabName: TTabName | undefined) => void;
|
|
22918
|
+
/**
|
|
22919
|
+
* @deprecated you can control the route state on the application level.
|
|
22920
|
+
*/
|
|
22918
22921
|
useHashForState?: boolean;
|
|
22919
|
-
}
|
|
22920
|
-
declare const Tabs: ({ children, onSelectedIdChange, useHashForState, selectedId, ...props }: TabsProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
22922
|
+
};
|
|
22923
|
+
declare const Tabs: <TTabName extends string = string>({ children, onSelectedIdChange, useHashForState, selectedId, ...props }: TabsProps<TTabName>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
22921
22924
|
declare const TabButtonGroup: ({ children, ...props }: Partial<TabListProps>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
22922
|
-
|
|
22923
|
-
id:
|
|
22925
|
+
type TabButtonProps<TTabName extends string = string> = Partial<TabProps> & {
|
|
22926
|
+
id: TTabName;
|
|
22924
22927
|
children: React__default.ReactNode;
|
|
22925
|
-
}
|
|
22926
|
-
declare const TabButton: ({ children, id, ...props }: TabButtonProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
22927
|
-
|
|
22928
|
-
|
|
22928
|
+
};
|
|
22929
|
+
declare const TabButton: <TTabName extends string = string>({ children, id, ...props }: TabButtonProps<TTabName>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
22930
|
+
type TabContentProps<TTabName extends string = string> = Partial<TabPanelProps> & {
|
|
22931
|
+
tabId?: TTabName;
|
|
22929
22932
|
children: React__default.ReactNode;
|
|
22930
|
-
}
|
|
22931
|
-
declare const TabContent: ({ children, ...props }: TabContentProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
22933
|
+
};
|
|
22934
|
+
declare const TabContent: <TTabName extends string = string>({ children, ...props }: TabContentProps<TTabName>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
22932
22935
|
|
|
22933
22936
|
type CreateTeamIntegrationTileProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
22934
22937
|
/** (optional) sets the title value
|
package/dist/index.js
CHANGED
|
@@ -21474,7 +21474,13 @@ var useCurrentTab = () => {
|
|
|
21474
21474
|
}
|
|
21475
21475
|
return context;
|
|
21476
21476
|
};
|
|
21477
|
-
var Tabs = ({
|
|
21477
|
+
var Tabs = ({
|
|
21478
|
+
children,
|
|
21479
|
+
onSelectedIdChange,
|
|
21480
|
+
useHashForState,
|
|
21481
|
+
selectedId,
|
|
21482
|
+
...props
|
|
21483
|
+
}) => {
|
|
21478
21484
|
const selected = (0, import_react137.useMemo)(() => {
|
|
21479
21485
|
if (selectedId)
|
|
21480
21486
|
return selectedId;
|
|
@@ -21484,12 +21490,15 @@ var Tabs = ({ children, onSelectedIdChange, useHashForState, selectedId, ...prop
|
|
|
21484
21490
|
(0, import_react137.useEffect)(() => {
|
|
21485
21491
|
var _a;
|
|
21486
21492
|
const selectedValueWithoutNull = (_a = tab.selectedId) != null ? _a : void 0;
|
|
21493
|
+
if (selectedValueWithoutNull === selected) {
|
|
21494
|
+
return;
|
|
21495
|
+
}
|
|
21487
21496
|
onSelectedIdChange == null ? void 0 : onSelectedIdChange(selectedValueWithoutNull);
|
|
21488
21497
|
if (useHashForState && typeof window !== "undefined" && window.history) {
|
|
21489
21498
|
const hashValue = selectedValueWithoutNull ? `#${selectedValueWithoutNull}` : "";
|
|
21490
|
-
window.history.
|
|
21499
|
+
window.history.replaceState(null, "", hashValue);
|
|
21491
21500
|
}
|
|
21492
|
-
}, [tab.selectedId, onSelectedIdChange, useHashForState]);
|
|
21501
|
+
}, [selected, tab.selectedId, onSelectedIdChange, useHashForState]);
|
|
21493
21502
|
(0, import_react137.useEffect)(() => {
|
|
21494
21503
|
if (selected && selected !== tab.selectedId) {
|
|
21495
21504
|
tab.setSelectedId(selected);
|
|
@@ -21501,11 +21510,18 @@ var TabButtonGroup = ({ children, ...props }) => {
|
|
|
21501
21510
|
const currentTab = useCurrentTab();
|
|
21502
21511
|
return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_Tab.TabList, { ...props, ...currentTab, css: tabButtonGroupStyles, children });
|
|
21503
21512
|
};
|
|
21504
|
-
var TabButton = ({
|
|
21513
|
+
var TabButton = ({
|
|
21514
|
+
children,
|
|
21515
|
+
id,
|
|
21516
|
+
...props
|
|
21517
|
+
}) => {
|
|
21505
21518
|
const currentTab = useCurrentTab();
|
|
21506
21519
|
return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_Tab.Tab, { type: "button", id, ...currentTab, ...props, css: tabButtonStyles, children });
|
|
21507
21520
|
};
|
|
21508
|
-
var TabContent = ({
|
|
21521
|
+
var TabContent = ({
|
|
21522
|
+
children,
|
|
21523
|
+
...props
|
|
21524
|
+
}) => {
|
|
21509
21525
|
const currentTab = useCurrentTab();
|
|
21510
21526
|
return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_Tab.TabPanel, { ...props, ...currentTab, children });
|
|
21511
21527
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/design-system",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.82.1",
|
|
4
4
|
"description": "Uniform design system components",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"@storybook/react": "6.5.16",
|
|
24
24
|
"@types/react": "18.2.21",
|
|
25
25
|
"@types/react-dom": "18.2.7",
|
|
26
|
-
"@uniformdev/canvas": "^19.
|
|
27
|
-
"@uniformdev/richtext": "^19.
|
|
26
|
+
"@uniformdev/canvas": "^19.82.1",
|
|
27
|
+
"@uniformdev/richtext": "^19.82.1",
|
|
28
28
|
"autoprefixer": "10.4.16",
|
|
29
29
|
"hygen": "6.2.11",
|
|
30
30
|
"postcss": "8.4.31",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"publishConfig": {
|
|
68
68
|
"access": "public"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "242b8cbfdb9e52a8020c7660af8363a16c070cfa"
|
|
71
71
|
}
|