@kubed/components 0.2.36 → 0.3.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/Alert/Alert.js +4 -4
- package/cjs/Alert/Alert.js.map +1 -1
- package/cjs/Badge/Badge.js +4 -4
- package/cjs/Badge/Badge.js.map +1 -1
- package/cjs/Badge/BadgeAnchor.js.map +1 -1
- package/cjs/Banner/Banner.js.map +1 -1
- package/cjs/Button/Button.styles.js +9 -9
- package/cjs/Button/Button.styles.js.map +1 -1
- package/cjs/Checkbox/Checkbox.js +1 -1
- package/cjs/Checkbox/Checkbox.js.map +1 -1
- package/cjs/Collapse/Collapse.js.map +1 -1
- package/cjs/Collapse/CollapsePanel.js +1 -1
- package/cjs/DatePicker/generatePicker/generateRangePicker.js +1 -1
- package/cjs/DatePicker/generatePicker/generateRangePicker.js.map +1 -1
- package/cjs/DatePicker/generatePicker/generateSinglePicker.js +1 -1
- package/cjs/DatePicker/generatePicker/generateSinglePicker.js.map +1 -1
- package/cjs/Descriptions/Description.js.map +1 -1
- package/cjs/Divider/Divider.js +1 -1
- package/cjs/Drawer/Drawer.js +1 -1
- package/cjs/Drawer/Drawer.js.map +1 -1
- package/cjs/Drawer/Drawer.styles.js.map +1 -1
- package/cjs/Dropdown/Dropdown.js +1 -1
- package/cjs/Dropzone/DropzoneStatus.js.map +1 -1
- package/cjs/Entity/Entity.js.map +1 -1
- package/cjs/FilterInput/FilterInput.js +1 -1
- package/cjs/FilterInput/FilterInput.js.map +1 -1
- package/cjs/FilterInput/FilterInput.styles.js.map +1 -1
- package/cjs/Form/Form.js +3 -3
- package/cjs/Form/FormItem/FormItem.js +3 -3
- package/cjs/Form/FormItem/FormItem.js.map +1 -1
- package/cjs/Grid/Row.js +3 -3
- package/cjs/Grid/Row.js.map +1 -1
- package/cjs/Group/Group.js +12 -12
- package/cjs/Group/Group.js.map +1 -1
- package/cjs/Input/Input.js +1 -1
- package/cjs/InputNumber/InputNumber.js +2 -2
- package/cjs/Menu/Menu.js.map +1 -1
- package/cjs/Menu/MenuButton/MenuButton.js +1 -1
- package/cjs/Menu/MenuButton/MenuButton.styles.js.map +1 -1
- package/cjs/Modal/Modal.js +1 -1
- package/cjs/Modal/Modal.styles.js.map +1 -1
- package/cjs/Navs/Navs.js +1 -1
- package/cjs/Navs/Navs.styles.js.map +1 -1
- package/cjs/Progress/Progress.styles.js.map +1 -1
- package/cjs/Radio/Radio.js +9 -9
- package/cjs/Radio/Radio.js.map +1 -1
- package/cjs/Sheet/Sheet.styles.js +4 -4
- package/cjs/Skeleton/Skeleton.js +1 -1
- package/cjs/Skeleton/Skeleton.styles.js.map +1 -1
- package/cjs/Slider/Slider/Slider.js +1 -1
- package/cjs/Slider/Slider/Slider.js.map +1 -1
- package/cjs/Slider/SliderRoot/SliderRoot.js +1 -1
- package/cjs/Slider/SliderRoot/SliderRoot.js.map +1 -1
- package/cjs/Slider/SliderRoot/SliderRoot.styles.js +1 -1
- package/cjs/Slider/Thumb/Thumb.js +1 -1
- package/cjs/Slider/Track/Track.styles.js +7 -7
- package/cjs/StatusDot/StatusDot.js.map +1 -1
- package/cjs/Steps/Step/Step.js +1 -1
- package/cjs/Steps/Step/Step.styles.js.map +1 -1
- package/cjs/Steps/Steps.js +1 -1
- package/cjs/Steps/Steps.js.map +1 -1
- package/cjs/Steps/Steps.styles.js.map +1 -1
- package/cjs/Steps/TabStep/TabStep.js +1 -1
- package/cjs/Steps/TabStep/TabStep.styles.js.map +1 -1
- package/cjs/Switch/Switch.js +1 -1
- package/cjs/Table/BaseTable/BasePagination.js +1 -1
- package/cjs/Table/BaseTable/Table.js +2 -2
- package/cjs/Table/BaseTable/Table.js.map +1 -1
- package/cjs/Table/BaseTable/TableBody.js +1 -1
- package/cjs/Table/BaseTable/TableCell.js +1 -1
- package/cjs/Table/BaseTable/TableFilteredEmpty/Description.styles.js +2 -2
- package/cjs/Table/BaseTable/TableHead.js +1 -1
- package/cjs/Table/DataTable/Table.js.map +1 -1
- package/cjs/Table/DataTable/Toolbar.js +1 -1
- package/cjs/Tabs/Tabs.js +1 -1
- package/cjs/Tabs/Tabs.styles.js.map +1 -1
- package/cjs/Tag/Tag.js.map +1 -1
- package/cjs/Textarea/Textarea.js +2 -2
- package/cjs/Textarea/Textarea.js.map +1 -1
- package/cjs/Tooltip/Tooltip.styles.js.map +1 -1
- package/cjs/TypeSelect/TypeSelect.js +1 -1
- package/cjs/TypeSelect/TypeSelect.styles.js.map +1 -1
- package/cjs/theme/ThemeProvider.js.map +1 -1
- package/cjs/theme/presets/dark.js.map +1 -1
- package/cjs/utils/forwardRef.js.map +1 -1
- package/cjs/utils/types.js.map +1 -1
- package/esm/ActionConfirm/ActionConfirm.js.map +1 -1
- package/esm/Alert/Alert.js +4 -4
- package/esm/Alert/Alert.js.map +1 -1
- package/esm/Badge/Badge.js +3 -3
- package/esm/Badge/Badge.js.map +1 -1
- package/esm/Badge/BadgeAnchor.js +8 -8
- package/esm/Badge/BadgeAnchor.js.map +1 -1
- package/esm/Banner/Banner.js +5 -5
- package/esm/Banner/Banner.js.map +1 -1
- package/esm/Card/Card.js +3 -3
- package/esm/Card/Card.js.map +1 -1
- package/esm/Center/Center.js +2 -2
- package/esm/Center/Center.js.map +1 -1
- package/esm/Checkbox/Checkbox.js.map +1 -1
- package/esm/Collapse/Collapse.js +1 -1
- package/esm/Collapse/Collapse.js.map +1 -1
- package/esm/Collapse/CollapsePanel.js.map +1 -1
- package/esm/Container/Container.js +4 -4
- package/esm/Container/Container.js.map +1 -1
- package/esm/DatePicker/generatePicker/generateRangePicker.js +1 -1
- package/esm/DatePicker/generatePicker/generateRangePicker.js.map +1 -1
- package/esm/DatePicker/generatePicker/generateSinglePicker.js +1 -1
- package/esm/DatePicker/generatePicker/generateSinglePicker.js.map +1 -1
- package/esm/Descriptions/Description.js.map +1 -1
- package/esm/Divider/Divider.js.map +1 -1
- package/esm/Drawer/Drawer.js +1 -1
- package/esm/Drawer/Drawer.js.map +1 -1
- package/esm/Drawer/Drawer.styles.js.map +1 -1
- package/esm/Dropdown/Dropdown.js +2 -2
- package/esm/Dropdown/Dropdown.js.map +1 -1
- package/esm/Dropzone/Dropzone.styles.js.map +1 -1
- package/esm/Dropzone/DropzoneStatus.js.map +1 -1
- package/esm/Empty/Empty.js +1 -1
- package/esm/Empty/Empty.js.map +1 -1
- package/esm/Entity/Entity.js.map +1 -1
- package/esm/Entity/Field.js.map +1 -1
- package/esm/FilterInput/FilterInput.js +1 -1
- package/esm/FilterInput/FilterInput.js.map +1 -1
- package/esm/FilterInput/FilterInput.styles.js +3 -3
- package/esm/FilterInput/FilterInput.styles.js.map +1 -1
- package/esm/Form/Form.js +3 -3
- package/esm/Form/Form.js.map +1 -1
- package/esm/Form/FormItem/FormItem.js +4 -4
- package/esm/Form/FormItem/FormItem.js.map +1 -1
- package/esm/Grid/Col.js +5 -5
- package/esm/Grid/Col.js.map +1 -1
- package/esm/Grid/Row.js +4 -4
- package/esm/Grid/Row.js.map +1 -1
- package/esm/Group/Group.js +2 -2
- package/esm/Group/Group.js.map +1 -1
- package/esm/Input/Input.js +1 -1
- package/esm/Input/Input.js.map +1 -1
- package/esm/InputNumber/InputNumber.js.map +1 -1
- package/esm/Loading/loaders/Circle.js +2 -2
- package/esm/Loading/loaders/Circle.js.map +1 -1
- package/esm/Menu/Menu.js.map +1 -1
- package/esm/Menu/MenuButton/MenuButton.js +1 -1
- package/esm/Modal/ConfirmDialog/ConfirmDialog.js.map +1 -1
- package/esm/Modal/Modal.js +1 -1
- package/esm/Modal/Modal.js.map +1 -1
- package/esm/Modal/Modal.styles.js.map +1 -1
- package/esm/Navs/Navs.js +1 -1
- package/esm/Navs/Navs.js.map +1 -1
- package/esm/Navs/Navs.styles.js.map +1 -1
- package/esm/Progress/Progress.styles.js +8 -8
- package/esm/Progress/Progress.styles.js.map +1 -1
- package/esm/Radio/Radio.js +6 -6
- package/esm/Radio/Radio.js.map +1 -1
- package/esm/Select/Select.styles.js.map +1 -1
- package/esm/Sheet/Sheet.styles.js.map +1 -1
- package/esm/ShowMore/ShowMore.js +2 -2
- package/esm/ShowMore/ShowMore.js.map +1 -1
- package/esm/Skeleton/Skeleton.js +1 -1
- package/esm/Skeleton/Skeleton.js.map +1 -1
- package/esm/Slider/Marks/Marks.style.js +3 -3
- package/esm/Slider/Marks/Marks.style.js.map +1 -1
- package/esm/Slider/Slider/Slider.js +1 -1
- package/esm/Slider/Slider/Slider.js.map +1 -1
- package/esm/Slider/SliderRoot/SliderRoot.js +1 -1
- package/esm/Slider/SliderRoot/SliderRoot.js.map +1 -1
- package/esm/Slider/SliderRoot/SliderRoot.styles.js.map +1 -1
- package/esm/Slider/Thumb/Thumb.js +1 -1
- package/esm/Slider/Thumb/Thumb.js.map +1 -1
- package/esm/Slider/Thumb/Thumb.styles.js.map +1 -1
- package/esm/SliderConfirm/SliderConfirm.styles.js.map +1 -1
- package/esm/Snippet/Snippet.js.map +1 -1
- package/esm/StatusDot/StatusDot.js +6 -6
- package/esm/StatusDot/StatusDot.js.map +1 -1
- package/esm/Steps/Step/Step.js +1 -1
- package/esm/Steps/Step/Step.js.map +1 -1
- package/esm/Steps/Step/Step.styles.js.map +1 -1
- package/esm/Steps/Steps.js +1 -1
- package/esm/Steps/Steps.js.map +1 -1
- package/esm/Steps/Steps.styles.js.map +1 -1
- package/esm/Steps/TabStep/TabStep.js +1 -1
- package/esm/Steps/TabStep/TabStep.js.map +1 -1
- package/esm/Steps/TabStep/TabStep.styles.js.map +1 -1
- package/esm/Switch/Switch.js +1 -1
- package/esm/Switch/Switch.js.map +1 -1
- package/esm/Switch/Switch.styles.js.map +1 -1
- package/esm/Table/BaseTable/BasePagination.js +2 -2
- package/esm/Table/BaseTable/BasePagination.js.map +1 -1
- package/esm/Table/BaseTable/Table.js +2 -2
- package/esm/Table/BaseTable/Table.js.map +1 -1
- package/esm/Table/BaseTable/TableBody.js +1 -1
- package/esm/Table/BaseTable/TableBody.js.map +1 -1
- package/esm/Table/BaseTable/TableCell.js +1 -1
- package/esm/Table/BaseTable/TableEmpty/CreateButton.styles.js.map +1 -1
- package/esm/Table/BaseTable/TableEmpty/index.styles.js +2 -2
- package/esm/Table/BaseTable/TableEmpty/index.styles.js.map +1 -1
- package/esm/Table/BaseTable/TableFilteredEmpty/Description.styles.js.map +1 -1
- package/esm/Table/BaseTable/TableHead.js +1 -1
- package/esm/Table/BaseTable/TableHead.js.map +1 -1
- package/esm/Table/BaseTable/Toolbar/index.styles.js.map +1 -1
- package/esm/Table/DataTable/Table.js +1 -1
- package/esm/Table/DataTable/Table.js.map +1 -1
- package/esm/Table/DataTable/Toolbar.js.map +1 -1
- package/esm/Tabs/Tabs.js +1 -1
- package/esm/Tabs/Tabs.js.map +1 -1
- package/esm/Tabs/Tabs.styles.js.map +1 -1
- package/esm/Tag/Tag.js +1 -1
- package/esm/Tag/Tag.js.map +1 -1
- package/esm/Text/Text.js +2 -2
- package/esm/Text/Text.js.map +1 -1
- package/esm/Textarea/Textarea.js +1 -1
- package/esm/Textarea/Textarea.js.map +1 -1
- package/esm/Tooltip/Tooltip.styles.js.map +1 -1
- package/esm/TypeSelect/TypeSelect.js +1 -1
- package/esm/TypeSelect/TypeSelect.js.map +1 -1
- package/esm/TypeSelect/TypeSelect.styles.js.map +1 -1
- package/esm/utils/forwardRef.js.map +1 -1
- package/esm/utils/types.js.map +1 -1
- package/lib/src/Drawer/Drawer.d.ts +1 -1
- package/lib/src/Drawer/Drawer.d.ts.map +1 -1
- package/lib/src/Dropzone/Dropzone.d.ts +3 -3
- package/lib/src/Dropzone/DropzoneStatus.d.ts +3 -3
- package/lib/src/Dropzone/DropzoneStatus.d.ts.map +1 -1
- package/lib/src/Form/FormItem/FormItem.d.ts.map +1 -1
- package/lib/src/Menu/Menu.d.ts.map +1 -1
- package/lib/src/Select/Select.styles.d.ts +1 -1
- package/lib/src/Select/iconUtil.d.ts +1 -1
- package/lib/src/Sheet/Sheet.d.ts +2 -2
- package/lib/src/Sheet/Sheet.d.ts.map +1 -1
- package/lib/src/Slider/SliderRoot/SliderRoot.d.ts.map +1 -1
- package/lib/src/Steps/Step/Step.styles.d.ts.map +1 -1
- package/lib/src/Steps/Steps.d.ts.map +1 -1
- package/lib/src/Table/DataTable/Table.d.ts +1 -57
- package/lib/src/Table/DataTable/Table.d.ts.map +1 -1
- package/lib/src/Table/DataTable/interfaces.d.ts +56 -1
- package/lib/src/Table/DataTable/interfaces.d.ts.map +1 -1
- package/lib/src/utils/types.d.ts +4 -3
- package/lib/src/utils/types.d.ts.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Marks.style.js","sources":["../../../src/Slider/Marks/Marks.style.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const sizes = {\n xs: 4,\n sm: 6,\n md: 8,\n lg: 10,\n xl: 12,\n};\n\ninterface MarkStylesProps {\n size?: number;\n}\n\nexport const Mark = styled.div<MarkStylesProps>`\n box-sizing: border-box;\n border: 2px solid ${({ theme }) => theme.palette.colors.green[1]};\n z-index: 1;\n height: 8px;\n width: 8px;\n border-radius: 1000px;\n transform: translateX(-4px);\n`;\n\nexport const MarkLabel = styled.div<MarkStylesProps>`\n transform: translate(-50%, 0);\n font-size: 12px;\n color: ${({ theme }) => theme.palette.accents_4};\n margin-top: 9px;\n`;\n"],"names":[],"mappings":";;AAA6C,MAAoC,IAAI,
|
|
1
|
+
{"version":3,"file":"Marks.style.js","sources":["../../../src/Slider/Marks/Marks.style.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const sizes = {\n xs: 4,\n sm: 6,\n md: 8,\n lg: 10,\n xl: 12,\n};\n\ninterface MarkStylesProps {\n size?: number;\n}\n\nexport const Mark = styled.div<MarkStylesProps>`\n box-sizing: border-box;\n border: 2px solid ${({ theme }) => theme.palette.colors.green[1]};\n z-index: 1;\n height: 8px;\n width: 8px;\n border-radius: 1000px;\n transform: translateX(-4px);\n`;\n\nexport const MarkLabel = styled.div<MarkStylesProps>`\n transform: translate(-50%, 0);\n font-size: 12px;\n color: ${({ theme }) => theme.palette.accents_4};\n margin-top: 9px;\n`;\n"],"names":["e"],"mappings":";;AAA6C,MAAoC,IAAI,CAACA,CAAC,CAAC,GAAG,CAAC;AAC5F;AACA,oBAAoB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAC7D;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,SAAS,CAACA,CAAC,CAAC,GAAG,CAAC;AAClB;AACA;AACA,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AAC5C;AACA;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import u,{forwardRef as K,useState as q,useRef as B}from"react";import{useUncontrolled as G,useMove as W,useMergedRef as J}from"@kubed/hooks";import{getUnevenPosition as Q}from"../utils/getPosition.js";import{getUnevenChangeValue as X}from"../utils/getChangeValue.js";import{Thumb as Y}from"../Thumb/Thumb.js";import{Track as Z}from"../Track/Track.js";import{SliderRoot as $}from"../SliderRoot/SliderRoot.js";var ee=Object.defineProperty,ae=Object.defineProperties,re=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,k=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,j=(e,a,t)=>a in e?ee(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,te=(e,a)=>{for(var t in a||(a={}))k.call(a,t)&&j(e,t,a[t]);if(m)for(var t of m(a))x.call(a,t)&&j(e,t,a[t]);return e},le=(e,a)=>ae(e,re(a)),
|
|
1
|
+
import u,{forwardRef as K,useState as q,useRef as B}from"react";import{useUncontrolled as G,useMove as W,useMergedRef as J}from"@kubed/hooks";import{getUnevenPosition as Q}from"../utils/getPosition.js";import{getUnevenChangeValue as X}from"../utils/getChangeValue.js";import{Thumb as Y}from"../Thumb/Thumb.js";import{Track as Z}from"../Track/Track.js";import{SliderRoot as $}from"../SliderRoot/SliderRoot.js";var ee=Object.defineProperty,ae=Object.defineProperties,re=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,k=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,j=(e,a,t)=>a in e?ee(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,te=(e,a)=>{for(var t in a||(a={}))k.call(a,t)&&j(e,t,a[t]);if(m)for(var t of m(a))x.call(a,t)&&j(e,t,a[t]);return e},le=(e,a)=>ae(e,re(a)),oe=(e,a)=>{var t={};for(var l in e)k.call(e,l)&&a.indexOf(l)<0&&(t[l]=e[l]);if(e!=null&&m)for(var l of m(e))a.indexOf(l)<0&&x.call(e,l)&&(t[l]=e[l]);return t};const C=K((e,a)=>{var t=e,{classNames:l,styles:c,disabled:f,color:ne,value:M,onChange:T,size:g="md",radius:D="xl",min:n=0,max:s=100,decimals:L=0,step:d=1,defaultValue:P,name:A,marks:b=[],label:p=r=>r,labelTransitionTimingFunction:se,labelAlwaysOn:E=!1,thumbLabel:R="",showLabelOnHover:v=!0,thumbChildren:S}=t,N=oe(t,["classNames","styles","disabled","color","value","onChange","size","radius","min","max","decimals","step","defaultValue","name","marks","label","labelTransitionTimingFunction","labelAlwaysOn","thumbLabel","showLabelOnHover","thumbChildren"]);const[V,y]=q(!1),[o,i]=G({value:M,defaultValue:P,finalValue:0,rule:r=>typeof r=="number",onChange:T}),h=B(null),w=Q({value:o,min:n,max:s,marks:b}),z=typeof p=="function"?p(o):p,H=r=>{if(f)return;const I=X({value:r,marks:b,decimals:L,min:n,max:s,step:d});i(I)},{ref:O,active:U}=W(({x:r})=>H(r));function F(r){r.cancelable&&(r.preventDefault(),r.stopPropagation())}const _=r=>{switch(r.nativeEvent.code){case"ArrowUp":case"ArrowRight":{r.preventDefault(),h.current.focus(),i(Math.min(Math.max(o+d,n),s));break}case"ArrowDown":case"ArrowLeft":{r.preventDefault(),h.current.focus(),i(Math.min(Math.max(o-d,n),s));break}}};return u.createElement($,le(te({},N),{size:g,ref:J(O,a),onMouseDownCapture:()=>{var r;return(r=O.current)==null?void 0:r.focus()},onKeyDownCapture:_,classNames:l,styles:c}),u.createElement(Z,{offset:0,filled:w,disabled:f,marks:b,size:g,radius:D,min:n,max:s,value:o,onChange:i,onMouseEnter:v?()=>y(!0):void 0,onMouseLeave:v?()=>y(!1):void 0,styles:c,classNames:l},u.createElement(Y,{max:s,min:n,value:o,disabled:f,position:w,dragging:U,label:z,ref:h,onMouseDown:F,labelAlwaysOn:E,classNames:l,styles:c,thumbLabel:R,showLabelOnHover:v&&V},S)),u.createElement("input",{type:"hidden",name:A,value:o}))});C.displayName="@kubed/components/Slider";export{C as Slider};
|
|
2
2
|
//# sourceMappingURL=Slider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.js","sources":["../../../src/Slider/Slider/Slider.tsx"],"sourcesContent":["import React, { useRef, useState, forwardRef } from 'react';\nimport { useUncontrolled, useMove, useMergedRef } from '@kubed/hooks';\nimport { DefaultProps, KubedNumberSize } from '../../theme/index';\nimport { getUnevenPosition } from '../utils/getPosition';\nimport { getUnevenChangeValue } from '../utils/getChangeValue';\nimport { Thumb } from '../Thumb/Thumb';\nimport { Track } from '../Track/Track';\nimport { SliderRoot } from '../SliderRoot/SliderRoot';\n\nexport interface SliderProps\n extends DefaultProps,\n Omit<React.ComponentPropsWithoutRef<'div'>, 'value' | 'onChange'> {\n /** Track border-radius from theme or number to set border-radius in px */\n radius?: KubedNumberSize;\n\n /** Predefined track and thumb size, number to set sizes in px */\n size?: KubedNumberSize;\n\n /** Minimal possible value */\n min?: number;\n\n /** keep decimals **/\n decimals?: number;\n\n /** Maximum possible value */\n max?: number;\n\n /** Number by which value will be incremented/decremented with thumb drag and arrows */\n step?: number;\n\n /** Current value for controlled slider */\n value?: number;\n\n /** Default value for uncontrolled slider */\n defaultValue?: number;\n\n /** Called each time value changes */\n onChange?(value: number): void;\n\n /** Hidden input name, use with uncontrolled variant */\n name?: string;\n\n /** Disable Slider */\n disabled?: boolean;\n\n /** Marks which will be placed on the track */\n marks?: { value: number; label?: React.ReactNode }[];\n\n /** Function to generate label or any react node to render instead, set to null to disable label */\n label?: React.ReactNode | ((value: number) => React.ReactNode);\n\n /** Label appear/disappear transition */\n labelTransition?: string;\n\n /** Label appear/disappear transition duration in ms */\n labelTransitionDuration?: number;\n\n /** Label appear/disappear transition timing function, defaults to theme.transitionRimingFunction */\n labelTransitionTimingFunction?: string;\n\n /** If true label will be not be hidden when user stops dragging */\n labelAlwaysOn?: boolean;\n\n /** Thumb aria-label */\n thumbLabel?: string;\n\n /** If true slider label will appear on hover */\n showLabelOnHover?: boolean;\n\n /** Thumb children, can be used to add icon */\n thumbChildren?: React.ReactNode;\n}\n\nexport const Slider = forwardRef<HTMLDivElement, SliderProps>(\n (\n {\n classNames,\n styles,\n disabled,\n color,\n value,\n onChange,\n size = 'md',\n radius = 'xl',\n min = 0,\n max = 100,\n decimals = 0,\n step = 1,\n defaultValue,\n name,\n marks = [],\n label = (f) => f,\n labelTransitionTimingFunction,\n labelAlwaysOn = false,\n thumbLabel = '',\n showLabelOnHover = true,\n thumbChildren,\n ...others\n }: SliderProps,\n ref\n ) => {\n const [hovered, setHovered] = useState(false);\n const [_value, setValue] = useUncontrolled({\n value,\n defaultValue,\n finalValue: 0,\n rule: (val) => typeof val === 'number',\n onChange,\n });\n // const container = useRef<HTMLDivElement>();\n const thumb = useRef<HTMLDivElement>();\n // const start = useRef<number>();\n // const offset = useRef<number>();\n const position = getUnevenPosition({ value: _value, min, max, marks });\n const _label = typeof label === 'function' ? label(_value) : label;\n\n const handleChange = (val: number) => {\n if (disabled) return;\n const nextValue = getUnevenChangeValue({ value: val, marks, decimals, min, max, step });\n setValue(nextValue);\n };\n\n const { ref: container, active } = useMove(({ x }) => handleChange(x));\n\n function handleThumbMouseDown(\n event: React.MouseEvent<HTMLDivElement> | React.TouchEvent<HTMLDivElement>\n ) {\n if (event.cancelable) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n\n const handleTrackKeydownCapture = (event: React.KeyboardEvent<HTMLDivElement>) => {\n switch (event.nativeEvent.code) {\n case 'ArrowUp':\n case 'ArrowRight': {\n event.preventDefault();\n thumb.current.focus();\n setValue(Math.min(Math.max(_value + step, min), max));\n break;\n }\n\n case 'ArrowDown':\n case 'ArrowLeft': {\n event.preventDefault();\n thumb.current.focus();\n setValue(Math.min(Math.max(_value - step, min), max));\n break;\n }\n\n default: {\n break;\n }\n }\n };\n\n return (\n <SliderRoot\n {...others}\n size={size}\n ref={useMergedRef(container, ref)}\n onMouseDownCapture={() => container.current?.focus()}\n onKeyDownCapture={handleTrackKeydownCapture}\n classNames={classNames}\n styles={styles}\n >\n <Track\n offset={0}\n filled={position}\n disabled={disabled}\n marks={marks}\n size={size}\n radius={radius}\n min={min}\n max={max}\n value={_value}\n onChange={setValue}\n onMouseEnter={showLabelOnHover ? () => setHovered(true) : undefined}\n onMouseLeave={showLabelOnHover ? () => setHovered(false) : undefined}\n styles={styles}\n classNames={classNames}\n >\n <Thumb\n max={max}\n min={min}\n value={_value}\n disabled={disabled}\n position={position}\n dragging={active}\n label={_label}\n ref={thumb}\n onMouseDown={handleThumbMouseDown}\n labelAlwaysOn={labelAlwaysOn}\n classNames={classNames}\n styles={styles}\n thumbLabel={thumbLabel}\n showLabelOnHover={showLabelOnHover && hovered}\n >\n {thumbChildren}\n </Thumb>\n </Track>\n\n <input type=\"hidden\" name={name} value={_value} />\n </SliderRoot>\n );\n }\n);\n\nSlider.displayName = '@kubed/components/Slider';\n"],"names":["X","Q","Y","J","ee","oe","Z","m","re","$","te","ne"],"mappings":";;;;;;;;AAAA,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAA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AM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAACH,UAAC,CAAC,aAAa,CAACI,KAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAACJ,UAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,WAAW,CAAC,0BAA0B;;;;"}
|
|
1
|
+
{"version":3,"file":"Slider.js","sources":["../../../src/Slider/Slider/Slider.tsx"],"sourcesContent":["import React, { useRef, useState, forwardRef } from 'react';\nimport { useUncontrolled, useMove, useMergedRef } from '@kubed/hooks';\nimport { DefaultProps, KubedNumberSize } from '../../theme/index';\nimport { getUnevenPosition } from '../utils/getPosition';\nimport { getUnevenChangeValue } from '../utils/getChangeValue';\nimport { Thumb } from '../Thumb/Thumb';\nimport { Track } from '../Track/Track';\nimport { SliderRoot } from '../SliderRoot/SliderRoot';\n\nexport interface SliderProps\n extends DefaultProps,\n Omit<React.ComponentPropsWithoutRef<'div'>, 'value' | 'onChange'> {\n /** Track border-radius from theme or number to set border-radius in px */\n radius?: KubedNumberSize;\n\n /** Predefined track and thumb size, number to set sizes in px */\n size?: KubedNumberSize;\n\n /** Minimal possible value */\n min?: number;\n\n /** keep decimals **/\n decimals?: number;\n\n /** Maximum possible value */\n max?: number;\n\n /** Number by which value will be incremented/decremented with thumb drag and arrows */\n step?: number;\n\n /** Current value for controlled slider */\n value?: number;\n\n /** Default value for uncontrolled slider */\n defaultValue?: number;\n\n /** Called each time value changes */\n onChange?(value: number): void;\n\n /** Hidden input name, use with uncontrolled variant */\n name?: string;\n\n /** Disable Slider */\n disabled?: boolean;\n\n /** Marks which will be placed on the track */\n marks?: { value: number; label?: React.ReactNode }[];\n\n /** Function to generate label or any react node to render instead, set to null to disable label */\n label?: React.ReactNode | ((value: number) => React.ReactNode);\n\n /** Label appear/disappear transition */\n labelTransition?: string;\n\n /** Label appear/disappear transition duration in ms */\n labelTransitionDuration?: number;\n\n /** Label appear/disappear transition timing function, defaults to theme.transitionRimingFunction */\n labelTransitionTimingFunction?: string;\n\n /** If true label will be not be hidden when user stops dragging */\n labelAlwaysOn?: boolean;\n\n /** Thumb aria-label */\n thumbLabel?: string;\n\n /** If true slider label will appear on hover */\n showLabelOnHover?: boolean;\n\n /** Thumb children, can be used to add icon */\n thumbChildren?: React.ReactNode;\n}\n\nexport const Slider = forwardRef<HTMLDivElement, SliderProps>(\n (\n {\n classNames,\n styles,\n disabled,\n color,\n value,\n onChange,\n size = 'md',\n radius = 'xl',\n min = 0,\n max = 100,\n decimals = 0,\n step = 1,\n defaultValue,\n name,\n marks = [],\n label = (f) => f,\n labelTransitionTimingFunction,\n labelAlwaysOn = false,\n thumbLabel = '',\n showLabelOnHover = true,\n thumbChildren,\n ...others\n }: SliderProps,\n ref\n ) => {\n const [hovered, setHovered] = useState(false);\n const [_value, setValue] = useUncontrolled({\n value,\n defaultValue,\n finalValue: 0,\n rule: (val) => typeof val === 'number',\n onChange,\n });\n // const container = useRef<HTMLDivElement>();\n const thumb = useRef<HTMLDivElement | null>(null);\n // const start = useRef<number>();\n // const offset = useRef<number>();\n const position = getUnevenPosition({ value: _value, min, max, marks });\n const _label = typeof label === 'function' ? label(_value) : label;\n\n const handleChange = (val: number) => {\n if (disabled) return;\n const nextValue = getUnevenChangeValue({ value: val, marks, decimals, min, max, step });\n setValue(nextValue);\n };\n\n const { ref: container, active } = useMove(({ x }) => handleChange(x));\n\n function handleThumbMouseDown(\n event: React.MouseEvent<HTMLDivElement> | React.TouchEvent<HTMLDivElement>\n ) {\n if (event.cancelable) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n\n const handleTrackKeydownCapture = (event: React.KeyboardEvent<HTMLDivElement>) => {\n switch (event.nativeEvent.code) {\n case 'ArrowUp':\n case 'ArrowRight': {\n event.preventDefault();\n thumb.current.focus();\n setValue(Math.min(Math.max(_value + step, min), max));\n break;\n }\n\n case 'ArrowDown':\n case 'ArrowLeft': {\n event.preventDefault();\n thumb.current.focus();\n setValue(Math.min(Math.max(_value - step, min), max));\n break;\n }\n\n default: {\n break;\n }\n }\n };\n\n return (\n <SliderRoot\n {...others}\n size={size}\n ref={useMergedRef(container, ref)}\n onMouseDownCapture={() => container.current?.focus()}\n onKeyDownCapture={handleTrackKeydownCapture}\n classNames={classNames}\n styles={styles}\n >\n <Track\n offset={0}\n filled={position}\n disabled={disabled}\n marks={marks}\n size={size}\n radius={radius}\n min={min}\n max={max}\n value={_value}\n onChange={setValue}\n onMouseEnter={showLabelOnHover ? () => setHovered(true) : undefined}\n onMouseLeave={showLabelOnHover ? () => setHovered(false) : undefined}\n styles={styles}\n classNames={classNames}\n >\n <Thumb\n max={max}\n min={min}\n value={_value}\n disabled={disabled}\n position={position}\n dragging={active}\n label={_label}\n ref={thumb}\n onMouseDown={handleThumbMouseDown}\n labelAlwaysOn={labelAlwaysOn}\n classNames={classNames}\n styles={styles}\n thumbLabel={thumbLabel}\n showLabelOnHover={showLabelOnHover && hovered}\n >\n {thumbChildren}\n </Thumb>\n </Track>\n\n <input type=\"hidden\" name={name} value={_value} />\n </SliderRoot>\n );\n }\n);\n\nSlider.displayName = '@kubed/components/Slider';\n"],"names":["X","Q","Y","J","ee","ne","Z","m","re","$","te","oe"],"mappings":";;;;;;;;AAAA,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,IA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C,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAACJ,UAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,WAAW,CAAC,0BAA0B;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import y,{forwardRef as b}from"react";import{RootWrapper as v}from"./SliderRoot.styles.js";var u=Object.defineProperty,O=Object.defineProperties,j=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,n=(e,r,t)=>r in e?u(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,N=(e,r)=>{for(var t in r||(r={}))o.call(r,t)&&n(e,t,r[t]);if(l)for(var t of l(r))i.call(r,t)&&n(e,t,r[t]);return e},R=(e,r)=>O(e,j(r)),w=(e,r)=>{var t={};for(var a in e)o.call(e,a)&&r.indexOf(a)<0&&(t[a]=e[a]);if(e!=null&&l)for(var a of l(e))r.indexOf(a)<0&&i.call(e,a)&&(t[a]=e[a]);return t};const c=b((e,r)=>{var t=e,{className:a,children:p,style:f,size:d,classNames:P,styles:s}=t,m=w(t,["className","children","style","size","classNames","styles"]);return y.createElement(v,R(N({},m),{className:a,size:d,tabIndex:-1,role:"slider",ref:r,style:s??f}),p)});c.displayName="@kubed/components/SliderRoot";export{c as SliderRoot};
|
|
2
2
|
//# sourceMappingURL=SliderRoot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SliderRoot.js","sources":["../../../src/Slider/SliderRoot/SliderRoot.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { RootWrapper } from './SliderRoot.styles';\nimport { KubedNumberSize, DefaultProps } from '../../theme/index';\n\ninterface SliderRootProps extends DefaultProps, React.ComponentPropsWithoutRef<'div'> {\n size: KubedNumberSize;\n children: React.ReactNode;\n}\n\nexport const SliderRoot = forwardRef<HTMLDivElement, SliderRootProps>(\n (
|
|
1
|
+
{"version":3,"file":"SliderRoot.js","sources":["../../../src/Slider/SliderRoot/SliderRoot.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { RootWrapper } from './SliderRoot.styles';\nimport { KubedNumberSize, DefaultProps } from '../../theme/index';\n\ninterface SliderRootProps extends DefaultProps, React.ComponentPropsWithoutRef<'div'> {\n size: KubedNumberSize;\n children: React.ReactNode;\n}\n\nexport const SliderRoot = forwardRef<HTMLDivElement, SliderRootProps>(\n ({ className, children, style, size, classNames, styles, ...others }: SliderRootProps, ref) => {\n return (\n <RootWrapper\n {...others}\n className={className}\n size={size}\n tabIndex={-1}\n role=\"slider\"\n ref={ref}\n style={styles ?? style}\n >\n {children}\n </RootWrapper>\n );\n }\n);\n\nSliderRoot.displayName = '@kubed/components/SliderRoot';\n"],"names":["P","N","x"],"mappings":";;;AAAA,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAA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AAU,CAACA,UAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAOC,UAAC,CAAC,aAAa,CAACC,WAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC,8BAA8B;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SliderRoot.styles.js","sources":["../../../src/Slider/SliderRoot/SliderRoot.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { KubedNumberSize } from '../../theme/index';\n\ninterface SliderRootStyles {\n size?: KubedNumberSize;\n}\n\nexport const sizes = {\n xs: 4,\n sm: 6,\n md: 8,\n lg: 10,\n xl: 12,\n};\n\nexport const RootWrapper = styled('div')<SliderRootStyles>`\n webkit-tap-highlight-color: transparent;\n outline: 0;\n height: 8px;\n display: flex;\n align-items: center;\n cursor: pointer;\n`;\n"],"names":[],"mappings":";;AAA6C,MAAoC,WAAW,
|
|
1
|
+
{"version":3,"file":"SliderRoot.styles.js","sources":["../../../src/Slider/SliderRoot/SliderRoot.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { KubedNumberSize } from '../../theme/index';\n\ninterface SliderRootStyles {\n size?: KubedNumberSize;\n}\n\nexport const sizes = {\n xs: 4,\n sm: 6,\n md: 8,\n lg: 10,\n xl: 12,\n};\n\nexport const RootWrapper = styled('div')<SliderRootStyles>`\n webkit-tap-highlight-color: transparent;\n outline: 0;\n height: 8px;\n display: flex;\n align-items: center;\n cursor: pointer;\n`;\n"],"names":["e"],"mappings":";;AAA6C,MAAoC,WAAW,CAACA,CAAC,CAAC,KAAK,CAAC,CAAC;AACtG;AACA;AACA;AACA;AACA;AACA;AACA;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import t,{forwardRef as y,useState as x}from"react";import
|
|
1
|
+
import t,{forwardRef as y,useState as x}from"react";import N from"classnames";import{ThumbWrapper as S}from"./Thumb.styles.js";import{Tooltip as j}from"../../Tooltip/Tooltip.js";const r=y(({max:s,min:i,value:m,position:u,disabled:c,label:p,dragging:o,onMouseDown:e,classNames:b,labelAlwaysOn:d,thumbLabel:f,onFocus:a,onBlur:l,showLabelOnHover:h,children:T=null},g)=>{const[v,n]=x(!1);return t.createElement(j,{content:p||"0",visible:d||o||v||h},t.createElement(S,{disabled:c,tabIndex:0,role:"slider","aria-label":f,"aria-valuemax":s,"aria-valuemin":i,"aria-valuenow":m,ref:g,className:N(b,{dragging:o}),onFocus:()=>{n(!0),typeof a=="function"&&a()},onBlur:()=>{n(!1),typeof l=="function"&&l()},onTouchStart:e,onMouseDown:e,onClick:w=>w.stopPropagation(),style:{left:`${u}%`}},T))});r.displayName="@kubed/components/SliderThumb";export{r as Thumb};
|
|
2
2
|
//# sourceMappingURL=Thumb.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Thumb.js","sources":["../../../src/Slider/Thumb/Thumb.tsx"],"sourcesContent":["import React, { useState, forwardRef } from 'react';\nimport cx from 'classnames';\nimport { DefaultProps } from '../../theme/index';\n\nimport { ThumbWrapper } from './Thumb.styles';\nimport { Tooltip } from '../../Tooltip/Tooltip';\n\ninterface ThumbProps extends DefaultProps {\n max: number;\n min: number;\n value: number;\n disabled?: boolean;\n position: number;\n dragging: boolean;\n label: React.ReactNode;\n onMouseDown(event: React.MouseEvent<HTMLDivElement> | React.TouchEvent<HTMLDivElement>): void;\n labelAlwaysOn: boolean;\n thumbLabel: string;\n onFocus?(): void;\n onBlur?(): void;\n showLabelOnHover?: boolean;\n children?: React.ReactNode;\n}\n\nexport const Thumb = forwardRef<HTMLDivElement, ThumbProps>(\n (\n {\n max,\n min,\n value,\n position,\n disabled,\n label,\n dragging,\n onMouseDown,\n classNames,\n labelAlwaysOn,\n thumbLabel,\n onFocus,\n onBlur,\n showLabelOnHover,\n children = null,\n }: ThumbProps,\n ref\n ) => {\n const [focused, setFocused] = useState(false);\n const isVisible = labelAlwaysOn || dragging || focused || showLabelOnHover;\n return (\n <Tooltip content={label || '0'} visible={isVisible}>\n <ThumbWrapper\n disabled={disabled}\n tabIndex={0}\n role=\"slider\"\n aria-label={thumbLabel}\n aria-valuemax={max}\n aria-valuemin={min}\n aria-valuenow={value}\n ref={ref}\n className={cx(classNames, {\n dragging,\n })}\n onFocus={() => {\n setFocused(true);\n typeof onFocus === 'function' && onFocus();\n }}\n onBlur={() => {\n setFocused(false);\n typeof onBlur === 'function' && onBlur();\n }}\n onTouchStart={onMouseDown}\n onMouseDown={onMouseDown}\n onClick={(event) => event.stopPropagation()}\n style={{ left: `${position}%` }}\n >\n {children}\n </ThumbWrapper>\n </Tooltip>\n );\n }\n);\n\nThumb.displayName = '@kubed/components/SliderThumb';\n"],"names":["D","y","n","w","R"
|
|
1
|
+
{"version":3,"file":"Thumb.js","sources":["../../../src/Slider/Thumb/Thumb.tsx"],"sourcesContent":["import React, { useState, forwardRef } from 'react';\nimport cx from 'classnames';\nimport { DefaultProps } from '../../theme/index';\n\nimport { ThumbWrapper } from './Thumb.styles';\nimport { Tooltip } from '../../Tooltip/Tooltip';\n\ninterface ThumbProps extends DefaultProps {\n max: number;\n min: number;\n value: number;\n disabled?: boolean;\n position: number;\n dragging: boolean;\n label: React.ReactNode;\n onMouseDown(event: React.MouseEvent<HTMLDivElement> | React.TouchEvent<HTMLDivElement>): void;\n labelAlwaysOn: boolean;\n thumbLabel: string;\n onFocus?(): void;\n onBlur?(): void;\n showLabelOnHover?: boolean;\n children?: React.ReactNode;\n}\n\nexport const Thumb = forwardRef<HTMLDivElement, ThumbProps>(\n (\n {\n max,\n min,\n value,\n position,\n disabled,\n label,\n dragging,\n onMouseDown,\n classNames,\n labelAlwaysOn,\n thumbLabel,\n onFocus,\n onBlur,\n showLabelOnHover,\n children = null,\n }: ThumbProps,\n ref\n ) => {\n const [focused, setFocused] = useState(false);\n const isVisible = labelAlwaysOn || dragging || focused || showLabelOnHover;\n return (\n <Tooltip content={label || '0'} visible={isVisible}>\n <ThumbWrapper\n disabled={disabled}\n tabIndex={0}\n role=\"slider\"\n aria-label={thumbLabel}\n aria-valuemax={max}\n aria-valuemin={min}\n aria-valuenow={value}\n ref={ref}\n className={cx(classNames, {\n dragging,\n })}\n onFocus={() => {\n setFocused(true);\n typeof onFocus === 'function' && onFocus();\n }}\n onBlur={() => {\n setFocused(false);\n typeof onBlur === 'function' && onBlur();\n }}\n onTouchStart={onMouseDown}\n onMouseDown={onMouseDown}\n onClick={(event) => event.stopPropagation()}\n style={{ left: `${position}%` }}\n >\n {children}\n </ThumbWrapper>\n </Tooltip>\n );\n }\n);\n\nThumb.displayName = '@kubed/components/SliderThumb';\n"],"names":["D","y","n","w","R"],"mappings":";;;;;AAAwL,MAAC,KAAK,CAACA,UAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CA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C,+BAA+B;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Thumb.styles.js","sources":["../../../src/Slider/Thumb/Thumb.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { KubedNumberSize, KubedTheme } from '../../theme/index';\nimport { addColorAlpha } from '../../utils/color';\n\ninterface ThumbStyles {\n color?: KubedTheme;\n size?: KubedNumberSize;\n labelTransitionTimingFunction?: string;\n disabled?: boolean;\n}\n\nexport const ThumbWrapper = styled('div')<ThumbStyles>`\n box-sizing: border-box;\n position: absolute;\n height: 20px;\n width: 20px;\n background-color: #fff;\n border: 1px solid\n ${({ theme, disabled }) =>\n disabled ? theme.palette.colors.white[3] : theme.palette.colors.green[2]};\n color: #55bc8a;\n box-shadow: 0 4px 8px 0\n ${({ theme, disabled }) =>\n disabled ? theme.palette.colors.white[3] : theme.palette.colors.green[2]};\n transform: translate(-50%, -50%);\n top: 50%;\n outline: none;\n cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'pointer')};\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n transition-duration: 100ms;\n transition-property: box-shadow, transform;\n transition-timing-function: cubic-bezier(0.51, 0.3, 0, 1.21);\n z-index: 2;\n\n &::after {\n content: '';\n display: block;\n position: absolute;\n top: 2px;\n left: 2px;\n width: 14px;\n height: 14px;\n border-radius: 50%;\n background-color: ${({ theme, disabled }) =>\n disabled ? theme.palette.colors.white[3] : theme.palette.colors.green[2]};\n }\n\n &.dragging {\n box-shadow: 0 4px 8px ${({ theme }) => addColorAlpha(theme.palette.accents_8, 0.2)};\n }\n`;\n"],"names":["
|
|
1
|
+
{"version":3,"file":"Thumb.styles.js","sources":["../../../src/Slider/Thumb/Thumb.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { KubedNumberSize, KubedTheme } from '../../theme/index';\nimport { addColorAlpha } from '../../utils/color';\n\ninterface ThumbStyles {\n color?: KubedTheme;\n size?: KubedNumberSize;\n labelTransitionTimingFunction?: string;\n disabled?: boolean;\n}\n\nexport const ThumbWrapper = styled('div')<ThumbStyles>`\n box-sizing: border-box;\n position: absolute;\n height: 20px;\n width: 20px;\n background-color: #fff;\n border: 1px solid\n ${({ theme, disabled }) =>\n disabled ? theme.palette.colors.white[3] : theme.palette.colors.green[2]};\n color: #55bc8a;\n box-shadow: 0 4px 8px 0\n ${({ theme, disabled }) =>\n disabled ? theme.palette.colors.white[3] : theme.palette.colors.green[2]};\n transform: translate(-50%, -50%);\n top: 50%;\n outline: none;\n cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'pointer')};\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n transition-duration: 100ms;\n transition-property: box-shadow, transform;\n transition-timing-function: cubic-bezier(0.51, 0.3, 0, 1.21);\n z-index: 2;\n\n &::after {\n content: '';\n display: block;\n position: absolute;\n top: 2px;\n left: 2px;\n width: 14px;\n height: 14px;\n border-radius: 50%;\n background-color: ${({ theme, disabled }) =>\n disabled ? theme.palette.colors.white[3] : theme.palette.colors.green[2]};\n }\n\n &.dragging {\n box-shadow: 0 4px 8px ${({ theme }) => addColorAlpha(theme.palette.accents_8, 0.2)};\n }\n`;\n"],"names":["r"],"mappings":";;;AAA+F,MAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AACtH;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACpF;AACA;AACA,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACpF;AACA;AACA;AACA,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,aAAa,CAAC,SAAS,CAAC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACtG;AACA;AACA;AACA,0BAA0B,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAGA,aAAC,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;AACnE;AACA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SliderConfirm.styles.js","sources":["../../src/SliderConfirm/SliderConfirm.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { addColorAlpha } from '../utils/color';\n\nexport const SliderConfirmRoot = styled.div`\n width: 560px;\n position: relative;\n`;\n\nexport const Track = styled.div`\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: ${({ theme }) => theme.palette.accents_1};\n height: 40px;\n border-radius: 40px;\n user-select: none;\n`;\n\ninterface DragHandlerProps {\n $left?: number;\n}\n\nexport const DragHandlerWrapper = styled.div`\n position: absolute;\n top: 0;\n left: 28px;\n right: 28px;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n`;\n\nexport const DragBackGround = styled.div`\n background-color: #55bc8a;\n position: absolute;\n top: 0;\n left: -28px;\n height: 100%;\n border-radius: 40px;\n opacity: 0;\n`;\n\nexport const DragHandler = styled('div')<DragHandlerProps>`\n position: absolute;\n top: 4px;\n width: 48px;\n height: 32px;\n border-radius: 40px;\n background-color: #fff;\n box-shadow: 0 4px 8px 0 ${({ theme }) => addColorAlpha(theme.palette.accents_8, 0.06)};\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 10;\n`;\n\nexport const Tip = styled.div`\n z-index: 9;\n font-weight: 600;\n // color: ${({ theme }) => theme.palette.accents_5};\n`;\n"],"names":["
|
|
1
|
+
{"version":3,"file":"SliderConfirm.styles.js","sources":["../../src/SliderConfirm/SliderConfirm.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { addColorAlpha } from '../utils/color';\n\nexport const SliderConfirmRoot = styled.div`\n width: 560px;\n position: relative;\n`;\n\nexport const Track = styled.div`\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: ${({ theme }) => theme.palette.accents_1};\n height: 40px;\n border-radius: 40px;\n user-select: none;\n`;\n\ninterface DragHandlerProps {\n $left?: number;\n}\n\nexport const DragHandlerWrapper = styled.div`\n position: absolute;\n top: 0;\n left: 28px;\n right: 28px;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n`;\n\nexport const DragBackGround = styled.div`\n background-color: #55bc8a;\n position: absolute;\n top: 0;\n left: -28px;\n height: 100%;\n border-radius: 40px;\n opacity: 0;\n`;\n\nexport const DragHandler = styled('div')<DragHandlerProps>`\n position: absolute;\n top: 4px;\n width: 48px;\n height: 32px;\n border-radius: 40px;\n background-color: #fff;\n box-shadow: 0 4px 8px 0 ${({ theme }) => addColorAlpha(theme.palette.accents_8, 0.06)};\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 10;\n`;\n\nexport const Tip = styled.div`\n z-index: 9;\n font-weight: 600;\n // color: ${({ theme }) => theme.palette.accents_5};\n`;\n"],"names":["o"],"mappings":";;;AAA4F,MAAC,iBAAiB,CAAC,CAAC,CAAC,GAAG,CAAC;AACrH;AACA;AACA,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC;AACd;AACA;AACA;AACA,oBAAoB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AACvD;AACA;AACA;AACA,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,GAAG,CAAC;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAGA,aAAC,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;AACpE;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;AACZ;AACA;AACA,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AAC/C;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Snippet.js","sources":["../../src/Snippet/Snippet.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport { Copy, Check } from '@kubed/icons';\nimport { useClipboard } from '@kubed/hooks';\nimport { Button } from '../Button/Button';\nimport { KubedNumberSize, themeUtils, useTheme } from '../theme';\n\nconst { getSizeValue } = themeUtils;\n\nconst SnippetWrapper = styled('div')<SnippetProps>`\n position: relative;\n border: 1px solid ${(props) => props.theme.palette.border};\n background-color: ${(props) => props.theme.palette.accents_1};\n padding: 10px ${(props) => (props.valueToCopy ? '40px' : '10px')} 10px 10px;\n box-sizing: border-box;\n width: ${({ width }) => (width ? `${width}px` : 'auto')};\n border-radius: ${({ radius, theme }) => getSizeValue(radius, theme.layout.radius)};\n`;\n\nconst SnippetPre = styled('pre')<SnippetProps>`\n color: ${(props) => props.theme.palette.accents_7};\n margin: 0;\n padding: 0;\n background: transparent;\n font-size: inherit;\n border: none;\n\n &:before {\n content: '${(props) => props.symbol} ';\n user-select: none;\n }\n`;\n\nconst SnippetIcon = styled.div`\n position: absolute;\n right: 0;\n top: 0;\n bottom: 0;\n cursor: pointer;\n user-select: none;\n color: ${(props) => props.theme.palette.accents_7};\n display: flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 100%;\n`;\n\nconst ICON_SIZE = 18;\n\nexport interface SnippetProps extends React.ComponentPropsWithoutRef<'div'> {\n /** Symbol of snippet, default value is $ */\n symbol?: string;\n\n /** Width of snippet */\n width?: number;\n\n // FIXME:Got error when add more types. Such as: string[] | ReactNode\n /** Content of snippet */\n content?: string;\n\n /** Border-radius from theme or number to set border-radius in px */\n radius?: KubedNumberSize;\n\n /** The value to be written to the clipboard */\n valueToCopy?: any;\n}\n\nexport function Snippet({\n symbol = '$',\n width = 300,\n content,\n radius,\n valueToCopy,\n children,\n ...others\n}: SnippetProps) {\n const { copy, copied } = useClipboard();\n const { palette } = useTheme();\n\n return (\n <SnippetWrapper radius={radius} width={width} valueToCopy={valueToCopy} {...others}>\n <SnippetPre symbol={symbol}>{children}</SnippetPre>\n {valueToCopy !== undefined &&\n (copied ? (\n <SnippetIcon>\n <Check size={ICON_SIZE} color={palette.success} />\n </SnippetIcon>\n ) : (\n <SnippetIcon as={Button} variant=\"text\" onClick={() => copy(valueToCopy)}>\n <Copy size={ICON_SIZE} />\n </SnippetIcon>\n ))}\n </SnippetWrapper>\n );\n}\n\nSnippet.displayName = '@kubed/components/Snippet';\n"],"names":["v","s","C","I","p","z","P","k"],"mappings":";;;;;;;;AAAA,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,qBAAqB,CAAC,IAAI,CAAC,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AAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAgP,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAACA,
|
|
1
|
+
{"version":3,"file":"Snippet.js","sources":["../../src/Snippet/Snippet.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport { Copy, Check } from '@kubed/icons';\nimport { useClipboard } from '@kubed/hooks';\nimport { Button } from '../Button/Button';\nimport { KubedNumberSize, themeUtils, useTheme } from '../theme';\n\nconst { getSizeValue } = themeUtils;\n\nconst SnippetWrapper = styled('div')<SnippetProps>`\n position: relative;\n border: 1px solid ${(props) => props.theme.palette.border};\n background-color: ${(props) => props.theme.palette.accents_1};\n padding: 10px ${(props) => (props.valueToCopy ? '40px' : '10px')} 10px 10px;\n box-sizing: border-box;\n width: ${({ width }) => (width ? `${width}px` : 'auto')};\n border-radius: ${({ radius, theme }) => getSizeValue(radius, theme.layout.radius)};\n`;\n\nconst SnippetPre = styled('pre')<SnippetProps>`\n color: ${(props) => props.theme.palette.accents_7};\n margin: 0;\n padding: 0;\n background: transparent;\n font-size: inherit;\n border: none;\n\n &:before {\n content: '${(props) => props.symbol} ';\n user-select: none;\n }\n`;\n\nconst SnippetIcon = styled.div`\n position: absolute;\n right: 0;\n top: 0;\n bottom: 0;\n cursor: pointer;\n user-select: none;\n color: ${(props) => props.theme.palette.accents_7};\n display: flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 100%;\n`;\n\nconst ICON_SIZE = 18;\n\nexport interface SnippetProps extends React.ComponentPropsWithoutRef<'div'> {\n /** Symbol of snippet, default value is $ */\n symbol?: string;\n\n /** Width of snippet */\n width?: number;\n\n // FIXME:Got error when add more types. Such as: string[] | ReactNode\n /** Content of snippet */\n content?: string;\n\n /** Border-radius from theme or number to set border-radius in px */\n radius?: KubedNumberSize;\n\n /** The value to be written to the clipboard */\n valueToCopy?: any;\n}\n\nexport function Snippet({\n symbol = '$',\n width = 300,\n content,\n radius,\n valueToCopy,\n children,\n ...others\n}: SnippetProps) {\n const { copy, copied } = useClipboard();\n const { palette } = useTheme();\n\n return (\n <SnippetWrapper radius={radius} width={width} valueToCopy={valueToCopy} {...others}>\n <SnippetPre symbol={symbol}>{children}</SnippetPre>\n {valueToCopy !== undefined &&\n (copied ? (\n <SnippetIcon>\n <Check size={ICON_SIZE} color={palette.success} />\n </SnippetIcon>\n ) : (\n <SnippetIcon as={Button} variant=\"text\" onClick={() => copy(valueToCopy)}>\n <Copy size={ICON_SIZE} />\n </SnippetIcon>\n ))}\n </SnippetWrapper>\n );\n}\n\nSnippet.displayName = '@kubed/components/Snippet';\n"],"names":["v","s","C","I","p","z","P","k"],"mappings":";;;;;;;;AAAA,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,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,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAACC,QAAC,EAAE,CAAC,OAAOC,UAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAACA,UAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAACA,UAAC,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAACA,UAAC,CAAC,aAAa,CAACC,KAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAACD,UAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,EAAE,CAACE,MAAC,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAACF,UAAC,CAAC,aAAa,CAACG,IAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,2BAA2B;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import i from"react";import l,{keyframes as g,css as c}from"styled-components";import y from"../utils/forwardRef.js";import{colorToRgbValues as x,addColorAlpha as w}from"../utils/color.js";var $=Object.defineProperty,a=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,f=(e,t
|
|
1
|
+
import i from"react";import l,{keyframes as g,css as c}from"styled-components";import y from"../utils/forwardRef.js";import{colorToRgbValues as x,addColorAlpha as w}from"../utils/color.js";var $=Object.defineProperty,a=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,f=(e,r,t)=>r in e?$(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,O=(e,r)=>{for(var t in r||(r={}))m.call(r,t)&&f(e,t,r[t]);if(a)for(var t of a(r))p.call(r,t)&&f(e,t,r[t]);return e},j=(e,r)=>{var t={};for(var o in e)m.call(e,o)&&r.indexOf(o)<0&&(t[o]=e[o]);if(e!=null&&a)for(var o of a(e))r.indexOf(o)<0&&p.call(e,o)&&(t[o]=e[o]);return t};const C=g`
|
|
2
2
|
0% {
|
|
3
3
|
transform: scale(0.7);
|
|
4
4
|
opacity: 0.2;
|
|
@@ -13,9 +13,9 @@ import i from"react";import l,{keyframes as g,css as c}from"styled-components";i
|
|
|
13
13
|
}
|
|
14
14
|
`,H=e=>e?c`
|
|
15
15
|
${C} 1.5s linear infinite
|
|
16
|
-
`:null,d=(e,
|
|
16
|
+
`:null,d=(e,r)=>{const{palette:t}=r;return t[e]?t[e]:t.colors[e]?t.colors[e][2]:t.accents_5},S=(e,r,t)=>{const o=d(e,r),n=x(o).join(" ");return c`
|
|
17
17
|
background-color: ${w(o,.1)};
|
|
18
|
-
${
|
|
18
|
+
${t?`box-shadow: 0 8px 16px 0 rgb(${n} / 36%);`:""}
|
|
19
19
|
`},k=l("div")`
|
|
20
20
|
display: inline-flex;
|
|
21
21
|
align-items: center;
|
|
@@ -25,7 +25,7 @@ import i from"react";import l,{keyframes as g,css as c}from"styled-components";i
|
|
|
25
25
|
width: 12px;
|
|
26
26
|
height: 12px;
|
|
27
27
|
border-radius: 50%;
|
|
28
|
-
${({color:e,theme:
|
|
28
|
+
${({color:e,theme:r,shadow:t})=>S(e,r,t)};
|
|
29
29
|
animation: ${({motion:e})=>H(e)};
|
|
30
30
|
|
|
31
31
|
&:before {
|
|
@@ -37,7 +37,7 @@ import i from"react";import l,{keyframes as g,css as c}from"styled-components";i
|
|
|
37
37
|
width: 8.3px;
|
|
38
38
|
height: 8.3px;
|
|
39
39
|
border-radius: 50%;
|
|
40
|
-
background-color: ${({color:e,theme:
|
|
40
|
+
background-color: ${({color:e,theme:r})=>d(e,r)};
|
|
41
41
|
}
|
|
42
42
|
`,P=l.span`
|
|
43
43
|
margin-left: 8px;
|
|
@@ -45,5 +45,5 @@ import i from"react";import l,{keyframes as g,css as c}from"styled-components";i
|
|
|
45
45
|
font-weight: 600;
|
|
46
46
|
font-family: Roboto, PingFang SC, Lantinghei SC, Helvetica Neue, Helvetica, Arial, Microsoft YaHei,
|
|
47
47
|
微软雅黑, STHeitiSC-Light, simsun, 宋体, WenQuanYi Zen Hei, WenQuanYi Micro Hei, sans-serif;
|
|
48
|
-
`,u=y((e,
|
|
48
|
+
`,u=y((e,r)=>{var t=e,{color:o,motion:n=!1,shadow:b=!0,labelClassName:h,children:s}=t,v=j(t,["color","motion","shadow","labelClassName","children"]);return i.createElement(k,O({ref:r},v),i.createElement(N,{color:o,motion:n,shadow:b}),s&&i.createElement(P,{className:h},s))});u.displayName="@kubed/components/StatusDot";export{u as StatusDot};
|
|
49
49
|
//# sourceMappingURL=StatusDot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusDot.js","sources":["../../src/StatusDot/StatusDot.tsx"],"sourcesContent":["import React from 'react';\nimport styled, { keyframes, css } from 'styled-components';\nimport forwardRef from '../utils/forwardRef';\nimport { KubedTheme } from '../theme';\nimport { colorToRgbValues, addColorAlpha } from '../utils/color';\n\nconst flicker = keyframes`\n 0% {\n transform: scale(0.7);\n opacity: 0.2;\n }\n 50% {\n transform: scale(1.2);\n opacity: 1;\n }\n 100% {\n transform: scale(0.7);\n opacity: 0.2;\n }\n`;\n\nconst getAnimation = (motion) => {\n if (motion) {\n return css`\n ${flicker} 1.5s linear infinite\n `;\n }\n return null;\n};\n\nconst getColor = (color, theme: KubedTheme) => {\n const { palette } = theme;\n if (palette[color]) {\n return palette[color];\n }\n if (palette.colors[color]) {\n return palette.colors[color][2];\n }\n return palette.accents_5;\n};\n\nconst getDotColor = (color, theme, shadow) => {\n const colorHex = getColor(color, theme);\n const colorRgb = colorToRgbValues(colorHex).join(' ');\n return css`\n background-color: ${addColorAlpha(colorHex, 0.1)};\n ${shadow ? `box-shadow: 0 8px 16px 0 rgb(${colorRgb} / 36%);` : ''}\n `;\n};\n\nconst DotWrapper = styled('div')<StatusDotProps>`\n display: inline-flex;\n align-items: center;\n`;\n\nconst Dot = styled.span<StatusDotProps>`\n position: relative;\n display: inline-block;\n width: 12px;\n height: 12px;\n border-radius: 50%;\n ${({ color, theme, shadow }) => getDotColor(color, theme, shadow)};\n animation: ${({ motion }) => getAnimation(motion)};\n\n &:before {\n position: absolute;\n content: '';\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n width: 8.3px;\n height: 8.3px;\n border-radius: 50%;\n background-color: ${({ color, theme }) => getColor(color, theme)};\n }\n`;\n\nconst Label = styled.span`\n margin-left: 8px;\n color: ${({ theme }) => theme.palette.accents_8};\n font-weight: 600;\n font-family: Roboto, PingFang SC, Lantinghei SC, Helvetica Neue, Helvetica, Arial, Microsoft YaHei,\n 微软雅黑, STHeitiSC-Light, simsun, 宋体, WenQuanYi Zen Hei, WenQuanYi Micro Hei, sans-serif;\n`;\n\nexport interface StatusDotProps {\n /** Dot color from theme */\n color?: string | 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error';\n\n /** Disable animation status or not */\n motion?: boolean;\n\n /** Disable shadow or not */\n shadow?: boolean;\n\n /** className of label */\n labelClassName?: string;\n}\n\nexport const StatusDot = forwardRef<StatusDotProps, 'div'>(\n ({ color, motion = false, shadow = true, labelClassName, children, ...rest }, ref) => {\n return (\n <DotWrapper ref={ref} {...rest}>\n <Dot color={color} motion={motion} shadow={shadow} />\n {children && <Label className={labelClassName}>{children}</Label>}\n </DotWrapper>\n );\n }\n);\n\nStatusDot.displayName = '@kubed/components/StatusDot';\n"],"names":["y","d","S","w","i","D","s"],"mappings":";;;;;AAAA,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,qBAAq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ACA,CAAC,CAAC,IAAI,CAAC;AACX;AACA;AACA;AACA;AACA;AACA,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3C,aAAa,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACpD;AACA,CAAC,CAAC,CAAC,CAACA,CAAC,CAAC,IAAI,CAAC;AACX;AACA,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AAC5C;AACA;AACA;AACA,CAAC,CAAa,MAAC,SAAS,CAACC,
|
|
1
|
+
{"version":3,"file":"StatusDot.js","sources":["../../src/StatusDot/StatusDot.tsx"],"sourcesContent":["import React from 'react';\nimport styled, { keyframes, css } from 'styled-components';\nimport forwardRef from '../utils/forwardRef';\nimport { KubedTheme } from '../theme';\nimport { colorToRgbValues, addColorAlpha } from '../utils/color';\n\nconst flicker = keyframes`\n 0% {\n transform: scale(0.7);\n opacity: 0.2;\n }\n 50% {\n transform: scale(1.2);\n opacity: 1;\n }\n 100% {\n transform: scale(0.7);\n opacity: 0.2;\n }\n`;\n\nconst getAnimation = (motion) => {\n if (motion) {\n return css`\n ${flicker} 1.5s linear infinite\n `;\n }\n return null;\n};\n\nconst getColor = (color, theme: KubedTheme) => {\n const { palette } = theme;\n if (palette[color]) {\n return palette[color];\n }\n if (palette.colors[color]) {\n return palette.colors[color][2];\n }\n return palette.accents_5;\n};\n\nconst getDotColor = (color, theme, shadow) => {\n const colorHex = getColor(color, theme);\n const colorRgb = colorToRgbValues(colorHex).join(' ');\n return css`\n background-color: ${addColorAlpha(colorHex, 0.1)};\n ${shadow ? `box-shadow: 0 8px 16px 0 rgb(${colorRgb} / 36%);` : ''}\n `;\n};\n\nconst DotWrapper = styled('div')<StatusDotProps>`\n display: inline-flex;\n align-items: center;\n`;\n\nconst Dot = styled.span<StatusDotProps>`\n position: relative;\n display: inline-block;\n width: 12px;\n height: 12px;\n border-radius: 50%;\n ${({ color, theme, shadow }) => getDotColor(color, theme, shadow)};\n animation: ${({ motion }) => getAnimation(motion)};\n\n &:before {\n position: absolute;\n content: '';\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n width: 8.3px;\n height: 8.3px;\n border-radius: 50%;\n background-color: ${({ color, theme }) => getColor(color, theme)};\n }\n`;\n\nconst Label = styled.span`\n margin-left: 8px;\n color: ${({ theme }) => theme.palette.accents_8};\n font-weight: 600;\n font-family: Roboto, PingFang SC, Lantinghei SC, Helvetica Neue, Helvetica, Arial, Microsoft YaHei,\n 微软雅黑, STHeitiSC-Light, simsun, 宋体, WenQuanYi Zen Hei, WenQuanYi Micro Hei, sans-serif;\n`;\n\nexport interface StatusDotProps {\n /** Dot color from theme */\n color?: string | 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error';\n\n /** Disable animation status or not */\n motion?: boolean;\n\n /** Disable shadow or not */\n shadow?: boolean;\n\n /** className of label */\n labelClassName?: string;\n}\n\nexport const StatusDot = forwardRef<StatusDotProps, 'div'>(\n ({ color, motion = false, shadow = true, labelClassName, children, ...rest }, ref) => {\n return (\n <DotWrapper ref={ref} {...rest}>\n <Dot color={color} motion={motion} shadow={shadow} />\n {children && <Label className={labelClassName}>{children}</Label>}\n </DotWrapper>\n );\n }\n);\n\nStatusDot.displayName = '@kubed/components/StatusDot';\n"],"names":["y","d","S","w","i","D","s"],"mappings":";;;;;AAAA,IAAI,CAAC,CAAC,MAAM,CAAC,cA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CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAEA,UAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,6BAA6B;;;;"}
|
package/esm/Steps/Step/Step.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import o from"react";import k from"classnames";import{Check as L}from"@kubed/icons";import h from"../../utils/forwardRef.js";import{Loading as
|
|
1
|
+
import o from"react";import k from"classnames";import{Check as L}from"@kubed/icons";import h from"../../utils/forwardRef.js";import{Loading as b}from"../../Loading/Loading.js";import{StepWrapper as D,StepIconWrapper as W,StepIcon as _,StepCompletedIcon as B,StepBody as H,StepLabel as J,StepDescription as K}from"./Step.styles.js";var M=Object.defineProperty,R=Object.defineProperties,$=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,v=(e,t,r)=>t in e?M(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,i=(e,t)=>{for(var r in t||(t={}))S.call(t,r)&&v(e,r,t[r]);if(s)for(var r of s(t))u.call(t,r)&&v(e,r,t[r]);return e},y=(e,t)=>R(e,$(t)),q=(e,t)=>{var r={};for(var l in e)S.call(e,l)&&t.indexOf(l)<0&&(r[l]=e[l]);if(e!=null&&s)for(var l of s(e))t.indexOf(l)<0&&u.call(e,l)&&(r[l]=e[l]);return r};const A={xs:16,sm:18,md:20,lg:22,xl:24},g=h((e,t)=>{var r=e,{className:l,state:a,color:N,icon:m,completedIcon:w,progressIcon:I,label:c,description:p,withIcon:E=!0,iconSize:O,size:j="md",loading:d,allowStepClick:C=!0,allowStepSelect:F,classNames:P,styles:G}=r,z=q(r,["className","state","color","icon","completedIcon","progressIcon","label","description","withIcon","iconSize","size","loading","allowStepClick","allowStepSelect","classNames","styles"]);const x=a==="stepCompleted"?null:a==="stepProgress"?I:m,n=O||A[j],f={"data-progress":a==="stepProgress"||void 0,"data-completed":a==="stepCompleted"||void 0};return o.createElement(D,i(y(i({tabIndex:C?0:-1,ref:t},f),{className:k("step-item",P)}),z),E&&o.createElement(W,{className:"stepicon-wrapper"},o.createElement(_,y(i({},f),{className:"step-icon"}),a==="stepCompleted"?o.createElement(B,{className:"step-completed-icon"},d?o.createElement(b,{color:"#fff",size:n,className:"stepLoader"}):w||o.createElement(L,{size:n,color:"#fff"})):null,a!=="stepCompleted"?d?o.createElement(b,{size:n,color:N}):x||m:null)),(c||p)&&o.createElement(H,{className:"step-body"},c&&o.createElement(J,{className:"step-label"},c),p&&o.createElement(K,{className:"step-desc",color:"dimmed"},p)))});g.displayName="@kubed/components/Step";export{g as Step};
|
|
2
2
|
//# sourceMappingURL=Step.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Step.js","sources":["../../../src/Steps/Step/Step.tsx"],"sourcesContent":["import React from 'react';\nimport cx from 'classnames';\nimport { Check } from '@kubed/icons';\nimport { DefaultProps, KubedNumberSize, KubedSizes } from '../../theme';\nimport forwardRef from '../../utils/forwardRef';\nimport { Loading } from '../../Loading/Loading';\nimport {\n StepWrapper,\n StepIcon,\n StepIconWrapper,\n StepCompletedIcon,\n StepBody,\n StepLabel,\n StepDescription,\n} from './Step.styles';\n\nexport interface StepProps extends DefaultProps {\n /** Step state, controlled by Steps component */\n state?: 'stepInactive' | 'stepProgress' | 'stepCompleted';\n\n /** Step color from theme.colors */\n color?: string | 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error';\n\n /** Should icon be displayed */\n withIcon?: boolean;\n\n /** Step icon, defaults to step index + 1 when rendered within Stepper */\n icon?: React.ReactNode;\n\n /** Step icon displayed when step is completed */\n completedIcon?: React.ReactNode;\n\n /** Step icon displayed when step is in progress */\n progressIcon?: React.ReactNode;\n\n /** Step label, render after icon */\n label?: React.ReactNode;\n\n /** Step description */\n description?: React.ReactNode;\n\n /** Icon wrapper size in px */\n iconSize?: number;\n\n /** Icon position relative to step body */\n iconPosition?: 'right' | 'left';\n\n /** Component size */\n size?: KubedSizes;\n\n /** Radius from theme.radius, or number to set border-radius in px */\n radius?: KubedNumberSize;\n\n /** Indicates loading state on step */\n loading?: boolean;\n\n /** Set to false to disable clicks on step */\n allowStepClick?: boolean;\n\n /** Should step selection be allowed */\n allowStepSelect?: boolean;\n\n /** Static selector base */\n __staticSelector?: string;\n}\n\nconst defaultIconSizes = {\n xs: 16,\n sm: 18,\n md: 20,\n lg: 22,\n xl: 24,\n};\n\nexport const Step = forwardRef<StepProps, 'div'>(\n (\n {\n className,\n state,\n color,\n icon,\n completedIcon,\n progressIcon,\n label,\n description,\n withIcon = true,\n iconSize,\n size = 'md',\n // radius = 'xl',\n loading,\n allowStepClick = true,\n allowStepSelect,\n // iconPosition = 'left',\n // __staticSelector = 'Step',\n classNames,\n styles,\n ...rest\n },\n ref\n ) => {\n const _icon = state === 'stepCompleted' ? null : state === 'stepProgress' ? progressIcon : icon;\n const _iconSize = iconSize || defaultIconSizes[size];\n\n const dataAttributes = {\n 'data-progress': state === 'stepProgress' || undefined,\n 'data-completed': state === 'stepCompleted' || undefined,\n };\n\n return (\n <StepWrapper\n tabIndex={allowStepClick ? 0 : -1}\n ref={ref}\n {...dataAttributes}\n className={cx('step-item', classNames)}\n {...rest}\n >\n {withIcon && (\n <StepIconWrapper className=\"stepicon-wrapper\">\n <StepIcon {...dataAttributes} className=\"step-icon\">\n {state === 'stepCompleted' ? (\n <StepCompletedIcon className=\"step-completed-icon\">\n {loading ? (\n <Loading color=\"#fff\" size={_iconSize} className=\"stepLoader\" />\n ) : (\n completedIcon || <Check size={_iconSize} color=\"#fff\" />\n )}\n </StepCompletedIcon>\n ) : null}\n\n {state !== 'stepCompleted' ? (\n loading ? (\n <Loading size={_iconSize} color={color} />\n ) : (\n _icon || icon\n )\n ) : null}\n </StepIcon>\n </StepIconWrapper>\n )}\n\n {(label || description) && (\n <StepBody className=\"step-body\">\n {label && <StepLabel className=\"step-label\">{label}</StepLabel>}\n {description && (\n <StepDescription className=\"step-desc\" color=\"dimmed\">\n {description}\n </StepDescription>\n )}\n </StepBody>\n )}\n </StepWrapper>\n );\n }\n);\n\nStep.displayName = '@kubed/components/Step';\n"],"names":["v","
|
|
1
|
+
{"version":3,"file":"Step.js","sources":["../../../src/Steps/Step/Step.tsx"],"sourcesContent":["import React from 'react';\nimport cx from 'classnames';\nimport { Check } from '@kubed/icons';\nimport { DefaultProps, KubedNumberSize, KubedSizes } from '../../theme';\nimport forwardRef from '../../utils/forwardRef';\nimport { Loading } from '../../Loading/Loading';\nimport {\n StepWrapper,\n StepIcon,\n StepIconWrapper,\n StepCompletedIcon,\n StepBody,\n StepLabel,\n StepDescription,\n} from './Step.styles';\n\nexport interface StepProps extends DefaultProps {\n /** Step state, controlled by Steps component */\n state?: 'stepInactive' | 'stepProgress' | 'stepCompleted';\n\n /** Step color from theme.colors */\n color?: string | 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error';\n\n /** Should icon be displayed */\n withIcon?: boolean;\n\n /** Step icon, defaults to step index + 1 when rendered within Stepper */\n icon?: React.ReactNode;\n\n /** Step icon displayed when step is completed */\n completedIcon?: React.ReactNode;\n\n /** Step icon displayed when step is in progress */\n progressIcon?: React.ReactNode;\n\n /** Step label, render after icon */\n label?: React.ReactNode;\n\n /** Step description */\n description?: React.ReactNode;\n\n /** Icon wrapper size in px */\n iconSize?: number;\n\n /** Icon position relative to step body */\n iconPosition?: 'right' | 'left';\n\n /** Component size */\n size?: KubedSizes;\n\n /** Radius from theme.radius, or number to set border-radius in px */\n radius?: KubedNumberSize;\n\n /** Indicates loading state on step */\n loading?: boolean;\n\n /** Set to false to disable clicks on step */\n allowStepClick?: boolean;\n\n /** Should step selection be allowed */\n allowStepSelect?: boolean;\n\n /** Static selector base */\n __staticSelector?: string;\n}\n\nconst defaultIconSizes = {\n xs: 16,\n sm: 18,\n md: 20,\n lg: 22,\n xl: 24,\n};\n\nexport const Step = forwardRef<StepProps, 'div'>(\n (\n {\n className,\n state,\n color,\n icon,\n completedIcon,\n progressIcon,\n label,\n description,\n withIcon = true,\n iconSize,\n size = 'md',\n // radius = 'xl',\n loading,\n allowStepClick = true,\n allowStepSelect,\n // iconPosition = 'left',\n // __staticSelector = 'Step',\n classNames,\n styles,\n ...rest\n },\n ref\n ) => {\n const _icon = state === 'stepCompleted' ? null : state === 'stepProgress' ? progressIcon : icon;\n const _iconSize = iconSize || defaultIconSizes[size];\n\n const dataAttributes = {\n 'data-progress': state === 'stepProgress' || undefined,\n 'data-completed': state === 'stepCompleted' || undefined,\n };\n\n return (\n <StepWrapper\n tabIndex={allowStepClick ? 0 : -1}\n ref={ref}\n {...dataAttributes}\n className={cx('step-item', classNames)}\n {...rest}\n >\n {withIcon && (\n <StepIconWrapper className=\"stepicon-wrapper\">\n <StepIcon {...dataAttributes} className=\"step-icon\">\n {state === 'stepCompleted' ? (\n <StepCompletedIcon className=\"step-completed-icon\">\n {loading ? (\n <Loading color=\"#fff\" size={_iconSize} className=\"stepLoader\" />\n ) : (\n completedIcon || <Check size={_iconSize} color=\"#fff\" />\n )}\n </StepCompletedIcon>\n ) : null}\n\n {state !== 'stepCompleted' ? (\n loading ? (\n <Loading size={_iconSize} color={color} />\n ) : (\n _icon || icon\n )\n ) : null}\n </StepIcon>\n </StepIconWrapper>\n )}\n\n {(label || description) && (\n <StepBody className=\"step-body\">\n {label && <StepLabel className=\"step-label\">{label}</StepLabel>}\n {description && (\n <StepDescription className=\"step-desc\" color=\"dimmed\">\n {description}\n </StepDescription>\n )}\n </StepBody>\n )}\n </StepWrapper>\n );\n }\n);\n\nStep.displayName = '@kubed/components/Step';\n"],"names":["v","P","p","B","_","j","A","q","g","R","E","F","G"],"mappings":";;;;;;;AAAA,IAAI,CAAC,CAAC,MAAM,C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EAAEN,UAAC,CAAC,aAAa,CAACO,KAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,eAAe,CAAC,CAAC,CAACP,UAAC,CAAC,aAAa,CAACM,OAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAGN,UAAC,CAAC,aAAa,CAACQ,QAAC,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,EAAER,UAAC,CAAC,aAAa,CAACS,SAAC,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAET,UAAC,CAAC,aAAa,CAACU,eAAC,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,wBAAwB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Step.styles.js","sources":["../../../src/Steps/Step/Step.styles.ts"],"sourcesContent":["import styled from 'styled-components';\
|
|
1
|
+
{"version":3,"file":"Step.styles.js","sources":["../../../src/Steps/Step/Step.styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StepWrapper = styled.div`\n display: flex;\n flex-direction: row;\n cursor: pointer;\n align-items: center;\n text-align: left;\n`;\n\nexport const StepBody = styled.div`\n margin-left: 12px;\n display: flex;\n flex-direction: column;\n`;\n\nexport const StepLabel = styled.div`\n font-size: 14px;\n font-weight: 500;\n line-height: 1.67;\n text-align: left;\n color: ${({ theme }) => theme.palette.accents_8};\n`;\n\nexport const StepDescription = styled.div`\n text-align: left;\n line-height: 1.67;\n color: ${({ theme }) => theme.palette.accents_5};\n`;\n\nexport const StepIcon = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n font-weight: 700;\n width: 32px;\n height: 32px;\n min-height: 32px;\n border-radius: 32px;\n font-size: 16px;\n border: 2px solid ${({ theme }) => theme.palette.accents_2};\n transition: background-color 150ms ease, border-color 150ms ease;\n background-color: ${({ theme }) => theme.palette.accents_2};\n color: ${({ theme }) => theme.palette.accents_7};\n &[data-progress='true'] {\n //background-color: #00aa72;\n border-color: #00aa72;\n //color: #fff;\n }\n &[data-completed='true'] {\n background-color: #00aa72;\n border-color: #00aa72;\n color: #fff;\n }\n`;\n\nexport const StepIconWrapper = styled.div`\n position: relative;\n overflow: hidden;\n flex-shrink: 0;\n margin-bottom: ${({ theme }) => theme.layout.gapQuarter};\n`;\n\nexport const StepCompletedIcon = styled.div`\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #fff;\n inset: 0;\n`;\n"],"names":[],"mappings":";;AAA6C,MAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC;AAChE;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC;AACjB;AACA;AACA;AACA,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC;AAClB;AACA;AACA;AACA;AACA,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AAC5C,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,GAAG,CAAC;AACxB;AACA;AACA,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AAC5C,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AACvD;AACA,oBAAoB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AACvD,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,GAAG,CAAC;AACxB;AACA;AACA;AACA,iBAAiB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC;AACpD,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,GAAG,CAAC;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;;;"}
|
package/esm/Steps/Steps.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import l,{cloneElement as K,Children as T}from"react";import u from"classnames";import V from"../utils/forwardRef.js";import{StepCompleted as P}from"./StepCompleted/StepCompleted.js";import{StepCompleted as le}from"./StepCompleted/StepCompleted.js";import{StepsSeparator as J,StepsRoot as L,StepsWrapper as M,StepsContent as Q}from"./Steps.styles.js";var U=Object.defineProperty,m=Object.getOwnPropertySymbols,I=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable,k=(o,t,e)=>t in o?U(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,X=(o,t)=>{for(var e in t||(t={}))I.call(t,e)&&k(o,e,t[e]);if(m)for(var e of m(t))N.call(t,e)&&k(o,e,t[e]);return o},Y=(o,t)=>{var e={};for(var r in o)I.call(o,r)&&t.indexOf(r)<0&&(e[r]=o[r]);if(o!=null&&m)for(var r of m(o))t.indexOf(r)<0&&N.call(o,r)&&(e[r]=o[r]);return e};function j(o){const t=[];return T.forEach(o,e=>{if(l.isValidElement(e)){if(e.type===l.Fragment){t.push(...j(e.props.children));return}t.push(e)}}),t}const w=V((o,t)=>{var e=o,{className:r,children:E,onStepClick:i,active:p,completedIcon:O,progressIcon:z,color:x,iconSize:_,contentPadding:Z,size:$,radius:R,orientation:d,breakpoint:ee,iconPosition:F,classNames:W,variant:f="default",styles:q}=e,A=Y(e,["className","children","onStepClick","active","completedIcon","progressIcon","color","iconSize","contentPadding","size","radius","orientation","breakpoint","iconPosition","classNames","variant","styles"]),v,S,y;const b=j(E),c=b.filter(n=>n.type!==P),h=b.find(n=>n.type===P),B=c.reduce((n,s,a)=>{const g=typeof s.props.allowStepSelect=="boolean"?s.props.allowStepSelect:typeof i=="function",H=s.props.state||(p===a?"stepProgress":p>a?"stepCompleted":"stepInactive");return n.push(K(s,{__staticSelector:"Stepper",icon:s.props.icon||a+1,key:a,state:H,onClick:()=>g&&typeof i=="function"&&i(a),allowStepClick:g&&typeof i=="function",completedIcon:s.props.completedIcon||O,progressIcon:s.props.progressIcon||z,color:s.props.color||x,iconSize:_,size:$,radius:R,classNames:W,styles:q,iconPosition:s.props.iconPosition||F,orientation:d,variant:f})),a!==c.length-1&&f==="default"&&n.push(l.createElement(J,{className:u("step-separator",{"is-active":a<p}),$active:a<p,$vertical:d==="vertical",key:`separator-${a}`})),n},[]),D=(S=(v=c[p])==null?void 0:v.props)==null?void 0:S.children,G=(y=h==null?void 0:h.props)==null?void 0:y.children,C=p>c.length-1?G:D;return l.createElement(L,X({ref:t,className:u("steps-root",r,{"steps-vertical":d==="vertical"})},A),l.createElement(M,{className:u("steps-wrapper",{"steps-tab":f==="tab"})},B),C&&l.createElement(Q,{className:"steps-content"},C))});w.displayName="@kubed/components/Steps";export{le as StepCompleted,w as Steps};
|
|
2
2
|
//# sourceMappingURL=Steps.js.map
|
package/esm/Steps/Steps.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Steps.js","sources":["../../src/Steps/Steps.tsx"],"sourcesContent":["import React, { Children, cloneElement } from 'react';\nimport cx from 'classnames';\nimport forwardRef from '../utils/forwardRef';\nimport { DefaultProps, KubedNumberSize, KubedSizes } from '../theme';\nimport { Step } from './Step/Step';\nimport { TabStep } from './TabStep/TabStep';\nimport { StepCompleted } from './StepCompleted/StepCompleted';\nimport { StepsRoot, StepsContent, StepsSeparator, StepsWrapper } from './Steps.styles';\n\nexport interface StepsProps extends DefaultProps {\n /** <Stepper.Step /> components only */\n children: React.ReactNode;\n\n /** Called when step is clicked */\n onStepClick?(stepIndex: number): void;\n\n /** Active step index */\n active: number;\n\n /** Step icon displayed when step is completed */\n completedIcon?: React.ReactNode;\n\n /** Step icon displayed when step is in progress */\n progressIcon?: React.ReactNode;\n\n /** Active and progress Step colors from theme.colors */\n color?: string | 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error';\n\n /** Step icon size in px */\n iconSize?: number;\n\n /** Content padding-top from theme.spacing or number to set value in px */\n contentPadding?: KubedNumberSize;\n\n /** Component orientation */\n orientation?: 'vertical' | 'horizontal';\n\n /** Icon position relative to step body */\n iconPosition?: 'right' | 'left';\n\n /** Component size */\n size?: KubedSizes;\n\n /** Radius from theme.radius, or number to set border-radius in px */\n radius?: KubedNumberSize;\n\n /** Breakpoint at which orientation will change from horizontal to vertical */\n breakpoint?: KubedNumberSize;\n\n variant?: 'default' | 'tab';\n}\n\nexport const Steps = forwardRef<StepsProps, 'div'>(\n (\n {\n className,\n children,\n onStepClick,\n active,\n completedIcon,\n progressIcon,\n color,\n iconSize,\n contentPadding,\n size,\n radius,\n orientation,\n breakpoint,\n iconPosition,\n classNames,\n variant = 'default',\n styles,\n ...rest\n },\n ref\n ) => {\n const convertedChildren = Children.toArray(children) as React.ReactElement[];\n const _children = convertedChildren.filter((child) => child.type !== StepCompleted);\n const completedStep = convertedChildren.find((item) => item.type === StepCompleted);\n\n const items = _children.reduce<React.ReactElement[]>((acc, item, index) => {\n const shouldAllowSelect =\n typeof item.props.allowStepSelect === 'boolean'\n ? item.props.allowStepSelect\n : typeof onStepClick === 'function';\n\n const itemState =\n item.props.state ||\n (active === index ? 'stepProgress' : active > index ? 'stepCompleted' : 'stepInactive');\n\n acc.push(\n cloneElement(item, {\n __staticSelector: 'Stepper',\n icon: item.props.icon || index + 1,\n key: index,\n state: itemState,\n onClick: () =>\n shouldAllowSelect && typeof onStepClick === 'function' && onStepClick(index),\n allowStepClick: shouldAllowSelect && typeof onStepClick === 'function',\n completedIcon: item.props.completedIcon || completedIcon,\n progressIcon: item.props.progressIcon || progressIcon,\n color: item.props.color || color,\n iconSize,\n size,\n radius,\n classNames,\n styles,\n iconPosition: item.props.iconPosition || iconPosition,\n orientation,\n variant,\n })\n );\n\n if (index !== _children.length - 1 && variant === 'default') {\n acc.push(\n <StepsSeparator\n className={cx('step-separator', { 'is-active': index < active })}\n $active={index < active}\n $vertical={orientation === 'vertical'}\n key={`separator-${index}`}\n />\n );\n }\n\n return acc;\n }, []);\n\n const stepContent = _children[active]?.props?.children;\n const completedContent = completedStep?.props?.children;\n const content = active > _children.length - 1 ? completedContent : stepContent;\n\n return (\n <StepsRoot\n ref={ref}\n className={cx('steps-root', className, { 'steps-vertical': orientation === 'vertical' })}\n {...rest}\n >\n <StepsWrapper className={cx('steps-wrapper', { 'steps-tab': variant === 'tab' })}>\n {items}\n </StepsWrapper>\n {content && <StepsContent className=\"steps-content\">{content}</StepsContent>}\n </StepsRoot>\n );\n }\n);\n\nexport { Step, StepCompleted, TabStep };\n\n// Steps.Step = Step;\n// Steps.Completed = StepCompleted;\nSteps.displayName = '@kubed/components/Steps';\n"],"names":["M","J","u","L","l","X","U","Y","V"],"mappings":";;;;;;;AAAA,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,CA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
+
{"version":3,"file":"Steps.js","sources":["../../src/Steps/Steps.tsx"],"sourcesContent":["import React, { Children, cloneElement } from 'react';\nimport cx from 'classnames';\nimport forwardRef from '../utils/forwardRef';\nimport { DefaultProps, KubedNumberSize, KubedSizes } from '../theme';\nimport { Step } from './Step/Step';\nimport { TabStep } from './TabStep/TabStep';\nimport { StepCompleted } from './StepCompleted/StepCompleted';\nimport { StepsRoot, StepsContent, StepsSeparator, StepsWrapper } from './Steps.styles';\n\nexport interface StepsProps extends DefaultProps {\n /** <Stepper.Step /> components only */\n children: React.ReactNode;\n\n /** Called when step is clicked */\n onStepClick?(stepIndex: number): void;\n\n /** Active step index */\n active: number;\n\n /** Step icon displayed when step is completed */\n completedIcon?: React.ReactNode;\n\n /** Step icon displayed when step is in progress */\n progressIcon?: React.ReactNode;\n\n /** Active and progress Step colors from theme.colors */\n color?: string | 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error';\n\n /** Step icon size in px */\n iconSize?: number;\n\n /** Content padding-top from theme.spacing or number to set value in px */\n contentPadding?: KubedNumberSize;\n\n /** Component orientation */\n orientation?: 'vertical' | 'horizontal';\n\n /** Icon position relative to step body */\n iconPosition?: 'right' | 'left';\n\n /** Component size */\n size?: KubedSizes;\n\n /** Radius from theme.radius, or number to set border-radius in px */\n radius?: KubedNumberSize;\n\n /** Breakpoint at which orientation will change from horizontal to vertical */\n breakpoint?: KubedNumberSize;\n\n variant?: 'default' | 'tab';\n}\n\nfunction getElementChildren(children: React.ReactNode): React.ReactElement<any>[] {\n const elements: React.ReactElement<any>[] = [];\n\n Children.forEach(children, (child) => {\n if (!React.isValidElement(child)) {\n return;\n }\n\n if (child.type === React.Fragment) {\n elements.push(\n ...getElementChildren((child.props as { children?: React.ReactNode }).children)\n );\n return;\n }\n\n elements.push(child);\n });\n\n return elements;\n}\n\nexport const Steps = forwardRef<StepsProps, 'div'>(\n (\n {\n className,\n children,\n onStepClick,\n active,\n completedIcon,\n progressIcon,\n color,\n iconSize,\n contentPadding,\n size,\n radius,\n orientation,\n breakpoint,\n iconPosition,\n classNames,\n variant = 'default',\n styles,\n ...rest\n },\n ref\n ) => {\n const convertedChildren = getElementChildren(children);\n const _children = convertedChildren.filter((child) => child.type !== StepCompleted);\n const completedStep = convertedChildren.find((item) => item.type === StepCompleted);\n\n const items = _children.reduce<React.ReactElement[]>(\n (acc, item: React.ReactElement<any>, index) => {\n const shouldAllowSelect =\n typeof item.props.allowStepSelect === 'boolean'\n ? item.props.allowStepSelect\n : typeof onStepClick === 'function';\n\n const itemState =\n item.props.state ||\n (active === index ? 'stepProgress' : active > index ? 'stepCompleted' : 'stepInactive');\n\n acc.push(\n cloneElement(item, {\n __staticSelector: 'Stepper',\n icon: item.props.icon || index + 1,\n key: index,\n state: itemState,\n onClick: () =>\n shouldAllowSelect && typeof onStepClick === 'function' && onStepClick(index),\n allowStepClick: shouldAllowSelect && typeof onStepClick === 'function',\n completedIcon: item.props.completedIcon || completedIcon,\n progressIcon: item.props.progressIcon || progressIcon,\n color: item.props.color || color,\n iconSize,\n size,\n radius,\n classNames,\n styles,\n iconPosition: item.props.iconPosition || iconPosition,\n orientation,\n variant,\n })\n );\n\n if (index !== _children.length - 1 && variant === 'default') {\n acc.push(\n <StepsSeparator\n className={cx('step-separator', { 'is-active': index < active })}\n $active={index < active}\n $vertical={orientation === 'vertical'}\n key={`separator-${index}`}\n />\n );\n }\n\n return acc;\n },\n []\n );\n\n const stepContent = _children[active]?.props?.children;\n const completedContent = completedStep?.props?.children;\n const content = active > _children.length - 1 ? completedContent : stepContent;\n\n return (\n <StepsRoot\n ref={ref}\n className={cx('steps-root', className, { 'steps-vertical': orientation === 'vertical' })}\n {...rest}\n >\n <StepsWrapper className={cx('steps-wrapper', { 'steps-tab': variant === 'tab' })}>\n {items}\n </StepsWrapper>\n {content && <StepsContent className=\"steps-content\">{content}</StepsContent>}\n </StepsRoot>\n );\n }\n);\n\nexport { Step, StepCompleted, TabStep };\n\n// Steps.Step = Step;\n// Steps.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AAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAOL,UAAC,CAAC,aAAa,CAACM,SAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAACD,GAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAACL,UAAC,CAAC,aAAa,CAACO,YAAC,CAAC,CAAC,SAAS,CAACF,GAAC,CAAC,eAAe,CAAC,CAAC,WAAW,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAEL,UAAC,CAAC,aAAa,CAACQ,YAAC,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAoD,KAAK,CAAC,WAAW,CAAC,yBAAyB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Steps.styles.js","sources":["../../src/Steps/Steps.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\n\nexport const StepsRoot = styled.div`\n &.steps-vertical {\n display: flex;\n\n .steps-wrapper {\n flex-direction: column;\n align-items: unset;\n }\n\n .steps-tab {\n flex-direction: column;\n height: auto;\n align-items: flex-start;\n padding: 12px 0 12px 12px;\n }\n\n .steps-content {\n padding-top: 0;\n padding-left: 16px;\n }\n }\n`;\n\nexport const StepsWrapper = styled.div`\n display: flex;\n align-items: center;\n\n &.steps-tab {\n background-color: ${({ theme }) => theme.palette.accents_1};\n height: 64px;\n padding: 0 20px;\n }\n`;\n\nexport const StepsContent = styled.div`\n padding-top: 16px;\n`;\n\ninterface SeparatorProps {\n $active: boolean;\n $vertical: boolean;\n}\n\nconst getSeparatorStyles = (vertical) => {\n if (vertical) {\n return css`\n flex: 1;\n margin-left: 15px;\n width: 2px;\n min-height: 24px;\n margin-top: 5px;\n margin-bottom: 8px;\n `;\n }\n return css`\n flex: 1 1 0%;\n height: 2px;\n margin: 0 10px;\n `;\n};\n\nexport const StepsSeparator = styled('div')<SeparatorProps>`\n background-color: ${({ $active, theme }) => ($active ? '#00aa72' : theme.palette.accents_2)};\n ${({ $vertical }) => getSeparatorStyles($vertical)};\n`;\n"],"names":["p"],"mappings":";;AAAuD,MAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"Steps.styles.js","sources":["../../src/Steps/Steps.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\n\nexport const StepsRoot = styled.div`\n &.steps-vertical {\n display: flex;\n\n .steps-wrapper {\n flex-direction: column;\n align-items: unset;\n }\n\n .steps-tab {\n flex-direction: column;\n height: auto;\n align-items: flex-start;\n padding: 12px 0 12px 12px;\n }\n\n .steps-content {\n padding-top: 0;\n padding-left: 16px;\n }\n }\n`;\n\nexport const StepsWrapper = styled.div`\n display: flex;\n align-items: center;\n\n &.steps-tab {\n background-color: ${({ theme }) => theme.palette.accents_1};\n height: 64px;\n padding: 0 20px;\n }\n`;\n\nexport const StepsContent = styled.div`\n padding-top: 16px;\n`;\n\ninterface SeparatorProps {\n $active: boolean;\n $vertical: boolean;\n}\n\nconst getSeparatorStyles = (vertical) => {\n if (vertical) {\n return css`\n flex: 1;\n margin-left: 15px;\n width: 2px;\n min-height: 24px;\n margin-top: 5px;\n margin-bottom: 8px;\n `;\n }\n return css`\n flex: 1 1 0%;\n height: 2px;\n margin: 0 10px;\n `;\n};\n\nexport const StepsSeparator = styled('div')<SeparatorProps>`\n background-color: ${({ $active, theme }) => ($active ? '#00aa72' : theme.palette.accents_2)};\n ${({ $vertical }) => getSeparatorStyles($vertical)};\n`;\n"],"names":["e","p"],"mappings":";;AAAuD,MAAC,SAAS,CAACA,CAAC,CAAC,GAAG,CAAC;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,YAAY,CAACA,CAAC,CAAC,GAAG,CAAC;AACrB;AACA;AACA;AACA;AACA,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AACzD;AACA;AACA;AACA,CAAC,CAAC,YAAY,CAACA,CAAC,CAAC,GAAG,CAAC;AACrB;AACA,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAACC,GAAC,CAAC;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,CAAC,CAACA,GAAC,CAAC;AACR;AACA;AACA;AACA,EAAE,CAAC,CAAa,MAAC,cAAc,CAACD,CAAC,CAAC,KAAK,CAAC,CAAC;AACzC,oBAAoB,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AAC7E,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1B;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import l from"react";import h from"classnames";import{Check as k}from"@kubed/icons";import T from"../../utils/forwardRef.js";import{Loading as
|
|
1
|
+
import l from"react";import h from"classnames";import{Check as k}from"@kubed/icons";import T from"../../utils/forwardRef.js";import{Loading as u}from"../../Loading/Loading.js";import{StepWrapper as W,StepIconWrapper as _,StepIcon as R,StepCompletedIcon as B,StepBody as K,StepLabel as M,StepDescription as Q}from"./TabStep.styles.js";var $=Object.defineProperty,q=Object.defineProperties,A=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,v=(e,t,r)=>t in e?$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,i=(e,t)=>{for(var r in t||(t={}))S.call(t,r)&&v(e,r,t[r]);if(a)for(var r of a(t))g.call(t,r)&&v(e,r,t[r]);return e},F=(e,t)=>q(e,A(t)),G=(e,t)=>{var r={};for(var o in e)S.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&a)for(var o of a(e))t.indexOf(o)<0&&g.call(e,o)&&(r[o]=e[o]);return r};const H={xs:16,sm:18,md:20,lg:22,xl:24},y=T((e,t)=>{var r=e,{className:o,state:s,color:w,icon:c,completedIcon:O,progressIcon:E,label:p,description:n,completedDescription:I,progressDescription:C,withIcon:P=!0,iconSize:j,size:z="md",loading:m,allowStepClick:N=!0,allowStepSelect:J,classNames:x,styles:U}=r,D=G(r,["className","state","color","icon","completedIcon","progressIcon","label","description","completedDescription","progressDescription","withIcon","iconSize","size","loading","allowStepClick","allowStepSelect","classNames","styles"]);const L=s==="stepCompleted"?null:s==="stepProgress"?E:c,d=j||H[z],f={"data-progress":s==="stepProgress"||void 0,"data-completed":s==="stepCompleted"||void 0},b=s==="stepCompleted"?I||n:s==="stepProgress"&&C||n;return l.createElement(W,i(F(i({tabIndex:N?0:-1,ref:t},f),{className:h("step-item",x)}),D),P&&l.createElement(_,null,l.createElement(R,i({},f),s==="stepCompleted"?l.createElement(B,null,m?l.createElement(u,{color:"#fff",size:d,className:"stepLoader"}):c||O||l.createElement(k,{size:24,color:"#fff"})):null,s!=="stepCompleted"?m?l.createElement(u,{size:d,color:w}):L||c:null)),(p||n)&&l.createElement(K,null,p&&l.createElement(M,null,p),b&&l.createElement(Q,{color:"dimmed"},b)))});y.displayName="@kubed/components/TabStep";export{y as TabStep};
|
|
2
2
|
//# sourceMappingURL=TabStep.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabStep.js","sources":["../../../src/Steps/TabStep/TabStep.tsx"],"sourcesContent":["import React from 'react';\nimport cx from 'classnames';\nimport { Check } from '@kubed/icons';\nimport { DefaultProps, KubedNumberSize, KubedSizes } from '../../theme';\nimport forwardRef from '../../utils/forwardRef';\nimport { Loading } from '../../Loading/Loading';\nimport {\n StepWrapper,\n StepIcon,\n StepIconWrapper,\n StepCompletedIcon,\n StepBody,\n StepLabel,\n StepDescription,\n} from './TabStep.styles';\n\nexport interface StepProps extends DefaultProps {\n /** Step state, controlled by Steps component */\n state?: 'stepInactive' | 'stepProgress' | 'stepCompleted';\n\n /** Step color from theme.colors */\n color?: string | 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error';\n\n /** Should icon be displayed */\n withIcon?: boolean;\n\n /** Step icon, defaults to step index + 1 when rendered within Stepper */\n icon?: React.ReactNode;\n\n /** Step icon displayed when step is completed */\n completedIcon?: React.ReactNode;\n\n /** Step icon displayed when step is in progress */\n progressIcon?: React.ReactNode;\n\n /** Step label, render after icon */\n label?: React.ReactNode;\n\n /** Step description */\n description?: React.ReactNode;\n\n /** Step progress description */\n progressDescription?: React.ReactNode;\n\n /** Step completed description */\n completedDescription?: React.ReactNode;\n\n /** Icon wrapper size in px */\n iconSize?: number;\n\n /** Icon position relative to step body */\n iconPosition?: 'right' | 'left';\n\n /** Component size */\n size?: KubedSizes;\n\n /** Radius from theme.radius, or number to set border-radius in px */\n radius?: KubedNumberSize;\n\n /** Indicates loading state on step */\n loading?: boolean;\n\n /** Set to false to disable clicks on step */\n allowStepClick?: boolean;\n\n /** Should step selection be allowed */\n allowStepSelect?: boolean;\n\n /** Static selector base */\n __staticSelector?: string;\n}\n\nconst defaultIconSizes = {\n xs: 16,\n sm: 18,\n md: 20,\n lg: 22,\n xl: 24,\n};\n\nexport const TabStep = forwardRef<StepProps, 'div'>(\n (\n {\n className,\n state,\n color,\n icon,\n completedIcon,\n progressIcon,\n label,\n description,\n completedDescription,\n progressDescription,\n withIcon = true,\n iconSize,\n size = 'md',\n // radius = 'xl',\n loading,\n allowStepClick = true,\n allowStepSelect,\n // iconPosition = 'left',\n // __staticSelector = 'Step',\n classNames,\n styles,\n ...rest\n },\n ref\n ) => {\n const _icon = state === 'stepCompleted' ? null : state === 'stepProgress' ? progressIcon : icon;\n const _iconSize = iconSize || defaultIconSizes[size];\n\n const dataAttributes = {\n 'data-progress': state === 'stepProgress' || undefined,\n 'data-completed': state === 'stepCompleted' || undefined,\n };\n\n const crtDescription =\n state === 'stepCompleted'\n ? completedDescription || description\n : state === 'stepProgress'\n ? progressDescription || description\n : description;\n\n return (\n <StepWrapper\n tabIndex={allowStepClick ? 0 : -1}\n ref={ref}\n {...dataAttributes}\n className={cx('step-item', classNames)}\n {...rest}\n >\n {withIcon && (\n <StepIconWrapper>\n <StepIcon {...dataAttributes}>\n {state === 'stepCompleted' ? (\n <StepCompletedIcon>\n {loading ? (\n <Loading color=\"#fff\" size={_iconSize} className=\"stepLoader\" />\n ) : (\n icon || completedIcon || <Check size={24} color=\"#fff\" />\n )}\n </StepCompletedIcon>\n ) : null}\n\n {state !== 'stepCompleted' ? (\n loading ? (\n <Loading size={_iconSize} color={color} />\n ) : (\n _icon || icon\n )\n ) : null}\n </StepIcon>\n </StepIconWrapper>\n )}\n\n {(label || description) && (\n <StepBody>\n {label && <StepLabel>{label}</StepLabel>}\n {crtDescription && <StepDescription color=\"dimmed\">{crtDescription}</StepDescription>}\n </StepBody>\n )}\n </StepWrapper>\n );\n }\n);\n\nTabStep.displayName = '@kubed/components/TabStep';\n"],"names":["A","
|
|
1
|
+
{"version":3,"file":"TabStep.js","sources":["../../../src/Steps/TabStep/TabStep.tsx"],"sourcesContent":["import React from 'react';\nimport cx from 'classnames';\nimport { Check } from '@kubed/icons';\nimport { DefaultProps, KubedNumberSize, KubedSizes } from '../../theme';\nimport forwardRef from '../../utils/forwardRef';\nimport { Loading } from '../../Loading/Loading';\nimport {\n StepWrapper,\n StepIcon,\n StepIconWrapper,\n StepCompletedIcon,\n StepBody,\n StepLabel,\n StepDescription,\n} from './TabStep.styles';\n\nexport interface StepProps extends DefaultProps {\n /** Step state, controlled by Steps component */\n state?: 'stepInactive' | 'stepProgress' | 'stepCompleted';\n\n /** Step color from theme.colors */\n color?: string | 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error';\n\n /** Should icon be displayed */\n withIcon?: boolean;\n\n /** Step icon, defaults to step index + 1 when rendered within Stepper */\n icon?: React.ReactNode;\n\n /** Step icon displayed when step is completed */\n completedIcon?: React.ReactNode;\n\n /** Step icon displayed when step is in progress */\n progressIcon?: React.ReactNode;\n\n /** Step label, render after icon */\n label?: React.ReactNode;\n\n /** Step description */\n description?: React.ReactNode;\n\n /** Step progress description */\n progressDescription?: React.ReactNode;\n\n /** Step completed description */\n completedDescription?: React.ReactNode;\n\n /** Icon wrapper size in px */\n iconSize?: number;\n\n /** Icon position relative to step body */\n iconPosition?: 'right' | 'left';\n\n /** Component size */\n size?: KubedSizes;\n\n /** Radius from theme.radius, or number to set border-radius in px */\n radius?: KubedNumberSize;\n\n /** Indicates loading state on step */\n loading?: boolean;\n\n /** Set to false to disable clicks on step */\n allowStepClick?: boolean;\n\n /** Should step selection be allowed */\n allowStepSelect?: boolean;\n\n /** Static selector base */\n __staticSelector?: string;\n}\n\nconst defaultIconSizes = {\n xs: 16,\n sm: 18,\n md: 20,\n lg: 22,\n xl: 24,\n};\n\nexport const TabStep = forwardRef<StepProps, 'div'>(\n (\n {\n className,\n state,\n color,\n icon,\n completedIcon,\n progressIcon,\n label,\n description,\n completedDescription,\n progressDescription,\n withIcon = true,\n iconSize,\n size = 'md',\n // radius = 'xl',\n loading,\n allowStepClick = true,\n allowStepSelect,\n // iconPosition = 'left',\n // __staticSelector = 'Step',\n classNames,\n styles,\n ...rest\n },\n ref\n ) => {\n const _icon = state === 'stepCompleted' ? null : state === 'stepProgress' ? progressIcon : icon;\n const _iconSize = iconSize || defaultIconSizes[size];\n\n const dataAttributes = {\n 'data-progress': state === 'stepProgress' || undefined,\n 'data-completed': state === 'stepCompleted' || undefined,\n };\n\n const crtDescription =\n state === 'stepCompleted'\n ? completedDescription || description\n : state === 'stepProgress'\n ? progressDescription || description\n : description;\n\n return (\n <StepWrapper\n tabIndex={allowStepClick ? 0 : -1}\n ref={ref}\n {...dataAttributes}\n className={cx('step-item', classNames)}\n {...rest}\n >\n {withIcon && (\n <StepIconWrapper>\n <StepIcon {...dataAttributes}>\n {state === 'stepCompleted' ? (\n <StepCompletedIcon>\n {loading ? (\n <Loading color=\"#fff\" size={_iconSize} className=\"stepLoader\" />\n ) : (\n icon || completedIcon || <Check size={24} color=\"#fff\" />\n )}\n </StepCompletedIcon>\n ) : null}\n\n {state !== 'stepCompleted' ? (\n loading ? (\n <Loading size={_iconSize} color={color} />\n ) : (\n _icon || icon\n )\n ) : null}\n </StepIcon>\n </StepIconWrapper>\n )}\n\n {(label || description) && (\n <StepBody>\n {label && <StepLabel>{label}</StepLabel>}\n {crtDescription && <StepDescription color=\"dimmed\">{crtDescription}</StepDescription>}\n </StepBody>\n )}\n </StepWrapper>\n );\n }\n);\n\nTabStep.displayName = '@kubed/components/TabStep';\n"],"names":["A","P","p","j","v","E","q","F","I","B","G","H","J"],"mappings":";;;;;;;AAAA,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,C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AI,CAAC,CAAC,EAAER,UAAC,CAAC,aAAa,CAACS,SAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAET,UAAC,CAAC,aAAa,CAACU,eAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,2BAA2B;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabStep.styles.js","sources":["../../../src/Steps/TabStep/TabStep.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport {
|
|
1
|
+
{"version":3,"file":"TabStep.styles.js","sources":["../../../src/Steps/TabStep/TabStep.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { themeUtils } from '../../theme';\n\nexport const StepWrapper = styled.div`\n display: flex;\n flex-direction: row;\n cursor: pointer;\n align-items: center;\n text-align: left;\n min-width: 180px;\n height: 100%;\n padding: 12px 15px;\n &[data-progress='true'] {\n background-color: ${({ theme }) => theme.palette.background};\n }\n`;\n\nexport const StepBody = styled.div`\n margin-left: 12px;\n display: flex;\n flex-direction: column;\n`;\n\nexport const StepLabel = styled.div`\n font-size: 12px;\n font-weight: 700;\n line-height: 1.67;\n text-align: left;\n color: ${({ theme }) => theme.palette.accents_8};\n`;\n\nexport const StepDescription = styled.div`\n text-align: left;\n line-height: 1.67;\n color: ${({ theme }) => theme.palette.accents_5};\n`;\n\nexport const StepIcon = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n font-weight: 700;\n width: 40px;\n height: 40px;\n min-height: 40px;\n //border-radius: 32px;\n font-size: 16px;\n //border: 2px solid ${({ theme }) => theme.palette.accents_2};\n transition: background-color 150ms ease, border-color 150ms ease;\n //background-color: ${({ theme }) => theme.palette.accents_2};\n color: ${({ theme }) => theme.palette.accents_7};\n &[data-progress='true'] {\n &:after {\n border-color: ${({ theme }) => themeUtils.getPrimaryColor(theme)};\n }\n }\n &[data-completed='true'] {\n color: #fff;\n &:after {\n border-color: ${({ theme }) => themeUtils.getPrimaryColor(theme)};\n background-color: ${({ theme }) => themeUtils.getPrimaryColor(theme)};\n }\n }\n\n .kubed-icon {\n width: 40px;\n height: 40px;\n }\n\n &:after {\n position: absolute;\n right: 0;\n bottom: 0;\n content: ' ';\n border: 2px solid ${({ theme }) => theme.palette.accents_3};\n background-color: ${({ theme }) => theme.palette.background};\n display: block;\n width: 12px;\n height: 12px;\n border-radius: 50%;\n }\n`;\n\nexport const StepIconWrapper = styled.div`\n position: relative;\n overflow: hidden;\n flex-shrink: 0;\n`;\n\nexport const StepCompletedIcon = styled.div`\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #fff;\n inset: 0;\n`;\n"],"names":["e","o"],"mappings":";;;AAAsF,MAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;AAC1D;AACA,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC;AACjB;AACA;AACA;AACA,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC;AAClB;AACA;AACA;AACA;AACA,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AAC5C,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,GAAG,CAAC;AACxB;AACA;AACA,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AAC5C,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC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