@primer/react 36.14.0 → 36.15.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/CHANGELOG.md +16 -0
- package/dist/browser.esm.js +1 -1
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +1 -1
- package/dist/browser.umd.js.map +1 -1
- package/generated/components.json +71 -15
- package/lib/ActionList/Item.d.ts.map +1 -1
- package/lib/ActionList/Item.js +2 -1
- package/lib/FeatureFlags/DefaultFeatureFlags.d.ts +3 -0
- package/lib/FeatureFlags/DefaultFeatureFlags.d.ts.map +1 -0
- package/lib/FeatureFlags/DefaultFeatureFlags.js +7 -0
- package/lib/FeatureFlags/FeatureFlagContext.d.ts +4 -0
- package/lib/FeatureFlags/FeatureFlagContext.d.ts.map +1 -0
- package/lib/FeatureFlags/FeatureFlagContext.js +8 -0
- package/lib/FeatureFlags/FeatureFlagScope.d.ts +22 -0
- package/lib/FeatureFlags/FeatureFlagScope.d.ts.map +1 -0
- package/lib/FeatureFlags/FeatureFlagScope.js +44 -0
- package/lib/FeatureFlags/FeatureFlags.d.ts +7 -0
- package/lib/FeatureFlags/FeatureFlags.d.ts.map +1 -0
- package/lib/FeatureFlags/FeatureFlags.js +26 -0
- package/lib/FeatureFlags/index.d.ts +4 -0
- package/lib/FeatureFlags/index.d.ts.map +1 -0
- package/lib/FeatureFlags/useFeatureFlag.d.ts +5 -0
- package/lib/FeatureFlags/useFeatureFlag.d.ts.map +1 -0
- package/lib/Stack/Stack.d.ts +65 -0
- package/lib/Stack/Stack.d.ts.map +1 -0
- package/lib/Stack/Stack.js +52 -0
- package/lib/Stack/index.d.ts +6 -0
- package/lib/Stack/index.d.ts.map +1 -0
- package/lib/Stack/index.js +9 -0
- package/lib/drafts/ActionBar/ActionBar.d.ts +8 -2
- package/lib/drafts/ActionBar/ActionBar.d.ts.map +1 -1
- package/lib/drafts/ActionBar/ActionBar.js +1 -0
- package/lib/drafts/ActionBar/index.js +6 -4
- package/lib/drafts/TabPanels/TabPanels.js +2 -2
- package/lib/drafts/index.d.ts +3 -0
- package/lib/drafts/index.d.ts.map +1 -1
- package/lib/drafts/index.js +4 -1
- package/lib/experimental/index.d.ts +2 -0
- package/lib/experimental/index.d.ts.map +1 -1
- package/lib/experimental/index.js +8 -1
- package/lib/internal/utils/__tests__/getResponsiveAttributes.test.d.ts +2 -0
- package/lib/internal/utils/__tests__/getResponsiveAttributes.test.d.ts.map +1 -0
- package/lib/internal/utils/getResponsiveAttributes.d.ts +19 -0
- package/lib/internal/utils/getResponsiveAttributes.d.ts.map +1 -0
- package/lib/internal/utils/getResponsiveAttributes.js +40 -0
- package/lib/internal/utils/getResponsiveControlValues.d.ts +8 -0
- package/lib/internal/utils/getResponsiveControlValues.d.ts.map +1 -0
- package/lib-esm/ActionList/Item.js +2 -1
- package/lib-esm/FeatureFlags/DefaultFeatureFlags.d.ts +3 -0
- package/lib-esm/FeatureFlags/DefaultFeatureFlags.js +5 -0
- package/lib-esm/FeatureFlags/FeatureFlagContext.d.ts +4 -0
- package/lib-esm/FeatureFlags/FeatureFlagContext.js +6 -0
- package/lib-esm/FeatureFlags/FeatureFlagScope.d.ts +22 -0
- package/lib-esm/FeatureFlags/FeatureFlagScope.js +42 -0
- package/lib-esm/FeatureFlags/FeatureFlags.d.ts +7 -0
- package/lib-esm/FeatureFlags/FeatureFlags.js +20 -0
- package/lib-esm/FeatureFlags/index.d.ts +4 -0
- package/lib-esm/FeatureFlags/useFeatureFlag.d.ts +5 -0
- package/lib-esm/Stack/Stack.d.ts +65 -0
- package/lib-esm/Stack/Stack.js +44 -0
- package/lib-esm/Stack/index.d.ts +6 -0
- package/lib-esm/Stack/index.js +7 -0
- package/lib-esm/drafts/ActionBar/ActionBar.d.ts +8 -2
- package/lib-esm/drafts/ActionBar/ActionBar.js +1 -0
- package/lib-esm/drafts/ActionBar/index.js +4 -2
- package/lib-esm/drafts/index.d.ts +3 -0
- package/lib-esm/drafts/index.js +2 -1
- package/lib-esm/experimental/index.d.ts +2 -0
- package/lib-esm/experimental/index.js +5 -1
- package/lib-esm/internal/utils/__tests__/getResponsiveAttributes.test.d.ts +2 -0
- package/lib-esm/internal/utils/getResponsiveAttributes.d.ts +19 -0
- package/lib-esm/internal/utils/getResponsiveAttributes.js +38 -0
- package/lib-esm/internal/utils/getResponsiveControlValues.d.ts +8 -0
- package/package.json +1 -1
- /package/lib/{packages/react/node_modules → node_modules}/@github/tab-container-element/dist/tab-container-element-define.js +0 -0
- /package/lib/{packages/react/node_modules → node_modules}/@github/tab-container-element/dist/tab-container-element.js +0 -0
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"components": {
|
|
4
4
|
"dialog": {
|
|
5
5
|
"id": "dialog",
|
|
6
|
+
"docsId": "dialog",
|
|
6
7
|
"name": "Dialog",
|
|
7
8
|
"status": "alpha",
|
|
8
9
|
"a11yReviewed": false,
|
|
@@ -153,7 +154,7 @@
|
|
|
153
154
|
},
|
|
154
155
|
{
|
|
155
156
|
"id": "components-actionlist-features--text-wrap-and-truncation",
|
|
156
|
-
"code": "() => (\n <Box maxWidth=\"300px\">\n <ActionList showDividers>\n <ActionList.Item>\n <ActionList.LeadingVisual>\n <ArrowRightIcon />\n </ActionList.LeadingVisual>\n Block Description. Long text should wrap\n <ActionList.Description variant=\"block\">\n This description is long, but it is block so it wraps\n </ActionList.Description>\n <ActionList.TrailingVisual>\n <ArrowLeftIcon />\n </ActionList.TrailingVisual>\n </ActionList.Item>\n <ActionList.Item>\n <ActionList.LeadingVisual>\n <ArrowRightIcon />\n </ActionList.LeadingVisual>\n Inline Description\n <ActionList.Description>\n This description gets truncated because it is inline\n </ActionList.Description>\n <ActionList.TrailingVisual>\n <ArrowLeftIcon />\n </ActionList.TrailingVisual>\n </ActionList.Item>\n <ActionList.Item>\n <ActionList.LeadingVisual>\n <ArrowRightIcon />\n </ActionList.LeadingVisual>\n Really long text without a description should wrap so it wraps\n <ActionList.TrailingVisual>\n <ArrowLeftIcon />\n </ActionList.TrailingVisual>\n </ActionList.Item>\n </ActionList>\n </Box>\n)"
|
|
157
|
+
"code": "() => (\n <Box maxWidth=\"300px\">\n <ActionList showDividers>\n <ActionList.Item>\n <ActionList.LeadingVisual>\n <ArrowRightIcon />\n </ActionList.LeadingVisual>\n Block Description. Long text should wrap\n <ActionList.Description variant=\"block\">\n This description is long, but it is block so it wraps\n </ActionList.Description>\n <ActionList.TrailingVisual>\n <ArrowLeftIcon />\n </ActionList.TrailingVisual>\n </ActionList.Item>\n <ActionList.Item>\n <ActionList.LeadingVisual>\n <ArrowRightIcon />\n </ActionList.LeadingVisual>\n Inline Description\n <ActionList.Description>\n This description gets truncated because it is inline\n </ActionList.Description>\n <ActionList.TrailingVisual>\n <ArrowLeftIcon />\n </ActionList.TrailingVisual>\n </ActionList.Item>\n <ActionList.Item>\n <ActionList.LeadingVisual>\n <ArrowRightIcon />\n </ActionList.LeadingVisual>\n Really long text without a description should wrap so it wraps\n <ActionList.TrailingVisual>\n <ArrowLeftIcon />\n </ActionList.TrailingVisual>\n </ActionList.Item>\n <ActionList.Item>\n <ActionList.LeadingVisual>\n <ArrowRightIcon />\n </ActionList.LeadingVisual>\n SomethingSomething/SomethingElse.Some.Thing.Lalala.la\n <ActionList.TrailingVisual>\n <ArrowLeftIcon />\n </ActionList.TrailingVisual>\n </ActionList.Item>\n </ActionList>\n </Box>\n)"
|
|
157
158
|
},
|
|
158
159
|
{
|
|
159
160
|
"id": "components-actionlist-features--conditional-children",
|
|
@@ -2159,8 +2160,9 @@
|
|
|
2159
2160
|
],
|
|
2160
2161
|
"subcomponents": []
|
|
2161
2162
|
},
|
|
2162
|
-
"
|
|
2163
|
-
"id": "
|
|
2163
|
+
"dialog_v2": {
|
|
2164
|
+
"id": "dialog_v2",
|
|
2165
|
+
"docsId": "dialog",
|
|
2164
2166
|
"name": "Dialog",
|
|
2165
2167
|
"status": "draft",
|
|
2166
2168
|
"a11yReviewed": false,
|
|
@@ -4643,6 +4645,7 @@
|
|
|
4643
4645
|
},
|
|
4644
4646
|
"select_panel": {
|
|
4645
4647
|
"id": "select_panel",
|
|
4648
|
+
"docsId": "select_panel",
|
|
4646
4649
|
"name": "SelectPanel",
|
|
4647
4650
|
"status": "alpha",
|
|
4648
4651
|
"a11yReviewed": false,
|
|
@@ -4958,6 +4961,58 @@
|
|
|
4958
4961
|
}
|
|
4959
4962
|
]
|
|
4960
4963
|
},
|
|
4964
|
+
"stack": {
|
|
4965
|
+
"id": "stack",
|
|
4966
|
+
"name": "Stack",
|
|
4967
|
+
"status": "alpha",
|
|
4968
|
+
"a11yReviewed": false,
|
|
4969
|
+
"stories": [],
|
|
4970
|
+
"importPath": "@primer/react/experimental",
|
|
4971
|
+
"props": [
|
|
4972
|
+
{
|
|
4973
|
+
"name": "gap",
|
|
4974
|
+
"type": "'none' | 'condensed' | 'normal' | 'spacious' | ResponsiveValue<'none' | 'condensed' | 'normal' | 'spacious'>",
|
|
4975
|
+
"description": "Specify the gap between children elements in the stack."
|
|
4976
|
+
},
|
|
4977
|
+
{
|
|
4978
|
+
"name": "direction",
|
|
4979
|
+
"type": "'horizontal' | 'vertical' | ResponsiveValue<'horizontal' | 'vertical'>",
|
|
4980
|
+
"description": "Specify the orientation for the stack container."
|
|
4981
|
+
},
|
|
4982
|
+
{
|
|
4983
|
+
"name": "align",
|
|
4984
|
+
"type": "'stretch' | 'start' | 'center' | 'end' | 'baseline' | ResponsiveValue<'stretch' | 'start' | 'center' | 'end' | 'baseline'>",
|
|
4985
|
+
"description": "Specify the alignment between items in the cross-axis of the orientation."
|
|
4986
|
+
},
|
|
4987
|
+
{
|
|
4988
|
+
"name": "wrap",
|
|
4989
|
+
"type": "'wrap' | 'nowrap' | ResponsiveValue<'wrap' | 'nowrap'>",
|
|
4990
|
+
"description": "Specify whether items are forced onto one line or can wrap onto multiple lines."
|
|
4991
|
+
},
|
|
4992
|
+
{
|
|
4993
|
+
"name": "justify",
|
|
4994
|
+
"type": "'start' | 'center' | 'end' | 'space-between' | 'space-evenly' | ResponsiveValue<'start' | 'center' | 'end' | 'space-between' | 'space-evenly'>",
|
|
4995
|
+
"description": "Specify how items will be distributed in the stacking direction."
|
|
4996
|
+
},
|
|
4997
|
+
{
|
|
4998
|
+
"name": "padding",
|
|
4999
|
+
"type": "'none' | 'condensed' | 'normal' | 'spacious' | ResponsiveValue<'none' | 'condensed' | 'normal' | 'spacious'>",
|
|
5000
|
+
"description": "Specify the padding of the stack container."
|
|
5001
|
+
}
|
|
5002
|
+
],
|
|
5003
|
+
"subcomponents": [
|
|
5004
|
+
{
|
|
5005
|
+
"name": "Stack.Item",
|
|
5006
|
+
"props": [
|
|
5007
|
+
{
|
|
5008
|
+
"name": "grow",
|
|
5009
|
+
"type": "boolean | ResponsiveValue<boolean>",
|
|
5010
|
+
"description": "Allow item to keep size or expand to fill the available space."
|
|
5011
|
+
}
|
|
5012
|
+
]
|
|
5013
|
+
}
|
|
5014
|
+
]
|
|
5015
|
+
},
|
|
4961
5016
|
"state_label": {
|
|
4962
5017
|
"id": "state_label",
|
|
4963
5018
|
"name": "StateLabel",
|
|
@@ -6058,7 +6113,7 @@
|
|
|
6058
6113
|
},
|
|
6059
6114
|
"tooltip_v2": {
|
|
6060
6115
|
"id": "tooltip_v2",
|
|
6061
|
-
"name": "
|
|
6116
|
+
"name": "Tooltip",
|
|
6062
6117
|
"docsId": "tooltip",
|
|
6063
6118
|
"status": "beta",
|
|
6064
6119
|
"a11yReviewed": true,
|
|
@@ -6069,35 +6124,35 @@
|
|
|
6069
6124
|
"code": "() => (\n <Box\n sx={{\n p: 6,\n }}\n >\n <Tooltip text=\"This change can't be undone.\">\n <Button>Delete</Button>\n </Tooltip>\n </Box>\n)"
|
|
6070
6125
|
},
|
|
6071
6126
|
{
|
|
6072
|
-
"id": "components-
|
|
6127
|
+
"id": "components-tooltip-features--anchor-has-margin",
|
|
6073
6128
|
"code": "() => (\n <Box\n sx={{\n p: 5,\n }}\n >\n <Tooltip text=\"Tooltip is still centered\">\n <Button\n sx={{\n marginLeft: 3,\n }}\n >\n Button has 16px margin Left\n </Button>\n </Tooltip>\n </Box>\n)"
|
|
6074
6129
|
},
|
|
6075
6130
|
{
|
|
6076
|
-
"id": "components-
|
|
6131
|
+
"id": "components-tooltip-features--label-type",
|
|
6077
6132
|
"code": "() => (\n <Box>\n <Tooltip text=\"Contribution Documentation for 'Primer React'\" type=\"label\">\n <Link\n href=\"https://github.com/primer/react/contributor-docs/CONTRIBUTING.md\"\n sx={{\n ml: 1,\n color: 'fg.muted',\n }}\n >\n <Octicon\n icon={BookIcon}\n sx={{\n color: 'fg.muted',\n }}\n />\n </Link>\n </Tooltip>\n </Box>\n)"
|
|
6078
6133
|
},
|
|
6079
6134
|
{
|
|
6080
|
-
"id": "components-
|
|
6135
|
+
"id": "components-tooltip-features--description-type",
|
|
6081
6136
|
"code": "() => (\n <Box\n sx={{\n p: 5,\n }}\n >\n <Tooltip text=\"Supplementary text\" direction=\"n\">\n <Button>Save</Button>\n </Tooltip>\n </Box>\n)"
|
|
6082
6137
|
},
|
|
6083
6138
|
{
|
|
6084
|
-
"id": "components-
|
|
6139
|
+
"id": "components-tooltip-features--icon-button-with-description",
|
|
6085
6140
|
"code": "() => (\n <Box\n sx={{\n p: 5,\n }}\n >\n <Tooltip text=\"Supplementary text for icon button\" direction=\"e\">\n <IconButton icon={SearchIcon} aria-label=\"Search\" />\n </Tooltip>\n </Box>\n)"
|
|
6086
6141
|
},
|
|
6087
6142
|
{
|
|
6088
|
-
"id": "components-
|
|
6143
|
+
"id": "components-tooltip-features--all-directions",
|
|
6089
6144
|
"code": "() => (\n <Box\n sx={{\n padding: 5,\n display: 'flex',\n gap: '8px',\n }}\n >\n <Tooltip direction=\"n\" text=\"Supplementary text\">\n <Button>North</Button>\n </Tooltip>\n <Tooltip direction=\"s\" text=\"Supplementary text\">\n <Button>South</Button>\n </Tooltip>\n <Tooltip direction=\"e\" text=\"Supplementary text\">\n <Button>East</Button>\n </Tooltip>\n <Tooltip direction=\"w\" text=\"Supplementary text\">\n <Button>West</Button>\n </Tooltip>\n <Tooltip direction=\"ne\" text=\"Supplementary text\">\n <Button>North East</Button>\n </Tooltip>\n <Tooltip direction=\"nw\" text=\"Supplementary text\">\n <Button>North West</Button>\n </Tooltip>\n <Tooltip direction=\"se\" text=\"Supplementary text\">\n <Button>Southeast</Button>\n </Tooltip>\n <Tooltip direction=\"sw\" text=\"Supplementary text\">\n <Button>Southwest</Button>\n </Tooltip>\n </Box>\n)"
|
|
6090
6145
|
},
|
|
6091
6146
|
{
|
|
6092
|
-
"id": "components-
|
|
6147
|
+
"id": "components-tooltip-features--multiline-text",
|
|
6093
6148
|
"code": "() => (\n <Box>\n <Tooltip\n direction=\"e\"\n text=\"Random long text that needs to be wrapped and be multipline and have some paddings around\"\n >\n <Button>Multiline East</Button>\n </Tooltip>\n </Box>\n)"
|
|
6094
6149
|
},
|
|
6095
6150
|
{
|
|
6096
|
-
"id": "components-
|
|
6151
|
+
"id": "components-tooltip-features--calculated-direction",
|
|
6097
6152
|
"code": "() => (\n <Box\n sx={{\n padding: 5,\n display: 'flex',\n gap: '8px',\n }}\n >\n <Tooltip\n direction=\"w\"\n text=\"But appears in the east direction due to not having enough space in the west\"\n >\n <Button>West</Button>\n </Tooltip>\n\n <Tooltip text=\"The direction here is north by default but there is not enough space in the north therefore the tooltip appears in the south\">\n <Button>North</Button>\n </Tooltip>\n </Box>\n)"
|
|
6098
6153
|
},
|
|
6099
6154
|
{
|
|
6100
|
-
"id": "components-
|
|
6155
|
+
"id": "components-tooltip-features--on-action-menu-anchor",
|
|
6101
6156
|
"code": "() => (\n <Box\n sx={{\n display: 'flex',\n padding: 5,\n gap: 2,\n }}\n >\n <ActionMenu>\n <ActionMenu.Anchor>\n <Tooltip text=\"Supplementary text to add here\" direction=\"n\">\n <Button\n leadingVisual={GitBranchIcon}\n trailingAction={TriangleDownIcon}\n >\n ActionMenu.Anchor w/ t\n </Button>\n </Tooltip>\n </ActionMenu.Anchor>\n <ActionMenu.Overlay width=\"medium\">\n <ActionList>\n <ActionList.Item onSelect={() => alert('Main')}>\n <ActionList.LeadingVisual>\n <CheckIcon />\n </ActionList.LeadingVisual>\n main <ActionList.TrailingVisual>default</ActionList.TrailingVisual>\n </ActionList.Item>\n <ActionList.Item onSelect={() => alert('Branch 1')}>\n branch-1\n </ActionList.Item>\n <ActionList.Item onSelect={() => alert('Branch 2')}>\n branch-2\n </ActionList.Item>\n </ActionList>\n </ActionMenu.Overlay>\n </ActionMenu>\n <ActionMenu>\n <Tooltip text=\"Supplementary text to add here\" direction=\"n\">\n <ActionMenu.Button leadingVisual={GitBranchIcon}>\n ActionMenu.Button w/ t\n </ActionMenu.Button>\n </Tooltip>\n <ActionMenu.Overlay width=\"medium\">\n <ActionList>\n <ActionList.Item onSelect={() => alert('Main')}>\n <ActionList.LeadingVisual>\n <CheckIcon />\n </ActionList.LeadingVisual>\n main <ActionList.TrailingVisual>default</ActionList.TrailingVisual>\n </ActionList.Item>\n <ActionList.Item onSelect={() => alert('Branch 1')}>\n branch-1\n </ActionList.Item>\n <ActionList.Item onSelect={() => alert('Branch 2')}>\n branch-2\n </ActionList.Item>\n </ActionList>\n </ActionMenu.Overlay>\n </ActionMenu>\n <ActionMenu>\n <ActionMenu.Anchor>\n <Button leadingVisual={GitBranchIcon} trailingAction={TriangleDownIcon}>\n ActionMenu.Anchor\n </Button>\n </ActionMenu.Anchor>\n <ActionMenu.Overlay width=\"medium\">\n <ActionList>\n <ActionList.Item onSelect={() => alert('Main')}>\n <ActionList.LeadingVisual>\n <CheckIcon />\n </ActionList.LeadingVisual>\n main <ActionList.TrailingVisual>default</ActionList.TrailingVisual>\n </ActionList.Item>\n <ActionList.Item onSelect={() => alert('Branch 1')}>\n branch-1\n </ActionList.Item>\n <ActionList.Item onSelect={() => alert('Branch 2')}>\n branch-2\n </ActionList.Item>\n </ActionList>\n </ActionMenu.Overlay>\n </ActionMenu>\n <ActionMenu>\n <ActionMenu.Button leadingVisual={GitBranchIcon}>\n ActionMenu.Button\n </ActionMenu.Button>\n\n <ActionMenu.Overlay width=\"medium\">\n <ActionList>\n <ActionList.Item onSelect={() => alert('Main')}>\n <ActionList.LeadingVisual>\n <CheckIcon />\n </ActionList.LeadingVisual>\n main <ActionList.TrailingVisual>default</ActionList.TrailingVisual>\n </ActionList.Item>\n <ActionList.Item onSelect={() => alert('Branch 1')}>\n branch-1\n </ActionList.Item>\n <ActionList.Item onSelect={() => alert('Branch 2')}>\n branch-2\n </ActionList.Item>\n </ActionList>\n </ActionMenu.Overlay>\n </ActionMenu>\n </Box>\n)"
|
|
6102
6157
|
}
|
|
6103
6158
|
],
|
|
@@ -6620,7 +6675,7 @@
|
|
|
6620
6675
|
"stories": [
|
|
6621
6676
|
{
|
|
6622
6677
|
"id": "drafts-components-actionbar--default",
|
|
6623
|
-
"code": "() => (\n <ActionBar>\n <ActionBar.IconButton\n icon={BoldIcon}\n aria-label=\"
|
|
6678
|
+
"code": "() => (\n <ActionBar aria-label=\"Toolbar\">\n <ActionBar.IconButton\n icon={BoldIcon}\n aria-label=\"Bold\"\n ></ActionBar.IconButton>\n <ActionBar.IconButton\n icon={ItalicIcon}\n aria-label=\"Italic\"\n ></ActionBar.IconButton>\n <ActionBar.IconButton\n icon={CodeIcon}\n aria-label=\"Code\"\n ></ActionBar.IconButton>\n <ActionBar.IconButton\n icon={LinkIcon}\n aria-label=\"Link\"\n ></ActionBar.IconButton>\n <ActionBar.Divider />\n <ActionBar.IconButton\n icon={FileAddedIcon}\n aria-label=\"File Added\"\n ></ActionBar.IconButton>\n <ActionBar.IconButton\n icon={SearchIcon}\n aria-label=\"Search\"\n ></ActionBar.IconButton>\n <ActionBar.IconButton\n icon={QuoteIcon}\n aria-label=\"Insert Quote\"\n ></ActionBar.IconButton>\n <ActionBar.IconButton\n icon={ListUnorderedIcon}\n aria-label=\"Unordered List\"\n ></ActionBar.IconButton>\n <ActionBar.IconButton\n icon={ListOrderedIcon}\n aria-label=\"Ordered List\"\n ></ActionBar.IconButton>\n <ActionBar.IconButton\n icon={TasklistIcon}\n aria-label=\"Task List\"\n ></ActionBar.IconButton>\n </ActionBar>\n)"
|
|
6624
6679
|
}
|
|
6625
6680
|
],
|
|
6626
6681
|
"importPath": "@primer/react/experimental",
|
|
@@ -6963,8 +7018,9 @@
|
|
|
6963
7018
|
],
|
|
6964
7019
|
"subcomponents": []
|
|
6965
7020
|
},
|
|
6966
|
-
"
|
|
6967
|
-
"id": "
|
|
7021
|
+
"select_panel_v2": {
|
|
7022
|
+
"id": "select_panel_v2",
|
|
7023
|
+
"docsId": "select_panel",
|
|
6968
7024
|
"name": "SelectPanel",
|
|
6969
7025
|
"status": "draft",
|
|
6970
7026
|
"a11yReviewed": false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../src/ActionList/Item.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;AAI/F,OAAO,KAAK,EAAC,mBAAmB,EAAkB,MAAM,UAAU,CAAA;AAmClE,eAAO,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../src/ActionList/Item.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;AAI/F,OAAO,KAAK,EAAC,mBAAmB,EAAkB,MAAM,UAAU,CAAA;AAmClE,eAAO,MAAM,IAAI,2DA6T6C,CAAA"}
|
package/lib/ActionList/Item.js
CHANGED
|
@@ -303,7 +303,8 @@ const Item = /*#__PURE__*/React__default.default.forwardRef(({
|
|
|
303
303
|
sx: {
|
|
304
304
|
flexGrow: slots.inlineDescription ? 0 : 1,
|
|
305
305
|
fontWeight: slots.inlineDescription || slots.blockDescription || active ? 'bold' : 'normal',
|
|
306
|
-
marginBlockEnd: slots.blockDescription ? '4px' : undefined
|
|
306
|
+
marginBlockEnd: slots.blockDescription ? '4px' : undefined,
|
|
307
|
+
wordBreak: 'break-word'
|
|
307
308
|
}
|
|
308
309
|
}, childrenWithoutSlots), slots.inlineDescription),
|
|
309
310
|
// If we're showing an inactive indicator and a leading visual has NOT been passed,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultFeatureFlags.d.ts","sourceRoot":"","sources":["../../src/FeatureFlags/DefaultFeatureFlags.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAA;AAEnD,eAAO,MAAM,mBAAmB,kBAA4B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FeatureFlagContext.d.ts","sourceRoot":"","sources":["../../src/FeatureFlags/FeatureFlagContext.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAA;AAGxD,eAAO,MAAM,kBAAkB,2CAAuD,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var DefaultFeatureFlags = require('./DefaultFeatureFlags.js');
|
|
5
|
+
|
|
6
|
+
const FeatureFlagContext = /*#__PURE__*/React.createContext(DefaultFeatureFlags.DefaultFeatureFlags);
|
|
7
|
+
|
|
8
|
+
exports.FeatureFlagContext = FeatureFlagContext;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type FeatureFlags = {
|
|
2
|
+
[key: string]: boolean;
|
|
3
|
+
};
|
|
4
|
+
export declare class FeatureFlagScope {
|
|
5
|
+
static create(flags?: FeatureFlags): FeatureFlagScope;
|
|
6
|
+
static merge(a: FeatureFlagScope, b: FeatureFlagScope): FeatureFlagScope;
|
|
7
|
+
flags: Map<string, boolean>;
|
|
8
|
+
constructor(flags?: FeatureFlags);
|
|
9
|
+
/**
|
|
10
|
+
* Enable a feature flag
|
|
11
|
+
*/
|
|
12
|
+
enable(name: string): void;
|
|
13
|
+
/**
|
|
14
|
+
* Disable a feature flag
|
|
15
|
+
*/
|
|
16
|
+
disable(name: string): void;
|
|
17
|
+
/**
|
|
18
|
+
* Check if a feature flag is enabled
|
|
19
|
+
*/
|
|
20
|
+
enabled(name: string): boolean;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=FeatureFlagScope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FeatureFlagScope.d.ts","sourceRoot":"","sources":["../../src/FeatureFlags/FeatureFlagScope.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB,CAAA;AAED,qBAAa,gBAAgB;IAC3B,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,YAAY,GAAG,gBAAgB;IAIrD,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,gBAAgB,EAAE,CAAC,EAAE,gBAAgB,GAAG,gBAAgB;IAcxE,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;gBAEf,KAAK,GAAE,YAAiB;IAIpC;;OAEG;IACI,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAIjC;;OAEG;IACI,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAIlC;;OAEG;IACI,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;CAGtC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
class FeatureFlagScope {
|
|
4
|
+
static create(flags) {
|
|
5
|
+
return new FeatureFlagScope(flags);
|
|
6
|
+
}
|
|
7
|
+
static merge(a, b) {
|
|
8
|
+
const merged = new FeatureFlagScope();
|
|
9
|
+
for (const [key, value] of a.flags) {
|
|
10
|
+
merged.flags.set(key, value);
|
|
11
|
+
}
|
|
12
|
+
for (const [key, value] of b.flags) {
|
|
13
|
+
merged.flags.set(key, value);
|
|
14
|
+
}
|
|
15
|
+
return merged;
|
|
16
|
+
}
|
|
17
|
+
constructor(flags = {}) {
|
|
18
|
+
this.flags = new Map(Object.entries(flags));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Enable a feature flag
|
|
23
|
+
*/
|
|
24
|
+
enable(name) {
|
|
25
|
+
this.flags.set(name, true);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Disable a feature flag
|
|
30
|
+
*/
|
|
31
|
+
disable(name) {
|
|
32
|
+
this.flags.set(name, false);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Check if a feature flag is enabled
|
|
37
|
+
*/
|
|
38
|
+
enabled(name) {
|
|
39
|
+
var _this$flags$get;
|
|
40
|
+
return (_this$flags$get = this.flags.get(name)) !== null && _this$flags$get !== void 0 ? _this$flags$get : false;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
exports.FeatureFlagScope = FeatureFlagScope;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type FeatureFlags } from './FeatureFlagScope';
|
|
3
|
+
export type FeatureFlagsProps = React.PropsWithChildren<{
|
|
4
|
+
flags: FeatureFlags;
|
|
5
|
+
}>;
|
|
6
|
+
export declare function FeatureFlags({ children, flags }: FeatureFlagsProps): React.JSX.Element;
|
|
7
|
+
//# sourceMappingURL=FeatureFlags.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FeatureFlags.d.ts","sourceRoot":"","sources":["../../src/FeatureFlags/FeatureFlags.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgB,MAAM,OAAO,CAAA;AAEpC,OAAO,EAAmB,KAAK,YAAY,EAAC,MAAM,oBAAoB,CAAA;AAGtE,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,iBAAiB,CAAC;IACtD,KAAK,EAAE,YAAY,CAAA;CACpB,CAAC,CAAA;AAEF,wBAAgB,YAAY,CAAC,EAAC,QAAQ,EAAE,KAAK,EAAC,EAAE,iBAAiB,qBAMhE"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var FeatureFlagContext = require('./FeatureFlagContext.js');
|
|
5
|
+
var FeatureFlagScope = require('./FeatureFlagScope.js');
|
|
6
|
+
var DefaultFeatureFlags = require('./DefaultFeatureFlags.js');
|
|
7
|
+
|
|
8
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
|
|
10
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
11
|
+
|
|
12
|
+
function FeatureFlags({
|
|
13
|
+
children,
|
|
14
|
+
flags
|
|
15
|
+
}) {
|
|
16
|
+
const value = React.useMemo(() => {
|
|
17
|
+
const scope = FeatureFlagScope.FeatureFlagScope.merge(DefaultFeatureFlags.DefaultFeatureFlags, FeatureFlagScope.FeatureFlagScope.create(flags));
|
|
18
|
+
return scope;
|
|
19
|
+
}, [flags]);
|
|
20
|
+
return /*#__PURE__*/React__default.default.createElement(FeatureFlagContext.FeatureFlagContext.Provider, {
|
|
21
|
+
value: value
|
|
22
|
+
}, children);
|
|
23
|
+
}
|
|
24
|
+
FeatureFlags.displayName = "FeatureFlags";
|
|
25
|
+
|
|
26
|
+
exports.FeatureFlags = FeatureFlags;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/FeatureFlags/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAA;AAC3C,YAAY,EAAC,iBAAiB,EAAC,MAAM,gBAAgB,CAAA;AACrD,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFeatureFlag.d.ts","sourceRoot":"","sources":["../../src/FeatureFlags/useFeatureFlag.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAGpD"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import React, { type ElementType } from 'react';
|
|
2
|
+
import type { ResponsiveValue } from '../hooks/useResponsiveValue';
|
|
3
|
+
type GapScale = 'none' | 'condensed' | 'normal' | 'spacious';
|
|
4
|
+
type Gap = GapScale | ResponsiveValue<GapScale>;
|
|
5
|
+
type DirectionScale = 'horizontal' | 'vertical';
|
|
6
|
+
type Direction = DirectionScale | ResponsiveValue<DirectionScale>;
|
|
7
|
+
type AlignScale = 'stretch' | 'start' | 'center' | 'end' | 'baseline';
|
|
8
|
+
type Align = AlignScale | ResponsiveValue<AlignScale>;
|
|
9
|
+
type WrapScale = 'wrap' | 'nowrap';
|
|
10
|
+
type Wrap = WrapScale | ResponsiveValue<WrapScale>;
|
|
11
|
+
type JustifyScale = 'start' | 'center' | 'end' | 'space-between' | 'space-evenly';
|
|
12
|
+
type Justify = JustifyScale | ResponsiveValue<JustifyScale>;
|
|
13
|
+
type PaddingScale = 'none' | 'condensed' | 'normal' | 'spacious';
|
|
14
|
+
type Padding = PaddingScale | ResponsiveValue<PaddingScale>;
|
|
15
|
+
type StackProps<As> = React.PropsWithChildren<{
|
|
16
|
+
/**
|
|
17
|
+
* Customize the element type of the rendered container
|
|
18
|
+
*/
|
|
19
|
+
as?: As;
|
|
20
|
+
/**
|
|
21
|
+
* Specify the gap between children elements in the stack
|
|
22
|
+
*/
|
|
23
|
+
gap?: Gap;
|
|
24
|
+
/**
|
|
25
|
+
* Specify the orientation for the stack container
|
|
26
|
+
* @default vertical
|
|
27
|
+
*/
|
|
28
|
+
direction?: Direction;
|
|
29
|
+
/**
|
|
30
|
+
* Specify the alignment between items in the cross-axis of the orientation
|
|
31
|
+
* @default stretch
|
|
32
|
+
*/
|
|
33
|
+
align?: Align;
|
|
34
|
+
/**
|
|
35
|
+
* Specify whether items are forced onto one line or can wrap onto multiple lines
|
|
36
|
+
* @default nowrap
|
|
37
|
+
*/
|
|
38
|
+
wrap?: Wrap;
|
|
39
|
+
/**
|
|
40
|
+
* Specify how items will be distributed in the stacking direction
|
|
41
|
+
* @default start
|
|
42
|
+
*/
|
|
43
|
+
justify?: Justify;
|
|
44
|
+
/**
|
|
45
|
+
* Specify the padding of the stack container
|
|
46
|
+
* @default none
|
|
47
|
+
*/
|
|
48
|
+
padding?: Padding;
|
|
49
|
+
}>;
|
|
50
|
+
declare function Stack<As extends ElementType>({ as, children, align, direction, gap, justify, padding, wrap, ...rest }: StackProps<As> & React.ComponentPropsWithoutRef<ElementType extends As ? As : 'div'>): React.JSX.Element;
|
|
51
|
+
type StackItemProps<As> = React.PropsWithChildren<{
|
|
52
|
+
/**
|
|
53
|
+
* Customize the element type of the rendered container
|
|
54
|
+
*/
|
|
55
|
+
as?: As;
|
|
56
|
+
/**
|
|
57
|
+
* Allow item to keep size or expand to fill the available space
|
|
58
|
+
* @default false
|
|
59
|
+
*/
|
|
60
|
+
grow?: boolean | ResponsiveValue<boolean>;
|
|
61
|
+
}>;
|
|
62
|
+
declare function StackItem<As extends ElementType>({ as, children, grow, ...rest }: StackItemProps<As> & React.ComponentPropsWithoutRef<ElementType extends As ? As : 'div'>): React.JSX.Element;
|
|
63
|
+
export { Stack, StackItem };
|
|
64
|
+
export type { StackProps, StackItemProps };
|
|
65
|
+
//# sourceMappingURL=Stack.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../../src/Stack/Stack.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,KAAK,WAAW,EAAC,MAAM,OAAO,CAAA;AAE7C,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,6BAA6B,CAAA;AA6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B,CAAC,CAAA;AAEF,iBAAS,KAAK,CAAC,EAAE,SAAS,WAAW,EAAE,EACrC,EAAE,EACF,QAAQ,EACR,KAAiB,EACjB,SAAsB,EACtB,GAAG,EACH,OAAiB,EACjB,OAAgB,EAChB,IAAe,EACf,GAAG,IAAI,EACR,EAAE,UAAU,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,wBAAwB,CAAC,WAAW,SAAS,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC,qBAiBtF;AA0BD,KAAK,cAAc,CAAC,EAAE,IAAI,KAAK,CAAC,iBAAiB,CAAC;IAChD;;OAEG;IACH,EAAE,CAAC,EAAE,EAAE,CAAA;IAEP;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,eAAe,CAAC,OAAO,CAAC,CAAA;CAC1C,CAAC,CAAA;AAEF,iBAAS,SAAS,CAAC,EAAE,SAAS,WAAW,EAAE,EACzC,EAAE,EACF,QAAQ,EACR,IAAY,EACZ,GAAG,IAAI,EACR,EAAE,cAAc,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,wBAAwB,CAAC,WAAW,SAAS,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC,qBAQ1F;AAED,OAAO,EAAC,KAAK,EAAE,SAAS,EAAC,CAAA;AACzB,YAAY,EAAC,UAAU,EAAE,cAAc,EAAC,CAAA"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var styled = require('styled-components');
|
|
5
|
+
var getResponsiveAttributes = require('../internal/utils/getResponsiveAttributes.js');
|
|
6
|
+
|
|
7
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
|
+
|
|
9
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
10
|
+
var styled__default = /*#__PURE__*/_interopDefault(styled);
|
|
11
|
+
|
|
12
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
13
|
+
const StyledStack = styled__default.default.div.withConfig({
|
|
14
|
+
displayName: "Stack__StyledStack",
|
|
15
|
+
componentId: "sc-x3xa2i-0"
|
|
16
|
+
})(["--Stack-gap-whenRegular:var(--stack-gap-normal,16px);--Stack-gap-whenNarrow:var(--stack-gap-normal,16px);--Stack-gap-whenWide:var(--Stack-gap-whenRegular);display:flex;flex-flow:column;align-items:stretch;align-content:flex-start;gap:var(--Stack-gap-whenNarrow);&[data-padding='none'],&[data-padding-narrow='none']{padding:0;}&[data-padding='condensed'],&[data-padding-narrow='condensed']{padding:var(--stack-padding-condensed,8px);}&[data-padding='normal'],&[data-padding-narrow='normal']{padding:var(--stack-padding-normal,16px);}&[data-padding='spacious'],&[data-padding-narrow='spacious']{padding:var(--stack-padding-spacious,24px);}&[data-orientation='horizontal'],&[data-orientation-narrow='horizontal']{flex-flow:row;}&[data-orientation='vertical'],&[data-orientation-narrow='vertical']{flex-flow:column;}&[data-gap='none'],&[data-gap-narrow='none']{--Stack-gap-whenNarrow:0;}&[data-gap='condensed'],&[data-gap-narrow='condensed']{--Stack-gap-whenNarrow:var(--stack-gap-condensed,8px);}&[data-gap='normal'],&[data-gap-narrow='normal']{--Stack-gap-whenNarrow:var(--stack-gap-normal,16px);}&[data-align='start'],&[data-align-narrow='start']{align-items:flex-start;}&[data-align='center'],&[data-align-narrow='center']{align-items:center;}&[data-align='end'],&[data-align-narrow='end']{align-items:flex-end;}&[data-align='baseline'],&[data-align-narrow='baseline']{align-items:baseline;}&[data-spread='start'],&[data-spread-narrow='start']{justify-content:flex-start;}&[data-spread='center'],&[data-spread-narrow='center']{justify-content:center;}&[data-spread='end'],&[data-spread-narrow='end']{justify-content:flex-end;}&[data-spread='space-between'],&[data-spread-narrow='space-between']{justify-content:space-between;}&[data-spread='space-evenly'],&[data-spread-narrow='space-evenly']{justify-content:space-evenly;}&[data-wrap='wrap'],&[data-wrap-narrow='wrap']{flex-wrap:wrap;}&[data-wrap='nowrap'],&[data-wrap-narrow='nowrap']{flex-wrap:nowrap;}@media (min-width:48rem){&[data-padding-regular='none']{padding:0;}&[data-padding-regular='condensed']{padding:var(--stack-padding-condensed,8px);}&[data-padding-regular='normal']{padding:var(--stack-padding-normal,16px);}&[data-padding-regular='spacious']{padding:var(--stack-padding-spacious,24px);}&[data-orientation-regular='horizontal']{flex-flow:row;}&[data-orientation-regular='vertical']{flex-flow:column;}&[data-gap-regular='none']{--Stack-gap-whenRegular:0;}&[data-gap-regular='condensed']{--Stack-gap-whenRegular:var(--stack-gap-condensed,8px);}&[data-gap-regular='normal']{--Stack-gap-whenRegular:var(--stack-gap-normal,16px);}&[data-gap-regular='spacious']{--Stack-gap-whenRegular:var(--stack-gap-spacious,24px);}&[data-align-regular='start']{align-items:flex-start;}&[data-align-regular='center']{align-items:center;}&[data-align-regular='end']{align-items:flex-end;}&[data-align-regular='baseline']{align-items:baseline;}&[data-spread-regular='start']{justify-content:flex-start;}&[data-spread-regular='center']{justify-content:center;}&[data-spread-regular='end']{justify-content:flex-end;}&[data-spread-regular='space-between']{justify-content:space-between;}&[data-spread-regular='space-evenly']{justify-content:space-evenly;}&[data-wrap-regular='wrap']{flex-wrap:wrap;}&[data-wrap-regular='nowrap']{flex-wrap:nowrap;}}@media (min-width:87.5rem){gap:var(--Stack-gap-whenWide);&[data-padding-wide='none']{padding:0;}&[data-padding-wide='condensed']{padding:var(--stack-padding-condensed,8px);}&[data-padding-wide='normal']{padding:var(--stack-padding-normal,16px);}&[data-padding-wide='spacious']{padding:var(--stack-padding-spacious,24px);}&[data-orientation-wide='horizontal']{flex-flow:row;}&[data-orientation-wide='vertical']{flex-flow:column;}&[data-gap-wide='none']{--Stack-gap-whenWide:0;}&[data-gap-wide='condensed']{--Stack-gap-whenWide:var(--stack-gap-condensed,8px);}&[data-gap-wide='normal']{--Stack-gap-whenWide:var(--stack-gap-normal,16px);}&[data-gap-wide='spacious']{--Stack-gap-whenWide:var(--stack-gap-spacious,24px);}&[data-align-wide='start']{align-items:flex-start;}&[data-align-wide='center']{align-items:center;}&[data-align-wide='end']{align-items:flex-end;}&[data-align-wide='baseline']{align-items:baseline;}&[data-spread-wide='start']{justify-content:flex-start;}&[data-spread-wide='center']{justify-content:center;}&[data-spread-wide='end']{justify-content:flex-end;}&[data-spread-wide='space-between']{justify-content:space-between;}&[data-spread-wide='space-evenly']{justify-content:space-evenly;}}"]);
|
|
17
|
+
function Stack({
|
|
18
|
+
as,
|
|
19
|
+
children,
|
|
20
|
+
align = 'stretch',
|
|
21
|
+
direction = 'vertical',
|
|
22
|
+
gap,
|
|
23
|
+
justify = 'start',
|
|
24
|
+
padding = 'none',
|
|
25
|
+
wrap = 'nowrap',
|
|
26
|
+
...rest
|
|
27
|
+
}) {
|
|
28
|
+
const BaseComponent = as !== null && as !== void 0 ? as : 'div';
|
|
29
|
+
return /*#__PURE__*/React__default.default.createElement(StyledStack, _extends({}, rest, {
|
|
30
|
+
as: BaseComponent
|
|
31
|
+
}, getResponsiveAttributes.getResponsiveAttributes('gap', gap), getResponsiveAttributes.getResponsiveAttributes('direction', direction), getResponsiveAttributes.getResponsiveAttributes('align', align), getResponsiveAttributes.getResponsiveAttributes('wrap', wrap), getResponsiveAttributes.getResponsiveAttributes('justify', justify), getResponsiveAttributes.getResponsiveAttributes('padding', padding)), children);
|
|
32
|
+
}
|
|
33
|
+
Stack.displayName = "Stack";
|
|
34
|
+
const StyledStackItem = styled__default.default.div.withConfig({
|
|
35
|
+
displayName: "Stack__StyledStackItem",
|
|
36
|
+
componentId: "sc-x3xa2i-1"
|
|
37
|
+
})(["flex:0 1 auto;min-inline-size:0;&[data-grow],&[data-grow-narrow]{flex-grow:1;}@media (min-width:48rem){&[data-grow-regular]{flex-grow:1;}}@media (min-width:87.5rem){&[data-grow-wide]{flex-grow:1;}}"]);
|
|
38
|
+
function StackItem({
|
|
39
|
+
as,
|
|
40
|
+
children,
|
|
41
|
+
grow = false,
|
|
42
|
+
...rest
|
|
43
|
+
}) {
|
|
44
|
+
const BaseComponent = as !== null && as !== void 0 ? as : 'div';
|
|
45
|
+
return /*#__PURE__*/React__default.default.createElement(StyledStackItem, _extends({}, rest, {
|
|
46
|
+
as: BaseComponent
|
|
47
|
+
}, getResponsiveAttributes.getResponsiveAttributes('grow', grow)), children);
|
|
48
|
+
}
|
|
49
|
+
StackItem.displayName = "StackItem";
|
|
50
|
+
|
|
51
|
+
exports.Stack = Stack;
|
|
52
|
+
exports.StackItem = StackItem;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Stack/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,IAAI,SAAS,EAAE,SAAS,EAAC,MAAM,SAAS,CAAA;AAErD,eAAO,MAAM,KAAK;;CAEhB,CAAA;AACF,YAAY,EAAC,UAAU,EAAE,cAAc,EAAC,MAAM,SAAS,CAAA"}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { IconButtonProps } from '../../Button';
|
|
3
3
|
type Size = 'small' | 'medium' | 'large';
|
|
4
|
+
type A11yProps = {
|
|
5
|
+
'aria-label': React.AriaAttributes['aria-label'];
|
|
6
|
+
'aria-labelledby'?: undefined;
|
|
7
|
+
} | {
|
|
8
|
+
'aria-label'?: undefined;
|
|
9
|
+
'aria-labelledby': React.AriaAttributes['aria-labelledby'];
|
|
10
|
+
};
|
|
4
11
|
export type ActionBarProps = {
|
|
5
12
|
size?: Size;
|
|
6
|
-
'aria-label'?: React.AriaAttributes['aria-label'];
|
|
7
13
|
children: React.ReactNode;
|
|
8
|
-
};
|
|
14
|
+
} & A11yProps;
|
|
9
15
|
export type ActionBarIconButtonProps = IconButtonProps;
|
|
10
16
|
export declare const ActionBar: React.FC<React.PropsWithChildren<ActionBarProps>>;
|
|
11
17
|
export declare const ActionBarIconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<unknown>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionBar.d.ts","sourceRoot":"","sources":["../../../src/drafts/ActionBar/ActionBar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkD,MAAM,OAAO,CAAA;AAWtE,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,cAAc,CAAA;AAwBjD,KAAK,IAAI,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;AAExC,
|
|
1
|
+
{"version":3,"file":"ActionBar.d.ts","sourceRoot":"","sources":["../../../src/drafts/ActionBar/ActionBar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkD,MAAM,OAAO,CAAA;AAWtE,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,cAAc,CAAA;AAwBjD,KAAK,IAAI,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;AAExC,KAAK,SAAS,GACV;IAAC,YAAY,EAAE,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;IAAC,iBAAiB,CAAC,EAAE,SAAS,CAAA;CAAC,GACjF;IAAC,YAAY,CAAC,EAAE,SAAS,CAAC;IAAC,iBAAiB,EAAE,KAAK,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAA;CAAC,CAAA;AAE1F,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,GAAG,SAAS,CAAA;AAEb,MAAM,MAAM,wBAAwB,GAAG,eAAe,CAAA;AAsHtD,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,CA6HvE,CAAA;AAED,eAAO,MAAM,mBAAmB,iFAU9B,CAAA;AAOF,eAAO,MAAM,eAAe,yBAsB3B,CAAA"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var ActionBar = require('./ActionBar.js');
|
|
3
|
+
var ActionBar$1 = require('./ActionBar.js');
|
|
4
4
|
|
|
5
|
-
Object.assign(ActionBar.ActionBar, {
|
|
6
|
-
IconButton: ActionBar.ActionBarIconButton,
|
|
7
|
-
Divider: ActionBar.VerticalDivider
|
|
5
|
+
const ActionBar = Object.assign(ActionBar$1.ActionBar, {
|
|
6
|
+
IconButton: ActionBar$1.ActionBarIconButton,
|
|
7
|
+
Divider: ActionBar$1.VerticalDivider
|
|
8
8
|
});
|
|
9
|
+
|
|
10
|
+
module.exports = ActionBar;
|
|
@@ -4,8 +4,8 @@ var clsx = require('clsx');
|
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var styled = require('styled-components');
|
|
6
6
|
var constants = require('../../constants.js');
|
|
7
|
-
var tabContainerElement = require('../../
|
|
8
|
-
require('../../
|
|
7
|
+
var tabContainerElement = require('../../node_modules/@github/tab-container-element/dist/tab-container-element.js');
|
|
8
|
+
require('../../node_modules/@github/tab-container-element/dist/tab-container-element-define.js');
|
|
9
9
|
var customElement = require('../../utils/custom-element.js');
|
|
10
10
|
var sx = require('../../sx.js');
|
|
11
11
|
var getGlobalFocusStyles = require('../../internal/utils/getGlobalFocusStyles.js');
|
package/lib/drafts/index.d.ts
CHANGED
|
@@ -25,5 +25,8 @@ export * from './SelectPanel2';
|
|
|
25
25
|
export { default as TabPanels } from './TabPanels';
|
|
26
26
|
export type { TabPanelsProps, TabPanelsTabProps, TabPanelsPanelProps } from './TabPanels';
|
|
27
27
|
export * from '../TooltipV2';
|
|
28
|
+
export { default as ActionBar } from './ActionBar';
|
|
28
29
|
export * from './ActionBar';
|
|
30
|
+
export { Stack } from '../Stack';
|
|
31
|
+
export type { StackProps, StackItemProps } from '../Stack';
|
|
29
32
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"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