@lanaco/lnc-react-ui 4.0.198 → 4.0.200

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.
Files changed (247) hide show
  1. package/dist/Accordion.cjs +5 -5
  2. package/dist/Accordion.js +45 -56
  3. package/dist/AccordionDetails.cjs +3 -3
  4. package/dist/AccordionDetails.js +11 -25
  5. package/dist/AccordionSummary.cjs +4 -4
  6. package/dist/AccordionSummary.js +34 -44
  7. package/dist/ActionsToolbar.cjs +2 -3
  8. package/dist/ActionsToolbar.js +83 -135
  9. package/dist/Alert.cjs +10 -10
  10. package/dist/Alert.js +32 -64
  11. package/dist/Avatar.cjs +9 -9
  12. package/dist/Avatar.js +33 -72
  13. package/dist/Badge.cjs +6 -6
  14. package/dist/Badge.js +22 -47
  15. package/dist/BlogCategoryCardsSection.cjs +1 -1
  16. package/dist/BlogCategoryCardsSection.js +12 -14
  17. package/dist/BlogExploreSection.cjs +1 -1
  18. package/dist/BlogExploreSection.js +1 -1
  19. package/dist/BlogsSectionWithFilters.cjs +1 -1
  20. package/dist/BlogsSectionWithFilters.js +1 -1
  21. package/dist/Breadcrumbs.cjs +5 -5
  22. package/dist/Breadcrumbs.js +57 -87
  23. package/dist/Button.cjs +11 -11
  24. package/dist/Button.js +126 -173
  25. package/dist/ButtonGroup.cjs +8 -8
  26. package/dist/ButtonGroup.js +37 -49
  27. package/dist/CalorieCalculatorSection.cjs +8 -8
  28. package/dist/CalorieCalculatorSection.js +90 -97
  29. package/dist/CheckBoxInput.cjs +1 -1
  30. package/dist/CheckBoxInput.js +2 -5
  31. package/dist/Chip.cjs +14 -14
  32. package/dist/Chip.js +73 -111
  33. package/dist/ConfirmationForm.cjs +6 -6
  34. package/dist/ConfirmationForm.js +67 -109
  35. package/dist/ContactSection.cjs +1 -0
  36. package/dist/ContactSection.js +1 -0
  37. package/dist/Content.cjs +1 -1
  38. package/dist/Content.js +7 -15
  39. package/dist/{DailyMotion-ByXblnua.js → DailyMotion-BBcJkMo_.js} +1 -1
  40. package/dist/{DailyMotion-BaFUcQKQ.cjs → DailyMotion-CpZExcrg.cjs} +1 -1
  41. package/dist/DataView.cjs +1 -1
  42. package/dist/DataView.js +30 -50
  43. package/dist/DateInput.cjs +4 -4
  44. package/dist/DateInput.js +1347 -1383
  45. package/dist/DecimalInput.cjs +6 -6
  46. package/dist/DecimalInput.js +210 -263
  47. package/dist/DecimalInputV2.cjs +23 -23
  48. package/dist/DecimalInputV2.js +119 -176
  49. package/dist/DetailedProductsInfinitiveSection.cjs +1 -1
  50. package/dist/DetailedProductsInfinitiveSection.js +1 -1
  51. package/dist/DetailedProductsSection.cjs +1 -1
  52. package/dist/DetailedProductsSection.js +1 -1
  53. package/dist/DetailsView.cjs +9 -9
  54. package/dist/DetailsView.js +111 -162
  55. package/dist/DoubleRangeSlider.cjs +22 -22
  56. package/dist/DoubleRangeSlider.js +70 -95
  57. package/dist/DragAndDropFile.cjs +10 -10
  58. package/dist/DragAndDropFile.js +347 -402
  59. package/dist/DragDropFiles.cjs +4 -4
  60. package/dist/DragDropFiles.js +70 -124
  61. package/dist/Drawer.cjs +5 -5
  62. package/dist/Drawer.js +97 -135
  63. package/dist/Dropdown.cjs +1 -1
  64. package/dist/Dropdown.js +44 -213
  65. package/dist/DropdownItem.cjs +14 -14
  66. package/dist/DropdownItem.js +106 -142
  67. package/dist/DropdownLookup.cjs +1 -1
  68. package/dist/DropdownLookup.js +61 -242
  69. package/dist/DropdownMenu.cjs +4 -4
  70. package/dist/DropdownMenu.js +87 -149
  71. package/dist/EditableTable.cjs +10 -10
  72. package/dist/EditableTable.js +165 -331
  73. package/dist/{Facebook-BCqiOWZO.js → Facebook-BSWPEXjA.js} +1 -1
  74. package/dist/{Facebook-D9wwecSW.cjs → Facebook-DoKw-XxT.cjs} +1 -1
  75. package/dist/FaqSection.cjs +3 -3
  76. package/dist/FaqSection.js +119 -153
  77. package/dist/FileInput.cjs +7 -7
  78. package/dist/FileInput.js +66 -94
  79. package/dist/{FilePlayer-ktaNhf3p.js → FilePlayer-BtGpIWnK.js} +1 -1
  80. package/dist/{FilePlayer-DB6jnpeC.cjs → FilePlayer-D9az_lc_.cjs} +1 -1
  81. package/dist/FlexBox.cjs +6 -6
  82. package/dist/FlexBox.js +28 -63
  83. package/dist/FlexGrid.cjs +1 -1
  84. package/dist/FlexGrid.js +27 -67
  85. package/dist/FlexGridItem.cjs +6 -6
  86. package/dist/FlexGridItem.js +34 -62
  87. package/dist/Footer.cjs +1 -1
  88. package/dist/Footer.js +7 -15
  89. package/dist/FormField.cjs +7 -7
  90. package/dist/FormField.js +22 -47
  91. package/dist/FormView.cjs +6 -6
  92. package/dist/FormView.js +148 -195
  93. package/dist/Grid.cjs +2 -2
  94. package/dist/Grid.js +40 -65
  95. package/dist/GridItem.cjs +2 -2
  96. package/dist/GridItem.js +47 -80
  97. package/dist/Header.cjs +1 -1
  98. package/dist/Header.js +7 -15
  99. package/dist/HelpBannerSection.cjs +3 -3
  100. package/dist/HelpBannerSection.js +9 -15
  101. package/dist/Icon.cjs +4 -4
  102. package/dist/Icon.js +29 -55
  103. package/dist/IconButton.cjs +9 -9
  104. package/dist/IconButton.js +89 -127
  105. package/dist/{Kaltura-CvlN0HDg.js → Kaltura-BDqlEQpd.js} +1 -1
  106. package/dist/{Kaltura-CCdXLzOa.cjs → Kaltura-CK6JHUZC.cjs} +1 -1
  107. package/dist/Kanban.cjs +7 -7
  108. package/dist/Kanban.js +2033 -2098
  109. package/dist/KanbanActionsToolbar.cjs +4 -5
  110. package/dist/KanbanActionsToolbar.js +61 -96
  111. package/dist/KanbanCard-B9V9EjVE.js +137 -0
  112. package/dist/KanbanCard-DihrKn-I.cjs +30 -0
  113. package/dist/KanbanCard.cjs +1 -1
  114. package/dist/KanbanCard.js +2 -3
  115. package/dist/KanbanFooter.cjs +3 -3
  116. package/dist/KanbanFooter.js +37 -55
  117. package/dist/KanbanHeader.cjs +4 -4
  118. package/dist/KanbanHeader.js +49 -81
  119. package/dist/KanbanView.cjs +2 -2
  120. package/dist/KanbanView.js +106 -173
  121. package/dist/Link.cjs +7 -7
  122. package/dist/Link.js +20 -37
  123. package/dist/LocationSearchSection.cjs +1 -1
  124. package/dist/LocationSearchSection.js +1 -1
  125. package/dist/MasonryGeneralCardsSection.cjs +1 -1
  126. package/dist/MasonryGeneralCardsSection.js +1 -1
  127. package/dist/MenuItem.cjs +13 -13
  128. package/dist/MenuItem.js +101 -139
  129. package/dist/{Mixcloud-nG_VyBNt.cjs → Mixcloud-C1Boh2Bm.cjs} +1 -1
  130. package/dist/{Mixcloud-Bb8MTclI.js → Mixcloud-zAh6j7Ha.js} +1 -1
  131. package/dist/Modal.cjs +18 -19
  132. package/dist/Modal.js +131 -166
  133. package/dist/MultiSelectDropdown.cjs +1 -1
  134. package/dist/MultiSelectDropdown.js +25 -196
  135. package/dist/MultiSelectDropdownLookup.cjs +1 -1
  136. package/dist/MultiSelectDropdownLookup.js +27 -209
  137. package/dist/{Mux-DfYpGTiP.js → Mux-BGTG_Tvc.js} +1 -1
  138. package/dist/{Mux-BgB2a8kM.cjs → Mux-C6TwZeaq.cjs} +1 -1
  139. package/dist/NestedDropdownItem.cjs +3 -3
  140. package/dist/NestedDropdownItem.js +45 -67
  141. package/dist/NestedMenuItem.cjs +5 -5
  142. package/dist/NestedMenuItem.js +51 -78
  143. package/dist/NotificationContainer.cjs +10 -10
  144. package/dist/NotificationContainer.js +46 -79
  145. package/dist/NotificationMessage.cjs +2 -2
  146. package/dist/NotificationMessage.js +47 -64
  147. package/dist/NumberInput.cjs +23 -23
  148. package/dist/NumberInput.js +89 -149
  149. package/dist/PageLayout.cjs +2 -2
  150. package/dist/PageLayout.js +20 -28
  151. package/dist/Pagination.cjs +3 -3
  152. package/dist/Pagination.js +102 -185
  153. package/dist/PasswordInput.cjs +23 -23
  154. package/dist/PasswordInput.js +108 -137
  155. package/dist/Popover.cjs +1 -1
  156. package/dist/Popover.js +7 -32
  157. package/dist/PopoverContent.cjs +5 -5
  158. package/dist/PopoverContent.js +22 -28
  159. package/dist/PopoverTrigger.cjs +1 -1
  160. package/dist/PopoverTrigger.js +7 -12
  161. package/dist/ProgressBar.cjs +8 -8
  162. package/dist/ProgressBar.js +32 -59
  163. package/dist/RadioGroup.cjs +3 -3
  164. package/dist/RadioGroup.js +41 -72
  165. package/dist/RadioInput.cjs +28 -28
  166. package/dist/RadioInput.js +78 -123
  167. package/dist/RangeSlider.cjs +19 -19
  168. package/dist/RangeSlider.js +92 -119
  169. package/dist/ReviewsSection.cjs +13 -13
  170. package/dist/ReviewsSection.js +81 -101
  171. package/dist/SalesCampaignsSection.cjs +19 -19
  172. package/dist/SalesCampaignsSection.js +283 -324
  173. package/dist/SearchBar.cjs +10 -10
  174. package/dist/SearchBar.js +168 -188
  175. package/dist/SearchSection-B94YN_6P.cjs +161 -0
  176. package/dist/{SearchSection-DDQ_K98T.js → SearchSection-DAaMecR4.js} +337 -359
  177. package/dist/SearchSection.cjs +1 -1
  178. package/dist/SearchSection.js +2 -3
  179. package/dist/Separator.cjs +3 -3
  180. package/dist/Separator.js +14 -19
  181. package/dist/Sidebar.cjs +4 -5
  182. package/dist/Sidebar.js +33 -56
  183. package/dist/SimpleCategoriesSection.cjs +1 -1
  184. package/dist/SimpleCategoriesSection.js +1 -1
  185. package/dist/{SoundCloud-C86xwUG6.cjs → SoundCloud-C6R6E6Zc.cjs} +1 -1
  186. package/dist/{SoundCloud-DG91z39R.js → SoundCloud-lO8wg_0s.js} +1 -1
  187. package/dist/Spinner.cjs +18 -18
  188. package/dist/Spinner.js +37 -54
  189. package/dist/StatsSection.cjs +6 -6
  190. package/dist/StatsSection.js +15 -25
  191. package/dist/{Streamable-4uAnb3WN.cjs → Streamable-DZO95CiT.cjs} +1 -1
  192. package/dist/{Streamable-BAIWLgyD.js → Streamable-Dwa5ZEK4.js} +1 -1
  193. package/dist/Surface.cjs +4 -4
  194. package/dist/Surface.js +19 -34
  195. package/dist/SwipeableDrawer.cjs +8 -8
  196. package/dist/SwipeableDrawer.js +84 -136
  197. package/dist/TabItem.cjs +11 -11
  198. package/dist/TabItem.js +83 -118
  199. package/dist/Table.cjs +65 -65
  200. package/dist/Table.js +786 -1167
  201. package/dist/TableView.cjs +2 -2
  202. package/dist/TableView.js +113 -197
  203. package/dist/Tabs.cjs +4 -4
  204. package/dist/Tabs.js +41 -60
  205. package/dist/TextAreaInput.cjs +14 -14
  206. package/dist/TextAreaInput.js +131 -181
  207. package/dist/TextInput.cjs +23 -23
  208. package/dist/TextInput.js +78 -126
  209. package/dist/ThemeProvider.cjs +5 -5
  210. package/dist/ThemeProvider.js +35 -39
  211. package/dist/TimeInput.cjs +7 -7
  212. package/dist/TimeInput.js +46 -72
  213. package/dist/Toggle.cjs +20 -20
  214. package/dist/Toggle.js +78 -109
  215. package/dist/ToggleSection.cjs +6 -5
  216. package/dist/ToggleSection.js +49 -55
  217. package/dist/TreeMenu.cjs +5 -5
  218. package/dist/TreeMenu.js +43 -67
  219. package/dist/TreeMenuSeparator.cjs +3 -3
  220. package/dist/TreeMenuSeparator.js +12 -20
  221. package/dist/{Twitch-CVAj24ti.cjs → Twitch-B17oKtD0.cjs} +1 -1
  222. package/dist/{Twitch-DfXeW5Xs.js → Twitch-C73-dwWo.js} +1 -1
  223. package/dist/UploadedFile.cjs +11 -11
  224. package/dist/UploadedFile.js +73 -99
  225. package/dist/{Vidyard-De3pges0.js → Vidyard-B6GdBHsM.js} +1 -1
  226. package/dist/{Vidyard-DaCcaaH4.cjs → Vidyard-s1MMcaRm.cjs} +1 -1
  227. package/dist/{Vimeo-8wXdCXGs.cjs → Vimeo-J1l_SU2E.cjs} +1 -1
  228. package/dist/{Vimeo-N6I2qi_h.js → Vimeo-kzHz4Gco.js} +1 -1
  229. package/dist/{Wistia-BrUzHQoq.cjs → Wistia-CudQyDHM.cjs} +1 -1
  230. package/dist/{Wistia-dlV6n6tO.js → Wistia-w4jnqd7y.js} +1 -1
  231. package/dist/{YouTube-Cfsj4ZaP.cjs → YouTube-BAYKouHS.cjs} +1 -1
  232. package/dist/{YouTube-DNJxWqRm.js → YouTube-BKyipPZx.js} +1 -1
  233. package/dist/index-BdKi2ogu.js +39 -0
  234. package/dist/index-CRk3vcd4.cjs +95 -0
  235. package/dist/index-CX2A-q39.cjs +4 -0
  236. package/dist/{index-CWALXP1T.js → index-CwMCk9wV.js} +118 -145
  237. package/dist/index.cjs +1 -1
  238. package/dist/index.js +2 -2
  239. package/dist/{tag-BtS5lWJ0.js → tag-Dm8CW4TM.js} +21 -27
  240. package/dist/{tag-CmeZsPQt.cjs → tag-UQjq2_Ba.cjs} +7 -7
  241. package/package.json +1 -1
  242. package/dist/KanbanCard-68kSAXL6.js +0 -175
  243. package/dist/KanbanCard-BDvoqTDS.cjs +0 -30
  244. package/dist/SearchSection-BcbHP6QF.cjs +0 -161
  245. package/dist/index-Be-_NM9Q.cjs +0 -4
  246. package/dist/index-C0LcDEqa.js +0 -47
  247. package/dist/index-CSNxZFTX.cjs +0 -95
@@ -1 +1 @@
1
- "use strict";const _=require("./_commonjsHelpers-DwTZ_eVU.cjs"),f=require("react"),c=require("./SearchSection-BcbHP6QF.cjs");function b(t,e){for(var r=0;r<e.length;r++){const s=e[r];if(typeof s!="string"&&!Array.isArray(s)){for(const a in s)if(a!=="default"&&!(a in t)){const l=Object.getOwnPropertyDescriptor(s,a);l&&Object.defineProperty(t,a,l.get?l:{enumerable:!0,get:()=>s[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var P=Object.create,n=Object.defineProperty,g=Object.getOwnPropertyDescriptor,v=Object.getOwnPropertyNames,O=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty,j=(t,e,r)=>e in t?n(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,L=(t,e)=>{for(var r in e)n(t,r,{get:e[r],enumerable:!0})},h=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of v(e))!S.call(t,a)&&a!==r&&n(t,a,{get:()=>e[a],enumerable:!(s=g(e,a))||s.enumerable});return t},w=(t,e,r)=>(r=t!=null?P(O(t)):{},h(!t||!t.__esModule?n(r,"default",{value:t,enumerable:!0}):r,t)),M=t=>h(n({},"__esModule",{value:!0}),t),o=(t,e,r)=>(j(t,typeof e!="symbol"?e+"":e,r),r),y={};L(y,{default:()=>i});var d=M(y),p=w(f),u=c.utils,m=c.patterns;const D="https://cdn.embed.ly/player-0.1.0.min.js",T="playerjs";class i extends p.Component{constructor(){super(...arguments),o(this,"callPlayer",u.callPlayer),o(this,"duration",null),o(this,"currentTime",null),o(this,"secondsLoaded",null),o(this,"mute",()=>{this.callPlayer("mute")}),o(this,"unmute",()=>{this.callPlayer("unmute")}),o(this,"ref",e=>{this.iframe=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){(0,u.getSDK)(D,T).then(r=>{this.iframe&&(this.player=new r.Player(this.iframe),this.player.setLoop(this.props.loop),this.player.on("ready",this.props.onReady),this.player.on("play",this.props.onPlay),this.player.on("pause",this.props.onPause),this.player.on("seeked",this.props.onSeek),this.player.on("ended",this.props.onEnded),this.player.on("error",this.props.onError),this.player.on("timeupdate",({duration:s,seconds:a})=>{this.duration=s,this.currentTime=a}),this.player.on("buffered",({percent:s})=>{this.duration&&(this.secondsLoaded=this.duration*s)}),this.props.muted&&this.player.mute())},this.props.onError)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,r=!0){this.callPlayer("setCurrentTime",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e*100)}setLoop(e){this.callPlayer("setLoop",e)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.secondsLoaded}render(){const e=this.props.url.match(m.MATCH_URL_STREAMABLE)[1],r={width:"100%",height:"100%"};return p.default.createElement("iframe",{ref:this.ref,src:`https://streamable.com/o/${e}`,frameBorder:"0",scrolling:"no",style:r,allow:"encrypted-media; autoplay; fullscreen;"})}}o(i,"displayName","Streamable");o(i,"canPlay",m.canPlay.streamable);const E=_.getDefaultExportFromCjs(d),A=b({__proto__:null,default:E},[d]);exports.Streamable=A;
1
+ "use strict";const _=require("./_commonjsHelpers-DwTZ_eVU.cjs"),f=require("react"),c=require("./SearchSection-B94YN_6P.cjs");function b(t,e){for(var r=0;r<e.length;r++){const s=e[r];if(typeof s!="string"&&!Array.isArray(s)){for(const a in s)if(a!=="default"&&!(a in t)){const l=Object.getOwnPropertyDescriptor(s,a);l&&Object.defineProperty(t,a,l.get?l:{enumerable:!0,get:()=>s[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var P=Object.create,n=Object.defineProperty,g=Object.getOwnPropertyDescriptor,v=Object.getOwnPropertyNames,O=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty,j=(t,e,r)=>e in t?n(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,L=(t,e)=>{for(var r in e)n(t,r,{get:e[r],enumerable:!0})},h=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of v(e))!S.call(t,a)&&a!==r&&n(t,a,{get:()=>e[a],enumerable:!(s=g(e,a))||s.enumerable});return t},w=(t,e,r)=>(r=t!=null?P(O(t)):{},h(!t||!t.__esModule?n(r,"default",{value:t,enumerable:!0}):r,t)),M=t=>h(n({},"__esModule",{value:!0}),t),o=(t,e,r)=>(j(t,typeof e!="symbol"?e+"":e,r),r),y={};L(y,{default:()=>i});var d=M(y),p=w(f),u=c.utils,m=c.patterns;const D="https://cdn.embed.ly/player-0.1.0.min.js",T="playerjs";class i extends p.Component{constructor(){super(...arguments),o(this,"callPlayer",u.callPlayer),o(this,"duration",null),o(this,"currentTime",null),o(this,"secondsLoaded",null),o(this,"mute",()=>{this.callPlayer("mute")}),o(this,"unmute",()=>{this.callPlayer("unmute")}),o(this,"ref",e=>{this.iframe=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){(0,u.getSDK)(D,T).then(r=>{this.iframe&&(this.player=new r.Player(this.iframe),this.player.setLoop(this.props.loop),this.player.on("ready",this.props.onReady),this.player.on("play",this.props.onPlay),this.player.on("pause",this.props.onPause),this.player.on("seeked",this.props.onSeek),this.player.on("ended",this.props.onEnded),this.player.on("error",this.props.onError),this.player.on("timeupdate",({duration:s,seconds:a})=>{this.duration=s,this.currentTime=a}),this.player.on("buffered",({percent:s})=>{this.duration&&(this.secondsLoaded=this.duration*s)}),this.props.muted&&this.player.mute())},this.props.onError)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,r=!0){this.callPlayer("setCurrentTime",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e*100)}setLoop(e){this.callPlayer("setLoop",e)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.secondsLoaded}render(){const e=this.props.url.match(m.MATCH_URL_STREAMABLE)[1],r={width:"100%",height:"100%"};return p.default.createElement("iframe",{ref:this.ref,src:`https://streamable.com/o/${e}`,frameBorder:"0",scrolling:"no",style:r,allow:"encrypted-media; autoplay; fullscreen;"})}}o(i,"displayName","Streamable");o(i,"canPlay",m.canPlay.streamable);const E=_.getDefaultExportFromCjs(d),A=b({__proto__:null,default:E},[d]);exports.Streamable=A;
@@ -1,6 +1,6 @@
1
1
  import { g as m } from "./_commonjsHelpers-BkfeUUK-.js";
2
2
  import f from "react";
3
- import { u as _, p as b } from "./SearchSection-DDQ_K98T.js";
3
+ import { u as _, p as b } from "./SearchSection-DAaMecR4.js";
4
4
  function P(t, e) {
5
5
  for (var r = 0; r < e.length; r++) {
6
6
  const s = e[r];
package/dist/Surface.cjs CHANGED
@@ -1,7 +1,7 @@
1
- "use strict";const x=require("react/jsx-runtime"),p=require("./emotion-styled.browser.esm-BtEseadx.cjs"),r=require("./index-BpbMKBf_.cjs"),s=require("./utils-RnrgDDZP.cjs"),c=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),g=p.styled.div`
1
+ "use strict";const m=require("react/jsx-runtime"),l=require("./emotion-styled.browser.esm-BtEseadx.cjs"),r=require("./utils-RnrgDDZP.cjs"),c=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),x=l.styled.div`
2
2
  padding: ${e=>e.padding};
3
- box-shadow: ${e=>s.getBoxShadowValue(e.theme,e.boxShadow)};
4
- border-radius: ${e=>s.getBorderRadiusValueWithUnits(e.theme,e.borderRadius)};
3
+ box-shadow: ${e=>r.getBoxShadowValue(e.theme,e.boxShadow)};
4
+ border-radius: ${e=>r.getBorderRadiusValueWithUnits(e.theme,e.borderRadius)};
5
5
  width: ${e=>e.fullWidth?"100%":"fit-content"};
6
6
  border-top: 1px solid rgba(0, 0, 0, 0.04);
7
- `,o=({children:e,style:t={},className:d="",boxShadow:i="s",borderRadius:n="regular",padding:l="s",fullWidth:a=!1})=>{const u=c.useTheme(),m={xs:"0.25rem",s:"0.5rem",m:"0.75rem",l:"1rem",xl:"1.25rem",xxl:"1.5rem"};return x.jsx(g,{theme:u,style:t,className:"lnc-ui-surface "+d,borderRadius:n,boxShadow:i,padding:m[l],fullWidth:a,children:e})};o.propTypes={borderRadius:r.PropTypes.oneOf(["slight","regular","edged","curved","none"]),boxShadow:r.PropTypes.oneOf(["xs","s","m","l","xl","xxl"]),paddign:r.PropTypes.oneOf(["xs","s","m","l","xl","xxl"]),fullWidth:r.PropTypes.bool,className:r.PropTypes.string,style:r.PropTypes.object};module.exports=o;
7
+ `,h=({children:e,style:t={},className:s="",boxShadow:o="s",borderRadius:d="regular",padding:i="s",fullWidth:n=!1})=>{const a=c.useTheme(),u={xs:"0.25rem",s:"0.5rem",m:"0.75rem",l:"1rem",xl:"1.25rem",xxl:"1.5rem"};return m.jsx(x,{theme:a,style:t,className:"lnc-ui-surface "+s,borderRadius:d,boxShadow:o,padding:u[i],fullWidth:n,children:e})};module.exports=h;
package/dist/Surface.js CHANGED
@@ -1,24 +1,23 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
- import { s as x } from "./emotion-styled.browser.esm-BNN1dTl3.js";
3
- import { P as r } from "./index-CblbdqjE.js";
2
+ import { s as l } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
3
  import { j as u, a as f } from "./utils-DtEfC-TX.js";
5
- import { u as p } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
6
- const g = x.div`
4
+ import { u as h } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
5
+ const x = l.div`
7
6
  padding: ${(e) => e.padding};
8
7
  box-shadow: ${(e) => u(e.theme, e.boxShadow)};
9
8
  border-radius: ${(e) => f(e.theme, e.borderRadius)};
10
9
  width: ${(e) => e.fullWidth ? "100%" : "fit-content"};
11
10
  border-top: 1px solid rgba(0, 0, 0, 0.04);
12
- `, h = ({
11
+ `, w = ({
13
12
  children: e,
14
- style: o = {},
15
- className: s = "",
16
- boxShadow: a = "s",
17
- borderRadius: d = "regular",
18
- padding: t = "s",
19
- fullWidth: l = !1
13
+ style: r = {},
14
+ className: a = "",
15
+ boxShadow: t = "s",
16
+ borderRadius: o = "regular",
17
+ padding: s = "s",
18
+ fullWidth: d = !1
20
19
  }) => {
21
- const i = p(), m = {
20
+ const i = h(), m = {
22
21
  xs: "0.25rem",
23
22
  s: "0.5rem",
24
23
  m: "0.75rem",
@@ -27,33 +26,19 @@ const g = x.div`
27
26
  xxl: "1.5rem"
28
27
  };
29
28
  return /* @__PURE__ */ n(
30
- g,
29
+ x,
31
30
  {
32
31
  theme: i,
33
- style: o,
34
- className: "lnc-ui-surface " + s,
35
- borderRadius: d,
36
- boxShadow: a,
37
- padding: m[t],
38
- fullWidth: l,
32
+ style: r,
33
+ className: "lnc-ui-surface " + a,
34
+ borderRadius: o,
35
+ boxShadow: t,
36
+ padding: m[s],
37
+ fullWidth: d,
39
38
  children: e
40
39
  }
41
40
  );
42
41
  };
43
- h.propTypes = {
44
- borderRadius: r.oneOf([
45
- "slight",
46
- "regular",
47
- "edged",
48
- "curved",
49
- "none"
50
- ]),
51
- boxShadow: r.oneOf(["xs", "s", "m", "l", "xl", "xxl"]),
52
- paddign: r.oneOf(["xs", "s", "m", "l", "xl", "xxl"]),
53
- fullWidth: r.bool,
54
- className: r.string,
55
- style: r.object
56
- };
57
42
  export {
58
- h as default
43
+ w as default
59
44
  };
@@ -1,10 +1,10 @@
1
- "use strict";const f=require("react/jsx-runtime"),u=require("react"),t=require("./index-BpbMKBf_.cjs"),$=require("./emotion-styled.browser.esm-BtEseadx.cjs"),y=require("./utils-RnrgDDZP.cjs"),X=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),Y=(e,o,n,c,a)=>{if(e==="right"||e==="left"||o&&n)return"height: 100%;";if(!(o&&a===!0))return o?"height: "+c+";":"height: 0;"},A=(e,o,n,c,a)=>{if(e==="top"||e==="bottom"||o&&n)return"width: 100%;";if(!(o&&a===!0))return o?"width: "+c+";":"width: 0;"},B=$.styled.div`
1
+ "use strict";const f=require("react/jsx-runtime"),a=require("react"),x=require("./emotion-styled.browser.esm-BtEseadx.cjs"),m=require("./utils-RnrgDDZP.cjs"),U=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),V=(e,n,r,s,u)=>{if(e==="right"||e==="left"||n&&r)return"height: 100%;";if(!(n&&u===!0))return n?"height: "+s+";":"height: 0;"},X=(e,n,r,s,u)=>{if(e==="top"||e==="bottom"||n&&r)return"width: 100%;";if(!(n&&u===!0))return n?"width: "+s+";":"width: 0;"},Y=x.styled.div`
2
2
  touch-action: none;
3
3
  overflow: auto;
4
4
  max-height: ${e=>e.isOpen||e.unsetHeight===!1?"100dvh":0};
5
- ${e=>Y(e.direction,e.isOpen,e.isFullPage,e.drawerSize,e.unsetHeight)}
5
+ ${e=>V(e.direction,e.isOpen,e.isFullPage,e.drawerSize,e.unsetHeight)}
6
6
  max-width: ${e=>e.isOpen||e.unsetWidth===!1?"100vw":0};
7
- ${e=>A(e.direction,e.isOpen,e.isFullPage,e.drawerSize,e.unsetWidth)}
7
+ ${e=>X(e.direction,e.isOpen,e.isFullPage,e.drawerSize,e.unsetWidth)}
8
8
  position: ${e=>e.position};
9
9
  z-index: ${e=>e.zIndex};
10
10
  ${e=>e.direction==="bottom"?"bottom: 0":"top: 0"};
@@ -18,10 +18,10 @@
18
18
 
19
19
  box-shadow: 0 0 10px 5px rgba(0, 0, 0, 0.1);
20
20
 
21
- background-color: ${e=>y.getColorRgbaValue(e.theme,"Drawer",e.color,"enabled","background")};
22
- color: ${e=>y.getColorRgbaValue(e.theme,"Drawer",e.color,"enabled","text")};
23
- ${e=>y.getComponentTypographyCss(e.theme,"Drawer",e.size,"enabled")};
24
- `,G=$.styled.div`
21
+ background-color: ${e=>m.getColorRgbaValue(e.theme,"Drawer",e.color,"enabled","background")};
22
+ color: ${e=>m.getColorRgbaValue(e.theme,"Drawer",e.color,"enabled","text")};
23
+ ${e=>m.getComponentTypographyCss(e.theme,"Drawer",e.size,"enabled")};
24
+ `,N=x.styled.div`
25
25
  z-index: ${e=>e.zIndex};
26
26
  position: ${e=>e.position};
27
27
  top: 0;
@@ -30,4 +30,4 @@
30
30
  height: ${e=>e.isOpen===!0&&e.enableOverlay===!0?"100dvh":0};
31
31
  width: ${e=>e.isOpen===!0&&e.enableOverlay===!0?"100vw":0};
32
32
  background-color: ${e=>e.overlayColor};
33
- `,v=u.forwardRef((e,o)=>{const{direction:n="right",open:c=!1,duration:a=.8,enableOverlay:x=!0,zIndex:m=100,position:O="fixed",closeOnClickOutside:P=!0,closeOnSwipe:d=!0,isFullPage:z=!1,unsetHeight:S=!1,unsetWidth:C=!1,onClose:D=()=>{},onOpen:k=()=>{},className:q="",style:F={},color:H="neutral",overlayColor:I="rgba(123, 123, 123, 0.5)",size:j="small",drawerSize:E="12.5rem",children:W,...M}=e,_=X.useTheme(),i=u.useRef(),[g,b]=u.useState(!1);var h=null,p=null;function R(r){return r.touches||r.originalEvent.touches}function L(r){const l=R(r)[0];h=l.clientX,p=l.clientY}function N(r){if(!(!h||!p)){var l=r.touches[0].clientX,V=r.touches[0].clientY,w=h-l,T=p-V;Math.abs(w)>Math.abs(T)?w>0?d==!0&&n=="left"&&s():d==!0&&n=="right"&&s():T>0?d==!0&&n=="top"&&s():d==!0&&n=="bottom"&&s(),h=null,p=null}}u.useImperativeHandle(o,()=>({open(){U()},close(){s()},isOpen(){return g}}));const U=r=>{b(!0),k(r)},s=r=>{b(!1),D(r)};return u.useEffect(()=>{const r=l=>{i!=null&&i.current&&!(i!=null&&i.current.contains(l.target))&&P==!0&&s()};return document.addEventListener("click",r,!0),()=>{document.removeEventListener("click",r,!0)}},[]),f.jsx(f.Fragment,{children:f.jsx(G,{enableOverlay:x,overlayColor:I,isOpen:g,zIndex:m,position:O,children:f.jsx(B,{ref:i,zIndex:m,isOpen:g,direction:n,isFullPage:z,unsetHeight:S,unsetWidth:C,duration:a,color:H,theme:_,className:q,style:F,size:j,drawerSize:E,onTouchStart:L,onTouchMove:N,...M,children:W})})})});v.propTypes={direction:t.PropTypes.oneOf(["top","right","left","bottom"]),open:t.PropTypes.bool,duration:t.PropTypes.number,enableOverlay:t.PropTypes.bool,zIndex:t.PropTypes.number,position:t.PropTypes.string,closeOnClickOutside:t.PropTypes.bool,closeOnSwipe:t.PropTypes.bool,isFullPage:t.PropTypes.bool,unsetHeight:t.PropTypes.bool,unsetWidth:t.PropTypes.bool,onClose:t.PropTypes.func,onOpen:t.PropTypes.func,className:t.PropTypes.string,style:t.PropTypes.object,overlayColor:t.PropTypes.string,drawerSize:t.PropTypes.string,size:t.PropTypes.oneOf(["small","medium","large"]),color:t.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral","gray"])};module.exports=v;
33
+ `,A=a.forwardRef((e,n)=>{const{direction:r="right",duration:s=.8,enableOverlay:u=!0,zIndex:$=100,position:y="fixed",closeOnClickOutside:O=!0,closeOnSwipe:c=!0,isFullPage:z=!1,unsetHeight:D=!1,unsetWidth:S=!1,onClose:C=()=>{},onOpen:k=()=>{},className:T="",style:q={},color:E="neutral",overlayColor:F="rgba(123, 123, 123, 0.5)",size:H="small",drawerSize:I="12.5rem",children:j,...M}=e,W=U.useTheme(),i=a.useRef(),[g,w]=a.useState(!1);var h=null,d=null;function _(t){return t.touches||t.originalEvent.touches}function p(t){const l=_(t)[0];h=l.clientX,d=l.clientY}function P(t){if(!(!h||!d)){var l=t.touches[0].clientX,L=t.touches[0].clientY,b=h-l,v=d-L;Math.abs(b)>Math.abs(v)?b>0?c==!0&&r=="left"&&o():c==!0&&r=="right"&&o():v>0?c==!0&&r=="top"&&o():c==!0&&r=="bottom"&&o(),h=null,d=null}}a.useImperativeHandle(n,()=>({open(){R()},close(){o()},isOpen(){return g}}));const R=t=>{w(!0),k(t)},o=t=>{w(!1),C(t)};return a.useEffect(()=>{const t=l=>{i!=null&&i.current&&!(i!=null&&i.current.contains(l.target))&&O==!0&&o()};return document.addEventListener("click",t,!0),()=>{document.removeEventListener("click",t,!0)}},[]),f.jsx(f.Fragment,{children:f.jsx(N,{enableOverlay:u,overlayColor:F,isOpen:g,zIndex:$,position:y,children:f.jsx(Y,{ref:i,zIndex:$,isOpen:g,direction:r,isFullPage:z,unsetHeight:D,unsetWidth:S,duration:s,color:E,theme:W,className:T,style:q,size:H,drawerSize:I,onTouchStart:p,onTouchMove:P,...M,children:j})})})});module.exports=A;
@@ -1,22 +1,21 @@
1
- import { jsx as g, Fragment as V } from "react/jsx-runtime";
2
- import { forwardRef as q, useRef as A, useState as B, useImperativeHandle as G, useEffect as J } from "react";
3
- import { P as t } from "./index-CblbdqjE.js";
4
- import { s as y } from "./emotion-styled.browser.esm-BNN1dTl3.js";
5
- import { b as w, c as K } from "./utils-DtEfC-TX.js";
6
- import { u as Q } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
7
- const R = (e, o, r, u, s) => {
8
- if (e === "right" || e === "left" || o && r) return "height: 100%;";
9
- if (!(o && s === !0))
10
- return o ? "height: " + u + ";" : "height: 0;";
11
- }, Z = (e, o, r, u, s) => {
12
- if (e === "top" || e === "bottom" || o && r) return "width: 100%;";
13
- if (!(o && s === !0))
14
- return o ? "width: " + u + ";" : "width: 0;";
15
- }, _ = y.div`
1
+ import { jsx as f, Fragment as j } from "react/jsx-runtime";
2
+ import { forwardRef as N, useRef as V, useState as q, useImperativeHandle as A, useEffect as B } from "react";
3
+ import { s as b } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
+ import { b as w, c as G } from "./utils-DtEfC-TX.js";
5
+ import { u as J } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
6
+ const K = (e, n, r, l, u) => {
7
+ if (e === "right" || e === "left" || n && r) return "height: 100%;";
8
+ if (!(n && u === !0))
9
+ return n ? "height: " + l + ";" : "height: 0;";
10
+ }, Q = (e, n, r, l, u) => {
11
+ if (e === "top" || e === "bottom" || n && r) return "width: 100%;";
12
+ if (!(n && u === !0))
13
+ return n ? "width: " + l + ";" : "width: 0;";
14
+ }, R = b.div`
16
15
  touch-action: none;
17
16
  overflow: auto;
18
17
  max-height: ${(e) => e.isOpen || e.unsetHeight === !1 ? "100dvh" : 0};
19
- ${(e) => R(
18
+ ${(e) => K(
20
19
  e.direction,
21
20
  e.isOpen,
22
21
  e.isFullPage,
@@ -24,7 +23,7 @@ const R = (e, o, r, u, s) => {
24
23
  e.unsetHeight
25
24
  )}
26
25
  max-width: ${(e) => e.isOpen || e.unsetWidth === !1 ? "100vw" : 0};
27
- ${(e) => Z(
26
+ ${(e) => Q(
28
27
  e.direction,
29
28
  e.isOpen,
30
29
  e.isFullPage,
@@ -52,8 +51,8 @@ const R = (e, o, r, u, s) => {
52
51
  "background"
53
52
  )};
54
53
  color: ${(e) => w(e.theme, "Drawer", e.color, "enabled", "text")};
55
- ${(e) => K(e.theme, "Drawer", e.size, "enabled")};
56
- `, ee = y.div`
54
+ ${(e) => G(e.theme, "Drawer", e.size, "enabled")};
55
+ `, Z = b.div`
57
56
  z-index: ${(e) => e.zIndex};
58
57
  position: ${(e) => e.position};
59
58
  top: 0;
@@ -62,155 +61,104 @@ const R = (e, o, r, u, s) => {
62
61
  height: ${(e) => e.isOpen === !0 && e.enableOverlay === !0 ? "100dvh" : 0};
63
62
  width: ${(e) => e.isOpen === !0 && e.enableOverlay === !0 ? "100vw" : 0};
64
63
  background-color: ${(e) => e.overlayColor};
65
- `, te = q((e, o) => {
64
+ `, ie = N((e, n) => {
66
65
  const {
67
66
  direction: r = "right",
68
- open: u = !1,
69
- duration: s = 0.8,
70
- enableOverlay: O = !0,
71
- zIndex: m = 100,
72
- position: p = "fixed",
73
- closeOnClickOutside: x = !0,
74
- closeOnSwipe: c = !0,
75
- isFullPage: z = !1,
76
- unsetHeight: S = !1,
77
- unsetWidth: C = !1,
67
+ duration: l = 0.8,
68
+ enableOverlay: u = !0,
69
+ zIndex: g = 100,
70
+ position: x = "fixed",
71
+ closeOnClickOutside: y = !0,
72
+ closeOnSwipe: s = !0,
73
+ isFullPage: O = !1,
74
+ unsetHeight: z = !1,
75
+ unsetWidth: D = !1,
78
76
  //----------------
79
- onClose: D = () => {
77
+ onClose: S = () => {
80
78
  },
81
- onOpen: T = () => {
79
+ onOpen: k = () => {
82
80
  },
83
81
  //----------------
84
- className: k = "",
85
- style: H = {},
86
- color: I = "neutral",
87
- overlayColor: P = "rgba(123, 123, 123, 0.5)",
88
- size: F = "small",
89
- drawerSize: W = "12.5rem",
90
- children: E,
82
+ className: p = "",
83
+ style: C = {},
84
+ color: T = "neutral",
85
+ overlayColor: H = "rgba(123, 123, 123, 0.5)",
86
+ size: I = "small",
87
+ drawerSize: E = "12.5rem",
88
+ children: F,
91
89
  ...M
92
- } = e, j = Q(), i = A(), [f, b] = B(!1);
93
- var d = null, h = null;
94
- function L(n) {
95
- return n.touches || n.originalEvent.touches;
90
+ } = e, W = J(), i = V(), [d, m] = q(!1);
91
+ var c = null, h = null;
92
+ function P(t) {
93
+ return t.touches || t.originalEvent.touches;
96
94
  }
97
- function N(n) {
98
- const a = L(n)[0];
99
- d = a.clientX, h = a.clientY;
95
+ function L(t) {
96
+ const a = P(t)[0];
97
+ c = a.clientX, h = a.clientY;
100
98
  }
101
- function U(n) {
102
- if (!(!d || !h)) {
103
- var a = n.touches[0].clientX, Y = n.touches[0].clientY, $ = d - a, v = h - Y;
104
- Math.abs($) > Math.abs(v) ? $ > 0 ? c == !0 && r == "left" && l() : c == !0 && r == "right" && l() : v > 0 ? c == !0 && r == "top" && l() : c == !0 && r == "bottom" && l(), d = null, h = null;
99
+ function U(t) {
100
+ if (!(!c || !h)) {
101
+ var a = t.touches[0].clientX, Y = t.touches[0].clientY, $ = c - a, v = h - Y;
102
+ Math.abs($) > Math.abs(v) ? $ > 0 ? s == !0 && r == "left" && o() : s == !0 && r == "right" && o() : v > 0 ? s == !0 && r == "top" && o() : s == !0 && r == "bottom" && o(), c = null, h = null;
105
103
  }
106
104
  }
107
- G(o, () => ({
105
+ A(n, () => ({
108
106
  open() {
109
107
  X();
110
108
  },
111
109
  close() {
112
- l();
110
+ o();
113
111
  },
114
112
  isOpen() {
115
- return f;
113
+ return d;
116
114
  }
117
115
  }));
118
- const X = (n) => {
119
- b(!0), T(n);
120
- }, l = (n) => {
121
- b(!1), D(n);
116
+ const X = (t) => {
117
+ m(!0), k(t);
118
+ }, o = (t) => {
119
+ m(!1), S(t);
122
120
  };
123
- return J(() => {
124
- const n = (a) => {
125
- i != null && i.current && !(i != null && i.current.contains(a.target)) && x == !0 && l();
121
+ return B(() => {
122
+ const t = (a) => {
123
+ i != null && i.current && !(i != null && i.current.contains(a.target)) && y == !0 && o();
126
124
  };
127
- return document.addEventListener("click", n, !0), () => {
128
- document.removeEventListener("click", n, !0);
125
+ return document.addEventListener("click", t, !0), () => {
126
+ document.removeEventListener("click", t, !0);
129
127
  };
130
- }, []), /* @__PURE__ */ g(V, { children: /* @__PURE__ */ g(
131
- ee,
128
+ }, []), /* @__PURE__ */ f(j, { children: /* @__PURE__ */ f(
129
+ Z,
132
130
  {
133
- enableOverlay: O,
134
- overlayColor: P,
135
- isOpen: f,
136
- zIndex: m,
137
- position: p,
138
- children: /* @__PURE__ */ g(
139
- _,
131
+ enableOverlay: u,
132
+ overlayColor: H,
133
+ isOpen: d,
134
+ zIndex: g,
135
+ position: x,
136
+ children: /* @__PURE__ */ f(
137
+ R,
140
138
  {
141
139
  ref: i,
142
- zIndex: m,
143
- isOpen: f,
140
+ zIndex: g,
141
+ isOpen: d,
144
142
  direction: r,
145
- isFullPage: z,
146
- unsetHeight: S,
147
- unsetWidth: C,
148
- duration: s,
149
- color: I,
150
- theme: j,
151
- className: k,
152
- style: H,
153
- size: F,
154
- drawerSize: W,
155
- onTouchStart: N,
143
+ isFullPage: O,
144
+ unsetHeight: z,
145
+ unsetWidth: D,
146
+ duration: l,
147
+ color: T,
148
+ theme: W,
149
+ className: p,
150
+ style: C,
151
+ size: I,
152
+ drawerSize: E,
153
+ onTouchStart: L,
156
154
  onTouchMove: U,
157
155
  ...M,
158
- children: E
156
+ children: F
159
157
  }
160
158
  )
161
159
  }
162
160
  ) });
163
161
  });
164
- te.propTypes = {
165
- direction: t.oneOf(["top", "right", "left", "bottom"]),
166
- open: t.bool,
167
- /**
168
- * Duration of opening the drawer in ms
169
- */
170
- duration: t.number,
171
- /**
172
- * Determines whether to show the overlay
173
- */
174
- enableOverlay: t.bool,
175
- /**
176
- * z-index of Drawer
177
- */
178
- zIndex: t.number,
179
- position: t.string,
180
- closeOnClickOutside: t.bool,
181
- closeOnSwipe: t.bool,
182
- /**
183
- * Determines whether drawer takes up the whole page
184
- */
185
- isFullPage: t.bool,
186
- unsetHeight: t.bool,
187
- unsetWidth: t.bool,
188
- //---------------------------------------------------------------
189
- onClose: t.func,
190
- onOpen: t.func,
191
- //---------------------------------------------------------------
192
- className: t.string,
193
- style: t.object,
194
- overlayColor: t.string,
195
- /**
196
- * Determines drawer's height or width depending on direction
197
- */
198
- drawerSize: t.string,
199
- /**
200
- * Determines font size
201
- */
202
- size: t.oneOf(["small", "medium", "large"]),
203
- color: t.oneOf([
204
- "primary",
205
- "secondary",
206
- "success",
207
- "warning",
208
- "danger",
209
- "information",
210
- "neutral",
211
- "gray"
212
- ])
213
- };
214
162
  export {
215
- te as default
163
+ ie as default
216
164
  };
package/dist/TabItem.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";const z=require("react/jsx-runtime"),m=require("react"),r=require("./index-BpbMKBf_.cjs"),E=require("./emotion-styled.browser.esm-BtEseadx.cjs"),t=require("./utils-RnrgDDZP.cjs"),N=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),y=require("./useUpdateEffect-BtMgpgIV.cjs"),_=e=>e=="small"?"3.125rem":e=="medium"?"3.375rem":"3.625rem",D=E.styled.div`
1
+ "use strict";const _=require("react/jsx-runtime"),m=require("react"),j=require("./emotion-styled.browser.esm-BtEseadx.cjs"),t=require("./utils-RnrgDDZP.cjs"),z=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),f=require("./useUpdateEffect-BtMgpgIV.cjs"),H=e=>e=="small"?"3.125rem":e=="medium"?"3.375rem":"3.625rem",I=j.styled.div`
2
2
  box-sizing: border-box;
3
3
  ${e=>e.disabled===!0&&t.getDisabledStateCss(e.theme)};
4
4
  min-width: 5.25rem;
@@ -7,20 +7,20 @@
7
7
  justify-content: center;
8
8
  align-items: center;
9
9
 
10
- height: ${e=>_(e.size)};
11
- ${e=>t.getComponentTypographyCss(e.theme,i(e.type),e.size,"enabled")};
10
+ height: ${e=>H(e.size)};
11
+ ${e=>t.getComponentTypographyCss(e.theme,a(e.type),e.size,"enabled")};
12
12
  ${e=>!e.disabled&&"cursor: pointer"};
13
- color: ${e=>!e.disabled&&t.getColorRgbaValue(e.theme,i(e.type),e.color,e.active?"active":"enabled","text")};
14
- background-color: ${e=>e.type=="regular"||e.type=="pill"&&(e.disabled==!0||e.active==!1)?"transparent":!e.disabled&&t.getColorRgbaValue(e.theme,i(e.type),e.color,e.active?"active":"enabled","background","backgroundOpacity")};
15
- ${e=>e.type=="underline"&&e.last==!1&&"border-right: 1px solid "+t.getColorRgbaValue(e.theme,i(e.type),e.color,"enabled","line")};
13
+ color: ${e=>!e.disabled&&t.getColorRgbaValue(e.theme,a(e.type),e.color,e.active?"active":"enabled","text")};
14
+ background-color: ${e=>e.type=="regular"||e.type=="pill"&&(e.disabled==!0||e.active==!1)?"transparent":!e.disabled&&t.getColorRgbaValue(e.theme,a(e.type),e.color,e.active?"active":"enabled","background","backgroundOpacity")};
15
+ ${e=>e.type=="underline"&&e.last==!1&&"border-right: 1px solid "+t.getColorRgbaValue(e.theme,a(e.type),e.color,"enabled","line")};
16
16
  ${e=>h(e.theme,e.type,e.active,e.disabled,e.color,"enabled")};
17
- ${e=>F(e.theme,e.type,e.first,e.last)};
17
+ ${e=>N(e.theme,e.type,e.first,e.last)};
18
18
  &:hover {
19
- color: ${e=>!e.disabled&&t.getColorRgbaValue(e.theme,i(e.type),e.color,"hover","text")};
20
- background-color: ${e=>e.type=="regular"?"transparent":!e.disabled&&t.getColorRgbaValue(e.theme,i(e.type),e.color,"hover","background","backgroundOpacity")};
19
+ color: ${e=>!e.disabled&&t.getColorRgbaValue(e.theme,a(e.type),e.color,"hover","text")};
20
+ background-color: ${e=>e.type=="regular"?"transparent":!e.disabled&&t.getColorRgbaValue(e.theme,a(e.type),e.color,"hover","background","backgroundOpacity")};
21
21
  ${e=>h(e.theme,e.type,e.active,e.disabled,e.color,"hover")};
22
22
  }
23
23
  &:active {
24
- background: ${e=>t.getColorRgbaValue(e.theme,i(e.type),e.color,"active","background","backgroundOpacity")};
24
+ background: ${e=>t.getColorRgbaValue(e.theme,a(e.type),e.color,"active","background","backgroundOpacity")};
25
25
  }
26
- `,i=e=>e=="underline"?"TabUnderline":e=="pill"?"TabPill":"TabRegular",F=(e,l,n,a)=>{if(l=="pill")return`border-radius: ${t.getBorderRadiusValueWithUnits(e,"regular")}`;if(l=="underline"&&n)return`border-radius: ${t.getBorderRadiusValueWithUnits(e,"regular")} 0 0 ${t.getBorderRadiusValueWithUnits(e,"regular")}`;if(l=="underline"&&a)return`border-radius: 0 ${t.getBorderRadiusValueWithUnits(e,"regular")} ${t.getBorderRadiusValueWithUnits(e,"regular")} 0`},h=(e,l,n,a,u,o)=>{if(l!="pill")return`border-bottom: ${!a&&(n||o=="hover")?e.components[l==="regular"?"TabRegular":"TabUnderline"].default.enabled.lineHeight+"":e.components[l==="regular"?"TabRegular":"TabUnderline"].default.hover.lineHeight+""} solid ${t.getColorRgbaValue(e,i(l),u,n&&!a?"active":a?"enabled":o,"line")}`},T=m.forwardRef((e,l)=>{const{type:n="underline",disabled:a,first:u=!1,last:o=!1,fullWidth:v=!1,active:c=!1,activeIndex:d,index:s,onFocus:$=()=>{},onBlur:R=()=>{},onClick:g=()=>{},onKeyDown:C=()=>{},itemClick:b=()=>{},size:P="small",color:k="primary",className:x="",style:V={},children:U,...B}=e,w=N.useTheme(),[W,f]=m.useState(c),q={theme:w,color:k,size:P,style:V,className:"lnc-ui-tabitem "+x},O=j=>{b&&!a&&b(s),g&&!a&&g(j)};return y.useUpdateEffect(()=>{f(c)},[c]),y.useUpdateEffect(()=>{f(d==s)},[d]),z.jsx(D,{ref:l,onFocus:$,onBlur:R,onClick:O,onKeyDown:C,disabled:a,type:n,first:u,last:o,fullWidth:v,active:W,...q,...B,children:U})});T.propTypes={type:r.PropTypes.oneOf(["regular","pill","underline"]),first:r.PropTypes.bool,last:r.PropTypes.bool,fullWidth:r.PropTypes.bool,active:r.PropTypes.bool,onClick:r.PropTypes.func,onBlur:r.PropTypes.func,onFocus:r.PropTypes.func,onKeyDown:r.PropTypes.func,className:r.PropTypes.string,style:r.PropTypes.object,color:r.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral","gray"]),size:r.PropTypes.oneOf(["small","medium","large"])};module.exports=T;
26
+ `,a=e=>e=="underline"?"TabUnderline":e=="pill"?"TabPill":"TabRegular",N=(e,r,i,l)=>{if(r=="pill")return`border-radius: ${t.getBorderRadiusValueWithUnits(e,"regular")}`;if(r=="underline"&&i)return`border-radius: ${t.getBorderRadiusValueWithUnits(e,"regular")} 0 0 ${t.getBorderRadiusValueWithUnits(e,"regular")}`;if(r=="underline"&&l)return`border-radius: 0 ${t.getBorderRadiusValueWithUnits(e,"regular")} ${t.getBorderRadiusValueWithUnits(e,"regular")} 0`},h=(e,r,i,l,u,n)=>{if(r!="pill")return`border-bottom: ${!l&&(i||n=="hover")?e.components[r==="regular"?"TabRegular":"TabUnderline"].default.enabled.lineHeight+"":e.components[r==="regular"?"TabRegular":"TabUnderline"].default.hover.lineHeight+""} solid ${t.getColorRgbaValue(e,a(r),u,i&&!l?"active":l?"enabled":n,"line")}`},O=m.forwardRef((e,r)=>{const{type:i="underline",disabled:l,first:u=!1,last:n=!1,fullWidth:y=!1,active:d=!1,activeIndex:o,index:c,onFocus:v=()=>{},onBlur:$=()=>{},onClick:s=()=>{},onKeyDown:R=()=>{},itemClick:g=()=>{},size:C="small",color:k="primary",className:T="",style:V={},children:x,...U}=e,B=z.useTheme(),[W,b]=m.useState(d),q={theme:B,color:k,size:C,style:V,className:"lnc-ui-tabitem "+T},w=E=>{g&&!l&&g(c),s&&!l&&s(E)};return f.useUpdateEffect(()=>{b(d)},[d]),f.useUpdateEffect(()=>{b(o==c)},[o]),_.jsx(I,{ref:r,onFocus:v,onBlur:$,onClick:w,onKeyDown:R,disabled:l,type:i,first:u,last:n,fullWidth:y,active:W,...q,...U,children:x})});module.exports=O;