@primer/components 0.0.0-202110118812 → 0.0.0-202110216818
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 +3 -5
- package/dist/browser.esm.js +4 -1
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +4 -1
- package/dist/browser.umd.js.map +1 -1
- package/lib/ActionList2/Description.d.ts +12 -0
- package/lib/ActionList2/Description.js +53 -0
- package/lib/ActionList2/Divider.d.ts +5 -0
- package/lib/ActionList2/Divider.js +33 -0
- package/lib/ActionList2/Group.d.ts +11 -0
- package/lib/ActionList2/Group.js +55 -0
- package/lib/ActionList2/Header.d.ts +26 -0
- package/lib/ActionList2/Header.js +57 -0
- package/lib/ActionList2/Item.d.ts +53 -0
- package/lib/ActionList2/Item.js +213 -0
- package/lib/ActionList2/LinkItem.d.ts +16 -0
- package/lib/ActionList2/LinkItem.js +54 -0
- package/lib/ActionList2/List.d.ts +26 -0
- package/lib/ActionList2/List.js +51 -0
- package/lib/ActionList2/Selection.d.ts +5 -0
- package/lib/ActionList2/Selection.js +73 -0
- package/lib/ActionList2/Visuals.d.ts +11 -0
- package/lib/ActionList2/Visuals.js +90 -0
- package/lib/ActionList2/hacks.d.ts +30 -0
- package/lib/ActionList2/hacks.js +38 -0
- package/lib/ActionList2/index.d.ts +40 -0
- package/lib/ActionList2/index.js +47 -0
- package/lib/Autocomplete/Autocomplete.d.ts +26 -26
- package/lib/Autocomplete/AutocompleteInput.d.ts +26 -26
- package/lib/Breadcrumbs.d.ts +7 -8
- package/lib/Breadcrumbs.js +12 -7
- package/lib/Button/Button.d.ts +24 -24
- package/lib/Button/ButtonClose.d.ts +43 -43
- package/lib/Button/ButtonDanger.d.ts +24 -24
- package/lib/Button/ButtonInvisible.d.ts +24 -24
- package/lib/Button/ButtonOutline.d.ts +24 -24
- package/lib/Button/ButtonPrimary.d.ts +24 -24
- package/lib/CircleOcticon.d.ts +40 -40
- package/lib/Dialog.d.ts +43 -43
- package/lib/Dropdown.d.ts +168 -168
- package/lib/DropdownMenu/DropdownButton.d.ts +44 -44
- package/lib/FilterList.d.ts +40 -40
- package/lib/Position.d.ts +4 -4
- package/lib/SelectMenu/SelectMenu.d.ts +235 -235
- package/lib/SelectMenu/SelectMenuItem.d.ts +1 -1
- package/lib/SelectMenu/SelectMenuModal.d.ts +1 -1
- package/lib/TextInputWithTokens.d.ts +26 -26
- package/lib/Timeline.d.ts +41 -41
- package/lib/Token/AvatarToken.d.ts +1 -1
- package/lib/Token/IssueLabelToken.d.ts +1 -1
- package/lib/Token/Token.d.ts +1 -1
- package/lib/experiments.d.ts +1 -0
- package/lib/experiments.js +18 -0
- package/lib/sx.d.ts +2 -0
- package/lib/sx.js +8 -0
- package/lib/utils/create-slots.d.ts +17 -0
- package/lib/utils/create-slots.js +105 -0
- package/lib/utils/use-force-update.d.ts +1 -0
- package/lib/utils/use-force-update.js +19 -0
- package/lib-esm/ActionList2/Description.d.ts +12 -0
- package/lib-esm/ActionList2/Description.js +37 -0
- package/lib-esm/ActionList2/Divider.d.ts +5 -0
- package/lib-esm/ActionList2/Divider.js +21 -0
- package/lib-esm/ActionList2/Group.d.ts +11 -0
- package/lib-esm/ActionList2/Group.js +38 -0
- package/lib-esm/ActionList2/Header.d.ts +26 -0
- package/lib-esm/ActionList2/Header.js +46 -0
- package/lib-esm/ActionList2/Item.d.ts +53 -0
- package/lib-esm/ActionList2/Item.js +185 -0
- package/lib-esm/ActionList2/LinkItem.d.ts +16 -0
- package/lib-esm/ActionList2/LinkItem.js +40 -0
- package/lib-esm/ActionList2/List.d.ts +26 -0
- package/lib-esm/ActionList2/List.js +34 -0
- package/lib-esm/ActionList2/Selection.d.ts +5 -0
- package/lib-esm/ActionList2/Selection.js +55 -0
- package/lib-esm/ActionList2/Visuals.d.ts +11 -0
- package/lib-esm/ActionList2/Visuals.js +68 -0
- package/lib-esm/ActionList2/hacks.d.ts +30 -0
- package/lib-esm/ActionList2/hacks.js +30 -0
- package/lib-esm/ActionList2/index.d.ts +40 -0
- package/lib-esm/ActionList2/index.js +33 -0
- package/lib-esm/Autocomplete/Autocomplete.d.ts +26 -26
- package/lib-esm/Autocomplete/AutocompleteInput.d.ts +26 -26
- package/lib-esm/Breadcrumbs.d.ts +7 -8
- package/lib-esm/Breadcrumbs.js +13 -8
- package/lib-esm/Button/Button.d.ts +24 -24
- package/lib-esm/Button/ButtonClose.d.ts +43 -43
- package/lib-esm/Button/ButtonDanger.d.ts +24 -24
- package/lib-esm/Button/ButtonInvisible.d.ts +24 -24
- package/lib-esm/Button/ButtonOutline.d.ts +24 -24
- package/lib-esm/Button/ButtonPrimary.d.ts +24 -24
- package/lib-esm/CircleOcticon.d.ts +40 -40
- package/lib-esm/Dialog.d.ts +43 -43
- package/lib-esm/Dropdown.d.ts +168 -168
- package/lib-esm/DropdownMenu/DropdownButton.d.ts +44 -44
- package/lib-esm/FilterList.d.ts +40 -40
- package/lib-esm/Position.d.ts +4 -4
- package/lib-esm/SelectMenu/SelectMenu.d.ts +235 -235
- package/lib-esm/SelectMenu/SelectMenuItem.d.ts +1 -1
- package/lib-esm/SelectMenu/SelectMenuModal.d.ts +1 -1
- package/lib-esm/TextInputWithTokens.d.ts +26 -26
- package/lib-esm/Timeline.d.ts +41 -41
- package/lib-esm/Token/AvatarToken.d.ts +1 -1
- package/lib-esm/Token/IssueLabelToken.d.ts +1 -1
- package/lib-esm/Token/Token.d.ts +1 -1
- package/lib-esm/experiments.d.ts +1 -0
- package/lib-esm/experiments.js +2 -0
- package/lib-esm/sx.d.ts +2 -0
- package/lib-esm/sx.js +3 -1
- package/lib-esm/utils/create-slots.d.ts +17 -0
- package/lib-esm/utils/create-slots.js +84 -0
- package/lib-esm/utils/use-force-update.d.ts +1 -0
- package/lib-esm/utils/use-force-update.js +6 -0
- package/package.json +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
# @primer/components
|
|
2
2
|
|
|
3
|
-
## 0.0.0-
|
|
4
|
-
|
|
5
|
-
### Major Changes
|
|
6
|
-
|
|
7
|
-
- [#1469](https://github.com/primer/react/pull/1469) [`76aa0739`](https://github.com/primer/react/commit/76aa07395e3ad06665dd374c1fc8c78525bfb88a) Thanks [@jfuchs](https://github.com/jfuchs)! - Breadcrumbs no longer accept styled props
|
|
3
|
+
## 0.0.0-202110216818
|
|
8
4
|
|
|
9
5
|
### Minor Changes
|
|
10
6
|
|
|
11
7
|
- [#1544](https://github.com/primer/react/pull/1544) [`5b55b0ab`](https://github.com/primer/react/commit/5b55b0ab8ea06b077e141c02285c81b99e246b77) Thanks [@jfuchs](https://github.com/jfuchs)! - The sx prop now has types that will inform autocomplete for color and shadow values that are key paths into the theme.
|
|
12
8
|
|
|
9
|
+
* [#1517](https://github.com/primer/react/pull/1517) [`19b430bb`](https://github.com/primer/react/commit/19b430bb48fcce76fc623378055a38392ef5d778) Thanks [@siddharthkp](https://github.com/siddharthkp)! - Add experimental `ActionList` with composable API
|
|
10
|
+
|
|
13
11
|
### Patch Changes
|
|
14
12
|
|
|
15
13
|
- Fake entry to force publishing
|
package/dist/browser.esm.js
CHANGED
|
@@ -810,8 +810,10 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
|
810
810
|
`,Sn=f.nav`
|
|
811
811
|
display: flex;
|
|
812
812
|
justify-content: space-between;
|
|
813
|
+
${It};
|
|
814
|
+
${Mt};
|
|
813
815
|
${rr};
|
|
814
|
-
`;function En({className:t,children:r,
|
|
816
|
+
`;function En({className:t,children:r,theme:o,...a}){const n=e.Children.map(r,(t=>e.createElement(Tn,{theme:o},t)));return e.createElement(Sn,Pt({className:t,"aria-label":"Breadcrumbs",theme:o},a),e.createElement(or,{as:"ol",my:0,pl:0},n))}En.displayName="Breadcrumbs";const Cn=f.a.attrs((e=>({activeClassName:"string"==typeof e.to?"selected":"",className:en(e.selected&&"selected",e.className),"aria-current":e.selected?"page":null})))`
|
|
815
817
|
color: ${Nt("colors.accent.fg")};
|
|
816
818
|
display: inline-block;
|
|
817
819
|
font-size: ${Nt("fontSizes.1")};
|
|
@@ -823,6 +825,7 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
|
823
825
|
color: ${Nt("colors.fg.default")};
|
|
824
826
|
pointer-events: none;
|
|
825
827
|
}
|
|
828
|
+
${It}
|
|
826
829
|
${rr};
|
|
827
830
|
`;En.displayName="Breadcrumbs",Cn.displayName="Breadcrumbs.Item";var zn=Object.assign(En,{Item:Cn});const Nn=Object.assign(En,{Item:Cn}),In={top:"Bottom",right:"Left",bottom:"Top",left:"Right"},An={top:"Left",right:"Top",bottom:"Left",left:"Top"};function Rn(e,t,r){const o=In[e].toLowerCase(),a=An[e].toLowerCase();return{[o]:"100%",[t||a]:t?r:"50%"}}const Ln=Tt({prop:"bg",key:"colors"}),On=Tt({prop:"borderColor",key:"colors"}),Mn=Tt({prop:"borderWidth",key:"borderWidths",scale:[0,1]});function Pn(t){var r;const o=e.useContext(b),a={...t,theme:null!==(r=t.theme)&&void 0!==r?r:o},{bg:n}=Ln(a),{borderColor:i}=On(a),{borderWidth:l}=Mn(a),{size:d=8,location:s="bottom"}=t,[c,f]=function(e){const[t,r]=e.split("-");return[t,r]}(s),g=An[c],u=[-d,0],p=[0,d],m=[d,0],h=`M${u}L${p}L${m}L${u}Z`,v=`M${u}L${p}L${m}`,x={top:`translate(${[d,2*d]}) rotate(180)`,right:`translate(${[0,d]}) rotate(-90)`,bottom:`translate(${[d,0]})`,left:`translate(${[2*d,d]}) rotate(90)`}[c];return e.createElement("svg",{width:2*d,height:2*d,style:{pointerEvents:"none",position:"absolute",...Rn(c,f,d),[`margin${g}`]:f?null:-d}},e.createElement("g",{transform:x},e.createElement("path",{d:h,fill:n}),e.createElement("path",{d:v,fill:"none",stroke:i,strokeWidth:l})))}Pn.displayName="Caret",Pn.locations=["top","top-left","top-right","right","right-top","right-bottom","bottom","bottom-left","bottom-right","left","left-top","left-bottom"],Pn.defaultProps={bg:"canvas.default",borderColor:"border.default",borderWidth:1};const Hn={small:56,medium:96,large:128},Dn=f.div`
|
|
828
831
|
display: ${e=>e.inline?"inline-flex":"flex"};
|