Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Pircher <[email protected]>
  • Loading branch information
patricklx committed Mar 14, 2024
1 parent 96e6a25 commit edc200a
Show file tree
Hide file tree
Showing 65 changed files with 1,520 additions and 1,536 deletions.
2 changes: 1 addition & 1 deletion carbon-components-ember/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import DialogManager from './addon/services/dialog-manager';
import Notifications from './addon/services/notifications';
import Ember from 'ember';
import 'ember-source/types/stable';

declare module '@ember/service' {
export interface Registry {
Expand Down
32 changes: 9 additions & 23 deletions carbon-components-ember/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
},
"dependencies": {
"@ascua/arrays": "^0.0.237",
"@babel/core": "^7.24.0",
"@babel/plugin-syntax-decorators": "^7.22.5",
"@carbon/charts": "^1.11.2",
"@carbon/colors": "^11.16.0",
Expand Down Expand Up @@ -89,9 +90,13 @@
"ember-template-lint-plugin-prettier": "^4.2.0",
"ember-tooltips": "^3.6.0",
"ember-truth-helpers": "^3.1.1",
"extra-fs": "^3.2.17",
"fast-glob": "^3.3.2",
"globals": "^13.20.0",
"jsonfile": "^6.1.0",
"prettier-linter-helpers": "^1.0.0",
"rollup-plugin-astroturf": "^0.1.0",
"rollup-plugin-postcss": "^4.0.2",
"spark-md5": "^3.0.1",
"synckit": "^0.8.5",
"ts-node": "^10.9.1",
Expand All @@ -117,32 +122,13 @@
"@release-it-plugins/lerna-changelog": "^5.0.0",
"@rollup/plugin-babel": "^6.0.3",
"@tsconfig/ember": "^2.0.0",
"@types/ember": "^4.0.4",
"@types/ember-qunit": "^6.1.1",
"@types/ember__application": "^4.0.6",
"@types/ember__array": "^4.0.4",
"@types/ember__component": "^4.0.14",
"@types/ember__controller": "^4.0.5",
"@types/ember__debug": "^4.0.4",
"@types/ember__engine": "^4.0.5",
"@types/ember__error": "^4.0.3",
"@types/ember__helper": "^4.0.3",
"@types/ember__modifier": "^4.0.6",
"@types/ember__object": "^4.0.6",
"@types/ember__owner": "^4.0.4",
"@types/ember__polyfills": "^4.0.2",
"@types/ember__routing": "^4.0.13",
"@types/ember__runloop": "^4.0.3",
"@types/ember__service": "^4.0.3",
"@types/ember__string": "^3.16.3",
"@types/ember__template": "^4.0.2",
"@types/ember__test": "^4.0.2",
"@types/ember__utils": "^4.0.3",
"@types/jquery": "^3.5.16",
"@types/qunit": "^2.19.5",
"@types/qunit-dom": "^0.7.0",
"@typescript-eslint/eslint-plugin": "^6.7.2",
"@typescript-eslint/parser": "^6.7.2",
"astroturf": "^1.2.0",
"babel-plugin-ember-template-compilation": "^2.2.0",
"bower": "^1.8.8",
"broccoli": "^3.4.2",
Expand All @@ -169,7 +155,7 @@
"ember-qunit": "^7.0.0",
"ember-resize-modifier": "^0.6.0",
"ember-resolver": "^10.0.0",
"ember-source": "^5.2.0",
"ember-source": "^5.7.0",
"ember-source-channel-url": "latest",
"ember-template-lint": "^5.11.2",
"ember-try": "^2.0.0",
Expand Down Expand Up @@ -281,8 +267,8 @@
"./services/notifications.js": "./dist/_app_/services/notifications.js"
}
},
"import": {
"#/*": "./src/*"
"imports": {
"#/*": "./src/*"
},
"exports": {
".": {
Expand Down
9 changes: 7 additions & 2 deletions carbon-components-ember/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { babel } from '@rollup/plugin-babel';
import copy from 'rollup-plugin-copy';
import { Addon } from '@embroider/addon-dev/rollup';
import resolve from '@rollup/plugin-node-resolve';
import astroturf from 'rollup-plugin-astroturf';
import postcss from 'rollup-plugin-postcss';

const addon = new Addon({
srcDir: 'src',
Expand Down Expand Up @@ -62,8 +64,11 @@ export default {
// Remove leftover build artifacts when starting a new build.
addon.clean(),

resolve({
extensions: ['.js', '.gjs', '.ts', '.gts']
astroturf({/* options */}),
postcss({
include: ['node_modules'],
extract: 'bundle.css',
modules: true
}),

// Copy Readme and License into published package
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { guidFor } from '@ember/object/internals';
import { WithBoundArgs } from '@glint/template';
import { tracked } from '@glimmer/tracking';
import { action } from '@ember/object';
import or from '#/helpers/or';
import or from '#/helpers/or.ts';

interface AccordionSignature {
Args: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import Component from '@glimmer/component';
import { defaultArgs } from '#/decorators/index.ts';
import { defaultArgs } from '#∼/utils/decorators.ts';
import { action } from '@ember/object';
import eq from 'ember-truth-helpers/helpers/eq';
import { fn } from '@ember/helper';
import { on } from '@ember/modifier';
import { fn } from '@ember/helper';
/** @documenter yuidoc */

type Args = {
Expand All @@ -29,7 +29,7 @@ export interface BreadcrumbSignature {
The Carbon Breadcrumb
```handlebars
{{import Breadcrumbs from '#/components/breadcrumbs'}}
{{import Breadcrumbs from '#/components/breadcrumbs.ts'}}
<Button @onClick={{fn this.onclick}} @danger={{false}} > Button Text </Button>
```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
import Component from '@glimmer/component';
import {
bxClassNames,
classPrefix,
defaultArgs,
} from '#/decorators';
import DialogManagerService from '#/services/dialog-manager';
import { bxClassNames, classPrefix, defaultArgs } from '#∼/utils/decorators.ts';
import DialogManagerService from '#∼/services/dialog-manager.js';
import { inject as service } from '@ember/service';
import { action } from '@ember/object';
import { tracked } from '@glimmer/tracking';
import ConfirmDialogComponent from '#/components/dialogs/confirm';
import or from '#/helpers/or';
import Confirm from '#/components/dialogs/confirm';
import styles from './styles.module.scss';
import Loading from '#/components/loading';
import { guidFor } from '@ember/object/internals';
import Ember from 'ember';
import Object = Ember.Object;
import ConfirmDialogComponent from '#∼/components/dialogs/confirm.gts';
import or from '#∼/helpers/or.ts';
import Confirm from '#∼/components/dialogs/confirm.gts';
import Loading from '#∼/components/loading.gts';
import { stylesheet } from 'astroturf';

/** @documenter yuidoc */

Expand Down Expand Up @@ -102,7 +95,7 @@ export interface ButtonSignature {
The Carbon Button
```handlebars
{{import Button from '#/components/button'}}
{{import Button from '#/components/button.ts'}}
<Button @onClick={{fn this.onclick}} @danger={{false}} > Button Text </Button>
```
Expand Down Expand Up @@ -130,21 +123,23 @@ class CarbonButton extends Component<ButtonSignature> {
ghost: false,
};

get className() {
return guidFor(Object.getPrototypeOf(this)) + 'carbon-button';
styles = stylesheet`
.namespace {
.cds--loading {
width: 2rem;
height: 2rem;
display: inline-block;
}
}
` as { namespace: string };

<template>
<style>
@scope { .{{this.className}}
.cds--loading { width: 2rem; height: 2rem; display: inline-block; } } }
</style>
<button
onclick={{this.onButtonClick}}
class='cds--btn
{{this.bxClassNames}}
{{this.layout}}
{{this.className}}
{{this.styles.namespace}}
{{if (or this.loading @loading) "cds--btn--ghost"}}'
aria-label='{{if @type "danger"}}'
disabled={{or @disabled this.loading @loading}}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { default as onUpdate } from '../../-helpers/on-update';
import { default as toBool } from '../../-helpers/to-bool';
import { default as newObj } from '#/helpers/new-obj';
import { default as onUpdate } from '../-helpers/on-update.ts';
import { default as toBool } from '../-helpers/to-bool.ts';
import { default as newObj } from '#/helpers/new-obj.ts';
import Component from '@glimmer/component';
import CarbonChart from '../../../charts/-components/chart';
import CarbonChart from '../../charts/-components/chart.gts';
import { ScaleTypes } from '@carbon/charts';

type Args = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { default as TabularData } from '#/components/charts/-components/tabular-data';
import { default as Axis } from '#/components/charts/-components/axis';
import { default as ColorPairing } from '#/components/charts/-components/color/pairing';
import { default as ColorScale } from '#/components/charts/-components/color/scale';
import { default as TabularData } from '#/components/charts/-components/tabular-data.gts'
import { default as Axis } from '#/components/charts/-components/axis.gts'
import { default as ColorPairing } from '#/components/charts/-components/color/pairing.gts'
import { default as ColorScale } from '#/components/charts/-components/color/scale.gts'
import { default as didInsert } from '@ember/render-modifiers/modifiers/did-insert';
import { default as didUpdate } from '@ember/render-modifiers/modifiers/did-update';
import { default as willDestroy } from '@ember/render-modifiers/modifiers/will-destroy';
import Component from '@glimmer/component';
import { action } from '@ember/object';
import { throttle } from '@ember/runloop';
import { defaultArgs } from '#/decorators';
import { defaultArgs } from '#∼/utils/decorators.ts';
import { Chart } from '@carbon/charts';
import { AxisChartOptions, BaseChartOptions } from '@carbon/charts';
import CarbonChartTabularData from '#/components/charts/-components/tabular-data';
import CarbonChartTabularData from '#/components/charts/-components/tabular-data.gts'
import { WithBoundArgs } from '@glint/template';
import ChartAxis from '#/components/charts/-components/axis';
import ChartAxis from '#/components/charts/-components/axis.gts'


/** @documenter yuidoc */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { default as onUpdate } from '#/components/charts/-helpers/on-update';
import { default as onUpdate } from '#/components/charts/-helpers/on-update.ts'
import Component from '@glimmer/component';
import { defaultArgs } from '#/decorators/index';
import CarbonChart from '#/components/charts/-components/chart';
import { defaultArgs } from '#∼/utils/decorators.ts';
import CarbonChart from '#/components/charts/-components/chart.gts'

type Args = {
numberOfVariants?: number;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { default as onUpdate } from '#/components/charts/-helpers/on-update';
import { default as onUpdate } from '#/components/charts/-helpers/on-update.ts'
import Component from '@glimmer/component';
import { defaultArgs } from '#/decorators';
import CarbonChart from '#/components/charts/-components/chart';
import { defaultArgs } from '#∼/utils/decorators.ts';
import CarbonChart from '#/components/charts/-components/chart.gts'

type Args = {
name: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { default as onUpdate } from '#/components/charts/-helpers/on-update';
import { default as onUpdate } from '#/components/charts/-helpers/on-update.ts';
import Component from '@glimmer/component';
import { action } from '@ember/object';
import { defaultArgs } from '#/decorators';
import { defaultArgs } from '#∼/utils/decorators.ts';
import CarbonChart, {
ChartData,
} from '#/components/charts/-components/chart';
} from '#/components/charts/-components/chart.gts'

type Args = {
backgroundColors?: string[];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { default as Chart } from '../-components/chart';
import { default as set } from '#/helpers/set';
import { default as Chart } from './-components/chart.gts';
import { SimpleBarChart } from '@carbon/charts';
import Component from '@glimmer/component';
import { defaultArgs } from '#/decorators/index';
import { CarbonChartSignature } from '#/components/charts/-components/chart/index';
import { defaultArgs } from '#∼/utils/decorators.ts';
import { CarbonChartSignature } from './-components/chart.gts';

/** @documenter yuidoc */

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { default as Chart } from '../-components/chart';
import { default as set } from '#/helpers/set';
import { default as set } from '#/helpers/set.ts';
import { LineChart } from '@carbon/charts';
import Component from '@glimmer/component';
import { CarbonChartSignature } from '#/components/charts/-components/chart/index';
import { CarbonChartSignature } from '#/components/charts/-components/chart/index.gts'

type Args = {
resizable?: boolean;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { default as Chart } from '../-components/chart';
import { default as set } from '#/helpers/set';
import { default as Chart } from './-components/chart.gts';
import { default as set } from '#/helpers/set.ts';
import { PieChart } from '@carbon/charts';
import Component from '@glimmer/component';
import { defaultArgs } from '#/decorators';
import { CarbonChartSignature } from '#/components/charts/-components/chart/index';
import { defaultArgs } from '#∼/utils/decorators.ts';
import { CarbonChartSignature } from '#/components/charts/-components/chart.gts';

type Args = {
resizable?: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import { action } from '@ember/object';
import { guidFor } from '@ember/object/internals';
import { defaultArgs } from '#/decorators';
import { defaultArgs } from '#∼/utils/decorators.ts';
import didInsert from '@ember/render-modifiers/modifiers/did-insert';
import { on } from '@ember/modifier';
import { fn } from '@ember/helper';
import set from '#/helpers/set';
import set from '#/helpers/set.ts';

type Args = {
name?: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import { defaultArgs } from '#/decorators';
import CopyButton from '#/components/copy-button';
import { defaultArgs } from '#∼/utils/decorators.ts';
import CopyButton from '#/components/copy-button.gts'
import { concat, fn } from '@ember/helper';
import didInsert from '@ember/render-modifiers/modifiers/did-insert';
import eq from 'ember-truth-helpers/helpers/eq';
import { on } from '@ember/modifier';
import set from '#/helpers/set';
import set from '#/helpers/set.ts';
import not from 'ember-truth-helpers/helpers/not';
import htmlSafe from '#/helpers/html-safe';
import htmlSafe from '#/helpers/html-safe.ts';
import { TemplateOnlyComponent } from '@ember/component/template-only';

type Args = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { action } from '@ember/object';
import { tracked } from '@glimmer/tracking';
import didInsert from '@ember/render-modifiers/modifiers/did-insert';
import EmberTooltip from 'ember-tooltips/components/ember-tooltip';
import Button from '#/components/button';
import or from '#/helpers/or';
import Button from '#/components/button.gts'
import or from '#/helpers/or.ts';

type Args = {
targetElementId?: string;
Expand Down
Loading

0 comments on commit edc200a

Please sign in to comment.