-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2836b9b
commit a145b75
Showing
47 changed files
with
436 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { application } from "controllers/application"; | ||
|
||
// Import all controller files | ||
// import ComboboxController from "./combobox/combobox_controller"; | ||
|
||
// Register all controllers | ||
// application.register("rbui--combobox", ComboboxController); | ||
|
||
import RBUI from "rbui-js"; | ||
RBUI.initialize(application); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails | ||
import "@hotwired/turbo-rails" | ||
import "controllers" | ||
|
||
import "rbui"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# frozen_string_literal: true | ||
|
||
class ApplicationView < ApplicationComponent | ||
include RBUI | ||
# The ApplicationView is an abstract class for all your views. | ||
|
||
# By default, it inherits from `ApplicationComponent`, but you | ||
# can change that to `Phlex::HTML` if you want to keep views and | ||
# components independent. | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# frozen_string_literal: true | ||
|
||
class ApplicationComponent < Phlex::HTML | ||
include Phlex::Rails::Helpers::Routes | ||
|
||
if Rails.env.development? | ||
def before_template | ||
comment { "Before #{self.class.name}" } | ||
super | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,3 +29,6 @@ | |
</main> | ||
</body> | ||
</html> | ||
<script> | ||
window.process = { env: { NODE_ENV: 'production'} } | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# frozen_string_literal: true | ||
|
||
class ApplicationLayout < ApplicationView | ||
include Phlex::Rails::Layout | ||
|
||
def template(&block) | ||
doctype | ||
|
||
html do | ||
head do | ||
title { "You're awesome" } | ||
meta name: "viewport", content: "width=device-width,initial-scale=1" | ||
csp_meta_tag | ||
csrf_meta_tags | ||
stylesheet_link_tag "application", data_turbo_track: "reload" | ||
javascript_importmap_tags | ||
end | ||
|
||
body do | ||
main(&block) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,40 @@ | |
|
||
pin "application" | ||
pin "@hotwired/turbo-rails", to: "turbo.min.js" | ||
pin "@hotwired/stimulus", to: "stimulus.min.js" | ||
pin "@hotwired/stimulus", to: "@hotwired--stimulus.js" # @3.2.2 | ||
pin "@hotwired/stimulus-loading", to: "stimulus-loading.js" | ||
pin_all_from "app/javascript/controllers", under: "controllers" | ||
pin "tailwindcss/plugin", to: "tailwindcss--plugin.js" # @3.4.13 | ||
pin "tailwindcss-animate", to: "tailwindcss-animate.js", preload: true | ||
pin_all_from "app/components/rbui", under: "rbui" | ||
pin "rbui-js" # @1.0.0 | ||
pin "@babel/runtime/helpers/esm/assertThisInitialized", to: "@babel--runtime--helpers--esm--assertThisInitialized.js" # @7.25.6 | ||
pin "@babel/runtime/helpers/esm/classCallCheck", to: "@babel--runtime--helpers--esm--classCallCheck.js" # @7.25.6 | ||
pin "@babel/runtime/helpers/esm/createClass", to: "@babel--runtime--helpers--esm--createClass.js" # @7.25.6 | ||
pin "@babel/runtime/helpers/esm/createForOfIteratorHelper", to: "@babel--runtime--helpers--esm--createForOfIteratorHelper.js" # @7.25.6 | ||
pin "@babel/runtime/helpers/esm/createSuper", to: "@babel--runtime--helpers--esm--createSuper.js" # @7.25.6 | ||
pin "@babel/runtime/helpers/esm/defineProperty", to: "@babel--runtime--helpers--esm--defineProperty.js" # @7.25.6 | ||
pin "@babel/runtime/helpers/esm/inherits", to: "@babel--runtime--helpers--esm--inherits.js" # @7.25.6 | ||
pin "@babel/runtime/helpers/esm/typeof", to: "@babel--runtime--helpers--esm--typeof.js" # @7.25.6 | ||
pin "@floating-ui/core", to: "@floating-ui--core.js" # @1.6.8 | ||
pin "@floating-ui/dom", to: "@floating-ui--dom.js" # @1.6.11 | ||
pin "@floating-ui/utils", to: "@floating-ui--utils.js" # @0.2.8 | ||
pin "@floating-ui/utils/dom", to: "@floating-ui--utils--dom.js" # @0.2.8 | ||
pin "@kurkle/color", to: "@kurkle--color.js" # @0.3.2 | ||
pin "@motionone/animation", to: "@motionone--animation.js" # @10.18.0 | ||
pin "@motionone/dom", to: "@motionone--dom.js" # @10.18.0 | ||
pin "@motionone/easing", to: "@motionone--easing.js" # @10.18.0 | ||
pin "@motionone/generators", to: "@motionone--generators.js" # @10.18.0 | ||
pin "@motionone/types", to: "@motionone--types.js" # @10.17.1 | ||
pin "@motionone/utils", to: "@motionone--utils.js" # @10.18.0 | ||
pin "@popperjs/core", to: "@popperjs--core.js" # @2.11.8 | ||
pin "chart.js/auto", to: "chart.js--auto.js" # @4.4.4 | ||
pin "date-fns", to: "https://ga.jspm.io/npm:[email protected]/index.mjs" | ||
pin "fuse.js" # @7.0.0 | ||
pin "hey-listen" # @1.0.8 | ||
pin "motion" # @10.18.0 | ||
pin "mustache" # @4.2.0 | ||
pin "tippy.js" # @6.3.7 | ||
pin "tslib" # @2.7.0 | ||
pin "@popperjs/core/+esm", to: "@popperjs--core--+esm.js" # @2.11.8 | ||
pin "@popperjs/core", to: "stupid-popper-lib-2024.js" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#RBUI.setup do |config| | ||
|
||
# Setting a namespace allows you to access RBUI components through this namespace. | ||
# For example, with namespace set to "UI", you can use: | ||
# UI::Button.new instead of RBUI::Button.new | ||
# UI::Card.new instead of RBUI::Card.new | ||
# This can help avoid naming conflicts and allows for cleaner, more concise code. | ||
# If you prefer to use RBUI components directly, you can leave this unset. | ||
# config.namespace = "UI" | ||
#end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,88 @@ | ||
// For importing tailwind styles from rbui gem | ||
const execSync = require('child_process').execSync; | ||
|
||
// Import rbui gem path | ||
const outputRBUI = execSync('bundle show rbui', { encoding: 'utf-8' }); | ||
const rbui_path = outputRBUI.trim() + '/**/*.rb'; | ||
|
||
const defaultTheme = require('tailwindcss/defaultTheme') | ||
|
||
module.exports = { | ||
darkMode: ["class"], | ||
content: [ | ||
'./public/*.html', | ||
'./app/views/**/*.{erb,haml,html,slim,rb}', | ||
'./app/components/rbui/**/*.rb', | ||
'./app/helpers/**/*.rb', | ||
'./app/assets/stylesheets/**/*.css', | ||
'./app/javascript/**/*.js', | ||
'./app/views/**/*.{erb,haml,html,slim}' | ||
rbui_path | ||
], | ||
theme: { | ||
container: { | ||
center: true, | ||
padding: "2rem", | ||
screens: { | ||
"2xl": "1400px", | ||
}, | ||
}, | ||
extend: { | ||
colors: { | ||
border: "hsl(var(--border))", | ||
input: "hsl(var(--input))", | ||
ring: "hsl(var(--ring))", | ||
background: "hsl(var(--background))", | ||
foreground: "hsl(var(--foreground))", | ||
primary: { | ||
DEFAULT: "hsl(var(--primary))", | ||
foreground: "hsl(var(--primary-foreground))", | ||
}, | ||
secondary: { | ||
DEFAULT: "hsl(var(--secondary))", | ||
foreground: "hsl(var(--secondary-foreground))", | ||
}, | ||
destructive: { | ||
DEFAULT: "hsl(var(--destructive))", | ||
foreground: "hsl(var(--destructive-foreground))", | ||
}, | ||
muted: { | ||
DEFAULT: "hsl(var(--muted))", | ||
foreground: "hsl(var(--muted-foreground))", | ||
}, | ||
accent: { | ||
DEFAULT: "hsl(var(--accent))", | ||
foreground: "hsl(var(--accent-foreground))", | ||
}, | ||
popover: { | ||
DEFAULT: "hsl(var(--popover))", | ||
foreground: "hsl(var(--popover-foreground))", | ||
}, | ||
card: { | ||
DEFAULT: "hsl(var(--card))", | ||
foreground: "hsl(var(--card-foreground))", | ||
}, | ||
/* rbui especific */ | ||
warning: { | ||
DEFAULT: "hsl(var(--warning))", | ||
foreground: "hsl(var(--warning-foreground))", | ||
}, | ||
success: { | ||
DEFAULT: "hsl(var(--success))", | ||
foreground: "hsl(var(--success-foreground))", | ||
}, | ||
}, | ||
borderRadius: { | ||
lg: `var(--radius)`, | ||
md: `calc(var(--radius) - 2px)`, | ||
sm: "calc(var(--radius) - 4px)", | ||
}, | ||
fontFamily: { | ||
sans: ['Inter var', ...defaultTheme.fontFamily.sans], | ||
sans: ["var(--font-sans)", ...defaultTheme.fontFamily.sans], | ||
}, | ||
}, | ||
}, | ||
plugins: [ | ||
require('@tailwindcss/forms'), | ||
require('@tailwindcss/typography'), | ||
require('@tailwindcss/container-queries'), | ||
] | ||
|
||
require("../vendor/javascript/tailwindcss-animate"), | ||
|
||
], | ||
} |
4 changes: 4 additions & 0 deletions
4
vendor/javascript/@babel--runtime--helpers--esm--assertThisInitialized.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// @babel/runtime/helpers/esm/[email protected] downloaded from https://ga.jspm.io/npm:@babel/[email protected]/helpers/esm/assertThisInitialized.js | ||
|
||
function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}export{_assertThisInitialized as default}; | ||
|
4 changes: 4 additions & 0 deletions
4
vendor/javascript/@babel--runtime--helpers--esm--classCallCheck.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// @babel/runtime/helpers/esm/[email protected] downloaded from https://ga.jspm.io/npm:@babel/[email protected]/helpers/esm/classCallCheck.js | ||
|
||
function _classCallCheck(a,l){if(!(a instanceof l))throw new TypeError("Cannot call a class as a function")}export{_classCallCheck as default}; | ||
|
4 changes: 4 additions & 0 deletions
4
vendor/javascript/@babel--runtime--helpers--esm--createClass.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
vendor/javascript/@babel--runtime--helpers--esm--createForOfIteratorHelper.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
vendor/javascript/@babel--runtime--helpers--esm--createSuper.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// @babel/runtime/helpers/esm/[email protected] downloaded from https://ga.jspm.io/npm:@babel/[email protected]/helpers/esm/createSuper.js | ||
|
||
import t from"./getPrototypeOf.js";import r from"./isNativeReflectConstruct.js";import e from"./possibleConstructorReturn.js";import"./typeof.js";import"./assertThisInitialized.js";function _createSuper(o){var s=r();return function(){var r,i=t(o);if(s){var p=t(this).constructor;r=Reflect.construct(i,arguments,p)}else r=i.apply(this,arguments);return e(this,r)}}export{_createSuper as default}; | ||
|
4 changes: 4 additions & 0 deletions
4
vendor/javascript/@babel--runtime--helpers--esm--defineProperty.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// @babel/runtime/helpers/esm/[email protected] downloaded from https://ga.jspm.io/npm:@babel/[email protected]/helpers/esm/defineProperty.js | ||
|
||
import e from"./toPropertyKey.js";import"./typeof.js";import"./toPrimitive.js";function _defineProperty(r,t,o){return(t=e(t))in r?Object.defineProperty(r,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[t]=o,r}export{_defineProperty as default}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// @babel/runtime/helpers/esm/[email protected] downloaded from https://ga.jspm.io/npm:@babel/[email protected]/helpers/esm/inherits.js | ||
|
||
import e from"./setPrototypeOf.js";function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&e(t,r)}export{_inherits as default}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// @babel/runtime/helpers/esm/[email protected] downloaded from https://ga.jspm.io/npm:@babel/[email protected]/helpers/esm/typeof.js | ||
|
||
function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}export{_typeof as default}; | ||
|
Oops, something went wrong.