@alphakits/ui 1.22.4 → 1.22.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/amount/component.js +1 -1
- package/dist/amount/index.js +1 -1
- package/dist/amount-input/component.js +1 -1
- package/dist/amount-input/index.js +1 -1
- package/dist/avatar/component.js +1 -1
- package/dist/avatar/index.js +1 -1
- package/dist/base-card/component.js +1 -1
- package/dist/base-card/index.js +1 -1
- package/dist/bottom-sheet/component.js +1 -1
- package/dist/bottom-sheet/index.js +1 -1
- package/dist/button/component.js +1 -1
- package/dist/button/index.js +1 -1
- package/dist/calendar/component.js +1 -1
- package/dist/calendar/components/days-table/component.js +1 -1
- package/dist/calendar/components/days-table/index.js +1 -1
- package/dist/calendar/components/header/index.js +1 -1
- package/dist/calendar/components/header//321/201omponent.js +1 -1
- package/dist/calendar/components/months-table/index.js +1 -1
- package/dist/calendar/components/months-table//321/201omponent.js +1 -1
- package/dist/calendar/components/select-button/index.js +1 -1
- package/dist/calendar/components/select-button//321/201omponent.js +1 -1
- package/dist/calendar/components/years-table/index.js +1 -1
- package/dist/calendar/components/years-table//321/201omponent.js +1 -1
- package/dist/calendar/index.js +1 -1
- package/dist/calendar-input/component.js +1 -1
- package/dist/calendar-input/index.js +1 -1
- package/dist/card/component.js +1 -1
- package/dist/card/images/index.js +1 -1
- package/dist/card/index.js +1 -1
- package/dist/cell/base/component.js +1 -1
- package/dist/cell/base/index.d.ts +1 -1
- package/dist/cell/base/index.js +1 -1
- package/dist/cell/component.js +1 -1
- package/dist/cell/index.js +1 -1
- package/dist/cell/pure/component.js +1 -1
- package/dist/cell/pure/index.js +1 -1
- package/dist/checkbox/component.js +1 -1
- package/dist/checkbox/index.js +1 -1
- package/dist/checkbox-group/component.js +1 -1
- package/dist/checkbox-group/index.js +1 -1
- package/dist/checkbox-lists/component.js +1 -1
- package/dist/checkbox-lists/index.js +1 -1
- package/dist/collapsable-row/addons.js +1 -1
- package/dist/collapsable-row/component.js +1 -1
- package/dist/collapsable-row/index.js +1 -1
- package/dist/collapse/component.js +1 -1
- package/dist/collapse/index.js +1 -1
- package/dist/component-931ddfe8.js +1 -0
- package/dist/copy-button/component.js +1 -1
- package/dist/copy-button/index.js +1 -1
- package/dist/date/component.js +1 -1
- package/dist/date/index.js +1 -1
- package/dist/date-switcher/component.js +1 -1
- package/dist/date-switcher/index.js +1 -1
- package/dist/footer/component.js +1 -1
- package/dist/footer/contact-block.js +1 -1
- package/dist/footer/index.js +1 -1
- package/dist/form/component.js +1 -1
- package/dist/form/components/form-footer/index.js +1 -1
- package/dist/form/components/form-loading/index.js +1 -1
- package/dist/form/components/form-wrapper/index.js +1 -1
- package/dist/form/components/index.d.ts +1 -1
- package/dist/form/components/index.js +1 -1
- package/dist/form/index.js +1 -1
- package/dist/form/templates/crud-form/index.js +1 -1
- package/dist/form/templates/filters-form/index.js +1 -1
- package/dist/form/templates/rest-form/form.js +1 -1
- package/dist/form/templates/rest-form/index.js +1 -1
- package/dist/form/utils/get-default-values.js +1 -1
- package/dist/form-control/component.js +1 -1
- package/dist/form-control/index.js +1 -1
- package/dist/grid/col/component.js +1 -1
- package/dist/grid/col/index.js +1 -1
- package/dist/grid/component.js +1 -1
- package/dist/grid/index.js +1 -1
- package/dist/grid/row/component.js +1 -1
- package/dist/grid/row/index.js +1 -1
- package/dist/header-search/component.js +1 -1
- package/dist/header-search/index.js +1 -1
- package/dist/heading/component.js +1 -1
- package/dist/heading/index.js +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/use-crud-form-requests/index.js +1 -1
- package/dist/hooks/use-get-one/index.js +1 -1
- package/dist/icon-button/component.js +1 -1
- package/dist/icon-button/index.js +1 -1
- package/dist/image/component.js +1 -1
- package/dist/image/constants.js +1 -1
- package/dist/image/image-base.js +1 -1
- package/dist/image/index.js +1 -1
- package/dist/image/use-image-render-component.js +1 -1
- package/dist/image/utils.js +1 -1
- package/dist/image-gallery/component.js +1 -1
- package/dist/image-gallery/components/header/index.js +1 -1
- package/dist/image-gallery/components/header-info-block/index.js +1 -1
- package/dist/image-gallery/components/image-viewer/index.js +1 -1
- package/dist/image-gallery/components/image-viewer/slide.js +1 -1
- package/dist/image-gallery/components/index.js +1 -1
- package/dist/image-gallery/index.js +1 -1
- package/dist/image-uploader/component.js +1 -1
- package/dist/image-uploader/index.js +1 -1
- package/dist/{index-2febc946.js → index-35df3371.js} +1 -1
- package/dist/index-6200214d.js +1 -0
- package/dist/{index-b5ac1279.js → index-756b7f6d.js} +2 -2
- package/dist/index.css +1 -1
- package/dist/info-block-header/component.js +1 -1
- package/dist/info-block-header/index.js +1 -1
- package/dist/info-block-item/component.js +1 -1
- package/dist/info-block-item/index.js +1 -1
- package/dist/input/component.js +1 -1
- package/dist/input/index.js +1 -1
- package/dist/input-autocomplete/autocomplete-field/index.js +1 -1
- package/dist/input-autocomplete/component.js +1 -1
- package/dist/input-autocomplete/index.js +1 -1
- package/dist/input-ghost/component.js +1 -1
- package/dist/input-ghost/index.js +1 -1
- package/dist/link/component.js +1 -1
- package/dist/link/index.js +1 -1
- package/dist/list-allert/component.js +1 -1
- package/dist/list-allert/index.js +1 -1
- package/dist/masked-input/component.js +1 -1
- package/dist/masked-input/index.js +1 -1
- package/dist/menu/component.js +1 -1
- package/dist/menu/components/content-header/index.js +1 -1
- package/dist/menu/components/index.js +1 -1
- package/dist/menu/components/menu-avatar/index.js +1 -1
- package/dist/menu/components/menu-back-button/index.js +1 -1
- package/dist/menu/components/menu-button/index.js +1 -1
- package/dist/menu/components/menu-buttons-list/index.js +1 -1
- package/dist/menu/components/user-button/index.js +1 -1
- package/dist/menu/index.js +1 -1
- package/dist/message/component.js +1 -1
- package/dist/message/index.js +1 -1
- package/dist/modal/components/modals/index.js +1 -1
- package/dist/modal/components/modals/modal.js +1 -1
- package/dist/modal/context.js +1 -1
- package/dist/modal/hooks/use-modal.js +1 -1
- package/dist/modal/index.js +1 -1
- package/dist/modal/utils/delete-property-by-id.js +1 -1
- package/dist/not-found/component.js +1 -1
- package/dist/not-found/index.js +1 -1
- package/dist/notification/component.js +1 -1
- package/dist/notification/index.js +1 -1
- package/dist/{parse-query-params-d8598111.js → parse-query-params-805d7079.js} +1 -1
- package/dist/picker-button/common/index.js +1 -1
- package/dist/picker-button/common/labeled-button/index.js +1 -1
- package/dist/picker-button/component.js +1 -1
- package/dist/picker-button/field/Component.js +1 -1
- package/dist/picker-button/field/index.js +1 -1
- package/dist/picker-button/index.js +1 -1
- package/dist/popover/component.js +1 -1
- package/dist/popover/index.js +1 -1
- package/dist/progress-bar/component.js +1 -1
- package/dist/progress-bar/index.js +1 -1
- package/dist/progress-index/component.js +1 -1
- package/dist/progress-index/index.js +1 -1
- package/dist/radio/component.js +1 -1
- package/dist/radio/index.js +1 -1
- package/dist/radio-group/component.js +1 -1
- package/dist/radio-group/index.js +1 -1
- package/dist/radio-groups/component.js +1 -1
- package/dist/radio-groups/index.js +1 -1
- package/dist/select/component.js +1 -1
- package/dist/select/components/base-select/component.js +1 -1
- package/dist/select/components/base-select/index.js +1 -1
- package/dist/select/components/field/component.js +1 -1
- package/dist/select/components/field/index.js +1 -1
- package/dist/select/components/index.js +1 -1
- package/dist/select/components/native-select/component.js +1 -1
- package/dist/select/components/native-select/index.js +1 -1
- package/dist/select/components/option/component.js +1 -1
- package/dist/select/components/option/index.js +1 -1
- package/dist/select/components/virtual-options-list/component.js +1 -1
- package/dist/select/components/virtual-options-list/index.js +1 -1
- package/dist/select/index.js +1 -1
- package/dist/select/presets/index.js +1 -1
- package/dist/select/presets/use-lazy-loading/index.js +1 -1
- package/dist/select/presets/use-select-with-loading/hook.js +1 -1
- package/dist/sidepanel-header/component.js +1 -1
- package/dist/sidepanel-header/index.js +1 -1
- package/dist/space/Item.js +1 -1
- package/dist/space/component.js +1 -1
- package/dist/space/index.js +1 -1
- package/dist/suffix-input/component.js +1 -1
- package/dist/suffix-input/index.js +1 -1
- package/dist/super-list-header/component.js +1 -1
- package/dist/super-list-header/index.js +1 -1
- package/dist/super-list-item/component.js +1 -1
- package/dist/super-list-item/index.js +1 -1
- package/dist/switch/component.js +1 -1
- package/dist/switch/index.js +1 -1
- package/dist/table/columns.js +1 -1
- package/dist/table/component.js +1 -1
- package/dist/table/components/cell/component.js +1 -1
- package/dist/table/components/cell/index.js +1 -1
- package/dist/table/components/cells/index.js +1 -1
- package/dist/table/components/empty-list/index.js +1 -1
- package/dist/table/components/error/index.js +1 -1
- package/dist/table/components/loading/index.js +1 -1
- package/dist/table/components/pagination/index.js +1 -1
- package/dist/table/components/table-header/index.js +1 -1
- package/dist/table/hooks/use-table-data.js +1 -1
- package/dist/table/index.d.ts +1 -1
- package/dist/table/index.js +1 -1
- package/dist/table/table.js +1 -1
- package/dist/table/utils/add-query-param.js +1 -1
- package/dist/table/utils/get-query-from-url.js +1 -1
- package/dist/table/utils/index.d.ts +1 -1
- package/dist/table/utils/index.js +1 -1
- package/dist/table/utils/parse-query-params.js +1 -1
- package/dist/table/utils/prepare-rows.js +1 -1
- package/dist/table/utils/query-adapter.js +1 -1
- package/dist/table/utils/remove-query-param.js +1 -1
- package/dist/table/utils/reset-query-param.js +1 -1
- package/dist/table-status/component.js +1 -1
- package/dist/table-status/index.js +1 -1
- package/dist/tag/component.js +1 -1
- package/dist/tag/index.js +1 -1
- package/dist/tags-list/component.js +1 -1
- package/dist/tags-list/index.js +1 -1
- package/dist/tariff-builder/component.js +1 -1
- package/dist/tariff-builder/index.js +1 -1
- package/dist/textarea/component.js +1 -1
- package/dist/textarea/index.js +1 -1
- package/dist/toast/component.js +1 -1
- package/dist/toast/index.js +1 -1
- package/dist/toast-notifier/component.js +1 -1
- package/dist/toast-notifier/index.js +1 -1
- package/dist/toast-plate/component.js +1 -1
- package/dist/toast-plate/index.js +1 -1
- package/dist/tooltip/component.js +1 -1
- package/dist/tooltip/index.js +1 -1
- package/dist/typography/component.js +1 -1
- package/dist/typography/index.js +1 -1
- package/dist/typography/text/component.js +1 -1
- package/dist/typography/text/index.js +1 -1
- package/dist/typography/title/component.js +1 -1
- package/dist/typography/title/index.js +1 -1
- package/dist/typography/title-responsive/component.js +1 -1
- package/dist/typography/title-responsive/index.js +1 -1
- package/dist/use-image-render-component-d9e8c942.js +1 -0
- package/dist/utils/format-date/index.js +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/show-toast/index.js +1 -1
- package/dist/with-suffix/component.js +1 -1
- package/dist/with-suffix/index.js +1 -1
- package/package.json +3 -9
- package/dist/component-b5e4cf32.js +0 -1
- package/dist/use-image-render-component-d889df1b.js +0 -1
- /package/dist/{_commonjsHelpers-2b1abe18.js → _commonjsHelpers-2dc295a1.js} +0 -0
- /package/dist/{colors.module-38dfa767.js → colors.module-5b52a3a9.js} +0 -0
- /package/dist/{common.module-2e87a255.js → common.module-f0dc2f7a.js} +0 -0
- /package/dist/{component-bc94041c.d.ts → component-6563fec5.d.ts} +0 -0
- /package/dist/{component-bc94041c.js → component-6563fec5.js} +0 -0
- /package/dist/{component-b5e4cf32.d.ts → component-931ddfe8.d.ts} +0 -0
- /package/dist/{contact-block-453f8847.d.ts → contact-block-ea5e216c.d.ts} +0 -0
- /package/dist/{contact-block-453f8847.js → contact-block-ea5e216c.js} +0 -0
- /package/dist/{gutters.module-c3dc98ea.js → gutters.module-a13a4c18.js} +0 -0
- /package/dist/{index-2febc946.d.ts → index-35df3371.d.ts} +0 -0
- /package/dist/{index-05de44ff.js → index-72fb3aee.js} +0 -0
- /package/dist/{intersection-observer-31da3d4c.js → intersection-observer-70a86ddd.js} +0 -0
- /package/dist/{parse-query-params-d8598111.d.ts → parse-query-params-805d7079.d.ts} +0 -0
- /package/dist/{slide-2aa7cfcb.d.ts → slide-e88bfe34.d.ts} +0 -0
- /package/dist/{slide-2aa7cfcb.js → slide-e88bfe34.js} +0 -0
- /package/dist/{tslib.es6-fc5cb6d0.js → tslib.es6-704fa8e2.js} +0 -0
- /package/dist/{use-image-render-component-d889df1b.d.ts → use-image-render-component-d9e8c942.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alphakits/ui",
|
|
3
|
-
"version": "1.22.
|
|
3
|
+
"version": "1.22.5",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@popperjs/core": "^2.3.3",
|
|
35
35
|
"@types/lodash": "^4.14.173",
|
|
36
|
+
"alpha-cli-icons": "^1.0.23",
|
|
36
37
|
"autosize": "4.0.2",
|
|
37
38
|
"axios": "^0.21.4",
|
|
38
39
|
"classnames": "^2.2.6",
|
|
@@ -46,6 +47,7 @@
|
|
|
46
47
|
"lodash": "4.17.21",
|
|
47
48
|
"postcss": "^8.2.9",
|
|
48
49
|
"query-string": "^7.0.1",
|
|
50
|
+
"react": "17.0.2",
|
|
49
51
|
"react-avatar-editor": "^13.0.0",
|
|
50
52
|
"react-dropzone": "^14.2.3",
|
|
51
53
|
"react-merge-refs": "1.1.0",
|
|
@@ -109,7 +111,6 @@
|
|
|
109
111
|
"@typescript-eslint/eslint-plugin": "^4.4.0",
|
|
110
112
|
"@typescript-eslint/parser": "^4.4.0",
|
|
111
113
|
"@wessberg/rollup-plugin-ts": "^1.3.6",
|
|
112
|
-
"alpha-cli-icons": "^1.0.23",
|
|
113
114
|
"alphakit-presets-lint": "1.0.0",
|
|
114
115
|
"babel-jest": "^26.6.3",
|
|
115
116
|
"babel-preset-env": "^1.7.0",
|
|
@@ -149,7 +150,6 @@
|
|
|
149
150
|
"prettier": "^2.1.1",
|
|
150
151
|
"prettier-eslint": "^11.0.0",
|
|
151
152
|
"prettier-eslint-cli": "^5.0.0",
|
|
152
|
-
"react": "17.0.2",
|
|
153
153
|
"react-docgen-typescript-loader": "^3.7.1",
|
|
154
154
|
"react-dom": "17.0.2",
|
|
155
155
|
"react-scripts": "3.4.1",
|
|
@@ -174,12 +174,6 @@
|
|
|
174
174
|
"typescript-plugin-css-modules": "2.2.0",
|
|
175
175
|
"url-loader": "4.1.0"
|
|
176
176
|
},
|
|
177
|
-
"peerDependencies": {
|
|
178
|
-
"alpha-cli-icons": "^1.0.17",
|
|
179
|
-
"axios": "^0.21.1",
|
|
180
|
-
"react": ">=16.13.0",
|
|
181
|
-
"react-dom": ">=16.13.0"
|
|
182
|
-
},
|
|
183
177
|
"prettier": "./node_modules/alphakit-presets-lint/prettier.js",
|
|
184
178
|
"eslintConfig": {
|
|
185
179
|
"extends": "./node_modules/alphakit-presets-lint/eslint/index.js"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{TableCell as e}from"./table/components/cell/component.js";import t,{useCallback as o,useEffect as l,useMemo as n}from"react";import r from"classnames";import{Cells as a}from"./table/components/cells/index.js";import{EmptyList as i}from"./table/components/empty-list/index.js";import{Error as c}from"./table/components/error/index.js";import{Loading as m}from"./table/components/loading/index.js";import{Pagination as s}from"./table/components/pagination/index.js";import{TableHeader as u}from"./table/components/table-header/index.js";import{useTableData as d}from"./table/hooks/use-table-data.js";import{addQueryParam as p}from"./table/utils/add-query-param.js";import{getTags as v}from"./table/utils/get-tags.js";import{Image as f}from"./image/component.js";import"./image/typings.js";import"./image/constants.js";import"./cell/pure/component.js";import{PhotoM as g}from"alpha-cli-icons";import{removeQueryParam as b}from"./table/utils/remove-query-param.js";import{resetQueryParam as w}from"./table/utils/reset-query-param.js";function h(e,t,o){return e?"string"==typeof e?t[e]:"function"==typeof e?e({row:t,refetch:o}):null:null}function C(e,t,o){return e?"string"==typeof e?t[e]:"function"==typeof e?e({row:t,refetch:o}):null:null}function E(e){var o=e.columns,l=e.data,n=e.refetch,r=l.map((function(e){return{row:e,cells:o.map((function(o){var l,r,a,i,c,m,s,u,d,p=C((null===(l=o.row)||void 0===l?void 0:l.title)||o.accessor,e,n),v=void 0;if(null===(r=o.row)||void 0===r?void 0:r.image){var b=h(null===(a=o.row)||void 0===a?void 0:a.image,e,n);v=b?t.createElement(f,{src:b,text:null==p?void 0:p.toString(),view:"ellipse"}):t.createElement(f,{icon:t.createElement(g,null),text:null==p?void 0:p.toString(),view:"ellipse"})}else if(null===(i=o.row)||void 0===i?void 0:i.icon){var w=h(null===(c=o.row)||void 0===c?void 0:c.icon,e,n);v=t.createElement(f,{icon:w||t.createElement(g,null),text:null==p?void 0:p.toString(),view:"ellipse"})}else(null===(m=o.row)||void 0===m?void 0:m.customAddon)&&(v=h(null===(s=o.row)||void 0===s?void 0:s.customAddon,e,n));return t.createElement(x.Cell,{title:p,subtitle:(null===(u=o.row)||void 0===u?void 0:u.subtitle)&&C(null===(d=o.row)||void 0===d?void 0:d.subtitle,e,n),addon:v})}))}}));return r}var j={table_wrapper:"index-module_table_wrapper__SeB5n",table:"index-module_table__9sbda",clickable:"index-module_clickable__k4S8g"};function k(e){var f=e.columns,g=e.searchPlaceholder,h=void 0===g?"Поиск по таблице":g,C=e.records,k=e.tagsBuilder,x=e.promise,y=e.onRowClick,_=e.onCreateClick,P=e.onFiltersClick,S=e.onDownloadClick,B=e.refetch,D=e.language,T=d({promise:x,records:C}),q=T.loading,F=T.error,N=T.data,A=T.total,L=T.params,R=T.pagesCount,V=T.updateData,z=_?function(){return _(V)}:void 0,G=o((function(e){w(e),V()}),[]);l((function(){V()}),[]);var H=function(){return P?P({submitCallback:function(e){return G(e)},initialValues:L}):null},I=function(e){p(e),V()},J=v({params:(null==L?void 0:L.where)||{},onDelete:function(e,t){b(e,t),V()},tagsBuilder:k,onClick:H}),K=n((function(){return E({columns:f,data:N,refetch:B||V})}),[N,f]);return t.createElement("div",{className:j.table_wrapper},t.createElement(u,{language:D,searchText:(null==L?void 0:L.searchText)||"",addParam:I,searchPlaceholder:h,tags:J,onCreateClick:z,onDownloadClick:S,onFiltersClick:H,showFiltersButton:!!P}),t.createElement("div",{className:j.table},t.createElement("table",{cellSpacing:"0",cellPadding:"0"},t.createElement(a,{sort:null==L?void 0:L.sort,order:null==L?void 0:L.order,addParam:I,columns:f}),t.createElement("tbody",null,F&&t.createElement(c,{language:D}),!K.length&&!q&&!F&&t.createElement(i,{language:D}),q&&t.createElement(m,{columnsLength:f.length}),K.map((function(e){var o,l=e.row,n=e.cells;return t.createElement("tr",{onClick:function(){return e=l,null==y?void 0:y(e,V);var e},className:r((o={},o[j.clickable]=!!y,o)),style:{visibility:q?"collapse":"visible"}},n.map((function(e){return e})))}))))),!!x&&t.createElement(s,{language:D,currentPage:L?+L.page:1,recordsPerPage:L?+L.limit:10,pagesCount:+R,addParam:I,total:+A}))}var x={Cell:e,TableComponent:k};export{x as T,k as a,E as p};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e,{useRef as t,useMemo as n,useEffect as o}from"react";import{PhotoS as i,PhotoM as r}from"alpha-cli-icons";import _ from"classnames";import{Spinner as m}from"./spinner/component.js";import{Typography as d}from"./typography/component.js";import"./image/typings.js";import{sizes as l,textSizes as a}from"./image/constants.js";import{getSrc as s,getCharsFromText as x}from"./image/utils.js";var c={component:"index-module_component__Jf39Y",default:"index-module_default__7yCk8",primary:"index-module_primary__NmfOf","primary-inverted":"index-module_primary-inverted__LgfAy",secondary:"index-module_secondary__mFC44","secondary-inverted":"index-module_secondary-inverted__A3WWS",positive:"index-module_positive__KObTG",negative:"index-module_negative__JSntK",attention:"index-module_attention__xn0w7",accent:"index-module_accent__OKgO0",broken:"index-module_broken__U-IUD",image:"index-module_image__m6QQ3",hint:"index-module_hint__U93qq",hint_text:"index-module_hint_text__iACDk",textContent:"index-module_textContent__zwpfH",xs:"index-module_xs__WMoNb",s:"index-module_s__Hg5M9",m:"index-module_m__C8KqW",l:"index-module_l__bAVTF",xl:"index-module_xl__4V4rQ",circle:"index-module_circle__a7zSR",ellipse:"index-module_ellipse__omc91",defs:"index-module_defs__-U1g-",textS:"index-module_textS__rn-Mq",textXs:"index-module_textXs__qpkPR",textM:"index-module_textM__mXb7s",textL:"index-module_textL__jV-69"},u=function(u){var p=u.src,f=void 0===p?"":p,g=u.resolution,v=u.size,y=u.alt,w=u.text,b=u.icon,h=e.useState("loading"),C=h[0],k=h[1],j=t(0),E=g||l[v],N=n((function(){return s(f,E)}),[E,f]);return o((function(){if(N){j.current=Date.now(),k("loading");var e=new Image;e.src=N,e.onload=function(){k("loaded")},e.onerror=function(){Date.now()-j.current<15e3?setTimeout((function(){e.src=N}),1e3):k("error")}}else k("error")}),[N]),b||("loading"===C?e.createElement(m,{className:c.spinner,size:"s",view:"dark"}):"error"===C&&w?e.createElement(d.Text,{className:_(c.textContent,c[a[v]]),view:"component",color:"tertiary",weight:"bold"},x(w.toUpperCase())):"error"===C?e.createElement(d.Text,{className:c.broken,tag:"div",color:"tertiary",view:"component",weight:"bold"},"xs"===v?e.createElement(i,null):e.createElement(r,null)):e.createElement("img",{className:c.image,src:f,alt:y}))};export{c as s,u};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{use-image-render-component-d889df1b.d.ts → use-image-render-component-d9e8c942.d.ts}
RENAMED
|
File without changes
|