@quixotic/ui 0.2.12 → 0.2.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.css +1 -1
- package/dist/index.cjs.js +73 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.css +1 -1
- package/dist/index.esm.js +75 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/types/components/design/KTabel/KTable.d.ts +3 -1
- package/dist/types/components/design/KTabs/KTabs.d.ts +9 -0
- package/dist/types/components/design/KTabs/index.d.ts +2 -0
- package/dist/types/components/design/index.d.ts +1 -0
- package/dist/types/hooks/useFocusVisible.d.ts +6 -0
- package/dist/types/test/setup.d.ts +1 -0
- package/package.json +10 -2
package/dist/index.cjs.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ant-select.k-auto-complete{box-shadow:none!important;.ant-select-content{.k-auto-complete-sm &{border-radius:var(--radius-sm);padding:var(--spacing-sm) var(--spacing-md-plus)}.k-auto-complete-md &{border-radius:var(--radius-sm);padding:var(--spacing-md) var(--spacing-md-plus)}.k-auto-complete-lg &{border-radius:var(--radius-md);padding:var(--spacing-md-plus) var(--spacing-md-plus)}.k-auto-complete-xl &{border-radius:var(--radius-md);padding:var(--spacing-lg) var(--spacing-lg)}}.ant-select-content{background-color:var(--bg-primary);border-color:var(--border-primary);border-radius:var(--radius-md);box-shadow:none;font-size:1rem;&::placeholder{color:var(--text-placeholder)}}&.ant-select-focused .ant-select-input,&:not(.ant-select-disabled):hover .ant-select-input{border-color:var(--border-solid)}&.ant-select-disabled .ant-select-input{background-color:var(--bg-disabled_subtle);border-color:var(--border-disabled)}}.k-button{&.k-button-sm{font-size:.75rem;gap:var(--spacing-xxs);height:1.5rem;letter-spacing:0;line-height:1.125rem;padding-block:.1875rem;padding-inline:var(--spacing-sm)}&.k-button-md,&.k-button-sm{border-radius:var(--radius-sm)}&.k-button-md{font-size:.875rem;gap:var(--spacing-xs);height:2rem;letter-spacing:-.006em;line-height:1.25rem;padding-block:var(--spacing-sm);padding-inline:var(--spacing-md)}&.k-button-lg{height:2.5rem;padding-block:var(--spacing-md);padding-inline:var(--spacing-md-plus)}&.k-button-lg,&.k-button-xl{border-radius:var(--radius-md);font-size:1rem;gap:var(--spacing-xs);letter-spacing:-.011em;line-height:1.5rem}&.k-button-xl{height:3rem;padding-block:var(--spacing-md-plus);padding-inline:var(--spacing-xl)}&.k-button-primary{background:var(--button-bg);border:1px solid transparent;box-shadow:var(--shadow-xs-button);color:var(--button-text);&:not(:disabled):hover{background:var(--button-bg-hover)}&:not(:disabled):active,&:not(:disabled):hover{border-color:transparent;box-shadow:var(--shadow-xs-button);color:var(--button-text)}&:not(:disabled):active{background:var(--button-bg-pressed)}&:disabled{background:var(--button-bg-disabled);border-color:transparent;box-shadow:none;color:var(--text-disabled)}}&.k-button-outline{background:var(--bg-primary);border:1px solid var(--border-primary);box-shadow:var(--shadow-xs-button);color:var(--text-primary);&:not(:disabled):hover{background:var(--bg-primary_hover)}&:not(:disabled):active,&:not(:disabled):hover{border-color:var(--border-primary);box-shadow:var(--shadow-xs-button);color:var(--text-primary)}&:not(:disabled):active{background:var(--bg-secondary_hover)}&:disabled{background:var(--button-bg-disabled);border-color:var(--border-primary);box-shadow:none;color:var(--text-disabled)}}&.k-button-ghost{background:var(--white);border:1px solid transparent;box-shadow:none;color:var(--text-primary);&:not(:disabled):hover{background:var(--bg-primary_hover)}&:not(:disabled):active,&:not(:disabled):hover{border-color:transparent;box-shadow:none;color:var(--text-primary)}&:not(:disabled):active{background:var(--bg-secondary_hover)}&:disabled{background:var(--button-bg-disabled);border-color:transparent;box-shadow:none;color:var(--text-disabled)}}&.k-button-link{background:var(--white);border:1px solid transparent;box-shadow:none;color:var(--text-primary);&:not(:disabled):hover{color:var(--text-tertiary_hover)}&:not(:disabled):active,&:not(:disabled):hover{background:var(--white);border-color:transparent;box-shadow:none}&:not(:disabled):active{color:var(--button-bg-pressed)}&:disabled{background:var(--white);border-color:transparent;box-shadow:none;color:var(--text-disabled)}}}.k-checkbox-group{display:flex;flex-wrap:wrap;gap:.5rem}.k-checkbox{&.ant-checkbox-wrapper{.ant-checkbox{.ant-checkbox-inner{align-items:center;display:flex;justify-content:center;.k-checkbox-sm &{border-radius:.25rem;height:1rem;width:1rem;&:before{content:"";height:.421875rem;width:.58625rem}}.k-checkbox-md &{border-radius:.375rem;height:1.25rem;width:1.25rem;&:before{content:"";height:.4925rem;width:.68375rem}}}&+span.ant-checkbox-label{font-weight:500;padding-inline:.5rem;.k-checkbox-sm &{font-size:.875rem;letter-spacing:-.006em;line-height:1.25rem}.k-checkbox-md &{font-size:1rem;letter-spacing:-.011em;line-height:1.5rem}}}}&.ant-checkbox-wrapper-disabled{.ant-checkbox{.ant-checkbox-inner{background:var(--bg-disabled_subtle);border-color:var(--border-disabled_subtle)}}}&:not(.ant-checkbox-wrapper-disabled) .ant-checkbox{&+span.ant-checkbox-label{color:var(--text-primary)}.ant-checkbox-input:focus-visible+.ant-checkbox-inner{outline-color:var(--utility-grey-700);outline-offset:.125rem;outline-width:.125rem}.ant-checkbox-inner{background:var(--bg-primary);border-color:var(--border-primary);border-style:solid;border-width:.0625rem;.ant-checkbox-indeterminate:not(.ant-checkbox-checked) &{background:var(--bg-primary);border-color:var(--border-primary);.ant-checkbox-wrapper:hover &{border-color:var(--checkbox-border_hover)}&:after{background:var(--fg-primary);border-radius:.125rem;display:block;height:.625rem;width:.625rem}&:before{display:none}}.ant-checkbox-checked &{background:var(--fg-primary);border-color:var(--fg-primary);.ant-checkbox-wrapper:hover &{border-color:var(--fg-primary)}&:after{display:none}&:before{background-color:var(--checkbox-checkmark-fg);mask:url("data:image/svg+xml;charset=utf-8,%3Csvg width='11' height='8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m10.81.747-7 7a.438.438 0 0 1-.62 0L.129 4.685a.438.438 0 1 1 .62-.62L3.5 6.82 10.19.13a.438.438 0 1 1 .62.618Z' fill='%23000'/%3E%3C/svg%3E") no-repeat center;mask-size:100% 100%}}.ant-checkbox-wrapper:hover &{border-color:var(--checkbox-border_hover)}}}}.k-input{&.ant-input,&.ant-input-affix-wrapper{&.k-input-sm{padding:var(--spacing-sm) var(--spacing-md-plus)}&.k-input-md,&.k-input-sm{border-radius:var(--radius-sm)}&.k-input-md{padding:var(--spacing-md) var(--spacing-md-plus)}&.k-input-lg{padding:var(--spacing-md-plus) var(--spacing-md-plus)}&.k-input-lg,&.k-input-xl{border-radius:var(--radius-md)}&.k-input-xl{padding:var(--spacing-lg) var(--spacing-lg)}&{background-color:var(--bg-primary);border-color:var(--border-primary);border-radius:var(--radius-md);box-shadow:none;font-size:1rem;&::placeholder{color:var(--text-placeholder)}& -focused,&:focus,&:not(.ant-input-disabled):not(.ant-input-affix-wrapper-disabled):hover{border-color:var(--border-solid)}& -disabled{background-color:var(--bg-disabled_subtle);border-color:var(--border-disabled)}}}&.ant-input-affix-wrapper{.ant-input{background-color:transparent;font-size:inherit;&::placeholder{color:var(--text-placeholder)}}}}.k-radio{&.ant-radio-wrapper{.ant-radio{.ant-radio-inner{align-items:center;border-radius:100%;display:flex;justify-content:center;&:after{display:none}.k-radio-sm &{height:1rem;width:1rem;&:before{height:.375rem;width:.375rem}}.k-radio-md &{height:1.25rem;width:1.25rem;&:before{height:.5rem;width:.5rem}}}&+span.ant-radio-label{font-weight:500;padding-inline:.5rem;.k-radio-sm &{font-size:.875rem;letter-spacing:-.006em;line-height:1.25rem}.k-radio-md &{font-size:1rem;letter-spacing:-.011em;line-height:1.5rem}}}}&.ant-radio-wrapper-disabled{.ant-radio{.ant-radio-inner{background:var(--bg-disabled_subtle);border-color:var(--border-disabled_subtle);.ant-radio-checked &{&:before{background:var(--fg-disabled_subtle);border-radius:100%;content:""}}}}}&:not(.ant-radio-wrapper-disabled) .ant-radio{&+span.ant-radio-label{color:var(--text-primary)}.ant-radio-input:focus-visible+.ant-radio-inner{outline-color:var(--utility-grey-700);outline-offset:.125rem;outline-width:.125rem}.ant-radio-inner{background:var(--bg-primary);border-color:var(--border-primary);border-style:solid;border-width:.0625rem;.ant-radio-checked &{background:var(--fg-primary);border-color:var(--fg-primary);.ant-radio-wrapper:hover &{border-color:var(--fg-primary)}}.ant-radio-wrapper:hover &{border-color:var(--radio-border_hover)}&:before{background:var(--checkbox-checkmark-fg);border-radius:100%;content:""}}}}.k-switch{&.k-switch-sm{height:1rem;min-width:1.75rem;.ant-switch-handle{border-radius:1.25rem;height:.75rem;inset-inline-start:.125rem;width:.75rem;.ant-switch-checked &{inset-inline-start:calc(100% - .875rem)}}}&.k-switch-md{height:1.25rem;min-width:2.25rem;.ant-switch-handle{border-radius:1.25rem;height:1rem;inset-inline-start:.125rem;width:1rem;.ant-switch-checked &{inset-inline-start:calc(100% - 1.125rem)}}}&:focus-visible{outline:.125rem solid var(--utility-grey-700);outline-offset:.125rem}&.ant-switch-disabled{background:var(--bg-disabled);.ant-switch-handle{&:before{background:var(--fg-disabled_subtle);box-shadow:none}}}&:not(.ant-switch-disabled),&:not(.ant-switch-disabled):hover{background:var(--bg-tertiary);.ant-switch-handle{background:var(--toggle-button-bg)}}&.ant-switch-checked:not(.ant-switch-disabled){background:var(--toggle-active-bg);.ant-switch-handle{background:var(--toggle-button-active-bg)}}}.k-table{&.ant-table-wrapper{.ant-table-container{border-radius:0}.ant-table-tbody .ant-table-row.ant-table-row-selected>.ant-table-cell{background:var(--grey-100);.dark &{background:var(--grey-700)}}table>thead>tr:first-child>:first-child{border-left-style:solid;border-radius:.375rem 0 0 .375rem}table>thead>tr:first-child>:last-child{border-radius:0 .375rem .375rem 0;border-right-style:solid}.ant-table-thead{>tr>th{background:var(--bg-secondary);border-color:var(--border-secondary);border-radius:0;border-style:solid none;border-width:.0625rem;color:var(--text-tertiary);font-size:.75rem;font-weight:600;letter-spacing:0;line-height:1.125rem;padding:.25rem .5rem;&:before{display:none}}}.ant-table-tbody{>tr{&:hover{background:var(--bg-primary_hover)}}>tr>td{border-color:var(--border-secondary);border-style:none none solid;border-width:.0625rem;font-size:.875rem;font-weight:400;letter-spacing:-.006em;line-height:1.25rem;padding:.5rem}}}}.ant-typography{&.k-paragraph,&.k-text,&.k-title{align-items:center;display:flex;flex-wrap:wrap;justify-content:start;.ant-typography-copy{width:1em}}}
|
|
1
|
+
.ant-select.k-auto-complete{box-shadow:none!important;.ant-select-content{.k-auto-complete-sm &{border-radius:var(--radius-sm);padding:var(--spacing-sm) var(--spacing-md-plus)}.k-auto-complete-md &{border-radius:var(--radius-sm);padding:var(--spacing-md) var(--spacing-md-plus)}.k-auto-complete-lg &{border-radius:var(--radius-md);padding:var(--spacing-md-plus) var(--spacing-md-plus)}.k-auto-complete-xl &{border-radius:var(--radius-md);padding:var(--spacing-lg) var(--spacing-lg)}}.ant-select-content{background-color:var(--bg-primary);border-color:var(--border-primary);border-radius:var(--radius-md);box-shadow:none;font-size:1rem;&::placeholder{color:var(--text-placeholder)}}&.ant-select-focused .ant-select-input,&:not(.ant-select-disabled):hover .ant-select-input{border-color:var(--border-solid)}&.ant-select-disabled .ant-select-input{background-color:var(--bg-disabled_subtle);border-color:var(--border-disabled)}}.k-button{&.k-button-sm{font-size:.75rem;gap:var(--spacing-xxs);height:1.5rem;letter-spacing:0;line-height:1.125rem;padding-block:.1875rem;padding-inline:var(--spacing-sm)}&.k-button-md,&.k-button-sm{border-radius:var(--radius-sm)}&.k-button-md{font-size:.875rem;gap:var(--spacing-xs);height:2rem;letter-spacing:-.006em;line-height:1.25rem;padding-block:var(--spacing-sm);padding-inline:var(--spacing-md)}&.k-button-lg{height:2.5rem;padding-block:var(--spacing-md);padding-inline:var(--spacing-md-plus)}&.k-button-lg,&.k-button-xl{border-radius:var(--radius-md);font-size:1rem;gap:var(--spacing-xs);letter-spacing:-.011em;line-height:1.5rem}&.k-button-xl{height:3rem;padding-block:var(--spacing-md-plus);padding-inline:var(--spacing-xl)}&.k-button-primary{background:var(--button-bg);border:1px solid transparent;box-shadow:var(--shadow-xs-button);color:var(--button-text);&:not(:disabled):hover{background:var(--button-bg-hover)}&:not(:disabled):active,&:not(:disabled):hover{border-color:transparent;box-shadow:var(--shadow-xs-button);color:var(--button-text)}&:not(:disabled):active{background:var(--button-bg-pressed)}&:disabled{background:var(--button-bg-disabled);border-color:transparent;box-shadow:none;color:var(--text-disabled)}}&.k-button-outline{background:var(--bg-primary);border:1px solid var(--border-primary);box-shadow:var(--shadow-xs-button);color:var(--text-primary);&:not(:disabled):hover{background:var(--bg-primary_hover)}&:not(:disabled):active,&:not(:disabled):hover{border-color:var(--border-primary);box-shadow:var(--shadow-xs-button);color:var(--text-primary)}&:not(:disabled):active{background:var(--bg-secondary_hover)}&:disabled{background:var(--button-bg-disabled);border-color:var(--border-primary);box-shadow:none;color:var(--text-disabled)}}&.k-button-ghost{background:var(--white);border:1px solid transparent;box-shadow:none;color:var(--text-primary);&:not(:disabled):hover{background:var(--bg-primary_hover)}&:not(:disabled):active,&:not(:disabled):hover{border-color:transparent;box-shadow:none;color:var(--text-primary)}&:not(:disabled):active{background:var(--bg-secondary_hover)}&:disabled{background:var(--button-bg-disabled);border-color:transparent;box-shadow:none;color:var(--text-disabled)}}&.k-button-link{background:var(--white);border:1px solid transparent;box-shadow:none;color:var(--text-primary);&:not(:disabled):hover{color:var(--text-tertiary_hover)}&:not(:disabled):active,&:not(:disabled):hover{background:var(--white);border-color:transparent;box-shadow:none}&:not(:disabled):active{color:var(--button-bg-pressed)}&:disabled{background:var(--white);border-color:transparent;box-shadow:none;color:var(--text-disabled)}}}.k-checkbox-group{display:flex;flex-wrap:wrap;gap:.5rem}.k-checkbox{&.ant-checkbox-wrapper{.ant-checkbox{.ant-checkbox-inner{align-items:center;display:flex;justify-content:center;.k-checkbox-sm &{border-radius:.25rem;height:1rem;width:1rem;&:before{content:"";height:.421875rem;width:.58625rem}}.k-checkbox-md &{border-radius:.375rem;height:1.25rem;width:1.25rem;&:before{content:"";height:.4925rem;width:.68375rem}}}&+span.ant-checkbox-label{font-weight:500;padding-inline:.5rem;.k-checkbox-sm &{font-size:.875rem;letter-spacing:-.006em;line-height:1.25rem}.k-checkbox-md &{font-size:1rem;letter-spacing:-.011em;line-height:1.5rem}}}}&.ant-checkbox-wrapper-disabled{.ant-checkbox{.ant-checkbox-inner{background:var(--bg-disabled_subtle);border-color:var(--border-disabled_subtle)}}}&:not(.ant-checkbox-wrapper-disabled) .ant-checkbox{&+span.ant-checkbox-label{color:var(--text-primary)}.ant-checkbox-input:focus-visible+.ant-checkbox-inner{outline-color:var(--utility-grey-700);outline-offset:.125rem;outline-width:.125rem}.ant-checkbox-inner{background:var(--bg-primary);border-color:var(--border-primary);border-style:solid;border-width:.0625rem;.ant-checkbox-indeterminate:not(.ant-checkbox-checked) &{background:var(--bg-primary);border-color:var(--border-primary);.ant-checkbox-wrapper:hover &{border-color:var(--checkbox-border_hover)}&:after{background:var(--fg-primary);border-radius:.125rem;display:block;height:.625rem;width:.625rem}&:before{display:none}}.ant-checkbox-checked &{background:var(--fg-primary);border-color:var(--fg-primary);.ant-checkbox-wrapper:hover &{border-color:var(--fg-primary)}&:after{display:none}&:before{background-color:var(--checkbox-checkmark-fg);mask:url("data:image/svg+xml;charset=utf-8,%3Csvg width='11' height='8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m10.81.747-7 7a.438.438 0 0 1-.62 0L.129 4.685a.438.438 0 1 1 .62-.62L3.5 6.82 10.19.13a.438.438 0 1 1 .62.618Z' fill='%23000'/%3E%3C/svg%3E") no-repeat center;mask-size:100% 100%}}.ant-checkbox-wrapper:hover &{border-color:var(--checkbox-border_hover)}}}}.k-input{&.ant-input,&.ant-input-affix-wrapper{&.k-input-sm{padding:var(--spacing-sm) var(--spacing-md-plus)}&.k-input-md,&.k-input-sm{border-radius:var(--radius-sm)}&.k-input-md{padding:var(--spacing-md) var(--spacing-md-plus)}&.k-input-lg{padding:var(--spacing-md-plus) var(--spacing-md-plus)}&.k-input-lg,&.k-input-xl{border-radius:var(--radius-md)}&.k-input-xl{padding:var(--spacing-lg) var(--spacing-lg)}&{background-color:var(--bg-primary);border-color:var(--border-primary);border-radius:var(--radius-md);box-shadow:none;font-size:1rem;&::placeholder{color:var(--text-placeholder)}& -focused,&:focus,&:not(.ant-input-disabled):not(.ant-input-affix-wrapper-disabled):hover{border-color:var(--border-solid)}& -disabled{background-color:var(--bg-disabled_subtle);border-color:var(--border-disabled)}}}&.ant-input-affix-wrapper{.ant-input{background-color:transparent;font-size:inherit;&::placeholder{color:var(--text-placeholder)}}}}.k-radio{&.ant-radio-wrapper{.ant-radio{.ant-radio-inner{align-items:center;border-radius:100%;display:flex;justify-content:center;&:after{display:none}.k-radio-sm &{height:1rem;width:1rem;&:before{height:.375rem;width:.375rem}}.k-radio-md &{height:1.25rem;width:1.25rem;&:before{height:.5rem;width:.5rem}}}&+span.ant-radio-label{font-weight:500;padding-inline:.5rem;.k-radio-sm &{font-size:.875rem;letter-spacing:-.006em;line-height:1.25rem}.k-radio-md &{font-size:1rem;letter-spacing:-.011em;line-height:1.5rem}}}}&.ant-radio-wrapper-disabled{.ant-radio{.ant-radio-inner{background:var(--bg-disabled_subtle);border-color:var(--border-disabled_subtle);.ant-radio-checked &{&:before{background:var(--fg-disabled_subtle);border-radius:100%;content:""}}}}}&:not(.ant-radio-wrapper-disabled) .ant-radio{&+span.ant-radio-label{color:var(--text-primary)}.ant-radio-input:focus-visible+.ant-radio-inner{outline-color:var(--utility-grey-700);outline-offset:.125rem;outline-width:.125rem}.ant-radio-inner{background:var(--bg-primary);border-color:var(--border-primary);border-style:solid;border-width:.0625rem;.ant-radio-checked &{background:var(--fg-primary);border-color:var(--fg-primary);.ant-radio-wrapper:hover &{border-color:var(--fg-primary)}}.ant-radio-wrapper:hover &{border-color:var(--radio-border_hover)}&:before{background:var(--checkbox-checkmark-fg);border-radius:100%;content:""}}}}.k-switch{&.k-switch-sm{height:1rem;min-width:1.75rem;.ant-switch-handle{border-radius:1.25rem;height:.75rem;inset-inline-start:.125rem;width:.75rem;.ant-switch-checked &{inset-inline-start:calc(100% - .875rem)}}}&.k-switch-md{height:1.25rem;min-width:2.25rem;.ant-switch-handle{border-radius:1.25rem;height:1rem;inset-inline-start:.125rem;width:1rem;.ant-switch-checked &{inset-inline-start:calc(100% - 1.125rem)}}}&:focus-visible{outline:.125rem solid var(--utility-grey-700);outline-offset:.125rem}&.ant-switch-disabled{background:var(--bg-disabled);.ant-switch-handle{&:before{background:var(--fg-disabled_subtle);box-shadow:none}}}&:not(.ant-switch-disabled),&:not(.ant-switch-disabled):hover{background:var(--bg-tertiary);.ant-switch-handle{background:var(--toggle-button-bg)}}&.ant-switch-checked:not(.ant-switch-disabled){background:var(--toggle-active-bg);.ant-switch-handle{background:var(--toggle-button-active-bg)}}}.k-table{&.ant-table-wrapper{.ant-table-container{border-radius:0}.ant-table-tbody .ant-table-row.ant-table-row-selected>.ant-table-cell{background:var(--grey-100);.dark &{background:var(--grey-700)}}table>thead>tr:first-child>:first-child{border-left-style:solid;border-radius:.375rem 0 0 .375rem}table>thead>tr:first-child>:last-child{border-radius:0 .375rem .375rem 0;border-right-style:solid}.ant-table-thead{>tr>th{background:var(--bg-secondary);border-color:var(--border-secondary);border-radius:0;border-style:solid none;border-width:.0625rem;color:var(--text-tertiary);font-size:.75rem;font-weight:600;letter-spacing:0;line-height:1.125rem;padding:.25rem .5rem;&:before{display:none}}}.ant-table-tbody{>tr{&:hover{background:var(--bg-primary_hover)}}>tr>td{border-color:var(--border-secondary);border-style:none none solid;border-width:.0625rem;font-size:.875rem;font-weight:400;letter-spacing:-.006em;line-height:1.25rem;padding:.5rem}}}}.ant-typography,.k-tabs{&.k-paragraph,&.k-text,&.k-title{align-items:center;display:flex;flex-wrap:wrap;justify-content:start;.ant-typography-copy{width:1em}}}
|
package/dist/index.cjs.js
CHANGED
|
@@ -102,7 +102,68 @@ const KSwitch = React.forwardRef(({ size = 'md', className, ...props }, ref) =>
|
|
|
102
102
|
return (jsxRuntime.jsx(antd.Switch, { ...props, className: tailwindMerge.twJoin('k-switch', `k-switch-${size}`, className), ref: ref }));
|
|
103
103
|
});
|
|
104
104
|
|
|
105
|
-
const
|
|
105
|
+
const useFocusVisible = ({ focusVisible = false, prefix = 'k-focus', selector = '[class^="ant-"]' } = {}) => {
|
|
106
|
+
const id = React.useId().replace(/:/g, '');
|
|
107
|
+
const idClass = `${prefix}-${id}`;
|
|
108
|
+
React.useEffect(() => {
|
|
109
|
+
if (focusVisible)
|
|
110
|
+
return;
|
|
111
|
+
const idClassInner = `${prefix}-${id}`;
|
|
112
|
+
let timer;
|
|
113
|
+
const updateTabIndex = () => {
|
|
114
|
+
const container = document.querySelector(`.${idClassInner}`);
|
|
115
|
+
if (!container)
|
|
116
|
+
return;
|
|
117
|
+
const elements = container.querySelectorAll(selector);
|
|
118
|
+
elements.forEach(el => {
|
|
119
|
+
if (el.getAttribute('tabindex') !== '-1') {
|
|
120
|
+
el.setAttribute('tabindex', '-1');
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
const debouncedUpdate = () => {
|
|
125
|
+
clearTimeout(timer);
|
|
126
|
+
timer = setTimeout(updateTabIndex, 0);
|
|
127
|
+
};
|
|
128
|
+
// 初始执行一次
|
|
129
|
+
updateTabIndex();
|
|
130
|
+
// 监听 DOM 变化
|
|
131
|
+
const container = document.querySelector(`.${idClassInner}`);
|
|
132
|
+
if (!container)
|
|
133
|
+
return;
|
|
134
|
+
const observer = new MutationObserver((mutations) => {
|
|
135
|
+
// 过滤掉我们自己修改 tabindex 引起的变动,避免触发(虽然代码里有判断,但过滤一下更安全)
|
|
136
|
+
const hasExternalChanges = mutations.some(m => {
|
|
137
|
+
if (m.type === 'attributes' && m.attributeName === 'tabindex') {
|
|
138
|
+
const target = m.target;
|
|
139
|
+
return target.getAttribute('tabindex') !== '-1';
|
|
140
|
+
}
|
|
141
|
+
return true;
|
|
142
|
+
});
|
|
143
|
+
if (hasExternalChanges) {
|
|
144
|
+
debouncedUpdate();
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
observer.observe(container, {
|
|
148
|
+
childList: true,
|
|
149
|
+
subtree: true,
|
|
150
|
+
attributes: true,
|
|
151
|
+
attributeFilter: ['class', 'tabindex']
|
|
152
|
+
});
|
|
153
|
+
return () => {
|
|
154
|
+
observer.disconnect();
|
|
155
|
+
clearTimeout(timer);
|
|
156
|
+
};
|
|
157
|
+
}, [focusVisible, id, prefix, selector]);
|
|
158
|
+
return idClass;
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
const KTable = React.forwardRef(({ className, focusVisible = false, ...props }, ref) => {
|
|
162
|
+
const idClass = useFocusVisible({
|
|
163
|
+
focusVisible,
|
|
164
|
+
prefix: 'k-table',
|
|
165
|
+
selector: '[class^="ant-table"], [class^="ant-pagination"]'
|
|
166
|
+
});
|
|
106
167
|
const rowSelection = props.rowSelection ? {
|
|
107
168
|
...props.rowSelection,
|
|
108
169
|
getCheckboxProps: (record) => {
|
|
@@ -128,7 +189,16 @@ const KTable = React.forwardRef(({ className, ...props }, ref) => {
|
|
|
128
189
|
};
|
|
129
190
|
}
|
|
130
191
|
} : undefined;
|
|
131
|
-
return (jsxRuntime.jsx(antd.Table, { ...props, rowSelection: rowSelection, className: tailwindMerge.twJoin('k-table', className), ref: ref }));
|
|
192
|
+
return (jsxRuntime.jsx(antd.Table, { ...props, rowSelection: rowSelection, className: tailwindMerge.twJoin('k-table', idClass, className), ref: ref }));
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
const KTabs = React.forwardRef(({ className, focusVisible = false, ...props }, ref) => {
|
|
196
|
+
const idClass = useFocusVisible({
|
|
197
|
+
focusVisible,
|
|
198
|
+
prefix: 'k-tabs',
|
|
199
|
+
selector: '.ant-tabs-nav [class^="ant-tabs"]'
|
|
200
|
+
});
|
|
201
|
+
return (jsxRuntime.jsx(antd.Tabs, { className: tailwindMerge.twJoin('k-tabs', `k-tabs-${props.size}`, idClass, className), ref: ref, ...props }));
|
|
132
202
|
});
|
|
133
203
|
|
|
134
204
|
const KTag = React.forwardRef(({ children, className, ...props }, ref) => {
|
|
@@ -184,6 +254,7 @@ exports.KSelect = KSelect;
|
|
|
184
254
|
exports.KSpin = KSpin;
|
|
185
255
|
exports.KSwitch = KSwitch;
|
|
186
256
|
exports.KTable = KTable;
|
|
257
|
+
exports.KTabs = KTabs;
|
|
187
258
|
exports.KTag = KTag;
|
|
188
259
|
exports.KText = KText;
|
|
189
260
|
exports.KTitle = KTitle;
|
package/dist/index.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../src/themes/dark.ts","../src/themes/light.ts","../src/ThemeProvider.tsx","../src/components/design/KAutoComplete/KAutoComplete.tsx","../src/components/design/KButton/KButton.tsx","../src/components/design/KCheckbox/KCheckbox.tsx","../src/components/design/KDropdown/KDropdown.tsx","../src/components/design/KInput/KInput.tsx","../src/components/design/KRadio/KRadio.tsx","../src/components/design/KSelect/KSelect.tsx","../src/components/design/KSpin/KSpin.tsx","../src/components/design/KSwitch/KSwitch.tsx","../src/components/design/KTabel/KTable.tsx","../src/components/design/KTag/KTag.tsx","../src/components/design/KTooltip/KTooltip.tsx","../src/components/design/KTypography/KTypography.tsx"],"sourcesContent":["import {theme as themeAntd, ThemeConfig} from \"antd\";\n\nexport const darkTheme: ThemeConfig = {\n algorithm: themeAntd.darkAlgorithm,\n token: {\n colorPrimary: 'var(--grey-900)',\n colorTextSecondary: 'var(--grey-900)',\n colorBorder: 'var(--grey-300)',\n colorBorderSecondary: 'var(--grey-200)'\n },\n cssVar: {key: \"app\"},\n components: {},\n};","import {theme as themeAntd, ThemeConfig} from \"antd\";\n\n\nexport const lightTheme: ThemeConfig = {\n algorithm: themeAntd.defaultAlgorithm,\n token: {\n colorPrimary: 'var(--grey-900)',\n colorTextSecondary: 'var(--grey-900)',\n colorBorder: 'var(--grey-300)',\n colorBorderSecondary: 'var(--grey-200)'\n },\n cssVar: {key: \"app\"},\n components: {\n Button: {\n }\n },\n};","import React from 'react';\nimport {ConfigProvider, ThemeConfig} from 'antd';\nimport {darkTheme} from \"./themes/dark\";\nimport {lightTheme} from \"./themes/light\";\n\n\nexport type ThemeMode = 'light' | 'dark';\n\nexport type ThemeProviderProps = {\n mode?: ThemeMode;\n children: React.ReactNode;\n} & ThemeConfig;\n\nexport const ThemeProvider: React.FC<ThemeProviderProps> = ({\n mode = 'light',\n children,\n ...props\n }) => {\n\n const baseTheme = mode === \"dark\" ? darkTheme : lightTheme;\n\n\n const mergedTheme: ThemeConfig = {\n ...baseTheme,\n ...props,\n token: props.token ? {\n ...baseTheme.token,\n ...props.token,\n } : baseTheme.token,\n components: props.components ? {\n ...baseTheme.components,\n ...props.components,\n } : baseTheme.components,\n };\n\n\n return (\n <ConfigProvider theme={mergedTheme}>\n {children}\n </ConfigProvider>\n );\n};","import React, {forwardRef} from 'react';\nimport {AutoComplete, AutoCompleteProps} from 'antd';\nimport {twJoin} from \"tailwind-merge\";\nimport './style.css'\nimport {BaseOptionType, DefaultOptionType} from \"antd/es/select\";\n\nexport type KAutoCompleteProps<\n ValueType = any,\n OptionType extends BaseOptionType | DefaultOptionType = DefaultOptionType,\n> = Omit<AutoCompleteProps<ValueType, OptionType>, 'size'> & {\n size?: 'sm' | 'md' | 'lg' | 'xl',\n};\n\nexport const KAutoComplete = forwardRef(<\n ValueType = any,\n OptionType extends BaseOptionType | DefaultOptionType = DefaultOptionType,\n>(\n {\n className,\n size = 'lg',\n ...props\n }: KAutoCompleteProps<ValueType, OptionType>,\n ref: any\n) => {\n return (\n <AutoComplete\n {...props}\n ref={ref}\n className={twJoin('k-auto-complete', `k-auto-complete-${size}`, className)}\n />\n );\n});\n\nKAutoComplete.displayName = 'KAutoComplete';\n\n","import React from 'react';\nimport {Button, ButtonProps} from 'antd';\nimport {cn} from \"../../../utils/cn\";\nimport './style.css';\nimport {twJoin} from \"tailwind-merge\";\n\nexport type KButtonProps = Omit<\n ButtonProps,\n 'size' | 'type'\n> & {\n size?: 'sm' | 'md' | 'lg' | 'xl',\n type?: 'primary' | 'outline' | 'ghost' | 'link'\n}\n\n\nexport const KButton = React.forwardRef<HTMLButtonElement, KButtonProps>(({\n children,\n className,\n type = 'primary',\n size = 'lg',\n ...rest\n }, ref) => {\n\n\n return (\n <Button\n {...rest}\n className={twJoin('k-button', `k-button-${type}`, `k-button-${size}`, className)}\n ref={ref}\n size={'middle'}\n type={'default'}\n >\n {children}\n </Button>\n );\n});\n","import React, {forwardRef} from 'react';\nimport {Checkbox, CheckboxProps} from 'antd';\nimport type {CheckboxRef} from 'antd/es/checkbox';\nimport {CheckboxGroupProps} from 'antd/es/checkbox';\nimport './style.css';\nimport {twJoin} from \"tailwind-merge\";\n\nexport type KCheckboxProps = CheckboxProps & {\n size?: 'sm' | 'md',\n}\n\nexport type KCheckboxGroupProps = CheckboxGroupProps;\n\nexport const KCheckboxGroup = forwardRef<HTMLDivElement, KCheckboxGroupProps>((props, ref) => {\n return <Checkbox.Group {...props} className={twJoin('k-checkbox-group', props.className)} ref={ref}/>;\n});\n\nexport interface KCheckboxInterface extends React.ForwardRefExoticComponent<KCheckboxProps & React.RefAttributes<CheckboxRef>> {\n Group: typeof KCheckboxGroup;\n}\n\nexport const KCheckbox = forwardRef<CheckboxRef, KCheckboxProps>(({\n children,\n className,\n size = 'md',\n ...props\n }, ref) => {\n\n\n return (\n <Checkbox\n {...props}\n className={twJoin(`k-checkbox k-checkbox-${size}`, className)}\n ref={ref}>\n {children}\n </Checkbox>\n );\n\n}) as KCheckboxInterface;\n\nKCheckbox.Group = KCheckboxGroup;\n\n","import React from 'react';\nimport {Dropdown, DropdownProps} from 'antd';\nimport {twJoin} from \"tailwind-merge\";\n\nexport type KDropdownProps = DropdownProps\n\n\nexport const KDropdown: React.FC<KDropdownProps> = ({children, className, ...props}) => {\n return (\n <Dropdown {...props} className={twJoin('k-dropdown', className)}>{children}</Dropdown>\n );\n};\n","import React, {forwardRef} from 'react';\nimport {Input, InputProps, InputRef} from 'antd';\nimport {twJoin} from \"tailwind-merge\";\nimport './style.css'\n\nexport type KInputProps = Omit<\n InputProps,\n 'size'\n> & {\n size?: 'sm' | 'md' | 'lg' | 'xl',\n};\n\n\nconst InternalKInput = forwardRef<InputRef, KInputProps>(({\n className,\n size = 'lg',\n ...props\n }, ref) => {\n\n\n return (\n <Input {...props} className={twJoin('k-input', `k-input-${size}`, className)} ref={ref}/>\n );\n});\n\ntype CompoundedComponent = typeof InternalKInput & {\n TextArea: typeof Input.TextArea;\n Search: typeof Input.Search;\n Password: typeof Input.Password;\n OTP: typeof Input.OTP;\n};\n\nexport const KInput = InternalKInput as CompoundedComponent;\n\nKInput.TextArea = Input.TextArea;\nKInput.Search = Input.Search;\nKInput.Password = Input.Password;\nKInput.OTP = Input.OTP;\n","import React, {ComponentProps, forwardRef} from 'react';\nimport {Radio, RadioGroupProps, RadioProps} from 'antd';\nimport {RadioRef} from 'antd/es/radio/interface';\nimport './style.css';\nimport {twJoin} from \"tailwind-merge\";\n\nexport type KRadioProps = RadioProps & {\n size?: 'sm' | 'md',\n}\nexport type KRadioGroupProps = RadioGroupProps\nexport type KRadioButtonProps = ComponentProps<typeof Radio.Button>;\n\nexport const KRadioGroup = forwardRef<HTMLDivElement, KRadioGroupProps>((props, ref) => {\n return <Radio.Group {...props} className={twJoin('k-radio-group', props.className)} ref={ref}/>;\n})\n\nexport const KRadioButton = forwardRef<RadioRef, KRadioButtonProps>((props, ref) => {\n return <Radio.Button {...props} className={twJoin('k-radio-button', props.className)} ref={ref}/>;\n})\n\nexport interface KRadioInterface extends React.ForwardRefExoticComponent<KRadioProps & React.RefAttributes<RadioRef>> {\n Group: typeof KRadioGroup;\n Button: typeof KRadioButton;\n}\n\nexport const KRadio = forwardRef<RadioRef, KRadioProps>(({children, size = 'md', ...props}, ref) => {\n return (\n <Radio {...props} className={twJoin('k-radio', `k-radio-${size}`, props.className)} ref={ref}>{children}</Radio>\n );\n}) as KRadioInterface;\n\nKRadio.Group = KRadioGroup;\nKRadio.Button = KRadioButton;\n\n\n\n","import React, {forwardRef} from 'react';\nimport {Select, SelectProps} from 'antd';\nimport type {RefSelectProps} from 'antd';\nimport {twJoin} from \"tailwind-merge\";\nimport './style.css';\n\nexport type KSelectProps = SelectProps;\n\n\nexport const KSelect = forwardRef<RefSelectProps, KSelectProps>(({children, className, ...props}, ref) => {\n return (\n <Select {...props} className={twJoin('k-select', className)} ref={ref}>{children}</Select>\n );\n});\n","import React from 'react';\nimport {Spin, SpinProps} from 'antd';\nimport {twJoin} from \"tailwind-merge\";\n\nexport type KSpinProps = Omit<SpinProps, 'size'> & {\n size?: 'sm' | 'md' | 'lg' | 'xl',\n};\n\nexport const KSpin: React.FC<KSpinProps> = ({className, size = 'lg', ...props}) => {\n return (\n <Spin {...props} className={twJoin('k-spin', `k-spin-${size}`, className)}/>\n );\n};\n","import React, {forwardRef} from 'react';\nimport {Switch, SwitchProps} from 'antd';\nimport {twJoin} from \"tailwind-merge\";\nimport './style.css';\n\nexport type KSwitchProps = Omit<SwitchProps, 'size'> & {\n size?: 'sm' | 'md',\n}\n\n\nexport const KSwitch = forwardRef<HTMLButtonElement, KSwitchProps>(({size = 'md', className, ...props}, ref) => {\n return (\n <Switch {...props} className={twJoin('k-switch', `k-switch-${size}`, className)} ref={ref}/>\n );\n});\n","import React, {forwardRef} from 'react';\nimport {Table, TableProps} from 'antd';\nimport type {TableRef} from 'antd/es/table';\nimport {twJoin} from \"tailwind-merge\";\nimport './style.css';\nimport '../KRadio/style.css';\nimport '../KCheckbox/style.css';\n\nexport type KTableProps<RecordType = any> = TableProps<RecordType>;\n\nexport const KTable = forwardRef<TableRef, KTableProps>(({className, ...props}, ref) => {\n const rowSelection = props.rowSelection ? {\n ...props.rowSelection,\n getCheckboxProps: (record: any) => {\n const existingProps = props.rowSelection?.getCheckboxProps?.(record) || {};\n const isRadio = props.rowSelection?.type === 'radio';\n const size = props.size === 'small' ? 'sm' : 'md';\n const cls = isRadio ? `k-radio k-radio-${size}` : `k-checkbox k-checkbox-${size}`;\n return {\n ...existingProps,\n className: twJoin(cls, existingProps.className),\n };\n },\n getTitleCheckboxProps: ()=>{\n const existingProps = props.rowSelection?.getTitleCheckboxProps?.() || {};\n const isRadio = props.rowSelection?.type === 'radio';\n const size = props.size === 'small' ? 'sm' : 'md';\n const cls = isRadio ? `k-radio k-radio-${size}` : `k-checkbox k-checkbox-${size}`;\n return {\n ...existingProps,\n className: twJoin(cls, existingProps.className),\n };\n }\n } : undefined;\n\n return (\n <Table\n {...props}\n rowSelection={rowSelection}\n className={twJoin('k-table', className)}\n ref={ref}\n />\n );\n}) as <RecordType = any>(\n props: KTableProps<RecordType> & { ref?: React.ForwardedRef<TableRef> }\n) => React.ReactElement;\n","import React, {forwardRef} from 'react';\nimport {Tag, TagProps} from 'antd';\nimport {twJoin} from \"tailwind-merge\";\nimport './style.css';\n\nexport type KTagProps = TagProps;\n\n\nexport const KTag = forwardRef<HTMLAnchorElement | HTMLSpanElement, KTagProps>(({\n children,\n className,\n ...props\n }, ref) => {\n return (\n <Tag {...props} className={twJoin('k-tag', className)} ref={ref}>{children}</Tag>\n );\n});\n","import React, {forwardRef} from 'react';\nimport {Tooltip, TooltipProps} from 'antd';\nimport type {TooltipRef} from 'antd/es/tooltip';\nimport {twJoin} from \"tailwind-merge\";\nimport './style.css';\n\nexport type KTooltipProps = TooltipProps\n\nexport const KTooltip = forwardRef<TooltipRef, KTooltipProps>(({children, className, ...props}, ref) => {\n return (\n <Tooltip {...props} className={twJoin('k-tooltip', className)} ref={ref}>{children}</Tooltip>\n );\n});\n","import React, {forwardRef} from 'react';\n\nimport {Typography} from \"antd\";\nimport {TextProps} from \"antd/es/typography/Text\";\nimport {TitleProps} from \"antd/es/typography/Title\";\nimport {ParagraphProps} from \"antd/es/typography/Paragraph\";\nimport {TypographyProps} from \"antd/es/typography/Typography\";\nimport {twJoin} from \"tailwind-merge\";\nimport './style.css';\n\nconst {Text, Title, Paragraph} = Typography;\n\nexport type KTextProps = TextProps;\nexport type KTitleProps = TitleProps;\nexport type KParagraphProps = ParagraphProps;\nexport type KTypographyProps = TypographyProps<any>;\n\nconst CopyIcon = () => (\n <svg width=\"1em\" height=\"1em\" viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M27 4H11C10.7348 4 10.4804 4.10536 10.2929 4.29289C10.1054 4.48043 10 4.73478 10 5V10H5C4.73478 10 4.48043 10.1054 4.29289 10.2929C4.10536 10.4804 4 10.7348 4 11V27C4 27.2652 4.10536 27.5196 4.29289 27.7071C4.48043 27.8946 4.73478 28 5 28H21C21.2652 28 21.5196 27.8946 21.7071 27.7071C21.8946 27.5196 22 27.2652 22 27V22H27C27.2652 22 27.5196 21.8946 27.7071 21.7071C27.8946 21.5196 28 21.2652 28 21V5C28 4.73478 27.8946 4.48043 27.7071 4.29289C27.5196 4.10536 27.2652 4 27 4ZM20 26H6V12H20V26ZM26 20H22V11C22 10.7348 21.8946 10.4804 21.7071 10.2929C21.5196 10.1054 21.2652 10 21 10H12V6H26V20Z\"\n fill=\"var(--fg-primary)\"/>\n </svg>\n);\n\nconst DoneIcon = () => (\n <svg width=\"1em\" height=\"0.72em\" viewBox=\"0 0 25 18\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M24.7081 1.70806L8.70806 17.7081C8.61518 17.801 8.50489 17.8748 8.3835 17.9251C8.2621 17.9754 8.13197 18.0013 8.00056 18.0013C7.86914 18.0013 7.73901 17.9754 7.61762 17.9251C7.49622 17.8748 7.38593 17.801 7.29306 17.7081L0.293056 10.7081C0.105415 10.5204 0 10.2659 0 10.0006C0 9.73519 0.105415 9.4807 0.293056 9.29306C0.480697 9.10542 0.735192 9 1.00056 9C1.26592 9 1.52042 9.10542 1.70806 9.29306L8.00056 15.5868L23.2931 0.293056C23.4807 0.105415 23.7352 -1.97711e-09 24.0006 0C24.2659 1.97712e-09 24.5204 0.105415 24.7081 0.293056C24.8957 0.480696 25.0011 0.735192 25.0011 1.00056C25.0011 1.26592 24.8957 1.52042 24.7081 1.70806Z\"\n fill=\"var(--fg-primary)\"/>\n </svg>\n);\n\nconst getCopyableConfig = (copyable: KTextProps['copyable']) => {\n if (!copyable) return copyable;\n const defaultIcon = [<CopyIcon key=\"copy-icon\"/>, <DoneIcon key=\"done-icon\"/>];\n if (typeof copyable === 'boolean') {\n return {\n icon: defaultIcon,\n };\n }\n return {\n ...copyable,\n icon: copyable.icon || defaultIcon,\n };\n};\n\nexport const KText = forwardRef<HTMLSpanElement, KTextProps>(({className, ...props}, ref) => {\n return <Text {...props} className={twJoin('k-text', className)} copyable={getCopyableConfig(props.copyable)}\n ref={ref}/>\n});\n\nexport const KTitle = forwardRef<HTMLHeadingElement, KTitleProps>(({className, ...props}, ref) => {\n return <Title {...props} className={twJoin('k-title', className)} copyable={getCopyableConfig(props.copyable)}\n ref={ref}/>\n});\n\nexport const KParagraph = forwardRef<HTMLDivElement, KParagraphProps>(({className, ...props}, ref) => {\n return <Paragraph {...props} className={twJoin('k-paragraph', className)}\n copyable={getCopyableConfig(props.copyable)} ref={ref}/>\n});\n\nexport const KTypography = forwardRef<HTMLElement, KTypographyProps>((props, ref) => {\n return <Typography {...props} ref={ref}/>\n}) as React.ForwardRefExoticComponent<KTypographyProps & React.RefAttributes<HTMLElement>> & {\n Text: typeof KText;\n Title: typeof KTitle;\n Paragraph: typeof KParagraph;\n};\n\nKTypography.Text = KText;\nKTypography.Title = KTitle;\nKTypography.Paragraph = KParagraph;\n\n\n\n"],"names":["themeAntd","_jsx","ConfigProvider","forwardRef","AutoComplete","twJoin","Button","Checkbox","Dropdown","Input","Radio","Select","Spin","Switch","Table","Tag","Tooltip","Typography"],"mappings":";;;;;;;AAEO,MAAM,SAAS,GAAgB;IAClC,SAAS,EAAEA,UAAS,CAAC,aAAa;AAClC,IAAA,KAAK,EAAE;AACH,QAAA,YAAY,EAAE,iBAAiB;AAC/B,QAAA,kBAAkB,EAAE,iBAAiB;AACrC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IAChF,OAAOF,cAAA,CAACgB,eAAU,EAAA,EAAA,GAAK,KAAK,EAAE,GAAG,EAAE,GAAG,EAAA,CAAG;AAC7C,CAAC;AAMD,WAAW,CAAC,IAAI,GAAG,KAAK;AACxB,WAAW,CAAC,KAAK,GAAG,MAAM;AAC1B,WAAW,CAAC,SAAS,GAAG,UAAU;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../src/themes/dark.ts","../src/themes/light.ts","../src/ThemeProvider.tsx","../src/components/design/KAutoComplete/KAutoComplete.tsx","../src/components/design/KButton/KButton.tsx","../src/components/design/KCheckbox/KCheckbox.tsx","../src/components/design/KDropdown/KDropdown.tsx","../src/components/design/KInput/KInput.tsx","../src/components/design/KRadio/KRadio.tsx","../src/components/design/KSelect/KSelect.tsx","../src/components/design/KSpin/KSpin.tsx","../src/components/design/KSwitch/KSwitch.tsx","../src/hooks/useFocusVisible.ts","../src/components/design/KTabel/KTable.tsx","../src/components/design/KTabs/KTabs.tsx","../src/components/design/KTag/KTag.tsx","../src/components/design/KTooltip/KTooltip.tsx","../src/components/design/KTypography/KTypography.tsx"],"sourcesContent":["import {theme as themeAntd, ThemeConfig} from \"antd\";\n\nexport const darkTheme: ThemeConfig = {\n algorithm: themeAntd.darkAlgorithm,\n token: {\n colorPrimary: 'var(--grey-900)',\n colorTextSecondary: 'var(--grey-900)',\n colorBorder: 'var(--grey-300)',\n colorBorderSecondary: 'var(--grey-200)'\n },\n cssVar: {key: \"app\"},\n components: {},\n};","import {theme as themeAntd, ThemeConfig} from \"antd\";\n\n\nexport const lightTheme: ThemeConfig = {\n algorithm: themeAntd.defaultAlgorithm,\n token: {\n colorPrimary: 'var(--grey-900)',\n colorTextSecondary: 'var(--grey-900)',\n colorBorder: 'var(--grey-300)',\n colorBorderSecondary: 'var(--grey-200)'\n },\n cssVar: {key: \"app\"},\n components: {\n Button: {\n }\n },\n};","import React from 'react';\nimport {ConfigProvider, ThemeConfig} from 'antd';\nimport {darkTheme} from \"./themes/dark\";\nimport {lightTheme} from \"./themes/light\";\n\n\nexport type ThemeMode = 'light' | 'dark';\n\nexport type ThemeProviderProps = {\n mode?: ThemeMode;\n children: React.ReactNode;\n} & ThemeConfig;\n\nexport const ThemeProvider: React.FC<ThemeProviderProps> = ({\n mode = 'light',\n children,\n ...props\n }) => {\n\n const baseTheme = mode === \"dark\" ? darkTheme : lightTheme;\n\n\n const mergedTheme: ThemeConfig = {\n ...baseTheme,\n ...props,\n token: props.token ? {\n ...baseTheme.token,\n ...props.token,\n } : baseTheme.token,\n components: props.components ? {\n ...baseTheme.components,\n ...props.components,\n } : baseTheme.components,\n };\n\n\n return (\n <ConfigProvider theme={mergedTheme}>\n {children}\n </ConfigProvider>\n );\n};","import React, {forwardRef} from 'react';\nimport {AutoComplete, AutoCompleteProps} from 'antd';\nimport {twJoin} from \"tailwind-merge\";\nimport './style.css'\nimport {BaseOptionType, DefaultOptionType} from \"antd/es/select\";\n\nexport type KAutoCompleteProps<\n ValueType = any,\n OptionType extends BaseOptionType | DefaultOptionType = DefaultOptionType,\n> = Omit<AutoCompleteProps<ValueType, OptionType>, 'size'> & {\n size?: 'sm' | 'md' | 'lg' | 'xl',\n};\n\nexport const KAutoComplete = forwardRef(<\n ValueType = any,\n OptionType extends BaseOptionType | DefaultOptionType = DefaultOptionType,\n>(\n {\n className,\n size = 'lg',\n ...props\n }: KAutoCompleteProps<ValueType, OptionType>,\n ref: any\n) => {\n return (\n <AutoComplete\n {...props}\n ref={ref}\n className={twJoin('k-auto-complete', `k-auto-complete-${size}`, className)}\n />\n );\n});\n\nKAutoComplete.displayName = 'KAutoComplete';\n\n","import React from 'react';\nimport {Button, ButtonProps} from 'antd';\nimport {cn} from \"../../../utils/cn\";\nimport './style.css';\nimport {twJoin} from \"tailwind-merge\";\n\nexport type KButtonProps = Omit<\n ButtonProps,\n 'size' | 'type'\n> & {\n size?: 'sm' | 'md' | 'lg' | 'xl',\n type?: 'primary' | 'outline' | 'ghost' | 'link'\n}\n\n\nexport const KButton = React.forwardRef<HTMLButtonElement, KButtonProps>(({\n children,\n className,\n type = 'primary',\n size = 'lg',\n ...rest\n }, ref) => {\n\n\n return (\n <Button\n {...rest}\n className={twJoin('k-button', `k-button-${type}`, `k-button-${size}`, className)}\n ref={ref}\n size={'middle'}\n type={'default'}\n >\n {children}\n </Button>\n );\n});\n","import React, {forwardRef} from 'react';\nimport {Checkbox, CheckboxProps} from 'antd';\nimport type {CheckboxRef} from 'antd/es/checkbox';\nimport {CheckboxGroupProps} from 'antd/es/checkbox';\nimport './style.css';\nimport {twJoin} from \"tailwind-merge\";\n\nexport type KCheckboxProps = CheckboxProps & {\n size?: 'sm' | 'md',\n}\n\nexport type KCheckboxGroupProps = CheckboxGroupProps;\n\nexport const KCheckboxGroup = forwardRef<HTMLDivElement, KCheckboxGroupProps>((props, ref) => {\n return <Checkbox.Group {...props} className={twJoin('k-checkbox-group', props.className)} ref={ref}/>;\n});\n\nexport interface KCheckboxInterface extends React.ForwardRefExoticComponent<KCheckboxProps & React.RefAttributes<CheckboxRef>> {\n Group: typeof KCheckboxGroup;\n}\n\nexport const KCheckbox = forwardRef<CheckboxRef, KCheckboxProps>(({\n children,\n className,\n size = 'md',\n ...props\n }, ref) => {\n\n\n return (\n <Checkbox\n {...props}\n className={twJoin(`k-checkbox k-checkbox-${size}`, className)}\n ref={ref}>\n {children}\n </Checkbox>\n );\n\n}) as KCheckboxInterface;\n\nKCheckbox.Group = KCheckboxGroup;\n\n","import React from 'react';\nimport {Dropdown, DropdownProps} from 'antd';\nimport {twJoin} from \"tailwind-merge\";\n\nexport type KDropdownProps = DropdownProps\n\n\nexport const KDropdown: React.FC<KDropdownProps> = ({children, className, ...props}) => {\n return (\n <Dropdown {...props} className={twJoin('k-dropdown', className)}>{children}</Dropdown>\n );\n};\n","import React, {forwardRef} from 'react';\nimport {Input, InputProps, InputRef} from 'antd';\nimport {twJoin} from \"tailwind-merge\";\nimport './style.css'\n\nexport type KInputProps = Omit<\n InputProps,\n 'size'\n> & {\n size?: 'sm' | 'md' | 'lg' | 'xl',\n};\n\n\nconst InternalKInput = forwardRef<InputRef, KInputProps>(({\n className,\n size = 'lg',\n ...props\n }, ref) => {\n\n\n return (\n <Input {...props} className={twJoin('k-input', `k-input-${size}`, className)} ref={ref}/>\n );\n});\n\ntype CompoundedComponent = typeof InternalKInput & {\n TextArea: typeof Input.TextArea;\n Search: typeof Input.Search;\n Password: typeof Input.Password;\n OTP: typeof Input.OTP;\n};\n\nexport const KInput = InternalKInput as CompoundedComponent;\n\nKInput.TextArea = Input.TextArea;\nKInput.Search = Input.Search;\nKInput.Password = Input.Password;\nKInput.OTP = Input.OTP;\n","import React, {ComponentProps, forwardRef} from 'react';\nimport {Radio, RadioGroupProps, RadioProps} from 'antd';\nimport {RadioRef} from 'antd/es/radio/interface';\nimport './style.css';\nimport {twJoin} from \"tailwind-merge\";\n\nexport type KRadioProps = RadioProps & {\n size?: 'sm' | 'md',\n}\nexport type KRadioGroupProps = RadioGroupProps\nexport type KRadioButtonProps = ComponentProps<typeof Radio.Button>;\n\nexport const KRadioGroup = forwardRef<HTMLDivElement, KRadioGroupProps>((props, ref) => {\n return <Radio.Group {...props} className={twJoin('k-radio-group', props.className)} ref={ref}/>;\n})\n\nexport const KRadioButton = forwardRef<RadioRef, KRadioButtonProps>((props, ref) => {\n return <Radio.Button {...props} className={twJoin('k-radio-button', props.className)} ref={ref}/>;\n})\n\nexport interface KRadioInterface extends React.ForwardRefExoticComponent<KRadioProps & React.RefAttributes<RadioRef>> {\n Group: typeof KRadioGroup;\n Button: typeof KRadioButton;\n}\n\nexport const KRadio = forwardRef<RadioRef, KRadioProps>(({children, size = 'md', ...props}, ref) => {\n return (\n <Radio {...props} className={twJoin('k-radio', `k-radio-${size}`, props.className)} ref={ref}>{children}</Radio>\n );\n}) as KRadioInterface;\n\nKRadio.Group = KRadioGroup;\nKRadio.Button = KRadioButton;\n\n\n\n","import React, {forwardRef} from 'react';\nimport {Select, SelectProps} from 'antd';\nimport type {RefSelectProps} from 'antd';\nimport {twJoin} from \"tailwind-merge\";\nimport './style.css';\n\nexport type KSelectProps = SelectProps;\n\n\nexport const KSelect = forwardRef<RefSelectProps, KSelectProps>(({children, className, ...props}, ref) => {\n return (\n <Select {...props} className={twJoin('k-select', className)} ref={ref}>{children}</Select>\n );\n});\n","import React from 'react';\nimport {Spin, SpinProps} from 'antd';\nimport {twJoin} from \"tailwind-merge\";\n\nexport type KSpinProps = Omit<SpinProps, 'size'> & {\n size?: 'sm' | 'md' | 'lg' | 'xl',\n};\n\nexport const KSpin: React.FC<KSpinProps> = ({className, size = 'lg', ...props}) => {\n return (\n <Spin {...props} className={twJoin('k-spin', `k-spin-${size}`, className)}/>\n );\n};\n","import React, {forwardRef} from 'react';\nimport {Switch, SwitchProps} from 'antd';\nimport {twJoin} from \"tailwind-merge\";\nimport './style.css';\n\nexport type KSwitchProps = Omit<SwitchProps, 'size'> & {\n size?: 'sm' | 'md',\n}\n\n\nexport const KSwitch = forwardRef<HTMLButtonElement, KSwitchProps>(({size = 'md', className, ...props}, ref) => {\n return (\n <Switch {...props} className={twJoin('k-switch', `k-switch-${size}`, className)} ref={ref}/>\n );\n});\n","import {useEffect, useId} from 'react';\n\nexport interface UseFocusVisibleOptions {\n focusVisible?: boolean;\n prefix?: string;\n selector?: string;\n}\n\nexport const useFocusVisible = ({\n focusVisible = false,\n prefix = 'k-focus',\n selector = '[class^=\"ant-\"]'\n }: UseFocusVisibleOptions = {}) => {\n const id = useId().replace(/:/g, '');\n const idClass = `${prefix}-${id}`;\n\n useEffect(() => {\n if (focusVisible) return;\n\n const idClassInner = `${prefix}-${id}`;\n\n let timer: ReturnType<typeof setTimeout>;\n const updateTabIndex = () => {\n const container = document.querySelector(`.${idClassInner}`);\n if (!container) return;\n const elements = container.querySelectorAll(selector);\n elements.forEach(el => {\n if (el.getAttribute('tabindex') !== '-1') {\n el.setAttribute('tabindex', '-1');\n }\n });\n };\n\n const debouncedUpdate = () => {\n clearTimeout(timer);\n timer = setTimeout(updateTabIndex, 0);\n };\n\n // 初始执行一次\n updateTabIndex();\n\n // 监听 DOM 变化\n const container = document.querySelector(`.${idClassInner}`);\n if (!container) return;\n\n const observer = new MutationObserver((mutations) => {\n // 过滤掉我们自己修改 tabindex 引起的变动,避免触发(虽然代码里有判断,但过滤一下更安全)\n const hasExternalChanges = mutations.some(m => {\n if (m.type === 'attributes' && m.attributeName === 'tabindex') {\n const target = m.target as HTMLElement;\n return target.getAttribute('tabindex') !== '-1';\n }\n return true;\n });\n\n if (hasExternalChanges) {\n debouncedUpdate();\n }\n });\n\n observer.observe(container, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['class', 'tabindex']\n });\n\n return () => {\n observer.disconnect();\n clearTimeout(timer);\n };\n }, [focusVisible, id, prefix, selector]);\n\n return idClass;\n};\n","import React, {forwardRef} from 'react';\nimport {Table, TableProps} from 'antd';\nimport type {TableRef} from 'antd/es/table';\nimport {twJoin} from \"tailwind-merge\";\nimport './style.css';\nimport '../KRadio/style.css';\nimport '../KCheckbox/style.css';\nimport {useFocusVisible} from \"../../../hooks/useFocusVisible\";\n\nexport type KTableProps<RecordType = any> = TableProps<RecordType> & {\n focusVisible?: boolean;\n};\n\nexport const KTable = forwardRef<TableRef, KTableProps>(({className, focusVisible = false, ...props}, ref) => {\n const idClass = useFocusVisible({\n focusVisible,\n prefix: 'k-table',\n selector: '[class^=\"ant-table\"], [class^=\"ant-pagination\"]'\n });\n\n const rowSelection = props.rowSelection ? {\n ...props.rowSelection,\n getCheckboxProps: (record: any) => {\n const existingProps = props.rowSelection?.getCheckboxProps?.(record) || {};\n const isRadio = props.rowSelection?.type === 'radio';\n const size = props.size === 'small' ? 'sm' : 'md';\n const cls = isRadio ? `k-radio k-radio-${size}` : `k-checkbox k-checkbox-${size}`;\n return {\n ...existingProps,\n className: twJoin(cls, existingProps.className),\n };\n },\n getTitleCheckboxProps: ()=>{\n const existingProps = props.rowSelection?.getTitleCheckboxProps?.() || {};\n const isRadio = props.rowSelection?.type === 'radio';\n const size = props.size === 'small' ? 'sm' : 'md';\n const cls = isRadio ? `k-radio k-radio-${size}` : `k-checkbox k-checkbox-${size}`;\n return {\n ...existingProps,\n className: twJoin(cls, existingProps.className),\n };\n }\n } : undefined;\n\n return (\n <Table\n {...props}\n rowSelection={rowSelection}\n className={twJoin('k-table', idClass, className)}\n ref={ref}\n />\n );\n}) as <RecordType = any>(\n props: KTableProps<RecordType> & { ref?: React.ForwardedRef<TableRef> }\n) => React.ReactElement;\n","import React, {forwardRef, ComponentRef} from 'react';\nimport {Tabs, TabsProps} from 'antd';\nimport './style.css';\nimport {twJoin} from \"tailwind-merge\";\nimport {useFocusVisible} from \"../../../hooks/useFocusVisible\";\n\nexport type KTabsProps = TabsProps & {\n focusVisible?: boolean,\n};\n\n\nexport const KTabs = forwardRef<ComponentRef<typeof Tabs>, KTabsProps>(({\n className,\n focusVisible = false,\n ...props\n }, ref) => {\n\n const idClass = useFocusVisible({\n focusVisible,\n prefix: 'k-tabs',\n selector: '.ant-tabs-nav [class^=\"ant-tabs\"]'\n });\n\n return (\n <Tabs\n className={twJoin(\n 'k-tabs',\n `k-tabs-${props.size}`,\n idClass,\n className\n )}\n ref={ref}\n {...props}\n />\n )\n})","import React, {forwardRef} from 'react';\nimport {Tag, TagProps} from 'antd';\nimport {twJoin} from \"tailwind-merge\";\nimport './style.css';\n\nexport type KTagProps = TagProps;\n\n\nexport const KTag = forwardRef<HTMLAnchorElement | HTMLSpanElement, KTagProps>(({\n children,\n className,\n ...props\n }, ref) => {\n return (\n <Tag {...props} className={twJoin('k-tag', className)} ref={ref}>{children}</Tag>\n );\n});\n","import React, {forwardRef} from 'react';\nimport {Tooltip, TooltipProps} from 'antd';\nimport type {TooltipRef} from 'antd/es/tooltip';\nimport {twJoin} from \"tailwind-merge\";\nimport './style.css';\n\nexport type KTooltipProps = TooltipProps\n\nexport const KTooltip = forwardRef<TooltipRef, KTooltipProps>(({children, className, ...props}, ref) => {\n return (\n <Tooltip {...props} className={twJoin('k-tooltip', className)} ref={ref}>{children}</Tooltip>\n );\n});\n","import React, {forwardRef} from 'react';\n\nimport {Typography} from \"antd\";\nimport {TextProps} from \"antd/es/typography/Text\";\nimport {TitleProps} from \"antd/es/typography/Title\";\nimport {ParagraphProps} from \"antd/es/typography/Paragraph\";\nimport {TypographyProps} from \"antd/es/typography/Typography\";\nimport {twJoin} from \"tailwind-merge\";\nimport './style.css';\n\nconst {Text, Title, Paragraph} = Typography;\n\nexport type KTextProps = TextProps;\nexport type KTitleProps = TitleProps;\nexport type KParagraphProps = ParagraphProps;\nexport type KTypographyProps = TypographyProps<any>;\n\nconst CopyIcon = () => (\n <svg width=\"1em\" height=\"1em\" viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M27 4H11C10.7348 4 10.4804 4.10536 10.2929 4.29289C10.1054 4.48043 10 4.73478 10 5V10H5C4.73478 10 4.48043 10.1054 4.29289 10.2929C4.10536 10.4804 4 10.7348 4 11V27C4 27.2652 4.10536 27.5196 4.29289 27.7071C4.48043 27.8946 4.73478 28 5 28H21C21.2652 28 21.5196 27.8946 21.7071 27.7071C21.8946 27.5196 22 27.2652 22 27V22H27C27.2652 22 27.5196 21.8946 27.7071 21.7071C27.8946 21.5196 28 21.2652 28 21V5C28 4.73478 27.8946 4.48043 27.7071 4.29289C27.5196 4.10536 27.2652 4 27 4ZM20 26H6V12H20V26ZM26 20H22V11C22 10.7348 21.8946 10.4804 21.7071 10.2929C21.5196 10.1054 21.2652 10 21 10H12V6H26V20Z\"\n fill=\"var(--fg-primary)\"/>\n </svg>\n);\n\nconst DoneIcon = () => (\n <svg width=\"1em\" height=\"0.72em\" viewBox=\"0 0 25 18\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M24.7081 1.70806L8.70806 17.7081C8.61518 17.801 8.50489 17.8748 8.3835 17.9251C8.2621 17.9754 8.13197 18.0013 8.00056 18.0013C7.86914 18.0013 7.73901 17.9754 7.61762 17.9251C7.49622 17.8748 7.38593 17.801 7.29306 17.7081L0.293056 10.7081C0.105415 10.5204 0 10.2659 0 10.0006C0 9.73519 0.105415 9.4807 0.293056 9.29306C0.480697 9.10542 0.735192 9 1.00056 9C1.26592 9 1.52042 9.10542 1.70806 9.29306L8.00056 15.5868L23.2931 0.293056C23.4807 0.105415 23.7352 -1.97711e-09 24.0006 0C24.2659 1.97712e-09 24.5204 0.105415 24.7081 0.293056C24.8957 0.480696 25.0011 0.735192 25.0011 1.00056C25.0011 1.26592 24.8957 1.52042 24.7081 1.70806Z\"\n fill=\"var(--fg-primary)\"/>\n </svg>\n);\n\nconst getCopyableConfig = (copyable: KTextProps['copyable']) => {\n if (!copyable) return copyable;\n const defaultIcon = [<CopyIcon key=\"copy-icon\"/>, <DoneIcon key=\"done-icon\"/>];\n if (typeof copyable === 'boolean') {\n return {\n icon: defaultIcon,\n };\n }\n return {\n ...copyable,\n icon: copyable.icon || defaultIcon,\n };\n};\n\nexport const KText = forwardRef<HTMLSpanElement, KTextProps>(({className, ...props}, ref) => {\n return <Text {...props} className={twJoin('k-text', className)} copyable={getCopyableConfig(props.copyable)}\n ref={ref}/>\n});\n\nexport const KTitle = forwardRef<HTMLHeadingElement, KTitleProps>(({className, ...props}, ref) => {\n return <Title {...props} className={twJoin('k-title', className)} copyable={getCopyableConfig(props.copyable)}\n ref={ref}/>\n});\n\nexport const KParagraph = forwardRef<HTMLDivElement, KParagraphProps>(({className, ...props}, ref) => {\n return <Paragraph {...props} className={twJoin('k-paragraph', className)}\n copyable={getCopyableConfig(props.copyable)} ref={ref}/>\n});\n\nexport const KTypography = forwardRef<HTMLElement, KTypographyProps>((props, ref) => {\n return <Typography {...props} ref={ref}/>\n}) as React.ForwardRefExoticComponent<KTypographyProps & React.RefAttributes<HTMLElement>> & {\n Text: typeof KText;\n Title: typeof KTitle;\n Paragraph: typeof KParagraph;\n};\n\nKTypography.Text = KText;\nKTypography.Title = KTitle;\nKTypography.Paragraph = KParagraph;\n\n\n\n"],"names":["themeAntd","_jsx","ConfigProvider","forwardRef","AutoComplete","twJoin","Button","Checkbox","Dropdown","Input","Radio","Select","Spin","Switch","useId","useEffect","Table","Tabs","Tag","Tooltip","Typography"],"mappings":";;;;;;;AAEO,MAAM,SAAS,GAAgB;IAClC,SAAS,EAAEA,UAAS,CAAC,aAAa;AAClC,IAAA,KAAK,EAAE;AACH,QAAA,YAAY,EAAE,iBAAiB;AAC/B,QAAA,kBAAkB,EAAE,iBAAiB;AACrC,QAAA,WAAW,EAAE,iBAAiB;AAC9B,QAAA,oBAAoB,EAAE;AACzB,KAAA;AACD,IAAA,MAAM,EAAE,EAAC,GAAG,EAAE,KAAK,EAAC;AACpB,IAAA,UAAU,EAAE,EAAE;CACjB;;ACTM,MAAM,UAAU,GAAgB;IACnC,SAAS,EAAEA,UAAS,CAAC,gBAAgB;AACrC,IAAA,KAAK,EAAE;AACH,QAAA,YAAY,EAAE,iBAAiB;AAC/B,QAAA,kBAAkB,EAAE,iBAAiB;AACrC,QAAA,WAAW,EAAE,iBAAiB;AAC9B,QAAA,oBAAoB,EAAE;AACzB,KAAA;AACD,IAAA,MAAM,EAAE,EAAC,GAAG,EAAE,KAAK,EAAC;AACpB,IAAA,UAAU,EAAE;AACR,QAAA,MAAM,EAAE;AAEX,KAAA;CACJ;;ACHM,MAAM,aAAa,GAAiC,CAAC,EACU,IAAI,GAAG,OAAO,EACd,QAAQ,EACR,GAAG,KAAK,EACX,KAAI;AAEnE,IAAA,MAAM,SAAS,GAAG,IAAI,KAAK,MAAM,GAAG,SAAS,GAAG,UAAU;AAG1D,IAAA,MAAM,WAAW,GAAgB;AAC7B,QAAA,GAAG,SAAS;AACZ,QAAA,GAAG,KAAK;AACR,QAAA,KAAK,EAAE,KAAK,CAAC,KAAK,GAAG;YACjB,GAAG,SAAS,CAAC,KAAK;YAClB,GAAG,KAAK,CAAC,KAAK;AACjB,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AC7F,OAAOF,cAAA,CAAC,KAAK,EAAA,EAAA,GAAK,KAAK,EAAE,SAAS,EAAEI,oBAAM,CAAC,SAAS,EAAE,SAAS,CAAC,EAAE,QAAQ,EAAE,iBAAiB,CAAC,KAAK,CAAC,QAAQ,CAAC,EAC/F,GAAG,EAAE,GAAG,EAAA,CAAG;AAC7B,CAAC;AAEM,MAAM,UAAU,GAAGF,gBAAU,CAAkC,CAAC,EAAC,SAAS,EAAE,GAAG,KAAK,EAAC,EAAE,GAAG,KAAI;IACjG,OAAOF,cAAA,CAAC,SAAS,EAAA,EAAA,GAAK,KAAK,EAAE,SAAS,EAAEI,oBAAM,CAAC,aAAa,EAAE,SAAS,CAAC,EACtD,QAAQ,EAAE,iBAAiB,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,GAAG,EAAA,CAAG;AAC9E,CAAC;AAEM,MAAM,WAAW,GAAGF,gBAAU,CAAgC,CAAC,KAAK,EAAE,GAAG,KAAI;IAChF,OAAOF,cAAA,CAACmB,eAAU,EAAA,EAAA,GAAK,KAAK,EAAE,GAAG,EAAE,GAAG,EAAA,CAAG;AAC7C,CAAC;AAMD,WAAW,CAAC,IAAI,GAAG,KAAK;AACxB,WAAW,CAAC,KAAK,GAAG,MAAM;AAC1B,WAAW,CAAC,SAAS,GAAG,UAAU;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.esm.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ant-select.k-auto-complete{box-shadow:none!important;.ant-select-content{.k-auto-complete-sm &{border-radius:var(--radius-sm);padding:var(--spacing-sm) var(--spacing-md-plus)}.k-auto-complete-md &{border-radius:var(--radius-sm);padding:var(--spacing-md) var(--spacing-md-plus)}.k-auto-complete-lg &{border-radius:var(--radius-md);padding:var(--spacing-md-plus) var(--spacing-md-plus)}.k-auto-complete-xl &{border-radius:var(--radius-md);padding:var(--spacing-lg) var(--spacing-lg)}}.ant-select-content{background-color:var(--bg-primary);border-color:var(--border-primary);border-radius:var(--radius-md);box-shadow:none;font-size:1rem;&::placeholder{color:var(--text-placeholder)}}&.ant-select-focused .ant-select-input,&:not(.ant-select-disabled):hover .ant-select-input{border-color:var(--border-solid)}&.ant-select-disabled .ant-select-input{background-color:var(--bg-disabled_subtle);border-color:var(--border-disabled)}}.k-button{&.k-button-sm{font-size:.75rem;gap:var(--spacing-xxs);height:1.5rem;letter-spacing:0;line-height:1.125rem;padding-block:.1875rem;padding-inline:var(--spacing-sm)}&.k-button-md,&.k-button-sm{border-radius:var(--radius-sm)}&.k-button-md{font-size:.875rem;gap:var(--spacing-xs);height:2rem;letter-spacing:-.006em;line-height:1.25rem;padding-block:var(--spacing-sm);padding-inline:var(--spacing-md)}&.k-button-lg{height:2.5rem;padding-block:var(--spacing-md);padding-inline:var(--spacing-md-plus)}&.k-button-lg,&.k-button-xl{border-radius:var(--radius-md);font-size:1rem;gap:var(--spacing-xs);letter-spacing:-.011em;line-height:1.5rem}&.k-button-xl{height:3rem;padding-block:var(--spacing-md-plus);padding-inline:var(--spacing-xl)}&.k-button-primary{background:var(--button-bg);border:1px solid transparent;box-shadow:var(--shadow-xs-button);color:var(--button-text);&:not(:disabled):hover{background:var(--button-bg-hover)}&:not(:disabled):active,&:not(:disabled):hover{border-color:transparent;box-shadow:var(--shadow-xs-button);color:var(--button-text)}&:not(:disabled):active{background:var(--button-bg-pressed)}&:disabled{background:var(--button-bg-disabled);border-color:transparent;box-shadow:none;color:var(--text-disabled)}}&.k-button-outline{background:var(--bg-primary);border:1px solid var(--border-primary);box-shadow:var(--shadow-xs-button);color:var(--text-primary);&:not(:disabled):hover{background:var(--bg-primary_hover)}&:not(:disabled):active,&:not(:disabled):hover{border-color:var(--border-primary);box-shadow:var(--shadow-xs-button);color:var(--text-primary)}&:not(:disabled):active{background:var(--bg-secondary_hover)}&:disabled{background:var(--button-bg-disabled);border-color:var(--border-primary);box-shadow:none;color:var(--text-disabled)}}&.k-button-ghost{background:var(--white);border:1px solid transparent;box-shadow:none;color:var(--text-primary);&:not(:disabled):hover{background:var(--bg-primary_hover)}&:not(:disabled):active,&:not(:disabled):hover{border-color:transparent;box-shadow:none;color:var(--text-primary)}&:not(:disabled):active{background:var(--bg-secondary_hover)}&:disabled{background:var(--button-bg-disabled);border-color:transparent;box-shadow:none;color:var(--text-disabled)}}&.k-button-link{background:var(--white);border:1px solid transparent;box-shadow:none;color:var(--text-primary);&:not(:disabled):hover{color:var(--text-tertiary_hover)}&:not(:disabled):active,&:not(:disabled):hover{background:var(--white);border-color:transparent;box-shadow:none}&:not(:disabled):active{color:var(--button-bg-pressed)}&:disabled{background:var(--white);border-color:transparent;box-shadow:none;color:var(--text-disabled)}}}.k-checkbox-group{display:flex;flex-wrap:wrap;gap:.5rem}.k-checkbox{&.ant-checkbox-wrapper{.ant-checkbox{.ant-checkbox-inner{align-items:center;display:flex;justify-content:center;.k-checkbox-sm &{border-radius:.25rem;height:1rem;width:1rem;&:before{content:"";height:.421875rem;width:.58625rem}}.k-checkbox-md &{border-radius:.375rem;height:1.25rem;width:1.25rem;&:before{content:"";height:.4925rem;width:.68375rem}}}&+span.ant-checkbox-label{font-weight:500;padding-inline:.5rem;.k-checkbox-sm &{font-size:.875rem;letter-spacing:-.006em;line-height:1.25rem}.k-checkbox-md &{font-size:1rem;letter-spacing:-.011em;line-height:1.5rem}}}}&.ant-checkbox-wrapper-disabled{.ant-checkbox{.ant-checkbox-inner{background:var(--bg-disabled_subtle);border-color:var(--border-disabled_subtle)}}}&:not(.ant-checkbox-wrapper-disabled) .ant-checkbox{&+span.ant-checkbox-label{color:var(--text-primary)}.ant-checkbox-input:focus-visible+.ant-checkbox-inner{outline-color:var(--utility-grey-700);outline-offset:.125rem;outline-width:.125rem}.ant-checkbox-inner{background:var(--bg-primary);border-color:var(--border-primary);border-style:solid;border-width:.0625rem;.ant-checkbox-indeterminate:not(.ant-checkbox-checked) &{background:var(--bg-primary);border-color:var(--border-primary);.ant-checkbox-wrapper:hover &{border-color:var(--checkbox-border_hover)}&:after{background:var(--fg-primary);border-radius:.125rem;display:block;height:.625rem;width:.625rem}&:before{display:none}}.ant-checkbox-checked &{background:var(--fg-primary);border-color:var(--fg-primary);.ant-checkbox-wrapper:hover &{border-color:var(--fg-primary)}&:after{display:none}&:before{background-color:var(--checkbox-checkmark-fg);mask:url("data:image/svg+xml;charset=utf-8,%3Csvg width='11' height='8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m10.81.747-7 7a.438.438 0 0 1-.62 0L.129 4.685a.438.438 0 1 1 .62-.62L3.5 6.82 10.19.13a.438.438 0 1 1 .62.618Z' fill='%23000'/%3E%3C/svg%3E") no-repeat center;mask-size:100% 100%}}.ant-checkbox-wrapper:hover &{border-color:var(--checkbox-border_hover)}}}}.k-input{&.ant-input,&.ant-input-affix-wrapper{&.k-input-sm{padding:var(--spacing-sm) var(--spacing-md-plus)}&.k-input-md,&.k-input-sm{border-radius:var(--radius-sm)}&.k-input-md{padding:var(--spacing-md) var(--spacing-md-plus)}&.k-input-lg{padding:var(--spacing-md-plus) var(--spacing-md-plus)}&.k-input-lg,&.k-input-xl{border-radius:var(--radius-md)}&.k-input-xl{padding:var(--spacing-lg) var(--spacing-lg)}&{background-color:var(--bg-primary);border-color:var(--border-primary);border-radius:var(--radius-md);box-shadow:none;font-size:1rem;&::placeholder{color:var(--text-placeholder)}& -focused,&:focus,&:not(.ant-input-disabled):not(.ant-input-affix-wrapper-disabled):hover{border-color:var(--border-solid)}& -disabled{background-color:var(--bg-disabled_subtle);border-color:var(--border-disabled)}}}&.ant-input-affix-wrapper{.ant-input{background-color:transparent;font-size:inherit;&::placeholder{color:var(--text-placeholder)}}}}.k-radio{&.ant-radio-wrapper{.ant-radio{.ant-radio-inner{align-items:center;border-radius:100%;display:flex;justify-content:center;&:after{display:none}.k-radio-sm &{height:1rem;width:1rem;&:before{height:.375rem;width:.375rem}}.k-radio-md &{height:1.25rem;width:1.25rem;&:before{height:.5rem;width:.5rem}}}&+span.ant-radio-label{font-weight:500;padding-inline:.5rem;.k-radio-sm &{font-size:.875rem;letter-spacing:-.006em;line-height:1.25rem}.k-radio-md &{font-size:1rem;letter-spacing:-.011em;line-height:1.5rem}}}}&.ant-radio-wrapper-disabled{.ant-radio{.ant-radio-inner{background:var(--bg-disabled_subtle);border-color:var(--border-disabled_subtle);.ant-radio-checked &{&:before{background:var(--fg-disabled_subtle);border-radius:100%;content:""}}}}}&:not(.ant-radio-wrapper-disabled) .ant-radio{&+span.ant-radio-label{color:var(--text-primary)}.ant-radio-input:focus-visible+.ant-radio-inner{outline-color:var(--utility-grey-700);outline-offset:.125rem;outline-width:.125rem}.ant-radio-inner{background:var(--bg-primary);border-color:var(--border-primary);border-style:solid;border-width:.0625rem;.ant-radio-checked &{background:var(--fg-primary);border-color:var(--fg-primary);.ant-radio-wrapper:hover &{border-color:var(--fg-primary)}}.ant-radio-wrapper:hover &{border-color:var(--radio-border_hover)}&:before{background:var(--checkbox-checkmark-fg);border-radius:100%;content:""}}}}.k-switch{&.k-switch-sm{height:1rem;min-width:1.75rem;.ant-switch-handle{border-radius:1.25rem;height:.75rem;inset-inline-start:.125rem;width:.75rem;.ant-switch-checked &{inset-inline-start:calc(100% - .875rem)}}}&.k-switch-md{height:1.25rem;min-width:2.25rem;.ant-switch-handle{border-radius:1.25rem;height:1rem;inset-inline-start:.125rem;width:1rem;.ant-switch-checked &{inset-inline-start:calc(100% - 1.125rem)}}}&:focus-visible{outline:.125rem solid var(--utility-grey-700);outline-offset:.125rem}&.ant-switch-disabled{background:var(--bg-disabled);.ant-switch-handle{&:before{background:var(--fg-disabled_subtle);box-shadow:none}}}&:not(.ant-switch-disabled),&:not(.ant-switch-disabled):hover{background:var(--bg-tertiary);.ant-switch-handle{background:var(--toggle-button-bg)}}&.ant-switch-checked:not(.ant-switch-disabled){background:var(--toggle-active-bg);.ant-switch-handle{background:var(--toggle-button-active-bg)}}}.k-table{&.ant-table-wrapper{.ant-table-container{border-radius:0}.ant-table-tbody .ant-table-row.ant-table-row-selected>.ant-table-cell{background:var(--grey-100);.dark &{background:var(--grey-700)}}table>thead>tr:first-child>:first-child{border-left-style:solid;border-radius:.375rem 0 0 .375rem}table>thead>tr:first-child>:last-child{border-radius:0 .375rem .375rem 0;border-right-style:solid}.ant-table-thead{>tr>th{background:var(--bg-secondary);border-color:var(--border-secondary);border-radius:0;border-style:solid none;border-width:.0625rem;color:var(--text-tertiary);font-size:.75rem;font-weight:600;letter-spacing:0;line-height:1.125rem;padding:.25rem .5rem;&:before{display:none}}}.ant-table-tbody{>tr{&:hover{background:var(--bg-primary_hover)}}>tr>td{border-color:var(--border-secondary);border-style:none none solid;border-width:.0625rem;font-size:.875rem;font-weight:400;letter-spacing:-.006em;line-height:1.25rem;padding:.5rem}}}}.ant-typography{&.k-paragraph,&.k-text,&.k-title{align-items:center;display:flex;flex-wrap:wrap;justify-content:start;.ant-typography-copy{width:1em}}}
|
|
1
|
+
.ant-select.k-auto-complete{box-shadow:none!important;.ant-select-content{.k-auto-complete-sm &{border-radius:var(--radius-sm);padding:var(--spacing-sm) var(--spacing-md-plus)}.k-auto-complete-md &{border-radius:var(--radius-sm);padding:var(--spacing-md) var(--spacing-md-plus)}.k-auto-complete-lg &{border-radius:var(--radius-md);padding:var(--spacing-md-plus) var(--spacing-md-plus)}.k-auto-complete-xl &{border-radius:var(--radius-md);padding:var(--spacing-lg) var(--spacing-lg)}}.ant-select-content{background-color:var(--bg-primary);border-color:var(--border-primary);border-radius:var(--radius-md);box-shadow:none;font-size:1rem;&::placeholder{color:var(--text-placeholder)}}&.ant-select-focused .ant-select-input,&:not(.ant-select-disabled):hover .ant-select-input{border-color:var(--border-solid)}&.ant-select-disabled .ant-select-input{background-color:var(--bg-disabled_subtle);border-color:var(--border-disabled)}}.k-button{&.k-button-sm{font-size:.75rem;gap:var(--spacing-xxs);height:1.5rem;letter-spacing:0;line-height:1.125rem;padding-block:.1875rem;padding-inline:var(--spacing-sm)}&.k-button-md,&.k-button-sm{border-radius:var(--radius-sm)}&.k-button-md{font-size:.875rem;gap:var(--spacing-xs);height:2rem;letter-spacing:-.006em;line-height:1.25rem;padding-block:var(--spacing-sm);padding-inline:var(--spacing-md)}&.k-button-lg{height:2.5rem;padding-block:var(--spacing-md);padding-inline:var(--spacing-md-plus)}&.k-button-lg,&.k-button-xl{border-radius:var(--radius-md);font-size:1rem;gap:var(--spacing-xs);letter-spacing:-.011em;line-height:1.5rem}&.k-button-xl{height:3rem;padding-block:var(--spacing-md-plus);padding-inline:var(--spacing-xl)}&.k-button-primary{background:var(--button-bg);border:1px solid transparent;box-shadow:var(--shadow-xs-button);color:var(--button-text);&:not(:disabled):hover{background:var(--button-bg-hover)}&:not(:disabled):active,&:not(:disabled):hover{border-color:transparent;box-shadow:var(--shadow-xs-button);color:var(--button-text)}&:not(:disabled):active{background:var(--button-bg-pressed)}&:disabled{background:var(--button-bg-disabled);border-color:transparent;box-shadow:none;color:var(--text-disabled)}}&.k-button-outline{background:var(--bg-primary);border:1px solid var(--border-primary);box-shadow:var(--shadow-xs-button);color:var(--text-primary);&:not(:disabled):hover{background:var(--bg-primary_hover)}&:not(:disabled):active,&:not(:disabled):hover{border-color:var(--border-primary);box-shadow:var(--shadow-xs-button);color:var(--text-primary)}&:not(:disabled):active{background:var(--bg-secondary_hover)}&:disabled{background:var(--button-bg-disabled);border-color:var(--border-primary);box-shadow:none;color:var(--text-disabled)}}&.k-button-ghost{background:var(--white);border:1px solid transparent;box-shadow:none;color:var(--text-primary);&:not(:disabled):hover{background:var(--bg-primary_hover)}&:not(:disabled):active,&:not(:disabled):hover{border-color:transparent;box-shadow:none;color:var(--text-primary)}&:not(:disabled):active{background:var(--bg-secondary_hover)}&:disabled{background:var(--button-bg-disabled);border-color:transparent;box-shadow:none;color:var(--text-disabled)}}&.k-button-link{background:var(--white);border:1px solid transparent;box-shadow:none;color:var(--text-primary);&:not(:disabled):hover{color:var(--text-tertiary_hover)}&:not(:disabled):active,&:not(:disabled):hover{background:var(--white);border-color:transparent;box-shadow:none}&:not(:disabled):active{color:var(--button-bg-pressed)}&:disabled{background:var(--white);border-color:transparent;box-shadow:none;color:var(--text-disabled)}}}.k-checkbox-group{display:flex;flex-wrap:wrap;gap:.5rem}.k-checkbox{&.ant-checkbox-wrapper{.ant-checkbox{.ant-checkbox-inner{align-items:center;display:flex;justify-content:center;.k-checkbox-sm &{border-radius:.25rem;height:1rem;width:1rem;&:before{content:"";height:.421875rem;width:.58625rem}}.k-checkbox-md &{border-radius:.375rem;height:1.25rem;width:1.25rem;&:before{content:"";height:.4925rem;width:.68375rem}}}&+span.ant-checkbox-label{font-weight:500;padding-inline:.5rem;.k-checkbox-sm &{font-size:.875rem;letter-spacing:-.006em;line-height:1.25rem}.k-checkbox-md &{font-size:1rem;letter-spacing:-.011em;line-height:1.5rem}}}}&.ant-checkbox-wrapper-disabled{.ant-checkbox{.ant-checkbox-inner{background:var(--bg-disabled_subtle);border-color:var(--border-disabled_subtle)}}}&:not(.ant-checkbox-wrapper-disabled) .ant-checkbox{&+span.ant-checkbox-label{color:var(--text-primary)}.ant-checkbox-input:focus-visible+.ant-checkbox-inner{outline-color:var(--utility-grey-700);outline-offset:.125rem;outline-width:.125rem}.ant-checkbox-inner{background:var(--bg-primary);border-color:var(--border-primary);border-style:solid;border-width:.0625rem;.ant-checkbox-indeterminate:not(.ant-checkbox-checked) &{background:var(--bg-primary);border-color:var(--border-primary);.ant-checkbox-wrapper:hover &{border-color:var(--checkbox-border_hover)}&:after{background:var(--fg-primary);border-radius:.125rem;display:block;height:.625rem;width:.625rem}&:before{display:none}}.ant-checkbox-checked &{background:var(--fg-primary);border-color:var(--fg-primary);.ant-checkbox-wrapper:hover &{border-color:var(--fg-primary)}&:after{display:none}&:before{background-color:var(--checkbox-checkmark-fg);mask:url("data:image/svg+xml;charset=utf-8,%3Csvg width='11' height='8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m10.81.747-7 7a.438.438 0 0 1-.62 0L.129 4.685a.438.438 0 1 1 .62-.62L3.5 6.82 10.19.13a.438.438 0 1 1 .62.618Z' fill='%23000'/%3E%3C/svg%3E") no-repeat center;mask-size:100% 100%}}.ant-checkbox-wrapper:hover &{border-color:var(--checkbox-border_hover)}}}}.k-input{&.ant-input,&.ant-input-affix-wrapper{&.k-input-sm{padding:var(--spacing-sm) var(--spacing-md-plus)}&.k-input-md,&.k-input-sm{border-radius:var(--radius-sm)}&.k-input-md{padding:var(--spacing-md) var(--spacing-md-plus)}&.k-input-lg{padding:var(--spacing-md-plus) var(--spacing-md-plus)}&.k-input-lg,&.k-input-xl{border-radius:var(--radius-md)}&.k-input-xl{padding:var(--spacing-lg) var(--spacing-lg)}&{background-color:var(--bg-primary);border-color:var(--border-primary);border-radius:var(--radius-md);box-shadow:none;font-size:1rem;&::placeholder{color:var(--text-placeholder)}& -focused,&:focus,&:not(.ant-input-disabled):not(.ant-input-affix-wrapper-disabled):hover{border-color:var(--border-solid)}& -disabled{background-color:var(--bg-disabled_subtle);border-color:var(--border-disabled)}}}&.ant-input-affix-wrapper{.ant-input{background-color:transparent;font-size:inherit;&::placeholder{color:var(--text-placeholder)}}}}.k-radio{&.ant-radio-wrapper{.ant-radio{.ant-radio-inner{align-items:center;border-radius:100%;display:flex;justify-content:center;&:after{display:none}.k-radio-sm &{height:1rem;width:1rem;&:before{height:.375rem;width:.375rem}}.k-radio-md &{height:1.25rem;width:1.25rem;&:before{height:.5rem;width:.5rem}}}&+span.ant-radio-label{font-weight:500;padding-inline:.5rem;.k-radio-sm &{font-size:.875rem;letter-spacing:-.006em;line-height:1.25rem}.k-radio-md &{font-size:1rem;letter-spacing:-.011em;line-height:1.5rem}}}}&.ant-radio-wrapper-disabled{.ant-radio{.ant-radio-inner{background:var(--bg-disabled_subtle);border-color:var(--border-disabled_subtle);.ant-radio-checked &{&:before{background:var(--fg-disabled_subtle);border-radius:100%;content:""}}}}}&:not(.ant-radio-wrapper-disabled) .ant-radio{&+span.ant-radio-label{color:var(--text-primary)}.ant-radio-input:focus-visible+.ant-radio-inner{outline-color:var(--utility-grey-700);outline-offset:.125rem;outline-width:.125rem}.ant-radio-inner{background:var(--bg-primary);border-color:var(--border-primary);border-style:solid;border-width:.0625rem;.ant-radio-checked &{background:var(--fg-primary);border-color:var(--fg-primary);.ant-radio-wrapper:hover &{border-color:var(--fg-primary)}}.ant-radio-wrapper:hover &{border-color:var(--radio-border_hover)}&:before{background:var(--checkbox-checkmark-fg);border-radius:100%;content:""}}}}.k-switch{&.k-switch-sm{height:1rem;min-width:1.75rem;.ant-switch-handle{border-radius:1.25rem;height:.75rem;inset-inline-start:.125rem;width:.75rem;.ant-switch-checked &{inset-inline-start:calc(100% - .875rem)}}}&.k-switch-md{height:1.25rem;min-width:2.25rem;.ant-switch-handle{border-radius:1.25rem;height:1rem;inset-inline-start:.125rem;width:1rem;.ant-switch-checked &{inset-inline-start:calc(100% - 1.125rem)}}}&:focus-visible{outline:.125rem solid var(--utility-grey-700);outline-offset:.125rem}&.ant-switch-disabled{background:var(--bg-disabled);.ant-switch-handle{&:before{background:var(--fg-disabled_subtle);box-shadow:none}}}&:not(.ant-switch-disabled),&:not(.ant-switch-disabled):hover{background:var(--bg-tertiary);.ant-switch-handle{background:var(--toggle-button-bg)}}&.ant-switch-checked:not(.ant-switch-disabled){background:var(--toggle-active-bg);.ant-switch-handle{background:var(--toggle-button-active-bg)}}}.k-table{&.ant-table-wrapper{.ant-table-container{border-radius:0}.ant-table-tbody .ant-table-row.ant-table-row-selected>.ant-table-cell{background:var(--grey-100);.dark &{background:var(--grey-700)}}table>thead>tr:first-child>:first-child{border-left-style:solid;border-radius:.375rem 0 0 .375rem}table>thead>tr:first-child>:last-child{border-radius:0 .375rem .375rem 0;border-right-style:solid}.ant-table-thead{>tr>th{background:var(--bg-secondary);border-color:var(--border-secondary);border-radius:0;border-style:solid none;border-width:.0625rem;color:var(--text-tertiary);font-size:.75rem;font-weight:600;letter-spacing:0;line-height:1.125rem;padding:.25rem .5rem;&:before{display:none}}}.ant-table-tbody{>tr{&:hover{background:var(--bg-primary_hover)}}>tr>td{border-color:var(--border-secondary);border-style:none none solid;border-width:.0625rem;font-size:.875rem;font-weight:400;letter-spacing:-.006em;line-height:1.25rem;padding:.5rem}}}}.ant-typography,.k-tabs{&.k-paragraph,&.k-text,&.k-title{align-items:center;display:flex;flex-wrap:wrap;justify-content:start;.ant-typography-copy{width:1em}}}
|
package/dist/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { theme, ConfigProvider, AutoComplete, Button, Checkbox, Dropdown, Input, Radio, Select, Spin, Switch, Table, Tag, Tooltip, Typography } from 'antd';
|
|
3
|
-
import React, { forwardRef } from 'react';
|
|
2
|
+
import { theme, ConfigProvider, AutoComplete, Button, Checkbox, Dropdown, Input, Radio, Select, Spin, Switch, Table, Tabs, Tag, Tooltip, Typography } from 'antd';
|
|
3
|
+
import React, { forwardRef, useId, useEffect } from 'react';
|
|
4
4
|
import { twJoin } from 'tailwind-merge';
|
|
5
5
|
|
|
6
6
|
const darkTheme = {
|
|
@@ -100,7 +100,68 @@ const KSwitch = forwardRef(({ size = 'md', className, ...props }, ref) => {
|
|
|
100
100
|
return (jsx(Switch, { ...props, className: twJoin('k-switch', `k-switch-${size}`, className), ref: ref }));
|
|
101
101
|
});
|
|
102
102
|
|
|
103
|
-
const
|
|
103
|
+
const useFocusVisible = ({ focusVisible = false, prefix = 'k-focus', selector = '[class^="ant-"]' } = {}) => {
|
|
104
|
+
const id = useId().replace(/:/g, '');
|
|
105
|
+
const idClass = `${prefix}-${id}`;
|
|
106
|
+
useEffect(() => {
|
|
107
|
+
if (focusVisible)
|
|
108
|
+
return;
|
|
109
|
+
const idClassInner = `${prefix}-${id}`;
|
|
110
|
+
let timer;
|
|
111
|
+
const updateTabIndex = () => {
|
|
112
|
+
const container = document.querySelector(`.${idClassInner}`);
|
|
113
|
+
if (!container)
|
|
114
|
+
return;
|
|
115
|
+
const elements = container.querySelectorAll(selector);
|
|
116
|
+
elements.forEach(el => {
|
|
117
|
+
if (el.getAttribute('tabindex') !== '-1') {
|
|
118
|
+
el.setAttribute('tabindex', '-1');
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
const debouncedUpdate = () => {
|
|
123
|
+
clearTimeout(timer);
|
|
124
|
+
timer = setTimeout(updateTabIndex, 0);
|
|
125
|
+
};
|
|
126
|
+
// 初始执行一次
|
|
127
|
+
updateTabIndex();
|
|
128
|
+
// 监听 DOM 变化
|
|
129
|
+
const container = document.querySelector(`.${idClassInner}`);
|
|
130
|
+
if (!container)
|
|
131
|
+
return;
|
|
132
|
+
const observer = new MutationObserver((mutations) => {
|
|
133
|
+
// 过滤掉我们自己修改 tabindex 引起的变动,避免触发(虽然代码里有判断,但过滤一下更安全)
|
|
134
|
+
const hasExternalChanges = mutations.some(m => {
|
|
135
|
+
if (m.type === 'attributes' && m.attributeName === 'tabindex') {
|
|
136
|
+
const target = m.target;
|
|
137
|
+
return target.getAttribute('tabindex') !== '-1';
|
|
138
|
+
}
|
|
139
|
+
return true;
|
|
140
|
+
});
|
|
141
|
+
if (hasExternalChanges) {
|
|
142
|
+
debouncedUpdate();
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
observer.observe(container, {
|
|
146
|
+
childList: true,
|
|
147
|
+
subtree: true,
|
|
148
|
+
attributes: true,
|
|
149
|
+
attributeFilter: ['class', 'tabindex']
|
|
150
|
+
});
|
|
151
|
+
return () => {
|
|
152
|
+
observer.disconnect();
|
|
153
|
+
clearTimeout(timer);
|
|
154
|
+
};
|
|
155
|
+
}, [focusVisible, id, prefix, selector]);
|
|
156
|
+
return idClass;
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
const KTable = forwardRef(({ className, focusVisible = false, ...props }, ref) => {
|
|
160
|
+
const idClass = useFocusVisible({
|
|
161
|
+
focusVisible,
|
|
162
|
+
prefix: 'k-table',
|
|
163
|
+
selector: '[class^="ant-table"], [class^="ant-pagination"]'
|
|
164
|
+
});
|
|
104
165
|
const rowSelection = props.rowSelection ? {
|
|
105
166
|
...props.rowSelection,
|
|
106
167
|
getCheckboxProps: (record) => {
|
|
@@ -126,7 +187,16 @@ const KTable = forwardRef(({ className, ...props }, ref) => {
|
|
|
126
187
|
};
|
|
127
188
|
}
|
|
128
189
|
} : undefined;
|
|
129
|
-
return (jsx(Table, { ...props, rowSelection: rowSelection, className: twJoin('k-table', className), ref: ref }));
|
|
190
|
+
return (jsx(Table, { ...props, rowSelection: rowSelection, className: twJoin('k-table', idClass, className), ref: ref }));
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
const KTabs = forwardRef(({ className, focusVisible = false, ...props }, ref) => {
|
|
194
|
+
const idClass = useFocusVisible({
|
|
195
|
+
focusVisible,
|
|
196
|
+
prefix: 'k-tabs',
|
|
197
|
+
selector: '.ant-tabs-nav [class^="ant-tabs"]'
|
|
198
|
+
});
|
|
199
|
+
return (jsx(Tabs, { className: twJoin('k-tabs', `k-tabs-${props.size}`, idClass, className), ref: ref, ...props }));
|
|
130
200
|
});
|
|
131
201
|
|
|
132
202
|
const KTag = forwardRef(({ children, className, ...props }, ref) => {
|
|
@@ -170,5 +240,5 @@ KTypography.Text = KText;
|
|
|
170
240
|
KTypography.Title = KTitle;
|
|
171
241
|
KTypography.Paragraph = KParagraph;
|
|
172
242
|
|
|
173
|
-
export { KAutoComplete, KButton, KCheckbox, KDropdown, KInput, KParagraph, KRadio, KRadioGroup, KSelect, KSpin, KSwitch, KTable, KTag, KText, KTitle, KTooltip, KTypography, ThemeProvider };
|
|
243
|
+
export { KAutoComplete, KButton, KCheckbox, KDropdown, KInput, KParagraph, KRadio, KRadioGroup, KSelect, KSpin, KSwitch, KTable, KTabs, KTag, KText, KTitle, KTooltip, KTypography, ThemeProvider };
|
|
174
244
|
//# sourceMappingURL=index.esm.js.map
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../src/themes/dark.ts","../src/themes/light.ts","../src/ThemeProvider.tsx","../src/components/design/KAutoComplete/KAutoComplete.tsx","../src/components/design/KButton/KButton.tsx","../src/components/design/KCheckbox/KCheckbox.tsx","../src/components/design/KDropdown/KDropdown.tsx","../src/components/design/KInput/KInput.tsx","../src/components/design/KRadio/KRadio.tsx","../src/components/design/KSelect/KSelect.tsx","../src/components/design/KSpin/KSpin.tsx","../src/components/design/KSwitch/KSwitch.tsx","../src/components/design/KTabel/KTable.tsx","../src/components/design/KTag/KTag.tsx","../src/components/design/KTooltip/KTooltip.tsx","../src/components/design/KTypography/KTypography.tsx"],"sourcesContent":["import {theme as themeAntd, ThemeConfig} from \"antd\";\n\nexport const darkTheme: ThemeConfig = {\n algorithm: themeAntd.darkAlgorithm,\n token: {\n colorPrimary: 'var(--grey-900)',\n colorTextSecondary: 'var(--grey-900)',\n colorBorder: 'var(--grey-300)',\n colorBorderSecondary: 'var(--grey-200)'\n },\n cssVar: {key: \"app\"},\n components: {},\n};","import {theme as themeAntd, ThemeConfig} from \"antd\";\n\n\nexport const lightTheme: ThemeConfig = {\n algorithm: themeAntd.defaultAlgorithm,\n token: {\n colorPrimary: 'var(--grey-900)',\n colorTextSecondary: 'var(--grey-900)',\n colorBorder: 'var(--grey-300)',\n colorBorderSecondary: 'var(--grey-200)'\n },\n cssVar: {key: \"app\"},\n components: {\n Button: {\n }\n },\n};","import React from 'react';\nimport {ConfigProvider, ThemeConfig} from 'antd';\nimport {darkTheme} from \"./themes/dark\";\nimport {lightTheme} from \"./themes/light\";\n\n\nexport type ThemeMode = 'light' | 'dark';\n\nexport type ThemeProviderProps = {\n mode?: ThemeMode;\n children: React.ReactNode;\n} & ThemeConfig;\n\nexport const ThemeProvider: React.FC<ThemeProviderProps> = ({\n mode = 'light',\n children,\n ...props\n }) => {\n\n const baseTheme = mode === \"dark\" ? darkTheme : lightTheme;\n\n\n const mergedTheme: ThemeConfig = {\n ...baseTheme,\n ...props,\n token: props.token ? {\n ...baseTheme.token,\n ...props.token,\n } : baseTheme.token,\n components: props.components ? {\n ...baseTheme.components,\n ...props.components,\n } : baseTheme.components,\n };\n\n\n return (\n <ConfigProvider theme={mergedTheme}>\n {children}\n </ConfigProvider>\n );\n};","import React, {forwardRef} from 'react';\nimport {AutoComplete, AutoCompleteProps} from 'antd';\nimport {twJoin} from \"tailwind-merge\";\nimport './style.css'\nimport {BaseOptionType, DefaultOptionType} from \"antd/es/select\";\n\nexport type KAutoCompleteProps<\n ValueType = any,\n OptionType extends BaseOptionType | DefaultOptionType = DefaultOptionType,\n> = Omit<AutoCompleteProps<ValueType, OptionType>, 'size'> & {\n size?: 'sm' | 'md' | 'lg' | 'xl',\n};\n\nexport const KAutoComplete = forwardRef(<\n ValueType = any,\n OptionType extends BaseOptionType | DefaultOptionType = DefaultOptionType,\n>(\n {\n className,\n size = 'lg',\n ...props\n }: KAutoCompleteProps<ValueType, OptionType>,\n ref: any\n) => {\n return (\n <AutoComplete\n {...props}\n ref={ref}\n className={twJoin('k-auto-complete', `k-auto-complete-${size}`, className)}\n />\n );\n});\n\nKAutoComplete.displayName = 'KAutoComplete';\n\n","import React from 'react';\nimport {Button, ButtonProps} from 'antd';\nimport {cn} from \"../../../utils/cn\";\nimport './style.css';\nimport {twJoin} from \"tailwind-merge\";\n\nexport type KButtonProps = Omit<\n ButtonProps,\n 'size' | 'type'\n> & {\n size?: 'sm' | 'md' | 'lg' | 'xl',\n type?: 'primary' | 'outline' | 'ghost' | 'link'\n}\n\n\nexport const KButton = React.forwardRef<HTMLButtonElement, KButtonProps>(({\n children,\n className,\n type = 'primary',\n size = 'lg',\n ...rest\n }, ref) => {\n\n\n return (\n <Button\n {...rest}\n className={twJoin('k-button', `k-button-${type}`, `k-button-${size}`, className)}\n ref={ref}\n size={'middle'}\n type={'default'}\n >\n {children}\n </Button>\n );\n});\n","import React, {forwardRef} from 'react';\nimport {Checkbox, CheckboxProps} from 'antd';\nimport type {CheckboxRef} from 'antd/es/checkbox';\nimport {CheckboxGroupProps} from 'antd/es/checkbox';\nimport './style.css';\nimport {twJoin} from \"tailwind-merge\";\n\nexport type KCheckboxProps = CheckboxProps & {\n size?: 'sm' | 'md',\n}\n\nexport type KCheckboxGroupProps = CheckboxGroupProps;\n\nexport const KCheckboxGroup = forwardRef<HTMLDivElement, KCheckboxGroupProps>((props, ref) => {\n return <Checkbox.Group {...props} className={twJoin('k-checkbox-group', props.className)} ref={ref}/>;\n});\n\nexport interface KCheckboxInterface extends React.ForwardRefExoticComponent<KCheckboxProps & React.RefAttributes<CheckboxRef>> {\n Group: typeof KCheckboxGroup;\n}\n\nexport const KCheckbox = forwardRef<CheckboxRef, KCheckboxProps>(({\n children,\n className,\n size = 'md',\n ...props\n }, ref) => {\n\n\n return (\n <Checkbox\n {...props}\n className={twJoin(`k-checkbox k-checkbox-${size}`, className)}\n ref={ref}>\n {children}\n </Checkbox>\n );\n\n}) as KCheckboxInterface;\n\nKCheckbox.Group = KCheckboxGroup;\n\n","import React from 'react';\nimport {Dropdown, DropdownProps} from 'antd';\nimport {twJoin} from \"tailwind-merge\";\n\nexport type KDropdownProps = DropdownProps\n\n\nexport const KDropdown: React.FC<KDropdownProps> = ({children, className, ...props}) => {\n return (\n <Dropdown {...props} className={twJoin('k-dropdown', className)}>{children}</Dropdown>\n );\n};\n","import React, {forwardRef} from 'react';\nimport {Input, InputProps, InputRef} from 'antd';\nimport {twJoin} from \"tailwind-merge\";\nimport './style.css'\n\nexport type KInputProps = Omit<\n InputProps,\n 'size'\n> & {\n size?: 'sm' | 'md' | 'lg' | 'xl',\n};\n\n\nconst InternalKInput = forwardRef<InputRef, KInputProps>(({\n className,\n size = 'lg',\n ...props\n }, ref) => {\n\n\n return (\n <Input {...props} className={twJoin('k-input', `k-input-${size}`, className)} ref={ref}/>\n );\n});\n\ntype CompoundedComponent = typeof InternalKInput & {\n TextArea: typeof Input.TextArea;\n Search: typeof Input.Search;\n Password: typeof Input.Password;\n OTP: typeof Input.OTP;\n};\n\nexport const KInput = InternalKInput as CompoundedComponent;\n\nKInput.TextArea = Input.TextArea;\nKInput.Search = Input.Search;\nKInput.Password = Input.Password;\nKInput.OTP = Input.OTP;\n","import React, {ComponentProps, forwardRef} from 'react';\nimport {Radio, RadioGroupProps, RadioProps} from 'antd';\nimport {RadioRef} from 'antd/es/radio/interface';\nimport './style.css';\nimport {twJoin} from \"tailwind-merge\";\n\nexport type KRadioProps = RadioProps & {\n size?: 'sm' | 'md',\n}\nexport type KRadioGroupProps = RadioGroupProps\nexport type KRadioButtonProps = ComponentProps<typeof Radio.Button>;\n\nexport const KRadioGroup = forwardRef<HTMLDivElement, KRadioGroupProps>((props, ref) => {\n return <Radio.Group {...props} className={twJoin('k-radio-group', props.className)} ref={ref}/>;\n})\n\nexport const KRadioButton = forwardRef<RadioRef, KRadioButtonProps>((props, ref) => {\n return <Radio.Button {...props} className={twJoin('k-radio-button', props.className)} ref={ref}/>;\n})\n\nexport interface KRadioInterface extends React.ForwardRefExoticComponent<KRadioProps & React.RefAttributes<RadioRef>> {\n Group: typeof KRadioGroup;\n Button: typeof KRadioButton;\n}\n\nexport const KRadio = forwardRef<RadioRef, KRadioProps>(({children, size = 'md', ...props}, ref) => {\n return (\n <Radio {...props} className={twJoin('k-radio', `k-radio-${size}`, props.className)} ref={ref}>{children}</Radio>\n );\n}) as KRadioInterface;\n\nKRadio.Group = KRadioGroup;\nKRadio.Button = KRadioButton;\n\n\n\n","import React, {forwardRef} from 'react';\nimport {Select, SelectProps} from 'antd';\nimport type {RefSelectProps} from 'antd';\nimport {twJoin} from \"tailwind-merge\";\nimport './style.css';\n\nexport type KSelectProps = SelectProps;\n\n\nexport const KSelect = forwardRef<RefSelectProps, KSelectProps>(({children, className, ...props}, ref) => {\n return (\n <Select {...props} className={twJoin('k-select', className)} ref={ref}>{children}</Select>\n );\n});\n","import React from 'react';\nimport {Spin, SpinProps} from 'antd';\nimport {twJoin} from \"tailwind-merge\";\n\nexport type KSpinProps = Omit<SpinProps, 'size'> & {\n size?: 'sm' | 'md' | 'lg' | 'xl',\n};\n\nexport const KSpin: React.FC<KSpinProps> = ({className, size = 'lg', ...props}) => {\n return (\n <Spin {...props} className={twJoin('k-spin', `k-spin-${size}`, className)}/>\n );\n};\n","import React, {forwardRef} from 'react';\nimport {Switch, SwitchProps} from 'antd';\nimport {twJoin} from \"tailwind-merge\";\nimport './style.css';\n\nexport type KSwitchProps = Omit<SwitchProps, 'size'> & {\n size?: 'sm' | 'md',\n}\n\n\nexport const KSwitch = forwardRef<HTMLButtonElement, KSwitchProps>(({size = 'md', className, ...props}, ref) => {\n return (\n <Switch {...props} className={twJoin('k-switch', `k-switch-${size}`, className)} ref={ref}/>\n );\n});\n","import React, {forwardRef} from 'react';\nimport {Table, TableProps} from 'antd';\nimport type {TableRef} from 'antd/es/table';\nimport {twJoin} from \"tailwind-merge\";\nimport './style.css';\nimport '../KRadio/style.css';\nimport '../KCheckbox/style.css';\n\nexport type KTableProps<RecordType = any> = TableProps<RecordType>;\n\nexport const KTable = forwardRef<TableRef, KTableProps>(({className, ...props}, ref) => {\n const rowSelection = props.rowSelection ? {\n ...props.rowSelection,\n getCheckboxProps: (record: any) => {\n const existingProps = props.rowSelection?.getCheckboxProps?.(record) || {};\n const isRadio = props.rowSelection?.type === 'radio';\n const size = props.size === 'small' ? 'sm' : 'md';\n const cls = isRadio ? `k-radio k-radio-${size}` : `k-checkbox k-checkbox-${size}`;\n return {\n ...existingProps,\n className: twJoin(cls, existingProps.className),\n };\n },\n getTitleCheckboxProps: ()=>{\n const existingProps = props.rowSelection?.getTitleCheckboxProps?.() || {};\n const isRadio = props.rowSelection?.type === 'radio';\n const size = props.size === 'small' ? 'sm' : 'md';\n const cls = isRadio ? `k-radio k-radio-${size}` : `k-checkbox k-checkbox-${size}`;\n return {\n ...existingProps,\n className: twJoin(cls, existingProps.className),\n };\n }\n } : undefined;\n\n return (\n <Table\n {...props}\n rowSelection={rowSelection}\n className={twJoin('k-table', className)}\n ref={ref}\n />\n );\n}) as <RecordType = any>(\n props: KTableProps<RecordType> & { ref?: React.ForwardedRef<TableRef> }\n) => React.ReactElement;\n","import React, {forwardRef} from 'react';\nimport {Tag, TagProps} from 'antd';\nimport {twJoin} from \"tailwind-merge\";\nimport './style.css';\n\nexport type KTagProps = TagProps;\n\n\nexport const KTag = forwardRef<HTMLAnchorElement | HTMLSpanElement, KTagProps>(({\n children,\n className,\n ...props\n }, ref) => {\n return (\n <Tag {...props} className={twJoin('k-tag', className)} ref={ref}>{children}</Tag>\n );\n});\n","import React, {forwardRef} from 'react';\nimport {Tooltip, TooltipProps} from 'antd';\nimport type {TooltipRef} from 'antd/es/tooltip';\nimport {twJoin} from \"tailwind-merge\";\nimport './style.css';\n\nexport type KTooltipProps = TooltipProps\n\nexport const KTooltip = forwardRef<TooltipRef, KTooltipProps>(({children, className, ...props}, ref) => {\n return (\n <Tooltip {...props} className={twJoin('k-tooltip', className)} ref={ref}>{children}</Tooltip>\n );\n});\n","import React, {forwardRef} from 'react';\n\nimport {Typography} from \"antd\";\nimport {TextProps} from \"antd/es/typography/Text\";\nimport {TitleProps} from \"antd/es/typography/Title\";\nimport {ParagraphProps} from \"antd/es/typography/Paragraph\";\nimport {TypographyProps} from \"antd/es/typography/Typography\";\nimport {twJoin} from \"tailwind-merge\";\nimport './style.css';\n\nconst {Text, Title, Paragraph} = Typography;\n\nexport type KTextProps = TextProps;\nexport type KTitleProps = TitleProps;\nexport type KParagraphProps = ParagraphProps;\nexport type KTypographyProps = TypographyProps<any>;\n\nconst CopyIcon = () => (\n <svg width=\"1em\" height=\"1em\" viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M27 4H11C10.7348 4 10.4804 4.10536 10.2929 4.29289C10.1054 4.48043 10 4.73478 10 5V10H5C4.73478 10 4.48043 10.1054 4.29289 10.2929C4.10536 10.4804 4 10.7348 4 11V27C4 27.2652 4.10536 27.5196 4.29289 27.7071C4.48043 27.8946 4.73478 28 5 28H21C21.2652 28 21.5196 27.8946 21.7071 27.7071C21.8946 27.5196 22 27.2652 22 27V22H27C27.2652 22 27.5196 21.8946 27.7071 21.7071C27.8946 21.5196 28 21.2652 28 21V5C28 4.73478 27.8946 4.48043 27.7071 4.29289C27.5196 4.10536 27.2652 4 27 4ZM20 26H6V12H20V26ZM26 20H22V11C22 10.7348 21.8946 10.4804 21.7071 10.2929C21.5196 10.1054 21.2652 10 21 10H12V6H26V20Z\"\n fill=\"var(--fg-primary)\"/>\n </svg>\n);\n\nconst DoneIcon = () => (\n <svg width=\"1em\" height=\"0.72em\" viewBox=\"0 0 25 18\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M24.7081 1.70806L8.70806 17.7081C8.61518 17.801 8.50489 17.8748 8.3835 17.9251C8.2621 17.9754 8.13197 18.0013 8.00056 18.0013C7.86914 18.0013 7.73901 17.9754 7.61762 17.9251C7.49622 17.8748 7.38593 17.801 7.29306 17.7081L0.293056 10.7081C0.105415 10.5204 0 10.2659 0 10.0006C0 9.73519 0.105415 9.4807 0.293056 9.29306C0.480697 9.10542 0.735192 9 1.00056 9C1.26592 9 1.52042 9.10542 1.70806 9.29306L8.00056 15.5868L23.2931 0.293056C23.4807 0.105415 23.7352 -1.97711e-09 24.0006 0C24.2659 1.97712e-09 24.5204 0.105415 24.7081 0.293056C24.8957 0.480696 25.0011 0.735192 25.0011 1.00056C25.0011 1.26592 24.8957 1.52042 24.7081 1.70806Z\"\n fill=\"var(--fg-primary)\"/>\n </svg>\n);\n\nconst getCopyableConfig = (copyable: KTextProps['copyable']) => {\n if (!copyable) return copyable;\n const defaultIcon = [<CopyIcon key=\"copy-icon\"/>, <DoneIcon key=\"done-icon\"/>];\n if (typeof copyable === 'boolean') {\n return {\n icon: defaultIcon,\n };\n }\n return {\n ...copyable,\n icon: copyable.icon || defaultIcon,\n };\n};\n\nexport const KText = forwardRef<HTMLSpanElement, KTextProps>(({className, ...props}, ref) => {\n return <Text {...props} className={twJoin('k-text', className)} copyable={getCopyableConfig(props.copyable)}\n ref={ref}/>\n});\n\nexport const KTitle = forwardRef<HTMLHeadingElement, KTitleProps>(({className, ...props}, ref) => {\n return <Title {...props} className={twJoin('k-title', className)} copyable={getCopyableConfig(props.copyable)}\n ref={ref}/>\n});\n\nexport const KParagraph = forwardRef<HTMLDivElement, KParagraphProps>(({className, ...props}, ref) => {\n return <Paragraph {...props} className={twJoin('k-paragraph', className)}\n copyable={getCopyableConfig(props.copyable)} ref={ref}/>\n});\n\nexport const KTypography = forwardRef<HTMLElement, KTypographyProps>((props, ref) => {\n return <Typography {...props} ref={ref}/>\n}) as React.ForwardRefExoticComponent<KTypographyProps & React.RefAttributes<HTMLElement>> & {\n Text: typeof KText;\n Title: typeof KTitle;\n Paragraph: typeof KParagraph;\n};\n\nKTypography.Text = KText;\nKTypography.Title = KTitle;\nKTypography.Paragraph = KParagraph;\n\n\n\n"],"names":["themeAntd","_jsx"],"mappings":";;;;;AAEO,MAAM,SAAS,GAAgB;IAClC,SAAS,EAAEA,KAAS,CAAC,aAAa;AAClC,IAAA,KAAK,EAAE;AACH,QAAA,YAAY,EAAE,iBAAiB;AAC/B,QAAA,kBAAkB,EAAE,iBAAiB;AACrC,QAAA,WAAW,EAAE,iBAAiB;AAC9B,QAAA,oBAAoB,EAAE;AACzB,KAAA;AACD,IAAA,MAAM,EAAE,EAAC,GAAG,EAAE,KAAK,EAAC;AACpB,IAAA,UAAU,EAAE,EAAE;CACjB;;ACTM,MAAM,UAAU,GAAgB;IACnC,SAAS,EAAEA,KAAS,CAAC,gBAAgB;AACrC,IAAA,KAAK,EAAE;AACH,QAAA,YAAY,EAAE,iBAAiB;AAC/B,QAAA,kBAAkB,EAAE,iBAAiB;AACrC,QAAA,WAAW,EAAE,iBAAiB;AAC9B,QAAA,oBAAoB,EAAE;AACzB,KAAA;AACD,IAAA,MAAM,EAAE,EAAC,GAAG,EAAE,KAAK,EAAC;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AAM,MAAM,GAAG,UAAU,CAAkC,CAAC,EAAC,SAAS,EAAE,GAAG,KAAK,EAAC,EAAE,GAAG,KAAI;IAC7F,OAAOA,GAAA,CAAC,KAAK,EAAA,EAAA,GAAK,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,EAAE,QAAQ,EAAE,iBAAiB,CAAC,KAAK,CAAC,QAAQ,CAAC,EAC/F,GAAG,EAAE,GAAG,EAAA,CAAG;AAC7B,CAAC;AAEM,MAAM,UAAU,GAAG,UAAU,CAAkC,CAAC,EAAC,SAAS,EAAE,GAAG,KAAK,EAAC,EAAE,GAAG,KAAI;IACjG,OAAOA,GAAA,CAAC,SAAS,EAAA,EAAA,GAAK,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,aAAa,EAAE,SAAS,CAAC,EACtD,QAAQ,EAAE,iBAAiB,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,GAAG,EAAA,CAAG;AAC9E,CAAC;AAEM,MAAM,WAAW,GAAG,UAAU,CAAgC,CAAC,KAAK,EAAE,GAAG,KAAI;IAChF,OAAOA,GAAA,CAAC,UAAU,EAAA,EAAA,GAAK,KAAK,EAAE,GAAG,EAAE,GAAG,EAAA,CAAG;AAC7C,CAAC;AAMD,WAAW,CAAC,IAAI,GAAG,KAAK;AACxB,WAAW,CAAC,KAAK,GAAG,MAAM;AAC1B,WAAW,CAAC,SAAS,GAAG,UAAU;;;;"}
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../src/themes/dark.ts","../src/themes/light.ts","../src/ThemeProvider.tsx","../src/components/design/KAutoComplete/KAutoComplete.tsx","../src/components/design/KButton/KButton.tsx","../src/components/design/KCheckbox/KCheckbox.tsx","../src/components/design/KDropdown/KDropdown.tsx","../src/components/design/KInput/KInput.tsx","../src/components/design/KRadio/KRadio.tsx","../src/components/design/KSelect/KSelect.tsx","../src/components/design/KSpin/KSpin.tsx","../src/components/design/KSwitch/KSwitch.tsx","../src/hooks/useFocusVisible.ts","../src/components/design/KTabel/KTable.tsx","../src/components/design/KTabs/KTabs.tsx","../src/components/design/KTag/KTag.tsx","../src/components/design/KTooltip/KTooltip.tsx","../src/components/design/KTypography/KTypography.tsx"],"sourcesContent":["import {theme as themeAntd, ThemeConfig} from \"antd\";\n\nexport const darkTheme: ThemeConfig = {\n algorithm: themeAntd.darkAlgorithm,\n token: {\n colorPrimary: 'var(--grey-900)',\n colorTextSecondary: 'var(--grey-900)',\n colorBorder: 'var(--grey-300)',\n colorBorderSecondary: 'var(--grey-200)'\n },\n cssVar: {key: \"app\"},\n components: {},\n};","import {theme as themeAntd, ThemeConfig} from \"antd\";\n\n\nexport const lightTheme: ThemeConfig = {\n algorithm: themeAntd.defaultAlgorithm,\n token: {\n colorPrimary: 'var(--grey-900)',\n colorTextSecondary: 'var(--grey-900)',\n colorBorder: 'var(--grey-300)',\n colorBorderSecondary: 'var(--grey-200)'\n },\n cssVar: {key: \"app\"},\n components: {\n Button: {\n }\n },\n};","import React from 'react';\nimport {ConfigProvider, ThemeConfig} from 'antd';\nimport {darkTheme} from \"./themes/dark\";\nimport {lightTheme} from \"./themes/light\";\n\n\nexport type ThemeMode = 'light' | 'dark';\n\nexport type ThemeProviderProps = {\n mode?: ThemeMode;\n children: React.ReactNode;\n} & ThemeConfig;\n\nexport const ThemeProvider: React.FC<ThemeProviderProps> = ({\n mode = 'light',\n children,\n ...props\n }) => {\n\n const baseTheme = mode === \"dark\" ? darkTheme : lightTheme;\n\n\n const mergedTheme: ThemeConfig = {\n ...baseTheme,\n ...props,\n token: props.token ? {\n ...baseTheme.token,\n ...props.token,\n } : baseTheme.token,\n components: props.components ? {\n ...baseTheme.components,\n ...props.components,\n } : baseTheme.components,\n };\n\n\n return (\n <ConfigProvider theme={mergedTheme}>\n {children}\n </ConfigProvider>\n );\n};","import React, {forwardRef} from 'react';\nimport {AutoComplete, AutoCompleteProps} from 'antd';\nimport {twJoin} from \"tailwind-merge\";\nimport './style.css'\nimport {BaseOptionType, DefaultOptionType} from \"antd/es/select\";\n\nexport type KAutoCompleteProps<\n ValueType = any,\n OptionType extends BaseOptionType | DefaultOptionType = DefaultOptionType,\n> = Omit<AutoCompleteProps<ValueType, OptionType>, 'size'> & {\n size?: 'sm' | 'md' | 'lg' | 'xl',\n};\n\nexport const KAutoComplete = forwardRef(<\n ValueType = any,\n OptionType extends BaseOptionType | DefaultOptionType = DefaultOptionType,\n>(\n {\n className,\n size = 'lg',\n ...props\n }: KAutoCompleteProps<ValueType, OptionType>,\n ref: any\n) => {\n return (\n <AutoComplete\n {...props}\n ref={ref}\n className={twJoin('k-auto-complete', `k-auto-complete-${size}`, className)}\n />\n );\n});\n\nKAutoComplete.displayName = 'KAutoComplete';\n\n","import React from 'react';\nimport {Button, ButtonProps} from 'antd';\nimport {cn} from \"../../../utils/cn\";\nimport './style.css';\nimport {twJoin} from \"tailwind-merge\";\n\nexport type KButtonProps = Omit<\n ButtonProps,\n 'size' | 'type'\n> & {\n size?: 'sm' | 'md' | 'lg' | 'xl',\n type?: 'primary' | 'outline' | 'ghost' | 'link'\n}\n\n\nexport const KButton = React.forwardRef<HTMLButtonElement, KButtonProps>(({\n children,\n className,\n type = 'primary',\n size = 'lg',\n ...rest\n }, ref) => {\n\n\n return (\n <Button\n {...rest}\n className={twJoin('k-button', `k-button-${type}`, `k-button-${size}`, className)}\n ref={ref}\n size={'middle'}\n type={'default'}\n >\n {children}\n </Button>\n );\n});\n","import React, {forwardRef} from 'react';\nimport {Checkbox, CheckboxProps} from 'antd';\nimport type {CheckboxRef} from 'antd/es/checkbox';\nimport {CheckboxGroupProps} from 'antd/es/checkbox';\nimport './style.css';\nimport {twJoin} from \"tailwind-merge\";\n\nexport type KCheckboxProps = CheckboxProps & {\n size?: 'sm' | 'md',\n}\n\nexport type KCheckboxGroupProps = CheckboxGroupProps;\n\nexport const KCheckboxGroup = forwardRef<HTMLDivElement, KCheckboxGroupProps>((props, ref) => {\n return <Checkbox.Group {...props} className={twJoin('k-checkbox-group', props.className)} ref={ref}/>;\n});\n\nexport interface KCheckboxInterface extends React.ForwardRefExoticComponent<KCheckboxProps & React.RefAttributes<CheckboxRef>> {\n Group: typeof KCheckboxGroup;\n}\n\nexport const KCheckbox = forwardRef<CheckboxRef, KCheckboxProps>(({\n children,\n className,\n size = 'md',\n ...props\n }, ref) => {\n\n\n return (\n <Checkbox\n {...props}\n className={twJoin(`k-checkbox k-checkbox-${size}`, className)}\n ref={ref}>\n {children}\n </Checkbox>\n );\n\n}) as KCheckboxInterface;\n\nKCheckbox.Group = KCheckboxGroup;\n\n","import React from 'react';\nimport {Dropdown, DropdownProps} from 'antd';\nimport {twJoin} from \"tailwind-merge\";\n\nexport type KDropdownProps = DropdownProps\n\n\nexport const KDropdown: React.FC<KDropdownProps> = ({children, className, ...props}) => {\n return (\n <Dropdown {...props} className={twJoin('k-dropdown', className)}>{children}</Dropdown>\n );\n};\n","import React, {forwardRef} from 'react';\nimport {Input, InputProps, InputRef} from 'antd';\nimport {twJoin} from \"tailwind-merge\";\nimport './style.css'\n\nexport type KInputProps = Omit<\n InputProps,\n 'size'\n> & {\n size?: 'sm' | 'md' | 'lg' | 'xl',\n};\n\n\nconst InternalKInput = forwardRef<InputRef, KInputProps>(({\n className,\n size = 'lg',\n ...props\n }, ref) => {\n\n\n return (\n <Input {...props} className={twJoin('k-input', `k-input-${size}`, className)} ref={ref}/>\n );\n});\n\ntype CompoundedComponent = typeof InternalKInput & {\n TextArea: typeof Input.TextArea;\n Search: typeof Input.Search;\n Password: typeof Input.Password;\n OTP: typeof Input.OTP;\n};\n\nexport const KInput = InternalKInput as CompoundedComponent;\n\nKInput.TextArea = Input.TextArea;\nKInput.Search = Input.Search;\nKInput.Password = Input.Password;\nKInput.OTP = Input.OTP;\n","import React, {ComponentProps, forwardRef} from 'react';\nimport {Radio, RadioGroupProps, RadioProps} from 'antd';\nimport {RadioRef} from 'antd/es/radio/interface';\nimport './style.css';\nimport {twJoin} from \"tailwind-merge\";\n\nexport type KRadioProps = RadioProps & {\n size?: 'sm' | 'md',\n}\nexport type KRadioGroupProps = RadioGroupProps\nexport type KRadioButtonProps = ComponentProps<typeof Radio.Button>;\n\nexport const KRadioGroup = forwardRef<HTMLDivElement, KRadioGroupProps>((props, ref) => {\n return <Radio.Group {...props} className={twJoin('k-radio-group', props.className)} ref={ref}/>;\n})\n\nexport const KRadioButton = forwardRef<RadioRef, KRadioButtonProps>((props, ref) => {\n return <Radio.Button {...props} className={twJoin('k-radio-button', props.className)} ref={ref}/>;\n})\n\nexport interface KRadioInterface extends React.ForwardRefExoticComponent<KRadioProps & React.RefAttributes<RadioRef>> {\n Group: typeof KRadioGroup;\n Button: typeof KRadioButton;\n}\n\nexport const KRadio = forwardRef<RadioRef, KRadioProps>(({children, size = 'md', ...props}, ref) => {\n return (\n <Radio {...props} className={twJoin('k-radio', `k-radio-${size}`, props.className)} ref={ref}>{children}</Radio>\n );\n}) as KRadioInterface;\n\nKRadio.Group = KRadioGroup;\nKRadio.Button = KRadioButton;\n\n\n\n","import React, {forwardRef} from 'react';\nimport {Select, SelectProps} from 'antd';\nimport type {RefSelectProps} from 'antd';\nimport {twJoin} from \"tailwind-merge\";\nimport './style.css';\n\nexport type KSelectProps = SelectProps;\n\n\nexport const KSelect = forwardRef<RefSelectProps, KSelectProps>(({children, className, ...props}, ref) => {\n return (\n <Select {...props} className={twJoin('k-select', className)} ref={ref}>{children}</Select>\n );\n});\n","import React from 'react';\nimport {Spin, SpinProps} from 'antd';\nimport {twJoin} from \"tailwind-merge\";\n\nexport type KSpinProps = Omit<SpinProps, 'size'> & {\n size?: 'sm' | 'md' | 'lg' | 'xl',\n};\n\nexport const KSpin: React.FC<KSpinProps> = ({className, size = 'lg', ...props}) => {\n return (\n <Spin {...props} className={twJoin('k-spin', `k-spin-${size}`, className)}/>\n );\n};\n","import React, {forwardRef} from 'react';\nimport {Switch, SwitchProps} from 'antd';\nimport {twJoin} from \"tailwind-merge\";\nimport './style.css';\n\nexport type KSwitchProps = Omit<SwitchProps, 'size'> & {\n size?: 'sm' | 'md',\n}\n\n\nexport const KSwitch = forwardRef<HTMLButtonElement, KSwitchProps>(({size = 'md', className, ...props}, ref) => {\n return (\n <Switch {...props} className={twJoin('k-switch', `k-switch-${size}`, className)} ref={ref}/>\n );\n});\n","import {useEffect, useId} from 'react';\n\nexport interface UseFocusVisibleOptions {\n focusVisible?: boolean;\n prefix?: string;\n selector?: string;\n}\n\nexport const useFocusVisible = ({\n focusVisible = false,\n prefix = 'k-focus',\n selector = '[class^=\"ant-\"]'\n }: UseFocusVisibleOptions = {}) => {\n const id = useId().replace(/:/g, '');\n const idClass = `${prefix}-${id}`;\n\n useEffect(() => {\n if (focusVisible) return;\n\n const idClassInner = `${prefix}-${id}`;\n\n let timer: ReturnType<typeof setTimeout>;\n const updateTabIndex = () => {\n const container = document.querySelector(`.${idClassInner}`);\n if (!container) return;\n const elements = container.querySelectorAll(selector);\n elements.forEach(el => {\n if (el.getAttribute('tabindex') !== '-1') {\n el.setAttribute('tabindex', '-1');\n }\n });\n };\n\n const debouncedUpdate = () => {\n clearTimeout(timer);\n timer = setTimeout(updateTabIndex, 0);\n };\n\n // 初始执行一次\n updateTabIndex();\n\n // 监听 DOM 变化\n const container = document.querySelector(`.${idClassInner}`);\n if (!container) return;\n\n const observer = new MutationObserver((mutations) => {\n // 过滤掉我们自己修改 tabindex 引起的变动,避免触发(虽然代码里有判断,但过滤一下更安全)\n const hasExternalChanges = mutations.some(m => {\n if (m.type === 'attributes' && m.attributeName === 'tabindex') {\n const target = m.target as HTMLElement;\n return target.getAttribute('tabindex') !== '-1';\n }\n return true;\n });\n\n if (hasExternalChanges) {\n debouncedUpdate();\n }\n });\n\n observer.observe(container, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['class', 'tabindex']\n });\n\n return () => {\n observer.disconnect();\n clearTimeout(timer);\n };\n }, [focusVisible, id, prefix, selector]);\n\n return idClass;\n};\n","import React, {forwardRef} from 'react';\nimport {Table, TableProps} from 'antd';\nimport type {TableRef} from 'antd/es/table';\nimport {twJoin} from \"tailwind-merge\";\nimport './style.css';\nimport '../KRadio/style.css';\nimport '../KCheckbox/style.css';\nimport {useFocusVisible} from \"../../../hooks/useFocusVisible\";\n\nexport type KTableProps<RecordType = any> = TableProps<RecordType> & {\n focusVisible?: boolean;\n};\n\nexport const KTable = forwardRef<TableRef, KTableProps>(({className, focusVisible = false, ...props}, ref) => {\n const idClass = useFocusVisible({\n focusVisible,\n prefix: 'k-table',\n selector: '[class^=\"ant-table\"], [class^=\"ant-pagination\"]'\n });\n\n const rowSelection = props.rowSelection ? {\n ...props.rowSelection,\n getCheckboxProps: (record: any) => {\n const existingProps = props.rowSelection?.getCheckboxProps?.(record) || {};\n const isRadio = props.rowSelection?.type === 'radio';\n const size = props.size === 'small' ? 'sm' : 'md';\n const cls = isRadio ? `k-radio k-radio-${size}` : `k-checkbox k-checkbox-${size}`;\n return {\n ...existingProps,\n className: twJoin(cls, existingProps.className),\n };\n },\n getTitleCheckboxProps: ()=>{\n const existingProps = props.rowSelection?.getTitleCheckboxProps?.() || {};\n const isRadio = props.rowSelection?.type === 'radio';\n const size = props.size === 'small' ? 'sm' : 'md';\n const cls = isRadio ? `k-radio k-radio-${size}` : `k-checkbox k-checkbox-${size}`;\n return {\n ...existingProps,\n className: twJoin(cls, existingProps.className),\n };\n }\n } : undefined;\n\n return (\n <Table\n {...props}\n rowSelection={rowSelection}\n className={twJoin('k-table', idClass, className)}\n ref={ref}\n />\n );\n}) as <RecordType = any>(\n props: KTableProps<RecordType> & { ref?: React.ForwardedRef<TableRef> }\n) => React.ReactElement;\n","import React, {forwardRef, ComponentRef} from 'react';\nimport {Tabs, TabsProps} from 'antd';\nimport './style.css';\nimport {twJoin} from \"tailwind-merge\";\nimport {useFocusVisible} from \"../../../hooks/useFocusVisible\";\n\nexport type KTabsProps = TabsProps & {\n focusVisible?: boolean,\n};\n\n\nexport const KTabs = forwardRef<ComponentRef<typeof Tabs>, KTabsProps>(({\n className,\n focusVisible = false,\n ...props\n }, ref) => {\n\n const idClass = useFocusVisible({\n focusVisible,\n prefix: 'k-tabs',\n selector: '.ant-tabs-nav [class^=\"ant-tabs\"]'\n });\n\n return (\n <Tabs\n className={twJoin(\n 'k-tabs',\n `k-tabs-${props.size}`,\n idClass,\n className\n )}\n ref={ref}\n {...props}\n />\n )\n})","import React, {forwardRef} from 'react';\nimport {Tag, TagProps} from 'antd';\nimport {twJoin} from \"tailwind-merge\";\nimport './style.css';\n\nexport type KTagProps = TagProps;\n\n\nexport const KTag = forwardRef<HTMLAnchorElement | HTMLSpanElement, KTagProps>(({\n children,\n className,\n ...props\n }, ref) => {\n return (\n <Tag {...props} className={twJoin('k-tag', className)} ref={ref}>{children}</Tag>\n );\n});\n","import React, {forwardRef} from 'react';\nimport {Tooltip, TooltipProps} from 'antd';\nimport type {TooltipRef} from 'antd/es/tooltip';\nimport {twJoin} from \"tailwind-merge\";\nimport './style.css';\n\nexport type KTooltipProps = TooltipProps\n\nexport const KTooltip = forwardRef<TooltipRef, KTooltipProps>(({children, className, ...props}, ref) => {\n return (\n <Tooltip {...props} className={twJoin('k-tooltip', className)} ref={ref}>{children}</Tooltip>\n );\n});\n","import React, {forwardRef} from 'react';\n\nimport {Typography} from \"antd\";\nimport {TextProps} from \"antd/es/typography/Text\";\nimport {TitleProps} from \"antd/es/typography/Title\";\nimport {ParagraphProps} from \"antd/es/typography/Paragraph\";\nimport {TypographyProps} from \"antd/es/typography/Typography\";\nimport {twJoin} from \"tailwind-merge\";\nimport './style.css';\n\nconst {Text, Title, Paragraph} = Typography;\n\nexport type KTextProps = TextProps;\nexport type KTitleProps = TitleProps;\nexport type KParagraphProps = ParagraphProps;\nexport type KTypographyProps = TypographyProps<any>;\n\nconst CopyIcon = () => (\n <svg width=\"1em\" height=\"1em\" viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M27 4H11C10.7348 4 10.4804 4.10536 10.2929 4.29289C10.1054 4.48043 10 4.73478 10 5V10H5C4.73478 10 4.48043 10.1054 4.29289 10.2929C4.10536 10.4804 4 10.7348 4 11V27C4 27.2652 4.10536 27.5196 4.29289 27.7071C4.48043 27.8946 4.73478 28 5 28H21C21.2652 28 21.5196 27.8946 21.7071 27.7071C21.8946 27.5196 22 27.2652 22 27V22H27C27.2652 22 27.5196 21.8946 27.7071 21.7071C27.8946 21.5196 28 21.2652 28 21V5C28 4.73478 27.8946 4.48043 27.7071 4.29289C27.5196 4.10536 27.2652 4 27 4ZM20 26H6V12H20V26ZM26 20H22V11C22 10.7348 21.8946 10.4804 21.7071 10.2929C21.5196 10.1054 21.2652 10 21 10H12V6H26V20Z\"\n fill=\"var(--fg-primary)\"/>\n </svg>\n);\n\nconst DoneIcon = () => (\n <svg width=\"1em\" height=\"0.72em\" viewBox=\"0 0 25 18\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M24.7081 1.70806L8.70806 17.7081C8.61518 17.801 8.50489 17.8748 8.3835 17.9251C8.2621 17.9754 8.13197 18.0013 8.00056 18.0013C7.86914 18.0013 7.73901 17.9754 7.61762 17.9251C7.49622 17.8748 7.38593 17.801 7.29306 17.7081L0.293056 10.7081C0.105415 10.5204 0 10.2659 0 10.0006C0 9.73519 0.105415 9.4807 0.293056 9.29306C0.480697 9.10542 0.735192 9 1.00056 9C1.26592 9 1.52042 9.10542 1.70806 9.29306L8.00056 15.5868L23.2931 0.293056C23.4807 0.105415 23.7352 -1.97711e-09 24.0006 0C24.2659 1.97712e-09 24.5204 0.105415 24.7081 0.293056C24.8957 0.480696 25.0011 0.735192 25.0011 1.00056C25.0011 1.26592 24.8957 1.52042 24.7081 1.70806Z\"\n fill=\"var(--fg-primary)\"/>\n </svg>\n);\n\nconst getCopyableConfig = (copyable: KTextProps['copyable']) => {\n if (!copyable) return copyable;\n const defaultIcon = [<CopyIcon key=\"copy-icon\"/>, <DoneIcon key=\"done-icon\"/>];\n if (typeof copyable === 'boolean') {\n return {\n icon: defaultIcon,\n };\n }\n return {\n ...copyable,\n icon: copyable.icon || defaultIcon,\n };\n};\n\nexport const KText = forwardRef<HTMLSpanElement, KTextProps>(({className, ...props}, ref) => {\n return <Text {...props} className={twJoin('k-text', className)} copyable={getCopyableConfig(props.copyable)}\n ref={ref}/>\n});\n\nexport const KTitle = forwardRef<HTMLHeadingElement, KTitleProps>(({className, ...props}, ref) => {\n return <Title {...props} className={twJoin('k-title', className)} copyable={getCopyableConfig(props.copyable)}\n ref={ref}/>\n});\n\nexport const KParagraph = forwardRef<HTMLDivElement, KParagraphProps>(({className, ...props}, ref) => {\n return <Paragraph {...props} className={twJoin('k-paragraph', className)}\n copyable={getCopyableConfig(props.copyable)} ref={ref}/>\n});\n\nexport const KTypography = forwardRef<HTMLElement, KTypographyProps>((props, ref) => {\n return <Typography {...props} ref={ref}/>\n}) as React.ForwardRefExoticComponent<KTypographyProps & React.RefAttributes<HTMLElement>> & {\n Text: typeof KText;\n Title: typeof KTitle;\n Paragraph: typeof KParagraph;\n};\n\nKTypography.Text = KText;\nKTypography.Title = KTitle;\nKTypography.Paragraph = KParagraph;\n\n\n\n"],"names":["themeAntd","_jsx"],"mappings":";;;;;AAEO,MAAM,SAAS,GAAgB;IAClC,SAAS,EAAEA,KAAS,CAAC,aAAa;AAClC,IAAA,KAAK,EAAE;AACH,QAAA,YAAY,EAAE,iBAAiB;AAC/B,QAAA,kBAAkB,EAAE,iBAAiB;AACrC,QAAA,WAAW,EAAE,iBAAiB;AAC9B,QAAA,oBAAoB,EAAE;AACzB,KAAA;AACD,IAAA,MAAM,EAAE,EAAC,GAAG,EAAE,KAAK,EAAC;AACpB,IAAA,UAAU,EAAE,EAAE;CACjB;;ACTM,MAAM,UAAU,GAAgB;IACnC,SAAS,EAAEA,KAAS,CAAC,gBAAgB;AACrC,IAAA,KAAK,EAAE;AACH,QAAA,YAAY,EAAE,iBAAiB;AAC/B,QAAA,kBAAkB,EAAE,i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M;AAC1B,WAAW,CAAC,SAAS,GAAG,UAAU;;;;"}
|
|
@@ -4,7 +4,9 @@ import type { TableRef } from 'antd/es/table';
|
|
|
4
4
|
import './style.css';
|
|
5
5
|
import '../KRadio/style.css';
|
|
6
6
|
import '../KCheckbox/style.css';
|
|
7
|
-
export type KTableProps<RecordType = any> = TableProps<RecordType
|
|
7
|
+
export type KTableProps<RecordType = any> = TableProps<RecordType> & {
|
|
8
|
+
focusVisible?: boolean;
|
|
9
|
+
};
|
|
8
10
|
export declare const KTable: <RecordType = any>(props: KTableProps<RecordType> & {
|
|
9
11
|
ref?: React.ForwardedRef<TableRef>;
|
|
10
12
|
}) => React.ReactElement;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TabsProps } from 'antd';
|
|
3
|
+
import './style.css';
|
|
4
|
+
export type KTabsProps = TabsProps & {
|
|
5
|
+
focusVisible?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const KTabs: React.ForwardRefExoticComponent<TabsProps & {
|
|
8
|
+
focusVisible?: boolean;
|
|
9
|
+
} & React.RefAttributes<import("antd/es/tabs").TabsRef>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public",
|
|
5
5
|
"registry": "https://registry.npmjs.org/"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.2.
|
|
7
|
+
"version": "0.2.14",
|
|
8
8
|
"main": "dist/index.cjs.js",
|
|
9
9
|
"module": "dist/index.esm.js",
|
|
10
10
|
"types": "dist/types/index.d.ts",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"build": "rm -rf dist && npm run build:types && npm run build:bundle",
|
|
29
29
|
"push": "node scripts/bump-version.mjs && pnpm run generate:design && pnpm run build && npm publish",
|
|
30
30
|
"watch": "rollup -c --watch",
|
|
31
|
+
"test": "vitest run",
|
|
31
32
|
"storybook": "storybook dev -p 6006",
|
|
32
33
|
"build-storybook": "storybook build"
|
|
33
34
|
},
|
|
@@ -50,13 +51,19 @@
|
|
|
50
51
|
"@storybook/addon-onboarding": "^9.1.10",
|
|
51
52
|
"@storybook/react-vite": "^9.1.10",
|
|
52
53
|
"@tailwindcss/postcss": "^4.1.18",
|
|
54
|
+
"@testing-library/dom": "^10.4.1",
|
|
55
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
56
|
+
"@testing-library/react": "^16.3.1",
|
|
57
|
+
"@types/node": "^25.0.3",
|
|
53
58
|
"@types/react": "^19.2.2",
|
|
54
59
|
"@types/react-dom": "^19.2.2",
|
|
60
|
+
"@vitejs/plugin-react": "^5.1.2",
|
|
55
61
|
"antd": "^6.1.1",
|
|
56
62
|
"autoprefixer": "^10.4.21",
|
|
57
63
|
"baseline-browser-mapping": "^2.9.9",
|
|
58
64
|
"clsx": "^2.1.1",
|
|
59
65
|
"cssnano": "^7.1.2",
|
|
66
|
+
"jsdom": "^27.4.0",
|
|
60
67
|
"postcss": "^8.5.6",
|
|
61
68
|
"react": "^19.2.0",
|
|
62
69
|
"react-dom": "^19.2.0",
|
|
@@ -68,6 +75,7 @@
|
|
|
68
75
|
"tailwind-merge": "^3.3.1",
|
|
69
76
|
"tailwindcss": "^4.1.18",
|
|
70
77
|
"tslib": "^2.8.1",
|
|
71
|
-
"typescript": "^5.9.3"
|
|
78
|
+
"typescript": "^5.9.3",
|
|
79
|
+
"vitest": "^4.0.16"
|
|
72
80
|
}
|
|
73
81
|
}
|