Skip to content

Commit

Permalink
Merge pull request #272 from josemarluedke/feat/move-forms-pkg-to-legacy
Browse files Browse the repository at this point in the history
breaking: move older components from forms to forms-legacy
  • Loading branch information
josemarluedke authored Feb 24, 2024
2 parents de133b6 + d1a73ce commit b064dba
Show file tree
Hide file tree
Showing 82 changed files with 4,442 additions and 10,442 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"test-app"
],
"scripts": {
"build": "pnpm --filter @frontile/theme build && pnpm --filter @frontile/utilities build && pnpm --filter @frontile/buttons build && pnpm --filter @frontile/status build && pnpm --filter @frontile/overlays build && pnpm --filter @frontile/collections build && pnpm --filter @frontile/notifications build && pnpm --filter @frontile/forms build && pnpm --filter @frontile/changeset-form build && pnpm --filter frontile build",
"build": "pnpm --filter @frontile/theme build && pnpm --filter @frontile/utilities build && pnpm --filter @frontile/buttons build && pnpm --filter @frontile/status build && pnpm --filter @frontile/overlays build && pnpm --filter @frontile/collections build && pnpm --filter @frontile/notifications build && pnpm --filter @frontile/forms build && pnpm --filter @frontile/forms-legacy build && pnpm --filter @frontile/changeset-form build && pnpm --filter frontile build",
"lint:hbs": "ember-template-lint .",
"lint:js": "eslint . --ext .js,.ts,.gts,.gjs",
"start": "pnpm --filter test-app start",
Expand Down
4 changes: 2 additions & 2 deletions packages/changeset-form/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @frontile/changeset-form

Integration between @frontile/forms package and [Changeset](https://github.com/poteto/ember-changeset).
Integration between @frontile/forms-legacy package and [Changeset](https://github.com/poteto/ember-changeset).

## Compatibility

Expand All @@ -23,7 +23,7 @@ module.exports = {
theme: {
// ...
},
plugins: [require('@frontile/forms/tailwind')]
plugins: [require('@frontile/forms-legacy/tailwind')]
};
```

Expand Down
2 changes: 1 addition & 1 deletion packages/changeset-form/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
},
"dependencies": {
"@embroider/addon-shim": "^1.8.7",
"@frontile/forms": "workspace:0.17.0-alpha.11",
"@frontile/forms-legacy": "workspace:0.17.0-alpha.11",
"@glint/template": "1.3.0",
"ember-changeset": "^4.1.2",
"ember-changeset-validations": "^4.1.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { action } from '@ember/object';
import ChangesetFormFieldsCheckbox from './checkbox';
import FormCheckboxGroup, {
type FormCheckboxGroupArgs
} from '@frontile/forms/components/form-checkbox-group';
} from '@frontile/forms-legacy/components/form-checkbox-group';
import type { BaseArgs, BaseSignature } from './base';
import type { BufferedChangeset } from 'ember-changeset/types';
import type { WithBoundArgs } from '@glint/template';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Base, { type BaseArgs, type BaseSignature } from './base';
import { action } from '@ember/object';
import FormCheckbox, {
type FormCheckboxArgs
} from '@frontile/forms/components/form-checkbox';
} from '@frontile/forms-legacy/components/form-checkbox';

export interface ChangesetFormFieldsCheckboxArgs
extends BaseArgs,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { action } from '@ember/object';
import { on } from '@ember/modifier';
import FormInput, {
type FormInputArgs
} from '@frontile/forms/components/form-input';
} from '@frontile/forms-legacy/components/form-input';

export interface ChangesetFormFieldsInputArgs extends BaseArgs, FormInputArgs {
onInput?: (value: string, event: InputEvent) => void;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import Base, { type BaseArgs, type BaseSignature } from './base';
import { action } from '@ember/object';
import type { FormRadioSignature } from '@frontile/forms/components/form-radio';
import type { FormRadioSignature } from '@frontile/forms-legacy/components/form-radio';
import FormRadioGroup, {
type FormRadioGroupArgs
} from '@frontile/forms/components/form-radio-group';
} from '@frontile/forms-legacy/components/form-radio-group';
import type { ComponentLike } from '@glint/template';

export interface ChangesetFormFieldsRadioGroupArgs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { action } from '@ember/object';
import { on } from '@ember/modifier';
import FormRadio, {
type FormRadioArgs
} from '@frontile/forms/components/form-radio';
} from '@frontile/forms-legacy/components/form-radio';

export interface ChangesetFormFieldsRadioArgs extends BaseArgs, FormRadioArgs {
onChange: (value: unknown, event: Event) => void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Base, { type BaseArgs, type BaseSignature } from './base';
import { action } from '@ember/object';
import FormSelect, {
type FormSelectArgs
} from '@frontile/forms/components/form-select';
} from '@frontile/forms-legacy/components/form-select';

export interface ChangesetFormFieldsSelectArgs
extends BaseArgs,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Base, { type BaseArgs, type BaseSignature } from './base';
import { action } from '@ember/object';
import { on } from '@ember/modifier';
import FormTextarea from '@frontile/forms/components/form-textarea';
import { type FormInputArgs } from '@frontile/forms/components/form-input';
import FormTextarea from '@frontile/forms-legacy/components/form-textarea';
import { type FormInputArgs } from '@frontile/forms-legacy/components/form-input';

export interface ChangesetFormFieldsTextareaArgs
extends BaseArgs,
Expand Down
39 changes: 39 additions & 0 deletions packages/forms-legacy/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# compiled output
/dist/
/tmp/

# dependencies
/bower_components/

# misc
/.bowerrc
/.editorconfig
/.ember-cli
/.env*
/.eslintignore
/.eslintrc.js
/.git/
/.github/
/.gitignore
/.git
/.github
/.template-lintrc.js
/.travis.yml
/.watchmanconfig
/bower.json
/config/ember-try.js
/CONTRIBUTING.md
/ember-cli-build.js
/testem.js
/tests/
/yarn.lock
/yarn-error.log
.gitkeep

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
9 changes: 9 additions & 0 deletions packages/forms-legacy/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
The MIT License (MIT)

Copyright (c) 2020

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
37 changes: 37 additions & 0 deletions packages/forms-legacy/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# @frontile/forms

Component Library for Ember Octane apps: Forms

## Compatibility

- Ember.js v3.16 or above
- Ember CLI v2.13 or above
- Node.js v10 or above

## Installation

```sh
ember install @frontile/forms
```

### Styles

```js
// tailwind.config.js

module.exports = {
theme: {
// ...
},
plugins: [require('@frontile/forms/tailwind')]
};
```

## Documentation

Visit [frontile.dev](https://frontile.dev/) to read the docs
and see live demos.

## License

This project is licensed under the [MIT License](LICENSE.md).
4 changes: 4 additions & 0 deletions packages/forms-legacy/addon-main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
'use strict';

const { addonV1Shim } = require('@embroider/addon-shim');
module.exports = addonV1Shim(__dirname);
25 changes: 25 additions & 0 deletions packages/forms-legacy/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module.exports = {
presets: [
[
'@babel/preset-typescript',
{
onlyRemoveTypeImports: true,
ignoreExtensions: true,
allExtensions: true
}
]
],
plugins: [
'@embroider/addon-dev/template-colocation-plugin',
[
'babel-plugin-ember-template-compilation',
{
targetFormat: 'hbs',
compilerPath: 'ember-source/dist/ember-template-compiler'
}
],
['@babel/plugin-proposal-decorators', { legacy: true }],
'@babel/plugin-proposal-class-properties',
'@babel/plugin-transform-class-static-block'
]
};
120 changes: 120 additions & 0 deletions packages/forms-legacy/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
{
"name": "@frontile/forms-legacy",
"version": "0.17.0-alpha.11",
"description": "Component Library for Ember Octane apps: Forms",
"keywords": [
"ember-addon",
"frontile"
],
"repository": "https://github.com/josemarluedke/frontile",
"license": "MIT",
"author": "",
"directories": {
"doc": "doc",
"test": "tests"
},
"files": [
"addon-main.js",
"declarations",
"dist"
],
"scripts": {
"build": "concurrently -m 1 'npm:build:*'",
"build:js": "rollup --config",
"build:types": "glint --declaration",
"lint": "concurrently 'npm:lint:*(!fix)' --names 'lint:'",
"lint:fix": "concurrently 'npm:lint:*:fix' --names 'fix:'",
"lint:hbs": "ember-template-lint . --no-error-on-unmatched-pattern",
"lint:js": "eslint . --cache",
"lint:hbs:fix": "ember-template-lint . --fix --no-error-on-unmatched-pattern",
"lint:js:fix": "eslint . --fix",
"lint:types": "glint",
"start": "concurrently 'npm:start:*'",
"start:js": "rollup --config --watch --no-watch.clearScreen",
"start:types": "glint -d --watch",
"test": "echo 'A v2 addon does not have tests, run tests in test-app'",
"prepack": "concurrently 'npm:build'"
},
"peerDependencies": {
"@babel/runtime": ">= 7",
"ember-source": "^4.0.0 || ^5.0.0"
},
"dependencies": {
"@embroider/addon-shim": "^1.8.7",
"@frontile/theme": "workspace:0.17.0-alpha.11",
"@glint/template": "1.3.0",
"ember-basic-dropdown": "^7.3.0",
"ember-power-select": "^7.2.0"
},
"devDependencies": {
"@babel/core": "7.23.9",
"@babel/plugin-proposal-class-properties": "7.18.6",
"@babel/plugin-proposal-decorators": "7.23.9",
"@babel/plugin-transform-class-static-block": "^7.23.4",
"@babel/preset-typescript": "7.23.3",
"@embroider/addon-dev": "4.2.1",
"@glimmer/component": "^1.1.2",
"@glimmer/tracking": "^1.1.2",
"@glint/core": "1.3.0",
"@glint/environment-ember-loose": "1.3.0",
"@glint/environment-ember-template-imports": "1.3.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"@tsconfig/ember": "^3.0.3",
"babel-plugin-ember-template-compilation": "^2.2.1",
"concurrently": "^8.2.2",
"ember-source": "^5.6.0",
"rollup": "^4.11.0",
"rollup-plugin-ts": "^3.4.5",
"tailwindcss": "^3.4.1",
"typescript": "^5.3.3"
},
"engines": {
"node": ">= 10.*"
},
"publishConfig": {
"access": "public"
},
"ember": {
"edition": "octane"
},
"ember-addon": {
"version": 2,
"type": "addon",
"main": "addon-main.js",
"app-js": {
"./components/form-checkbox-group.js": "./dist/_app_/components/form-checkbox-group.js",
"./components/form-checkbox.js": "./dist/_app_/components/form-checkbox.js",
"./components/form-field.js": "./dist/_app_/components/form-field.js",
"./components/form-field/checkbox.js": "./dist/_app_/components/form-field/checkbox.js",
"./components/form-field/feedback.js": "./dist/_app_/components/form-field/feedback.js",
"./components/form-field/hint.js": "./dist/_app_/components/form-field/hint.js",
"./components/form-field/input.js": "./dist/_app_/components/form-field/input.js",
"./components/form-field/label.js": "./dist/_app_/components/form-field/label.js",
"./components/form-field/radio.js": "./dist/_app_/components/form-field/radio.js",
"./components/form-field/textarea.js": "./dist/_app_/components/form-field/textarea.js",
"./components/form-input.js": "./dist/_app_/components/form-input.js",
"./components/form-radio-group.js": "./dist/_app_/components/form-radio-group.js",
"./components/form-radio.js": "./dist/_app_/components/form-radio.js",
"./components/form-select.js": "./dist/_app_/components/form-select.js",
"./components/form-textarea.js": "./dist/_app_/components/form-textarea.js"
}
},
"exports": {
".": {
"types": "./declarations/index.d.ts",
"default": "./dist/index.js"
},
"./*": {
"types": "./declarations/*.d.ts",
"default": "./dist/*.js"
},
"./addon-main.js": "./addon-main.js"
},
"typesVersions": {
"*": {
"*": [
"declarations/*"
]
}
}
}
Loading

0 comments on commit b064dba

Please sign in to comment.