Badge
YDFに於いてはベッジ(badge)は、丸い角有りか無しの、四角の中に 単語や日付・時間の様な文字列を表示させる為の無動作のコンポーネント。 アイコンも追加可能ではあるが、文言の代わりには成っていなく、文言の補足である。
様々なUI/UXフレームワークに於いては似た様なコンポーネントはChipやPillや[+Term--YDID Tag]等の様に 名付けられ、定義や明確な差別化が有る訳ではない。 フレームワークに依ってコンポーネントの名前が異なり、フレームワーク内の定義がされる事も有る。 YDFも、フレームワークとして紹介されていなくても、ベッジの場合を含めて、コンポーネントの名前に対して定義を導入する事が有る。
YDFの場合ベッジは非対話型と成り、 情報を表示しているだけ。 外見が似ているが、対話可能なコンポーネントと判別する必要が有る、例えばボタン・リンクの振る舞いが有る奴か、中に✖ボタンが有る奴等。 尚、YDFに於いては文言が2件迄対応、即ちキー及び値。 例えば、日付けを表す必要が有るが、日読みのアイコンと日付けの文言だけでは具体的に何の日付けか日自明的な場合にとって役立つ機能である。
概要
- Pugミクスイン
Badge--YDF- PugミクスインのLive template (IntelliJ IDEAファミリー結合開発環境専用正式的プラグイン)
- オートコンプリート系
Badge--YDF- 省略
bdg-ydf- Loading Placeholder
Badge--YDF-LoadingPlaceholder
- スタイル生成専用Stylusミクスイン
generateBadgeYDF_GUI_ComponentStyles- 用意済みのテーマ
Badge__YDF.Themes.regular- 標準(規定)
- 用意済みの幾何学的変形
Badge__YDF.GeometricVariations.regular- 標準(規定)
Badge__YDF.GeometricVariations.small- 小型
- 幾何学的修飾子
Badge__YDF.GeometricModifiers.pillShape- 最大の面取り
Badge__YDF.GeometricModifiers.singleLine- 強制一行、オーバーフローの時切り詰め
- 用意済みの修飾的変形
Badge__YDF.DecorativeVariations.veryCatchyBright- 鮮明で超派手(規定は赤)
Badge__YDF.DecorativeVariations.catchyBright- 鮮明で派手(規定はオレンジ)
Badge__YDF.DecorativeVariations.modestlyCatchyBright- 鮮明でやや派手(規定で黄色)
Badge__YDF.DecorativeVariations.neutralBright- 鮮明で中立的(規定で水色)
Badge__YDF.DecorativeVariations.modestlyCalmingBright- 鮮明でやや穏やか(規定で青色)
Badge__YDF.DecorativeVariations.calmingBright- 鮮明で穏やか(規定で緑色)
Badge__YDF.DecorativeVariations.achromaticBright- 鮮明で不染色(規定で暗い灰色)
Badge__YDF.DecorativeVariations.veryCatchyPastel- パステルで超派手(規定は赤)
Badge__YDF.DecorativeVariations.catchyPastel- パステルで派手(規定はオレンジ)
Badge__YDF.DecorativeVariations.modestlyCatchyPastel- パステルでやや派手(規定で黄色)
Badge__YDF.DecorativeVariations.neutralPastel- パステルで中立的(規定で水色)
Badge__YDF.DecorativeVariations.modestlyCalmingPastel- パステルでやや穏やか(規定で青色)
Badge__YDF.DecorativeVariations.calmingPastel- パステルで穏やか(規定で緑色)
Badge__YDF.DecorativeVariations.achromaticPastel- パステルで不染色(規定で明るい灰色)
- 修飾的修飾子
Badge__YDF.DecorativeModifiers.bordersDisguising- 大小変化無しで枠が無い効果
Badge__YDF.DecorativeModifiers.noBackground- 塗りつぶし無し
- ローディングプレースホルダ
- 無し
利用
マークアップ
プロジェクトへの取り組み
当GUIコンポーネントのマークアップは Pugミクスインの Badge--YDFに依り確保される。 取り組み方法は 通常 即ちComponents.pugと言うPugファイルの 含め 。 但し其の前Functionality.pugファイルも含めなければいけないが、ページのテンプレート の場合、Functionality.pugは含め済みで、 重複し含めてるとエラーが発生するのだ。
include ../../node_modules/@yamato-daiwa/frontend/Functionality.pug
include ../../node_modules/@yamato-daiwa/frontend/Components.pug上記のコードを含めているPugファイルの配置に依り、貴方の場合node_modules ディジタルへの早退パスが異なる可能性が有ります。
ところで、GUIコンポーネントとは限らずYDFの仕組み上の基本的な事ではありますが、 上記のファイルを含めるだけではHTMLコードが一切生成されない と忘れないでおきましょう。 BadgeコンポーネントのHTMLコードを 生成させるには、Badge--YDFと言うPugミクスインを呼び出す必用が有ります。 尚、現時点ではスタイルが未だ確保されていなければ、HTMLコードが生成されたとしても、 表示が未だ未だ崩れている状態ですが、勿論此のページ無いスタイル確保方法を説明しますので、御安心下さい。
Pug混入のBadge--YDF
- 一般技術名
- properties
- 日本語名
- プロパティ揃い
- 型
- Properties
- keyLabel
- 日本語名
- キーラベル
- 型
- string
- undefinedは不可か
- いいえ
- nullは不可か
- はい
- 最小文字数
- 1
- valueLabel
- 日本語名
- 値ラベル
- 型
- string
- undefinedは不可か
- はい
- nullは不可か
- はい
- 最小文字数
- 1
- theme
- 日本語名
- テーマ
- 型
- string
- undefinedの代替
- Badge__YDF.Themes.regular
- nullは不可か
- はい
- 利用可能な選択肢
- Badge__YDF.Themes.regular
- (`Badge__YDF.defineThemes(themesNames)`で定義された中から何れか)
- areThemesCSS_ClassesCommon
- 日本語名
- テーマCSSクラスは共通真偽
- 型
- boolean
- undefinedの代替
- Badge__YDF.areThemesCSS_ClassesCommon
- nullは不可か
- はい
- geometricVariation
- 日本語名
- 幾何学的変形
- 型
- string
- undefinedの代替
- Badge__YDF.GeometricVariations.regular
- nullは不可か
- はい
- 利用可能な選択肢
- Badge__YDF.GeometricVariations.regular
- Badge__YDF.GeometricVariations.small
- (`Badge__YDF.defineGeometricVariations(geometricVariationsNames)`で定義された中から何れか)
- geometricModifiers
- 日本語名
- 幾何学的改変
- 型
- 指数配列
- undefinedの代替
- []
- nullは不可か
- はい
- undefined要素可否
- はい
- null要素可否
- はい
- 配列の要素
- 型
- string
- 利用可能な選択肢
- Badge__YDF.GeometricModifiers.pillShape
- Badge__YDF.GeometricModifiers.singleLine
- decorativeVariation
- 日本語名
- 修飾的変形
- 型
- string
- undefinedは不可か
- はい
- nullは不可か
- はい
- 利用可能な選択肢
- Badge__YDF.DecorativeVariations.veryCatchyBright
- Badge__YDF.DecorativeVariations.catchyBright
- Badge__YDF.DecorativeVariations.modestlyCatchyBright
- Badge__YDF.DecorativeVariations.neutralBright
- Badge__YDF.DecorativeVariations.modestlyCalmingBright
- Badge__YDF.DecorativeVariations.calmingBright
- Badge__YDF.DecorativeVariations.achromaticBright
- Badge__YDF.DecorativeVariations.veryCatchyPastel
- Badge__YDF.DecorativeVariations.catchyPastel
- Badge__YDF.DecorativeVariations.modestlyCatchyPastel
- Badge__YDF.DecorativeVariations.neutralPastel
- Badge__YDF.DecorativeVariations.modestlyCalmingPastel
- Badge__YDF.DecorativeVariations.calmingPastel
- Badge__YDF.DecorativeVariations.achromaticPastel
- (`Badge__YDF.defineDecorativeVariations(decorativeVariationsNames)`で定義された中から何れか)
- decorativeModifiers
- 日本語名
- 修飾的修飾子
- 型
- 指数配列
- undefinedの代替
- []
- nullは不可か
- はい
- undefined要素可否
- はい
- null要素可否
- はい
- 配列の要素
- 型
- string
- 利用可能な選択肢
- Badge__YDF.DecorativeModifiers.bordersDisguising
- Badge__YDF.DecorativeModifiers.noBackground
- rootElementTag
- 日本語名
- ルート要素のタグ
- 型
- string
- undefinedの代替
- "span"
- nullは不可か
- はい
- 最小文字数
- 1