Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add CalendarEditIcon #500

Merged
merged 4 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/size-limit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
run: pnpm build

- name: Download baseline stats
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v4
if: github.event.number
with:
workflow: size-limit.yml
Expand All @@ -60,7 +60,7 @@ jobs:
run: echo '${{ steps.measure_size.outputs.result }}' > ./size-limit-report/output.json

- name: Upload stats
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: size-limit-report
path: ${{ env.REPORT_FOLDER }}
Expand Down
4 changes: 2 additions & 2 deletions .size-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ module.exports = [
path: './dist/es/index.js',
webpack: true,
import: '{ Button }',
limit: '34 kB',
limit: '36 kB',
},
{
name: 'Tree shaking (just an Icon)',
path: './dist/es/index.js',
webpack: true,
import: '{ AiIcon }',
limit: '23 kB',
limit: '25 kB',
},
];
2 changes: 0 additions & 2 deletions src/components/forms/FieldWrapper/FieldWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ export const FieldWrapper = forwardRef(function FieldWrapper(
) {
const {
as,
qa,
labelPosition = 'top',
label,
extra,
Expand Down Expand Up @@ -158,7 +157,6 @@ export const FieldWrapper = forwardRef(function FieldWrapper(
<>
<FieldElement
ref={ref}
qa={qa}
as={as ?? 'div'}
mods={mods}
isHidden={isHidden}
Expand Down
1 change: 0 additions & 1 deletion src/components/forms/FieldWrapper/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { Props, Styles } from '../../../tasty';
// ADDING NEW PROPS TO THIS INTERFACE REQUIRES ADDING THEM TO createFieldWrapperPropsKeys FUNCTION

export type CubeFieldWrapperProps = {
qa?: string;
as?: string;
validationState?: ValidationState;
styles?: Styles;
Expand Down
2 changes: 0 additions & 2 deletions src/components/forms/wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export function wrapWithField<T extends WrapWithFieldProps>(
props: T,
) {
let {
qa,
label,
extra,
labelPosition = 'top',
Expand All @@ -39,7 +38,6 @@ export function wrapWithField<T extends WrapWithFieldProps>(
return (
<FieldWrapper
{...{
qa,
labelPosition,
label,
extra,
Expand Down
31 changes: 14 additions & 17 deletions src/components/pickers/Menu/Menu.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
Flex,
Button,
Text,
Root,
Space,
AlertDialog,
DialogContainer,
Expand All @@ -39,22 +38,20 @@ export default {

const MenuTemplate = (props) => {
return (
<Root>
<Menu id="menu" {...props} width="340px">
<Menu.Item key="1" onPress={action('Item 1')}>
Item 1
</Menu.Item>
<Menu.Item key="2" onPress={action('Item 2')}>
Item 2
</Menu.Item>
<Menu.Item key="3" onPress={action('Item 3')}>
Item 3
</Menu.Item>
<Menu.Item key="4" onPress={action('Item 4')}>
Item 4
</Menu.Item>
</Menu>
</Root>
<Menu id="menu" {...props} width="340px">
<Menu.Item key="1" onPress={action('Item 1')}>
Item 1
</Menu.Item>
<Menu.Item key="2" onPress={action('Item 2')}>
Item 2
</Menu.Item>
<Menu.Item key="3" onPress={action('Item 3')}>
Item 3
</Menu.Item>
<Menu.Item key="4" onPress={action('Item 4')}>
Item 4
</Menu.Item>
</Menu>
);
};

Expand Down
16 changes: 16 additions & 0 deletions src/icons/CalendarEditIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export const CalendarEditIcon = (
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
fill="none"
viewBox="0 0 16 16"
>
<path
fill="currentColor"
fillRule="evenodd"
d="M4.70474 1.98261V0.995119C4.70474 0.636134 4.99576 0.345118 5.35474 0.345118C5.71373 0.345118 6.00474 0.636133 6.00474 0.995119V1.98261H10.0047V0.995119C10.0047 0.636134 10.2958 0.345118 10.6547 0.345118C11.0137 0.345118 11.3047 0.636133 11.3047 0.995119V1.98261C11.8122 1.9826 12.2321 1.98267 12.5746 2.01066C12.9317 2.03983 13.2614 2.10253 13.5715 2.26055C14.0513 2.50502 14.4414 2.89512 14.6859 3.37494C14.8439 3.68506 14.9066 4.01474 14.9358 4.37177C14.9744 4.84498 14.9702 5.32199 14.9659 5.79772C14.9647 5.93939 14.9634 6.08095 14.9633 6.22227C14.9633 6.77499 14.5149 7.22289 13.9622 7.22227L2.33629 7.20919V11.3164C2.33629 11.8592 2.33679 12.2272 2.36001 12.5114C2.38262 12.788 2.42345 12.9276 2.47253 13.0239C2.59237 13.2591 2.7836 13.4503 3.0188 13.5702C3.11511 13.6192 3.25467 13.6601 3.5313 13.6827C3.81552 13.7059 4.18351 13.7064 4.72629 13.7064H6.27801C6.637 13.7064 6.92801 13.9974 6.92801 14.3564C6.92801 14.7154 6.637 15.0064 6.27801 15.0064H4.69952C4.19022 15.0064 3.76888 15.0064 3.42544 14.9784C3.06841 14.9492 2.73873 14.8865 2.42861 14.7285C1.9488 14.484 1.5587 14.0939 1.31422 13.6141C1.15621 13.304 1.0935 12.9743 1.06433 12.6172C1.03627 12.2738 1.03628 11.8525 1.03629 11.3432V11.3431V5.64585V5.64584C1.03628 5.13654 1.03627 4.7152 1.06433 4.37177C1.0935 4.01474 1.15621 3.68506 1.31422 3.37494C1.5587 2.89512 1.9488 2.50502 2.42861 2.26055C2.73873 2.10253 3.06841 2.03983 3.42544 2.01066C3.76888 1.9826 4.19023 1.9826 4.69954 1.98261H4.70474ZM13.6638 5.67261V6.02193L2.33629 6.00919V5.67261C2.33629 5.12984 2.33679 4.76185 2.36001 4.47763C2.38262 4.20099 2.42345 4.06144 2.47253 3.96512C2.59237 3.72992 2.7836 3.5387 3.0188 3.41885C3.11511 3.36978 3.25467 3.32894 3.5313 3.30634C3.81552 3.28312 4.18351 3.28261 4.72629 3.28261H11.2738C11.8166 3.28261 12.1846 3.28312 12.4688 3.30634C12.7454 3.32894 12.885 3.36978 12.9813 3.41885C13.2165 3.5387 13.4077 3.72992 13.5276 3.96513C13.5766 4.06144 13.6175 4.201 13.6401 4.47763C13.6633 4.76185 13.6638 5.12984 13.6638 5.67261ZM13.5399 9.68673C13.536 9.68283 13.5296 9.68283 13.5257 9.68673L9.65988 13.5526C9.658 13.5545 9.65695 13.557 9.65695 13.5597V14.6725C9.65695 14.6781 9.66143 14.6825 9.66695 14.6825H10.7798C10.7825 14.6825 10.785 14.6815 10.7869 14.6796L14.6528 10.8138C14.6567 10.8098 14.6567 10.8035 14.6528 10.7996L13.5399 9.68673ZM15.572 9.88037L14.4591 8.76749C13.9475 8.25587 13.1181 8.25594 12.6065 8.76749L8.74064 12.6333C8.49496 12.879 8.35695 13.2122 8.35695 13.5597V14.6725C8.35695 15.396 8.94345 15.9825 9.66695 15.9825L10.7798 15.9825C11.1273 15.9825 11.4605 15.8445 11.7061 15.5988L15.572 11.733C16.0836 11.2214 16.0836 10.392 15.572 9.88037Z"
clipRule="evenodd"
/>
</svg>
);
2 changes: 2 additions & 0 deletions src/icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { BooleanIcon as _BooleanIcon } from './BooleanIcon';
import { CountIcon as _CountIcon } from './CountIcon';
import { CubeIcon as _CubeIcon } from './CubeIcon';
import { CalendarIcon as _CalendarIcon } from './CalendarIcon';
import { CalendarEditIcon as _CalendarEditIcon } from './CalendarEditIcon';
import { DonutIcon as _DonutIcon } from './DonutIcon';
import { DownIcon as _DownIcon } from './DownIcon';
import { FilterIcon as _FilterIcon } from './FilterIcon';
Expand Down Expand Up @@ -79,6 +80,7 @@ export const BooleanIcon = wrapIcon('BooleanIcon', _BooleanIcon);
export const CountIcon = wrapIcon('CountIcon', _CountIcon);
export const CubeIcon = wrapIcon('CubeIcon', _CubeIcon);
export const CalendarIcon = wrapIcon('CalendarIcon', _CalendarIcon);
export const CalendarEditIcon = wrapIcon('CalendarEditIcon', _CalendarEditIcon);
export const DonutIcon = wrapIcon('DonutIcon', _DonutIcon);
export const DownIcon = wrapIcon('DownIcon', _DownIcon);
export const FilterIcon = wrapIcon('FilterIcon', _FilterIcon);
Expand Down
Loading