@openproject/primer-view-components 0.0.0-20230808124600
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +21 -0
- package/README.md +21 -0
- package/app/assets/javascripts/app/components/primer/alpha/action_bar_element.d.ts +16 -0
- package/app/assets/javascripts/app/components/primer/alpha/action_menu/action_menu_element.d.ts +31 -0
- package/app/assets/javascripts/app/components/primer/alpha/dropdown/menu.d.ts +1 -0
- package/app/assets/javascripts/app/components/primer/alpha/dropdown.d.ts +1 -0
- package/app/assets/javascripts/app/components/primer/alpha/image_crop.d.ts +1 -0
- package/app/assets/javascripts/app/components/primer/alpha/modal_dialog.d.ts +18 -0
- package/app/assets/javascripts/app/components/primer/alpha/nav_list.d.ts +28 -0
- package/app/assets/javascripts/app/components/primer/alpha/segmented_control.d.ts +12 -0
- package/app/assets/javascripts/app/components/primer/alpha/tab_container.d.ts +1 -0
- package/app/assets/javascripts/app/components/primer/alpha/toggle_switch.d.ts +30 -0
- package/app/assets/javascripts/app/components/primer/alpha/tool_tip.d.ts +26 -0
- package/app/assets/javascripts/app/components/primer/alpha/x_banner.d.ts +13 -0
- package/app/assets/javascripts/app/components/primer/anchored_position.d.ts +27 -0
- package/app/assets/javascripts/app/components/primer/beta/auto_complete/auto_complete.d.ts +1 -0
- package/app/assets/javascripts/app/components/primer/beta/clipboard_copy.d.ts +1 -0
- package/app/assets/javascripts/app/components/primer/beta/relative_time.d.ts +1 -0
- package/app/assets/javascripts/app/components/primer/focus_group.d.ts +19 -0
- package/app/assets/javascripts/app/components/primer/primer.d.ts +21 -0
- package/app/assets/javascripts/lib/primer/forms/primer_multi_input.d.ts +10 -0
- package/app/assets/javascripts/lib/primer/forms/primer_text_field.d.ts +1 -0
- package/app/assets/javascripts/lib/primer/forms/toggle_switch_input.d.ts +5 -0
- package/app/assets/javascripts/primer_view_components.js +2 -0
- package/app/assets/javascripts/primer_view_components.js.map +1 -0
- package/app/assets/styles/primer_view_components.css +1 -0
- package/app/assets/styles/primer_view_components.css.map +1 -0
- package/app/components/primer/alpha/action_bar.css +1 -0
- package/app/components/primer/alpha/action_bar.css.json +17 -0
- package/app/components/primer/alpha/action_bar_element.d.ts +16 -0
- package/app/components/primer/alpha/action_bar_element.js +172 -0
- package/app/components/primer/alpha/action_list.css +1 -0
- package/app/components/primer/alpha/action_list.css.json +134 -0
- package/app/components/primer/alpha/action_menu/action_menu_element.d.ts +31 -0
- package/app/components/primer/alpha/action_menu/action_menu_element.js +241 -0
- package/app/components/primer/alpha/auto_complete.css +1 -0
- package/app/components/primer/alpha/auto_complete.css.json +23 -0
- package/app/components/primer/alpha/banner.css +1 -0
- package/app/components/primer/alpha/banner.css.json +24 -0
- package/app/components/primer/alpha/button_marketing.css +1 -0
- package/app/components/primer/alpha/button_marketing.css.json +33 -0
- package/app/components/primer/alpha/dialog.css +1 -0
- package/app/components/primer/alpha/dialog.css.json +80 -0
- package/app/components/primer/alpha/dropdown/menu.d.ts +1 -0
- package/app/components/primer/alpha/dropdown/menu.js +1 -0
- package/app/components/primer/alpha/dropdown.css +1 -0
- package/app/components/primer/alpha/dropdown.css.json +40 -0
- package/app/components/primer/alpha/dropdown.d.ts +1 -0
- package/app/components/primer/alpha/dropdown.js +1 -0
- package/app/components/primer/alpha/image_crop.d.ts +1 -0
- package/app/components/primer/alpha/image_crop.js +1 -0
- package/app/components/primer/alpha/layout.css +1 -0
- package/app/components/primer/alpha/layout.css.json +80 -0
- package/app/components/primer/alpha/menu.css +1 -0
- package/app/components/primer/alpha/menu.css.json +28 -0
- package/app/components/primer/alpha/modal_dialog.d.ts +18 -0
- package/app/components/primer/alpha/modal_dialog.js +189 -0
- package/app/components/primer/alpha/nav_list.d.ts +28 -0
- package/app/components/primer/alpha/nav_list.js +248 -0
- package/app/components/primer/alpha/overlay.css +1 -0
- package/app/components/primer/alpha/overlay.css.json +8 -0
- package/app/components/primer/alpha/segmented_control.css +1 -0
- package/app/components/primer/alpha/segmented_control.css.json +33 -0
- package/app/components/primer/alpha/segmented_control.d.ts +12 -0
- package/app/components/primer/alpha/segmented_control.js +47 -0
- package/app/components/primer/alpha/tab_container.d.ts +1 -0
- package/app/components/primer/alpha/tab_container.js +1 -0
- package/app/components/primer/alpha/tab_nav.css +1 -0
- package/app/components/primer/alpha/tab_nav.css.json +24 -0
- package/app/components/primer/alpha/text_field.css +1 -0
- package/app/components/primer/alpha/text_field.css.json +135 -0
- package/app/components/primer/alpha/toggle_switch.css +1 -0
- package/app/components/primer/alpha/toggle_switch.css.json +40 -0
- package/app/components/primer/alpha/toggle_switch.d.ts +30 -0
- package/app/components/primer/alpha/toggle_switch.js +165 -0
- package/app/components/primer/alpha/tool_tip.d.ts +26 -0
- package/app/components/primer/alpha/tool_tip.js +427 -0
- package/app/components/primer/alpha/underline_nav.css +1 -0
- package/app/components/primer/alpha/underline_nav.css.json +28 -0
- package/app/components/primer/alpha/x_banner.d.ts +13 -0
- package/app/components/primer/alpha/x_banner.js +49 -0
- package/app/components/primer/anchored_position.d.ts +27 -0
- package/app/components/primer/anchored_position.js +147 -0
- package/app/components/primer/beta/auto_complete/auto_complete.d.ts +1 -0
- package/app/components/primer/beta/auto_complete/auto_complete.js +1 -0
- package/app/components/primer/beta/avatar.css +1 -0
- package/app/components/primer/beta/avatar.css.json +17 -0
- package/app/components/primer/beta/avatar_stack.css +1 -0
- package/app/components/primer/beta/avatar_stack.css.json +28 -0
- package/app/components/primer/beta/blankslate.css +1 -0
- package/app/components/primer/beta/blankslate.css.json +22 -0
- package/app/components/primer/beta/border_box.css +1 -0
- package/app/components/primer/beta/border_box.css.json +54 -0
- package/app/components/primer/beta/breadcrumbs.css +1 -0
- package/app/components/primer/beta/breadcrumbs.css.json +11 -0
- package/app/components/primer/beta/button.css +1 -0
- package/app/components/primer/beta/button.css.json +75 -0
- package/app/components/primer/beta/button_group.css +1 -0
- package/app/components/primer/beta/button_group.css.json +14 -0
- package/app/components/primer/beta/clipboard_copy.d.ts +1 -0
- package/app/components/primer/beta/clipboard_copy.js +43 -0
- package/app/components/primer/beta/counter.css +1 -0
- package/app/components/primer/beta/counter.css.json +10 -0
- package/app/components/primer/beta/flash.css +1 -0
- package/app/components/primer/beta/flash.css.json +27 -0
- package/app/components/primer/beta/label.css +1 -0
- package/app/components/primer/beta/label.css.json +25 -0
- package/app/components/primer/beta/link.css +1 -0
- package/app/components/primer/beta/link.css.json +19 -0
- package/app/components/primer/beta/popover.css +1 -0
- package/app/components/primer/beta/popover.css.json +39 -0
- package/app/components/primer/beta/progress_bar.css +1 -0
- package/app/components/primer/beta/progress_bar.css.json +10 -0
- package/app/components/primer/beta/relative_time.d.ts +1 -0
- package/app/components/primer/beta/relative_time.js +1 -0
- package/app/components/primer/beta/state.css +1 -0
- package/app/components/primer/beta/state.css.json +13 -0
- package/app/components/primer/beta/subhead.css +1 -0
- package/app/components/primer/beta/subhead.css.json +12 -0
- package/app/components/primer/beta/timeline_item.css +1 -0
- package/app/components/primer/beta/timeline_item.css.json +16 -0
- package/app/components/primer/beta/truncate.css +1 -0
- package/app/components/primer/beta/truncate.css.json +12 -0
- package/app/components/primer/focus_group.d.ts +19 -0
- package/app/components/primer/focus_group.js +139 -0
- package/app/components/primer/primer.d.ts +21 -0
- package/app/components/primer/primer.js +21 -0
- package/app/components/primer/truncate.css +1 -0
- package/app/components/primer/truncate.css.json +13 -0
- package/lib/primer/forms/primer_multi_input.d.ts +10 -0
- package/lib/primer/forms/primer_multi_input.js +45 -0
- package/lib/primer/forms/primer_text_field.d.ts +1 -0
- package/lib/primer/forms/primer_text_field.js +73 -0
- package/lib/primer/forms/toggle_switch_input.d.ts +5 -0
- package/lib/primer/forms/toggle_switch_input.js +34 -0
- package/package.json +101 -0
- package/static/arguments.json +4501 -0
- package/static/audited_at.json +107 -0
- package/static/classes.json +606 -0
- package/static/constants.json +1335 -0
- package/static/info_arch.json +14465 -0
- package/static/previews.json +6408 -0
- package/static/statuses.json +107 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/* eslint-disable custom-elements/expose-class-on-global */
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
import { controller, target } from '@github/catalyst';
|
|
9
|
+
let ToggleSwitchInputElement = class ToggleSwitchInputElement extends HTMLElement {
|
|
10
|
+
connectedCallback() {
|
|
11
|
+
this.addEventListener('toggleSwitchError', (event) => {
|
|
12
|
+
this.validationMessageElement.textContent = event.detail;
|
|
13
|
+
this.validationElement.removeAttribute('hidden');
|
|
14
|
+
});
|
|
15
|
+
this.addEventListener('toggleSwitchSuccess', () => {
|
|
16
|
+
this.validationMessageElement.textContent = '';
|
|
17
|
+
this.validationElement.setAttribute('hidden', 'hidden');
|
|
18
|
+
});
|
|
19
|
+
this.addEventListener('toggleSwitchLoading', () => {
|
|
20
|
+
this.validationMessageElement.textContent = '';
|
|
21
|
+
this.validationElement.setAttribute('hidden', 'hidden');
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
__decorate([
|
|
26
|
+
target
|
|
27
|
+
], ToggleSwitchInputElement.prototype, "validationElement", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
target
|
|
30
|
+
], ToggleSwitchInputElement.prototype, "validationMessageElement", void 0);
|
|
31
|
+
ToggleSwitchInputElement = __decorate([
|
|
32
|
+
controller
|
|
33
|
+
], ToggleSwitchInputElement);
|
|
34
|
+
export { ToggleSwitchInputElement };
|
package/package.json
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@openproject/primer-view-components",
|
|
3
|
+
"version": "0.0.0-20230808124600",
|
|
4
|
+
"description": "ViewComponents of the Primer Design System for OpenProject",
|
|
5
|
+
"main": "app/assets/javascripts/primer_view_components.js",
|
|
6
|
+
"module": "app/components/primer/primer.js",
|
|
7
|
+
"types": "app/components/primer/primer.d.ts",
|
|
8
|
+
"repository": "primer/view_components",
|
|
9
|
+
"keywords": [
|
|
10
|
+
"rails",
|
|
11
|
+
"view_components",
|
|
12
|
+
"components",
|
|
13
|
+
"library",
|
|
14
|
+
"design-system"
|
|
15
|
+
],
|
|
16
|
+
"author": "GitHub, Inc.",
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"homepage": "https://github.com/opf/primer_view_components#readme",
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/opf/primer_view_components/issues"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"static/*.json",
|
|
24
|
+
"app/assets/**/*",
|
|
25
|
+
"app/components/primer/**/*.js",
|
|
26
|
+
"app/components/primer/**/*.css",
|
|
27
|
+
"app/components/primer/**/*.css.json",
|
|
28
|
+
"app/components/primer/**/*.d.ts",
|
|
29
|
+
"lib/primer/forms/**/*.js",
|
|
30
|
+
"lib/primer/forms/**/*.d.ts"
|
|
31
|
+
],
|
|
32
|
+
"scripts": {
|
|
33
|
+
"clean": "git clean -fdX -- app/",
|
|
34
|
+
"build:docs": "npm run --prefix ./docs/ build",
|
|
35
|
+
"build:docs:preview": "cd docs && npx gatsby build",
|
|
36
|
+
"prepare": "rm -rf docs/static && mkdir -p docs/static && script/build-assets && cp app/assets/**/primer_view_components.* docs/static/",
|
|
37
|
+
"lint": "npm run lint:stylelint && npm run lint:eslint",
|
|
38
|
+
"lint:stylelint": "stylelint 'app/components/**/*.pcss'",
|
|
39
|
+
"lint:stylelint:fix": "stylelint 'app/components/**/*.pcss' --fix",
|
|
40
|
+
"lint:eslint": "eslint 'app/components/**/*.ts'",
|
|
41
|
+
"lint:eslint:fix": "eslint 'app/components/**/*.ts' --fix",
|
|
42
|
+
"changeset:version": "changeset version && script/version",
|
|
43
|
+
"build:js": "script/build-assets js",
|
|
44
|
+
"build:css": "script/build-assets css"
|
|
45
|
+
},
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"@github/auto-check-element": "^5.2.0",
|
|
48
|
+
"@github/auto-complete-element": "^3.3.4",
|
|
49
|
+
"@github/catalyst": "^1.6.0",
|
|
50
|
+
"@github/clipboard-copy-element": "^1.1.2",
|
|
51
|
+
"@github/details-menu-element": "^1.0.12",
|
|
52
|
+
"@github/image-crop-element": "^5.0.0",
|
|
53
|
+
"@github/include-fragment-element": "^6.1.1",
|
|
54
|
+
"@github/relative-time-element": "^4.0.0",
|
|
55
|
+
"@github/tab-container-element": "^3.1.2",
|
|
56
|
+
"@oddbird/popover-polyfill": "^0.2.1",
|
|
57
|
+
"@primer/behaviors": "^1.3.4"
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"@changesets/changelog-github": "^0.4.6",
|
|
61
|
+
"@github/axe-github": "^0.5.0",
|
|
62
|
+
"@github/browserslist-config": "^1.0.0",
|
|
63
|
+
"@github/markdownlint-github": "^0.2.2",
|
|
64
|
+
"@github/prettier-config": "0.0.4",
|
|
65
|
+
"@playwright/test": "^1.35.1",
|
|
66
|
+
"@primer/css": "21.0.2",
|
|
67
|
+
"@primer/primitives": "7.11.14",
|
|
68
|
+
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
69
|
+
"@rollup/plugin-typescript": "^8.3.3",
|
|
70
|
+
"@typescript-eslint/eslint-plugin": "^5.31.0",
|
|
71
|
+
"@typescript-eslint/parser": "^5.31.0",
|
|
72
|
+
"axe-core": "^4.7.1",
|
|
73
|
+
"chokidar-cli": "^3.0.0",
|
|
74
|
+
"cssnano": "^5.1.13",
|
|
75
|
+
"eslint": "^8.23.1",
|
|
76
|
+
"eslint-plugin-custom-elements": "^0.0.6",
|
|
77
|
+
"eslint-plugin-github": "^4.4.0",
|
|
78
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
79
|
+
"markdownlint-cli2": "^0.5.1",
|
|
80
|
+
"mocha": "^10.0.0",
|
|
81
|
+
"playwright": "^1.35.1",
|
|
82
|
+
"postcss": "^8.4.16",
|
|
83
|
+
"postcss-cli": "^10.1.0",
|
|
84
|
+
"postcss-custom-properties-fallback": "^1.0.2",
|
|
85
|
+
"postcss-import": "^14.1.0",
|
|
86
|
+
"postcss-mixins": "^9.0.3",
|
|
87
|
+
"postcss-preset-env": "^7.8.0",
|
|
88
|
+
"prettier": "2.7.1",
|
|
89
|
+
"primer-changesets-cli": "2.2.0",
|
|
90
|
+
"rollup": "^2.77.1",
|
|
91
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
92
|
+
"stylelint": "^14.13.0",
|
|
93
|
+
"stylelint-config-prettier": "^9.0.3",
|
|
94
|
+
"stylelint-config-standard": "^28.0.0",
|
|
95
|
+
"@primer/stylelint-config": "^12.7.2",
|
|
96
|
+
"tslib": "^2.4.0",
|
|
97
|
+
"typescript": "^4.7.4"
|
|
98
|
+
},
|
|
99
|
+
"prettier": "@github/prettier-config",
|
|
100
|
+
"browserslist": "extends @github/browserslist-config"
|
|
101
|
+
}
|