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(link): add link component #972

Open
wants to merge 32 commits into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
3280dfb
docs: implement trendyol tool hedwig to collect feedback (#957) (#959)
ogunb Nov 14, 2024
e3838d3
doc: add adr documents for dropdown
Dec 20, 2024
0e70708
fix: fix lint issue on web-test-runner and enchance structure for vs …
Dec 20, 2024
09a06e4
feature(dropdown): add icon support
Dec 20, 2024
5586612
test: upgrade version of web-test-runner and use playwright package
Dec 20, 2024
39aeb1a
ci: change playwright install command
Dec 20, 2024
970bbe6
Merge branch 'next' into feature/905-dropdown-icon-integration
erbilnas Dec 20, 2024
7990fa3
ci: change playwright install command
Dec 20, 2024
bee34c6
Merge branch 'feature/905-dropdown-icon-integration' of https://githu…
Dec 20, 2024
0f6718b
ci: change playwright install command
Dec 20, 2024
1999d76
ci: change playwright install command
Dec 20, 2024
b9f3a5e
ci: change verify stages
Dec 21, 2024
587c056
ci: change verify stages
Dec 21, 2024
2dfcf53
ci: change verify stages
Dec 21, 2024
69a94c0
fix: fix tests
Dec 21, 2024
e02a819
feat(select): add feature fallback for select search
Dec 21, 2024
64b76b1
docs(dropdown): add icon examples to storybook
Dec 21, 2024
d79e960
fix(select): increase code coverage
Dec 23, 2024
f834d20
fix(select): increase code coverage
Dec 23, 2024
bcee2d9
feat(dropdown): trigger release
Dec 23, 2024
69738d0
feat(link): link component
Dec 25, 2024
df4d231
Merge branch 'next' into feat/906-link-component
erbilnas Dec 25, 2024
8eff185
chore: resolve conflict
Dec 25, 2024
e212d11
chore: resolve conflict
Dec 25, 2024
ab9fe45
fix(link): set default font
Dec 25, 2024
c94e9a1
fix(link): change default font family
Dec 25, 2024
412f661
docs(link): enhance examples
Dec 25, 2024
a6a08cc
fix(link): remove unnecessary navigation handling
Dec 25, 2024
e5dc48e
feat(link): add all anchor attrs, non-standalone links support slotte…
Dec 26, 2024
e883edb
Merge branch 'next' into feat/906-link-component
erbilnas Dec 26, 2024
d6f1674
fix(link): make anchor attrs optional
Dec 26, 2024
2e42f4d
Merge branch 'feat/906-link-component' of https://github.com/Trendyol…
Dec 26, 2024
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
1 change: 1 addition & 0 deletions commitlint.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ module.exports = {
"table",
"split-button",
"datepicker",
"link",
],
],
},
Expand Down
7 changes: 6 additions & 1 deletion custom-elements-manifest.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ import { parse } from "comment-parser";

export default {
globs: ["src/components/**/!(*.test|*.stories).ts"],
exclude: ["src/**/*.css", "src/**/*.constant.ts","src/**/*/*.types.ts","src/components/icon/icon-list.ts"],
exclude: [
"src/**/*.css",
"src/**/*.constant.ts",
"src/**/*/*.types.ts",
"src/components/icon/icon-list.ts",
],
outdir: "dist/",
dev: false,
watch: false,
Expand Down
37 changes: 19 additions & 18 deletions src/baklava.ts
Original file line number Diff line number Diff line change
@@ -1,40 +1,41 @@
export { default as BlAccordionGroup } from "./components/accordion-group/bl-accordion-group";
export { default as BlAccordion } from "./components/accordion-group/accordion/bl-accordion";
export { default as BlAccordionGroup } from "./components/accordion-group/bl-accordion-group";
export { default as BlAlert } from "./components/alert/bl-alert";
export { default as BlBadge } from "./components/badge/bl-badge";
export { default as BlButton } from "./components/button/bl-button";
export { default as BlCalendar } from "./components/calendar/bl-calendar";
export { default as BlCheckboxGroup } from "./components/checkbox-group/bl-checkbox-group";
export { default as BlCheckbox } from "./components/checkbox-group/checkbox/bl-checkbox";
export { default as BlDatepicker } from "./components/datepicker/bl-datepicker";
export { default as BlDialog } from "./components/dialog/bl-dialog";
export { default as BlDrawer } from "./components/drawer/bl-drawer";
export { default as BlDropdown } from "./components/dropdown/bl-dropdown";
export { default as BlDropdownGroup } from "./components/dropdown/group/bl-dropdown-group";
export { default as BlDropdownItem } from "./components/dropdown/item/bl-dropdown-item";
export { default as BlIcon } from "./components/icon/bl-icon";
export { default as BlInput } from "./components/input/bl-input";
export { default as BlLink } from "./components/link/bl-link";
export { default as BlNotification } from "./components/notification/bl-notification";
export { default as BlNotificationCard } from "./components/notification/card/bl-notification-card";
export { default as BlPagination } from "./components/pagination/bl-pagination";
export { default as BlPopover } from "./components/popover/bl-popover";
export { default as BlProgressIndicator } from "./components/progress-indicator/bl-progress-indicator";
export { default as BlRadioGroup } from "./components/radio-group/bl-radio-group";
export { default as BlRadio } from "./components/radio-group/radio/bl-radio";
export { default as BlSelect } from "./components/select/bl-select";
export { default as BlSelectOption } from "./components/select/option/bl-select-option";
export { default as BlTab } from "./components/tab-group/tab/bl-tab";
export { default as BlSpinner } from "./components/spinner/bl-spinner";
export { default as BlSplitButton } from "./components/split-button/bl-split-button";
export { default as BlSwitch } from "./components/switch/bl-switch";
export { default as BlTabGroup } from "./components/tab-group/bl-tab-group";
export { default as BlTabPanel } from "./components/tab-group/tab-panel/bl-tab-panel";
export { default as BlTextarea } from "./components/textarea/bl-textarea";
export { default as BlTooltip } from "./components/tooltip/bl-tooltip";
export { default as BlPopover } from "./components/popover/bl-popover";
export { default as BlDropdown } from "./components/dropdown/bl-dropdown";
export { default as BlDropdownItem } from "./components/dropdown/item/bl-dropdown-item";
export { default as BlDropdownGroup } from "./components/dropdown/group/bl-dropdown-group";
export { default as BlSwitch } from "./components/switch/bl-switch";
export { default as BlSpinner } from "./components/spinner/bl-spinner";
export { default as BlNotification } from "./components/notification/bl-notification";
export { default as BlNotificationCard } from "./components/notification/card/bl-notification-card";
export { default as BlTab } from "./components/tab-group/tab/bl-tab";
export { default as BlTable } from "./components/table/bl-table";
export { default as BlTableHeader } from "./components/table/table-header/bl-table-header";
export { default as BlTableBody } from "./components/table/table-body/bl-table-body";
export { default as BlTableRow } from "./components/table/table-row/bl-table-row";
export { default as BlTableHeaderCell } from "./components/table/table-header-cell/bl-table-header-cell";
export { default as BlTableCell } from "./components/table/table-cell/bl-table-cell";
export { default as BlSplitButton } from "./components/split-button/bl-split-button";
export { default as BlCalendar } from "./components/calendar/bl-calendar";
export { default as BlDatePicker } from "./components/datepicker/bl-datepicker";
export { default as BlTableHeaderCell } from "./components/table/table-header-cell/bl-table-header-cell";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did we change casing? that could be a breaking change

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's breaking tests and btw it already named like that
export default class BlDatepicker extends DatepickerCalendarMixin {

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should talk with @dilandoogan

export { default as BlTableHeader } from "./components/table/table-header/bl-table-header";
export { default as BlTableRow } from "./components/table/table-row/bl-table-row";
export { default as BlTextarea } from "./components/textarea/bl-textarea";
export { default as BlTooltip } from "./components/tooltip/bl-tooltip";
export { getIconPath, setIconPath } from "./utilities/asset-paths";
1 change: 1 addition & 0 deletions src/components/calendar/bl-calendar.css
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@

.grid-item {
width: 93.33px;

--bl-size-3xs: 15px;
}

Expand Down
10 changes: 5 additions & 5 deletions src/components/datepicker/bl-datepicker.test.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { aTimeout, expect, fixture, html } from "@open-wc/testing";
import { BlButton, BlDatePicker } from "../../baklava";
import { CALENDAR_TYPES } from "../calendar/bl-calendar.constant";
import sinon from "sinon";
import { BlButton, BlDatepicker } from "../../baklava";
import { CALENDAR_TYPES } from "../calendar/bl-calendar.constant";
import "./bl-datepicker";

describe("BlDatepicker", () => {
let element: BlDatePicker;
let element: BlDatepicker;
let getElementByIdStub: sinon.SinonStub;
let consoleWarnSpy: sinon.SinonSpy;

beforeEach(async () => {
element = await fixture<BlDatePicker>(html`
element = await fixture<BlDatepicker>(html`
<bl-datepicker type="single" locale="en"></bl-datepicker>`);

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
Expand Down Expand Up @@ -276,7 +276,7 @@ describe("BlDatepicker", () => {
});

it("should warn when 'value' is not an array for multiple/range selection", async () => {
element = await fixture<BlDatePicker>(html`
element = await fixture<BlDatepicker>(html`
<bl-datepicker type="multiple" locale="en"></bl-datepicker>`);
element.value = new Date();

Expand Down
105 changes: 105 additions & 0 deletions src/components/link/bl-link.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
:host {
display: inline-flex;
align-items: center;
}

.link {
/* Custom properties */
--color: var(--bl-link-color, var(--bl-color-primary));
--hover-color: var(--bl-link-hover-color, var(--bl-color-primary-highlight));
--active-color: var(--bl-link-active-color, var(--bl-color-primary-highlight));

/* Base styles */
display: inline-flex;
align-items: center;
color: var(--color);
cursor: pointer;
outline: none;
position: relative;
}

/* States */
.link:hover {
text-decoration: none;
}

.link:hover:not(.disabled) {
color: var(--hover-color);
}

.link:active:not(.disabled) {
color: var(--active-color);
}

/* Focus styles */
.link:focus-visible {
outline: none;
}

.link:focus-visible::after {
content: "";
position: absolute;
inset: -2px;
border: 2px solid var(--bl-color-primary);
border-radius: var(--bl-border-radius-s);
}

/* Primary kind */
.link.standalone.kind-primary {
color: var(--bl-color-primary);
}

.link.standalone.kind-primary:hover:not(.disabled),
.link.standalone.kind-primary:active:not(.disabled) {
color: var(--bl-color-primary-highlight);
}

/* Neutral kind */
.link.standalone.kind-neutral {
color: var(--bl-color-neutral);
}

.link.standalone.kind-neutral:hover:not(.disabled),
.link.standalone.kind-neutral:active:not(.disabled) {
color: var(--bl-color-neutral-highlight);
}

/* Size variants */
.link.standalone.size-large {
font-weight: var(--bl-font-weight-regular);
font-size: var(--bl-font-size-l);
}

.link.standalone.size-medium {
font-weight: var(--bl-font-weight-regular);
font-size: var(--bl-font-size-m);
}

.link.standalone.size-small {
font-weight: var(--bl-font-weight-regular);
font-size: var(--bl-font-size-s);
}

/* Icon styles */
.icon {
margin-inline-start: var(--bl-size-3xs);
}

/* Disabled state */
.link.disabled {
opacity: 0.5;
cursor: not-allowed;
}

/* Screen reader only text */
.visually-hidden {
position: absolute;
block-size: 1px;
inline-size: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
Loading
Loading