Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
8f492d5
Added new component Smart ToggleButtons
nathalieArnoux Jun 9, 2025
878b886
Added hover
nathalieArnoux Jun 9, 2025
114ac75
removed empty css rule
nathalieArnoux Jun 10, 2025
67900b7
Added Smart Button component
nathalieArnoux Jun 12, 2025
b2e3d3a
Fixed initial PR feedback
nathalieArnoux Jun 13, 2025
2469606
Removed redundant color variables
nathalieArnoux Jun 16, 2025
6b25c3b
Added new Smart Skeleton component
nathalieArnoux Jun 16, 2025
fba5d62
[WIP] Smart immersive input component: Add new component & resize bas…
aprentout Jun 23, 2025
6787799
Smart immersive input component: Add tests & cleanup code
aprentout Jun 23, 2025
69eea21
Smart immersive input component: Move css in separated file & rollbac…
aprentout Jun 23, 2025
3346718
Dummy app: Reword smart immersive input section
aprentout Jun 24, 2025
4b8e706
feat: added smart input component
OwenCoogan Jun 23, 2025
42da644
fix: fixed broken tests
OwenCoogan Jun 23, 2025
40dd996
fix: cleanup
OwenCoogan Jun 23, 2025
c56944f
fix: fixes post review
OwenCoogan Jun 25, 2025
6f1ebc4
fix: added fixes post review
OwenCoogan Jun 25, 2025
b7dd47c
wip: added feedback component
OwenCoogan Jun 23, 2025
5006149
fix: added story & fixed styling
OwenCoogan Jun 24, 2025
6b9db2e
fix: remove unused method
OwenCoogan Jun 24, 2025
f89daa6
fix: added fixes post review
OwenCoogan Jun 25, 2025
437d7ef
fix: added fixes post review
OwenCoogan Jun 25, 2025
797d553
fix: push uncommited file
OwenCoogan Jun 25, 2025
1a47ff5
fix: removed unused class
OwenCoogan Jun 25, 2025
72ad987
WIP
nathalieArnoux Jun 20, 2025
e600528
Added Smart Immersive Currency Input component
nathalieArnoux Jun 24, 2025
e4b15be
Fixed animation colors and tests
nathalieArnoux Jun 24, 2025
034ab47
Fixed PR feedback
nathalieArnoux Jun 25, 2025
6c62ca1
Added new OSS::Pill and Smart::Pill components
nathalieArnoux Jun 26, 2025
1adb6c9
Removed unnecessary onChange action
nathalieArnoux Jun 27, 2025
55fc341
wip: immersive logo
OwenCoogan Jun 25, 2025
4d15c2b
wip: smart logo
OwenCoogan Jun 25, 2025
ac5d284
feat: fixed loading animation
OwenCoogan Jun 26, 2025
23ddfaf
fix: css cleanup
OwenCoogan Jun 26, 2025
0b8a609
fix: added test
OwenCoogan Jun 26, 2025
bca0998
fix: added fixes post review
OwenCoogan Jun 27, 2025
1045187
fix: cleanup & unstaged files
OwenCoogan Jun 30, 2025
9f70841
fix: added fixes post review
OwenCoogan Jun 30, 2025
bc0f213
fix: renamed onClick arg to onEdit
OwenCoogan Jul 1, 2025
de44f01
Added @icon arg on OSS::Pill & Smart::Pill
nathalieArnoux Jul 2, 2025
06ae674
Added icon helpers
nathalieArnoux Jul 2, 2025
8256987
FA duotone
nathalieArnoux Jul 16, 2025
b2d55c7
Scrollable-panel: Add new offset params
aprentout Jul 24, 2025
8ded2e1
Smart immersive select: Add new smart component & add skin on infinit…
aprentout Jul 23, 2025
295ea51
Smart immersive select: Add tests
aprentout Jul 23, 2025
ea25f7b
Fix pr feedback
aprentout Jul 24, 2025
65827db
Added Smart::Tag & Smart::TagInput components
nathalieArnoux Jul 24, 2025
3c02c74
Fixed tag lg size
nathalieArnoux Jul 24, 2025
15382a3
Fixed PR feedback
nathalieArnoux Jul 25, 2025
cd7d5fc
Added test and doc for placeholder arg on tag input
nathalieArnoux Jul 25, 2025
26aab38
Fixed additional PR feedback
nathalieArnoux Jul 25, 2025
d7f3598
Smart component: Fix input css issue
aprentout Aug 12, 2025
d444f75
Remove unused css
aprentout Aug 13, 2025
ccc13d8
Smart infinite-select: Rework style
aprentout Aug 19, 2025
5ddb030
Fix pr feedback
aprentout Aug 20, 2025
5e85cfa
Smart Textarea: Add new component
aprentout Aug 18, 2025
29b35cc
Smart Textarea: Fix test
aprentout Aug 18, 2025
fa28bd9
Smart Textarea: Fix pr feedbacks
aprentout Aug 18, 2025
99e4129
Fix pr feedback
aprentout Aug 19, 2025
76e777d
Fix pr feedback
aprentout Aug 20, 2025
dce7094
[WIP] Wizard container: Step properly adjust to content size
aprentout Aug 27, 2025
7066ffa
Step-wrapper: Add scroll tolerance & improve css
aprentout Aug 28, 2025
1e485b6
Wizard-container: Remove the scrollable section
aprentout Aug 29, 2025
5b515fb
Updated: tweaks & additions on smart components
Miexil Sep 3, 2025
aa98bbf
Updated: Smart::Logo use more precise class names to prevent clashes …
Miexil Sep 3, 2025
d9f0314
Updated: WizardManager - do not focus on error step when it's the cur…
Miexil Sep 3, 2025
ebbd222
Updated: Smart::Select paddings and dropdown position
Miexil Sep 3, 2025
0ffd39c
Wizard-manager: Find first focusable step not hidden
aprentout Sep 4, 2025
63685a2
Updated: Smart::Immersive::Select input format and types
Miexil Sep 9, 2025
09a181c
Updated: Smart::TagInput delay on-clickoutside
Miexil Sep 9, 2025
b7eb824
Updated: Wizard::BaseStep re-assign stepValidator in constructor ever…
Miexil Sep 9, 2025
3d1d131
Update smart select & logo components
aprentout Sep 9, 2025
159605a
Smart immersive select: Trigger search reset on click outside
aprentout Sep 9, 2025
fa5b077
Smart immersive logo: Replace campaign wording
aprentout Sep 9, 2025
e6d4832
Updated: fixed ts error
Miexil Sep 10, 2025
66775ce
Updated: Smart::TagInput with splattributes
Miexil Sep 10, 2025
8296baf
Smart pill: Enable rotating gradient animation only when pill is sele…
aprentout Sep 11, 2025
040d3a6
Updated: Focus and display each step in between when changing step
Miexil Sep 22, 2025
334771f
Fixed: allow focusing step when no focused step is configured
Miexil Sep 25, 2025
553e4a4
Updated: better handle first step focus for initialization
Miexil Sep 25, 2025
addc12c
Added: Wizard option to disable/enable scrollwheel
Miexil Sep 25, 2025
6678434
Updated: Option to prevent wizard scroll from html class
Miexil Sep 29, 2025
63c3ecd
Updated: wizard manager method to mark step as incomplete
Miexil Sep 29, 2025
767007b
Added: default gray background on logo
Miexil Sep 29, 2025
5bab335
Updated: SmartCurrencyInput floating dropdown
Miexil Sep 29, 2025
e7661ed
Smart immersive input: Handle suffix/prefix name block
aprentout Sep 30, 2025
053c017
Merge pull request #577 from upfluence/ap/dra-3557-v2
aprentout Oct 2, 2025
ed03e50
wip: added number input
OwenCoogan Oct 3, 2025
c3a0069
fix: fixed tests
OwenCoogan Oct 6, 2025
115cd39
fix: fixed css issue
OwenCoogan Oct 7, 2025
49c3281
fix: fixed styles
OwenCoogan Oct 7, 2025
2ae85ed
Merge pull request #579 from upfluence/oc/DRA-3559
OwenCoogan Oct 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 @@ -67,16 +67,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
4 changes: 2 additions & 2 deletions addon/components/o-s-s/number-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { action } from '@ember/object';
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';

interface OSSNumberInputArgs {
export interface OSSNumberInputArgs {
value?: number;
min?: number;
max?: number;
Expand All @@ -21,7 +21,7 @@ const DECREASE_VALUE_KEYS = ['ArrowDown', 'ArrowLeft'];
const BASE_INPUT_PIXEL_WIDTH = 40;
const CHAR_PIXEL_WIDTH = 7;

export default class OSSNumberInput extends Component<OSSNumberInputArgs> {
export default class OSSNumberInput<T extends OSSNumberInputArgs> extends Component<T> {
@tracked localValue: number = this.args.value || DEFAULT_VALUE;
@tracked reachedTooltip: string | null = null;
@tracked inputElement: HTMLElement | null = null;
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