Skip to content
Draft
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .vale/DevDocs/MeaningfulLink.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ tokens:
- \[this\]\(.*\)
- \[this page\]\(.*\)
- \[this link\]\(.*\)
- \[link\]\(.*\)
- \[click here\]\(.*\)
- \[click this\]\(.*\)
- \[click that\]\(.*\)
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@
"vue-demi"
],
"onlyBuiltDependencies": [
"esbuild",
"pngquant-bin"
"pngquant-bin",
"esbuild"
]
}
}
53 changes: 53 additions & 0 deletions playground/entries/Ellipsis.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import { Box } from '@semcore/ui/base-components';
import type { EllipsisProps } from '@semcore/ui/ellipsis';
import Ellipsis from '@semcore/ui/ellipsis';
import { Text } from '@semcore/ui/typography';
import React from 'react';

import type { JSXProps } from '../types/JSXProps';
import type { PlaygroundEntry } from '../types/Playground';
import createGithubLink from '../utils/createGHLink';

export type EllipsisJSXProps = JSXProps<EllipsisProps>;

function getJSX({ handleControlChange, ...ellipsisProps }: EllipsisJSXProps) {
return (
<Box w={200}>
<Ellipsis {...ellipsisProps}>
<Text>
Intergalactic, planetary, planetary, intergalactic Intergalactic, planetary, planetary, intergalactic
Intergalactic, planetary, planetary, intergalactic Intergalactic, planetary, planetary, intergalactic Another
dimension, another dimension Another dimension, another dimension Another dimension, another dimension Another
dimension, another dimension Another dimension, another dimension Another dimension
</Text>
</Ellipsis>
</Box>
);
}

const entry: PlaygroundEntry<EllipsisJSXProps> = {
JSX: (props) => getJSX(props),
controls: {
trim: {
type: 'inline-radio',
value: 'end',
options: ['end', 'middle'],
displayName: 'Trimming type',
},
tooltip: {
type: 'boolean',
value: true,
displayName: 'Show tooltip',
},
maxLine: {
type: 'text-number',
value: 1,
min: 1,
displayName: 'Number of lines',
visibleIf: [{ dependsOn: 'trim', equals: 'end' }],
},
},
link: createGithubLink('ellipsis'),
};

export default entry;
43 changes: 0 additions & 43 deletions playground/entries/Hint.tsx

This file was deleted.

20 changes: 18 additions & 2 deletions playground/entries/Tooltip.tsx
Original file line number Diff line number Diff line change
@@ -1,27 +1,42 @@
import FileExportM from '@semcore/icon/FileExport/m';
import Button from '@semcore/ui/button';
import Link from '@semcore/ui/link';
import Tooltip, { DescriptionTooltip, type DescriptionTooltipProps, type TooltipProps } from '@semcore/ui/tooltip';
import Tooltip, { DescriptionTooltip, Hint, type DescriptionTooltipProps, type TooltipHintProps, type TooltipProps } from '@semcore/ui/tooltip';
import { Text } from '@semcore/ui/typography';
import React from 'react';

import type { JSXProps } from '../types/JSXProps';
import type { PlaygroundEntry } from '../types/Playground';
import createGithubLink from '../utils/createGHLink';

const Components = [Tooltip.displayName, DescriptionTooltip.displayName] as const;
const Components = [Hint.displayName, Tooltip.displayName, DescriptionTooltip.displayName] as const;

type AdditionalJSXProps<Component extends (typeof Components)[number]> = {
component: Component;
};
type HintComponentJSXProps = JSXProps<TooltipHintProps> & AdditionalJSXProps<'Hint'>;
type DescriptionTooltipComponentJSXProps = JSXProps<DescriptionTooltipProps> & AdditionalJSXProps<'DescriptionTooltip'>;
type TooltipComponentJSXProps = JSXProps<TooltipProps> & AdditionalJSXProps<'Tooltip'>;

export type TooltipJSXProps =
| HintComponentJSXProps
| DescriptionTooltipComponentJSXProps
| TooltipComponentJSXProps;

const JSXMap = {
Hint: (props: HintComponentJSXProps) => (
<Hint
title='Export to PDF'
placement={props.placement}
theme={props.theme}
>
<Button>
<Button.Addon>
<FileExportM />
</Button.Addon>
</Button>
</Hint>
),
DescriptionTooltip: (props: DescriptionTooltipComponentJSXProps) => (
<DescriptionTooltip
placement={props.placement}
Expand Down Expand Up @@ -59,6 +74,7 @@ const JSXMap = {
function getJSX(props: TooltipJSXProps) {
const { component } = props;

if (component === 'Hint') return JSXMap[component](props);
if (component === 'DescriptionTooltip') return JSXMap[component](props);
return JSXMap[component](props);
}
Expand Down
4 changes: 2 additions & 2 deletions playground/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import DatePicker from './entries/DatePicker';
import Divider from './entries/Divider';
import Dot from './entries/Dot';
import Dropdown from './entries/Dropdown';
import Ellipsis from './entries/Ellipsis';
import FeaturePopover from './entries/FeaturePopover';
import Hint from './entries/Hint';
import InlineInput from './entries/InlineInput';
import Input from './entries/Input';
import InputMask from './entries/InputMask';
Expand Down Expand Up @@ -58,8 +58,8 @@ const registry = {
Divider,
Dot,
Dropdown,
Ellipsis,
FeaturePopover,
Hint,
InlineInput,
Input,
InputMask,
Expand Down
61 changes: 14 additions & 47 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions semcore/add-filter/__tests__/add-filter.browser-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ export const locators = {

selectTriggerFilled: (page: Page, placeholder: string, index?: number): Locator => {
const base = page.locator(
`[data-ui-name="FilterTrigger.Text"][placeholder="${placeholder}"]`,
`div[data-ui-name="FilterTrigger.Text"][placeholder="${placeholder}"]`,
);
return typeof index === 'number' ? base.nth(index) : base;
},

addFilterSelectInputSearch: (page: Page): Locator => page.locator('[data-ui-name="AddFilterSelect.InputSearch"]'),

dropdownTrigger: (page: Page, placeholder: string): Locator =>
page.locator(`[data-ui-name="AddFilterDropdown.Trigger"][placeholder="${placeholder}"]`),
page.locator(`div[data-ui-name="AddFilterDropdown.Trigger"][placeholder="${placeholder}"]`),

dialog: (page: Page): Locator => page.getByRole('dialog'),

Expand Down
4 changes: 0 additions & 4 deletions semcore/base-components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangel

- Removed using `getNodeByRef` in `Portal`, `OutsideClick`, `ScrollArea` components. Use `React.RefObject` instead.

### Added

- `Hint` component.

## [16.4.2] - 2025-12-01

### Fixed
Expand Down
Loading
Loading