Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
11f8de3
Added new component Smart ToggleButtons
nathalieArnoux Jun 9, 2025
fa36f76
Added hover
nathalieArnoux Jun 9, 2025
6d53972
removed empty css rule
nathalieArnoux Jun 10, 2025
71d6e53
Added Smart Button component
nathalieArnoux Jun 12, 2025
520e1a6
Fixed initial PR feedback
nathalieArnoux Jun 13, 2025
2b1a4ba
Removed redundant color variables
nathalieArnoux Jun 16, 2025
52beefe
Added new Smart Skeleton component
nathalieArnoux Jun 16, 2025
a835a8f
[WIP] Smart immersive input component: Add new component & resize bas…
aprentout Jun 23, 2025
d3c299b
Smart immersive input component: Add tests & cleanup code
aprentout Jun 23, 2025
67cf5af
Smart immersive input component: Move css in separated file & rollbac…
aprentout Jun 23, 2025
3627464
Dummy app: Reword smart immersive input section
aprentout Jun 24, 2025
5b36c2c
feat: added smart input component
OwenCoogan Jun 23, 2025
b4df87d
fix: fixed broken tests
OwenCoogan Jun 23, 2025
3de0d37
fix: cleanup
OwenCoogan Jun 23, 2025
348bad8
fix: fixes post review
OwenCoogan Jun 25, 2025
670fab0
fix: added fixes post review
OwenCoogan Jun 25, 2025
16bfb01
wip: added feedback component
OwenCoogan Jun 23, 2025
016a67e
fix: added story & fixed styling
OwenCoogan Jun 24, 2025
091267c
fix: remove unused method
OwenCoogan Jun 24, 2025
ff15a42
fix: added fixes post review
OwenCoogan Jun 25, 2025
40a5122
fix: added fixes post review
OwenCoogan Jun 25, 2025
8fa604a
fix: push uncommited file
OwenCoogan Jun 25, 2025
a59abe5
fix: removed unused class
OwenCoogan Jun 25, 2025
0b6a68d
WIP
nathalieArnoux Jun 20, 2025
2965793
Added Smart Immersive Currency Input component
nathalieArnoux Jun 24, 2025
200ee1a
Fixed animation colors and tests
nathalieArnoux Jun 24, 2025
db1bcd3
Fixed PR feedback
nathalieArnoux Jun 25, 2025
7c4dbcf
Added new OSS::Pill and Smart::Pill components
nathalieArnoux Jun 26, 2025
e51b806
Removed unnecessary onChange action
nathalieArnoux Jun 27, 2025
e97a24d
wip: immersive logo
OwenCoogan Jun 25, 2025
80c1857
wip: smart logo
OwenCoogan Jun 25, 2025
094d6a5
feat: fixed loading animation
OwenCoogan Jun 26, 2025
148d780
fix: css cleanup
OwenCoogan Jun 26, 2025
758ebf8
fix: added test
OwenCoogan Jun 26, 2025
899f44d
fix: added fixes post review
OwenCoogan Jun 27, 2025
1c60b79
fix: cleanup & unstaged files
OwenCoogan Jun 30, 2025
626d676
fix: added fixes post review
OwenCoogan Jun 30, 2025
5e89b2e
fix: renamed onClick arg to onEdit
OwenCoogan Jul 1, 2025
aaff089
Added @icon arg on OSS::Pill & Smart::Pill
nathalieArnoux Jul 2, 2025
ce30edf
Added icon helpers
nathalieArnoux Jul 2, 2025
4406642
FA duotone
nathalieArnoux Jul 16, 2025
8130ec3
Scrollable-panel: Add new offset params
aprentout Jul 24, 2025
d8b145d
Smart immersive select: Add new smart component & add skin on infinit…
aprentout Jul 23, 2025
be20487
Smart immersive select: Add tests
aprentout Jul 23, 2025
2ce89ea
Fix pr feedback
aprentout Jul 24, 2025
0f799dc
Added Smart::Tag & Smart::TagInput components
nathalieArnoux Jul 24, 2025
6379101
Fixed tag lg size
nathalieArnoux Jul 24, 2025
05b7398
Fixed PR feedback
nathalieArnoux Jul 25, 2025
a775561
Added test and doc for placeholder arg on tag input
nathalieArnoux Jul 25, 2025
a23a8e0
Fixed additional PR feedback
nathalieArnoux Jul 25, 2025
cccb9ef
Smart component: Fix input css issue
aprentout Aug 12, 2025
70de3a9
Remove unused css
aprentout Aug 13, 2025
f6b3ec9
Smart infinite-select: Rework style
aprentout Aug 19, 2025
e751a63
Fix pr feedback
aprentout Aug 20, 2025
9eba31c
Smart Textarea: Add new component
aprentout Aug 18, 2025
33e49f2
Smart Textarea: Fix test
aprentout Aug 18, 2025
8f3c72c
Smart Textarea: Fix pr feedbacks
aprentout Aug 18, 2025
12063e5
Fix pr feedback
aprentout Aug 19, 2025
fa5e841
Fix pr feedback
aprentout Aug 20, 2025
c69488c
[WIP] Wizard container: Step properly adjust to content size
aprentout Aug 27, 2025
9859264
Step-wrapper: Add scroll tolerance & improve css
aprentout Aug 28, 2025
aa2223c
Wizard-container: Remove the scrollable section
aprentout Aug 29, 2025
90a0c6c
Updated: tweaks & additions on smart components
Miexil Sep 3, 2025
c3fd451
Updated: Smart::Logo use more precise class names to prevent clashes …
Miexil Sep 3, 2025
fa7ca86
Updated: WizardManager - do not focus on error step when it's the cur…
Miexil Sep 3, 2025
2e9245c
Updated: Smart::Select paddings and dropdown position
Miexil Sep 3, 2025
db1af3d
Wizard-manager: Find first focusable step not hidden
aprentout Sep 4, 2025
1a5e128
Updated: Smart::Immersive::Select input format and types
Miexil Sep 9, 2025
94e8f95
Updated: Smart::TagInput delay on-clickoutside
Miexil Sep 9, 2025
f19084b
Updated: Wizard::BaseStep re-assign stepValidator in constructor ever…
Miexil Sep 9, 2025
c385c54
Update smart select & logo components
aprentout Sep 9, 2025
fbdc58a
Smart immersive select: Trigger search reset on click outside
aprentout Sep 9, 2025
ee22ffd
Smart immersive logo: Replace campaign wording
aprentout Sep 9, 2025
16cf9ee
Merge pull request #561 from upfluence/mbap/updates-for-creation-flow
Miexil Sep 9, 2025
8605498
Updated: fixed ts error
Miexil Sep 10, 2025
cda535f
Updated: Smart::TagInput with splattributes
Miexil Sep 10, 2025
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
8 changes: 5 additions & 3 deletions addon/components/o-s-s/button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const SQUARE_CLASS = 'upf-square-btn';
const DEFAULT_COUNTER_TIME = 5000;
const DEFAULT_STEP_COUNTER_TIME = 1000;

interface ButtonArgs {
export interface OSSButtonArgs {
skin?: string;
size?: string;
loading?: boolean;
Expand All @@ -87,15 +87,17 @@ interface ButtonArgs {
};
}

export default class OSSButton extends Component<ButtonArgs> {
export default class OSSButton<T extends OSSButtonArgs> extends Component<T> {
@tracked DOMElement: HTMLElement | undefined;
@tracked intervalID: ReturnType<typeof setInterval> | undefined;
@tracked intervalState: boolean = false;
@tracked counterTimeLeft: number = 0;

constructor(owner: unknown, args: ButtonArgs) {
constructor(owner: unknown, args: OSSButtonArgs, preventDefaultAssertions?: boolean) {
super(owner, args);

if (preventDefaultAssertions) return;

assert(
'[component][OSS::Button] You must pass either a @label, an @icon or an @iconUrl argument.',
args.label || args.icon || args.iconUrl
Expand Down
21 changes: 14 additions & 7 deletions addon/components/o-s-s/currency-input.hbs
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
<div class={{this.computedClasses}} ...attributes>
<div class="currency-input fx-row fx-1 fx-xalign-center
{{if @onlyCurrency 'onlycurrency'}} {{if this.currencySelectorShown 'currency-input--active'}}">
<div class="currency-selector fx-row fx-gap-px-12 fx-malign-space-between fx-xalign-center"
role={{if this.allowCurrencyUpdate 'button' 'img'}}
{{on "click" this.toggleCurrencySelector}}>
<div
class="currency-input fx-row fx-1 fx-xalign-center
{{if @onlyCurrency 'onlycurrency'}}
{{if this.currencySelectorShown 'currency-input--active'}}"
>
<div
class="currency-selector fx-row fx-gap-px-12 fx-malign-space-between fx-xalign-center"
role={{if this.allowCurrencyUpdate "button" "img"}}
{{on "click" this.toggleCurrencySelector}}
>
<div class="fx-col">
<div class="fx-row fx-gap-px-9">
<span>{{this.selectedCurrencySymbol}}</span>
Expand All @@ -14,8 +19,10 @@
</div>

{{#if (and this.allowCurrencyUpdate (not this.disabled))}}
<OSS::Icon @icon="{{if this.currencySelectorShown "fa-chevron-up" "fa-chevron-down"}}"
class="margin-left-px-6" />
<OSS::Icon
@icon="{{if this.currencySelectorShown 'fa-chevron-up' 'fa-chevron-down'}}"
class="margin-left-px-6"
/>
{{/if}}
</div>
{{#unless @onlyCurrency}}
Expand Down
8 changes: 5 additions & 3 deletions addon/components/o-s-s/currency-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export type Currency = {
symbol: string;
};

interface OSSCurrencyInputArgs {
export interface OSSCurrencyInputArgs {
currency: string;
value: number;
onChange(currency: string, value: number): void;
Expand Down Expand Up @@ -66,16 +66,18 @@ const AUTHORIZED_INPUTS = [
'ArrowDown'
];

export default class OSSCurrencyInput extends Component<OSSCurrencyInputArgs> {
export default class OSSCurrencyInput<T extends OSSCurrencyInputArgs> extends Component<T> {
private currencies = this.args.allowedCurrencies ?? PLATFORM_CURRENCIES;

@tracked currencySelectorShown: boolean = false;
@tracked filteredCurrencies: Currency[] = this.currencies;
@tracked localValue: number = this.args.value;

constructor(owner: unknown, args: OSSCurrencyInputArgs) {
constructor(owner: unknown, args: OSSCurrencyInputArgs, preventDefaultAssertions?: boolean) {
super(owner, args);

if (preventDefaultAssertions) return;

if (!this.args.value && !this.args.placeholder) {
this.localValue = 0;
}
Expand Down
5 changes: 4 additions & 1 deletion addon/components/o-s-s/infinite-select.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<div
id={{this.elementId}}
data-internal-id={{this.elementId}}
class="fx-col fx-gap-px-12 upf-infinite-select {{unless this.inline 'upf-infinite-select--absolute'}}"
class="fx-col fx-gap-px-12 upf-infinite-select
{{unless this.inline 'upf-infinite-select--absolute'}}
upf-infinite-select--{{this.skin}}"
{{did-insert this.onRender}}
...attributes
>
Expand All @@ -10,6 +12,7 @@
@value={{this._searchKeyword}}
@placeholder={{this.searchPlaceholder}}
@onChange={{this.updateSearchKeyword}}
class="upf-infinite-select--search"
{{on "keydown" this.handleKeyEventInput}}
{{did-insert this.initSearchInput}}
/>
Expand Down
17 changes: 16 additions & 1 deletion addon/components/o-s-s/infinite-select.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ const FAKE_DATA = [
{ superhero: 'Spider Man', characters: 'Peter Parker' }
];

const SkinTypes = ['default', 'smart'];

export default {
title: 'Components/OSS::InfiniteSelect',
component: 'infinite-select',
Expand Down Expand Up @@ -56,6 +58,17 @@ export default {
},
control: { type: 'boolean' }
},
skin: {
description: 'Adjust the skin of the badge',
table: {
type: {
summary: SkinTypes.join('|')
},
defaultValue: { summary: 'default' }
},
options: SkinTypes,
control: { type: 'select' }
},
loading: {
type: { name: 'boolean' },
description: 'Whether or not the initial content is loading',
Expand Down Expand Up @@ -159,6 +172,7 @@ const defaultArgs = {
loadingMore: false,
inline: false,
enableKeyboard: false,
skin: 'default',
onSelect: action('onSelect'),
onSearch: action('onSearch'),
onBottomReached: action('onBottomReached'),
Expand All @@ -171,7 +185,8 @@ const Template = (args) => ({
@items={{this.items}} @itemLabel={{this.itemLabel}} @searchEnabled={{this.searchEnabled}} @onSearch={{this.onSearch}}
@searchPlaceholder={{this.searchPlaceholder}} @onSelect={{this.onSelect}} @loading={{this.loading}}
@loadingMore={{this.loadingMore}} @inline={{this.inline}} @onBottomReached={{this.onBottomReached}}
@didRender={{this.didRender}} @enableKeyboard={{this.enableKeyboard}} class="upf-align--absolute-center"/>
@skin={{this.skin}} @didRender={{this.didRender}} @enableKeyboard={{this.enableKeyboard}}
class="upf-align--absolute-center"/>
`,
context: args
});
Expand Down
5 changes: 5 additions & 0 deletions addon/components/o-s-s/infinite-select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ interface InfiniteSelectArgs {
items: InfinityItem[];
inline: boolean;
enableKeyboard?: boolean;
skin?: 'default' | 'smart';

onSelect: (item: InfinityItem) => void;
onSearch?: (keyword: string) => void;
Expand Down Expand Up @@ -71,6 +72,10 @@ export default class OSSInfiniteSelect extends Component<InfiniteSelectArgs> {
return this.args.inline ?? false;
}

get skin(): 'default' | 'smart' {
return this.args.skin ?? 'default';
}

@action
onRender(): void {
this.args.didRender?.();
Expand Down
4 changes: 2 additions & 2 deletions addon/components/o-s-s/input-container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export type FeedbackMessage = {
value: string;
};

interface OSSInputContainerArgs {
export interface OSSInputContainerArgs {
value?: string;
disabled?: boolean;
feedbackMessage?: FeedbackMessage;
Expand All @@ -21,7 +21,7 @@ interface OSSInputContainerArgs {

export const AutocompleteValues = ['on', 'off'];

export default class OSSInputContainer extends Component<OSSInputContainerArgs> {
export default class OSSInputContainer<T extends OSSInputContainerArgs> extends Component<T> {
get feedbackMessage(): FeedbackMessage | undefined {
if (this.args.feedbackMessage && ['error', 'warning', 'success'].includes(this.args.feedbackMessage.type)) {
return this.args.feedbackMessage;
Expand Down
17 changes: 15 additions & 2 deletions addon/components/o-s-s/scrollable-panel.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@ export default {
type: 'boolean'
}
},
offset: {
description: 'Offset in pixels from which the scrollable panel will be considered as scrolled',
table: {
type: { summary: 'number' },
defaultValue: { summary: '0' }
},
control: {
type: 'number'
}
},
onBottomReached: {
description: 'Function to be called when the scroll hits the bottom',
table: {
Expand All @@ -68,6 +78,7 @@ const defaultArgs = {
plain: false,
disableShadows: false,
hideScrollbar: false,
offset: 0,
onBottomReached: action('onBottomReached')
};

Expand All @@ -83,7 +94,8 @@ const Template = (args) => ({
@disableShadows={{this.disableShadows}}
@onBottomReached={{this.onBottomReached}}
@hideScrollbar={{this.hideScrollbar}}
@horizontal={{this.horizontal}} >
@horizontal={{this.horizontal}}
@offset={{this.offset}} >
<div class="fx-col fx-gap-px-12 padding-px-12">
<div class="background-color-gray-200" style="height: 50px; width: 100%;" />
<div class="background-color-gray-200" style="height: 50px; width: 100%;" />
Expand All @@ -105,7 +117,8 @@ const TemplateHorizontal = (args) => ({
@disableShadows={{this.disableShadows}}
@onBottomReached={{this.onBottomReached}}
@hideScrollbar={{this.hideScrollbar}}
@horizontal={{this.horizontal}} >
@horizontal={{this.horizontal}}
@offset={{this.offset}} >
<div class="fx-row fx-gap-px-12 padding-px-12" style="width: fit-content">
<div class="background-color-gray-200" style="height: 50px; width: 100px;" />
<div class="background-color-gray-200" style="height: 50px; width: 100px;" />
Expand Down
19 changes: 15 additions & 4 deletions addon/components/o-s-s/scrollable-panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ interface OSSScrollablePanelComponentSignature {
disableShadows?: boolean;
horizontal?: boolean;
hideScrollbar?: boolean;
offset?: number;
onBottomReached?: () => void;
}

Expand All @@ -19,6 +20,10 @@ export default class OSSScrollablePanelComponent extends Component<OSSScrollable

resizeObserver = new ResizeObserver(this.resizeObserverCallback.bind(this));

get offset(): number {
return this.args.offset ?? 0;
}

@action
initScrollListener(element: HTMLElement): void {
this.parentElement = element;
Expand Down Expand Up @@ -54,7 +59,7 @@ export default class OSSScrollablePanelComponent extends Component<OSSScrollable
}

private scrollListener(): void {
if (this.parentElement.scrollTop > 0) {
if (this.parentElement.scrollTop - this.offset > 0) {
this.shadowTopVisible = true;
} else {
this.shadowTopVisible = false;
Expand All @@ -63,15 +68,18 @@ export default class OSSScrollablePanelComponent extends Component<OSSScrollable
}

private displayBottomShadow(): void {
if (this.parentElement.scrollTop + this.parentElement.clientHeight >= this.parentElement.scrollHeight - 1) {
if (
this.parentElement.scrollTop + this.parentElement.clientHeight + this.offset >=
this.parentElement.scrollHeight - 1
) {
this.shadowBottomVisible = false;
} else {
this.shadowBottomVisible = true;
}
}

private horizontalScrollListener(): void {
if (this.parentElement.scrollLeft > 0) {
if (this.parentElement.scrollLeft - this.offset > 0) {
this.shadowLeftVisible = true;
} else {
this.shadowLeftVisible = false;
Expand All @@ -80,7 +88,10 @@ export default class OSSScrollablePanelComponent extends Component<OSSScrollable
}

private displayRightShadow(): void {
if (this.parentElement.scrollLeft + this.parentElement.clientWidth >= this.parentElement.scrollWidth - 1) {
if (
this.parentElement.scrollLeft + this.parentElement.clientWidth + this.offset >=
this.parentElement.scrollWidth - 1
) {
this.shadowRightVisible = false;
} else {
this.shadowRightVisible = true;
Expand Down
8 changes: 5 additions & 3 deletions addon/components/o-s-s/skeleton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Component from '@glimmer/component';
import { assert } from '@ember/debug';
import { htmlSafe } from '@ember/template';

interface OSSSkeletonArgs {
export interface OSSSkeletonArgs {
width?: number | string;
height?: number | string;
multiple?: number;
Expand All @@ -13,10 +13,12 @@ interface OSSSkeletonArgs {

const RANGE_PERCENTAGE: number = 15;

export default class OSSSkeleton extends Component<OSSSkeletonArgs> {
constructor(owner: unknown, args: OSSSkeletonArgs) {
export default class OSSSkeleton<T extends OSSSkeletonArgs> extends Component<T> {
constructor(owner: unknown, args: OSSSkeletonArgs, preventDefaultAssertions?: boolean) {
super(owner, args);

if (preventDefaultAssertions) return;

if (this.args.direction) {
assert(
`[component][OSS::Skeleton] The @direction argument should be a value of ${['row', 'column', 'col']}`,
Expand Down
26 changes: 26 additions & 0 deletions addon/components/o-s-s/smart/button.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{{! template-lint-disable u-template-lint/no-bare-button}}
<div class="upf-smart-btn-container fx-row" ...attributes>
<button
type="button"
class={{this.computedSmartClasses}}
disabled={{@disabled}}
{{did-insert this.didInsert}}
{{on "click" this.onclick}}
>
{{#if this.loadingState}}
<OSS::Icon @style="solid" @icon="fa-spinner-third fa-spin" />
{{#if (and @label @loadingOptions.showLabel)}}
<span class="margin-left-px-6">{{@label}}</span>
{{/if}}
{{else}}
{{#if @icon}}
<OSS::Icon @style={{fa-icon-style @icon}} @icon={{fa-icon-value @icon}} />
{{else if @iconUrl}}
<img src={{@iconUrl}} alt="icon" />
{{/if}}
{{#if (and @label (not this.isCircle))}}
<span class={{if (or @icon @iconUrl) "margin-left-px-6"}}>{{@label}}</span>
{{/if}}
{{/if}}
</button>
</div>
Loading
Loading