@wavemaker-ai/foundation-css 1.0.0-rc.647469
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/cjs/foundation-css.cjs +9454 -0
- package/cjs/src_tokens_mobile_components_accordion-pane_accordion-pane_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_accordion_accordion_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_anchor_anchor_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_audio_audio_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_badge_badge_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_barcodescanner_barcodescanner_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_bottomsheet_bottomsheet_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_breadcrumb_breadcrumb_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_button-group_button-group_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_button_button_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_calendar_calendar_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_camera_camera_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_cards_cards_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_carousel_carousel_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_checkbox_checkbox_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_checkboxset_checkboxset_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_chips_chips_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_container_container_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_currency_currency_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_datetime_datetime_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_dropdown-menu_dropdown-menu_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_fileupload_fileupload_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_form-controls_form-controls_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_form-wrapper_form-wrapper_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_grid-layout_grid-layout_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_icon_icon_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_label_label_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_list_list_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_listtemplate_listtemplate_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_login_login_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_lottie_lottie_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_message_message_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_modal-dialog_modal-dialog_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_nav_nav_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_navbar_navbar_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_navitem_navitem_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_page-content_page-content_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_page-left-nav_page-left-nav_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_panel-footer_panel-footer_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_panel_panel_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_partial-container_partial-container_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_picture_picture_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_popover_popover_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_progress-bar_progress-bar_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_progress-circle_progress-circle_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_radioset_radioset_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_rating_rating_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_scrollbar_scrollbar_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_search_search_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_select_select_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_slider_slider_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_spinner_spinner_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_switch_switch_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_tabbar_tabbar_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_tabs_tabs_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_textarea_textarea_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_tile_tile_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_toast_toast_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_toggle_toggle_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_video_video_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_webview_webview_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_wizard_wizard_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_accordion_accordion_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_anchor_anchor_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_audio_audio_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_badge_badge_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_breadcrumb_breadcrumb_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_button-group_button-group_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_button_button_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_calendar_calendar_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_cards_cards_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_carousel_carousel_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_checkbox_checkbox_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_checkboxset_checkboxset_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_chips_chips_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_color-picker_color-picker_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_container_container_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_currency_currency_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_data-table_data-table_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_date_date_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_dropdown-menu_dropdown-menu_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_fileupload_fileupload_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_form-controls_form-controls_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_grid-layout_grid-layout_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_icon_icon_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_iconbutton-toggleable_iconbutton-toggleable_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_iframe_iframe_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_label_label_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_list_list_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_message_message_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_modal-dialog_modal-dialog_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_nav_nav_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_page-content_page-content_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_page-footer_page-footer_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_page-header_page-header_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_page-left-nav_page-left-nav_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_page-right-nav_page-right-nav_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_page-top-nav_page-top-nav_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_pagination_pagination_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_panel_panel_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_picture_picture_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_popover_popover_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_progress-bar_progress-bar_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_progress-circle_progress-circle_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_radioset_radioset_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_rating_rating_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_richtext-editor_richtext-editor_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_scrollbar_scrollbar_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_search_search_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_slider_slider_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_spinner_spinner_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_switch_switch_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_tabs_tabs_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_tile_tile_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_time_time_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_toast_toast_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_toggle_toggle_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_tree_tree_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_video_video_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_web_components_wizard_wizard_json.foundation-css.cjs +14 -0
- package/foundation/fonts/fonts/roboto.ttf +0 -0
- package/foundation/fonts/icons/fontawesome/fontawesome-webfont.eot +0 -0
- package/foundation/fonts/icons/fontawesome/fontawesome-webfont.svg +686 -0
- package/foundation/fonts/icons/fontawesome/fontawesome-webfont.ttf +0 -0
- package/foundation/fonts/icons/fontawesome/fontawesome-webfont.woff +0 -0
- package/foundation/fonts/icons/material/materialicon.eot +0 -0
- package/foundation/fonts/icons/material/materialicon.svg +97 -0
- package/foundation/fonts/icons/material/materialicon.ttf +0 -0
- package/foundation/fonts/icons/material/materialicon.woff +0 -0
- package/foundation/fonts/icons/summernote/summernote.eot +0 -0
- package/foundation/fonts/icons/summernote/summernote.svg +63 -0
- package/foundation/fonts/icons/summernote/summernote.ttf +0 -0
- package/foundation/fonts/icons/summernote/summernote.woff +0 -0
- package/foundation/fonts/icons/wavicon/wavicon.eot +0 -0
- package/foundation/fonts/icons/wavicon/wavicon.svg +1160 -0
- package/foundation/fonts/icons/wavicon/wavicon.ttf +0 -0
- package/foundation/fonts/icons/wavicon/wavicon.woff +0 -0
- package/foundation/fonts/icons/wm-streamline-light/wm-streamline-light-icon.eot +0 -0
- package/foundation/fonts/icons/wm-streamline-light/wm-streamline-light-icon.svg +244 -0
- package/foundation/fonts/icons/wm-streamline-light/wm-streamline-light-icon.ttf +0 -0
- package/foundation/fonts/icons/wm-streamline-light/wm-streamline-light-icon.woff +0 -0
- package/foundation/fonts/icons/wm-streamline-regular/wm-streamline-regular-icon.eot +0 -0
- package/foundation/fonts/icons/wm-streamline-regular/wm-streamline-regular-icon.svg +216 -0
- package/foundation/fonts/icons/wm-streamline-regular/wm-streamline-regular-icon.ttf +0 -0
- package/foundation/fonts/icons/wm-streamline-regular/wm-streamline-regular-icon.woff +0 -0
- package/foundation/foundation.css +26884 -0
- package/foundation/foundation.min.css +1 -0
- package/foundation/icon-fonts.min.css +1 -0
- package/index.d.ts +10 -0
- package/index.js +64 -0
- package/index.js.map +1 -0
- package/native_mobile.index.d.ts +280 -0
- package/native_mobile.index.js +321 -0
- package/native_mobile.index.js.map +1 -0
- package/npm-shrinkwrap.json +4373 -0
- package/package-lock.json +4373 -0
- package/package.json +57 -0
- package/src/node/index.d.ts +1 -0
- package/src/node/index.js +2 -0
- package/src/node/index.js.map +1 -0
- package/src/styles/mobile/components/advanced/carousel/carousel-content.less +3 -0
- package/src/styles/mobile/components/advanced/carousel/carousel-template.less +3 -0
- package/src/styles/mobile/components/advanced/carousel.less +141 -0
- package/src/styles/mobile/components/advanced/customwidgetcontainer.less +0 -0
- package/src/styles/mobile/components/advanced/login.less +11 -0
- package/src/styles/mobile/components/advanced/network-toast.less +15 -0
- package/src/styles/mobile/components/advanced/webview.less +4 -0
- package/src/styles/mobile/components/basic/anchor.less +38 -0
- package/src/styles/mobile/components/basic/audio.less +3 -0
- package/src/styles/mobile/components/basic/base.less +0 -0
- package/src/styles/mobile/components/basic/bottomsheet.less +32 -0
- package/src/styles/mobile/components/basic/button.less +76 -0
- package/src/styles/mobile/components/basic/buttongroup.less +43 -0
- package/src/styles/mobile/components/basic/custom.less +6 -0
- package/src/styles/mobile/components/basic/icon.less +22 -0
- package/src/styles/mobile/components/basic/label.less +314 -0
- package/src/styles/mobile/components/basic/lottie.less +10 -0
- package/src/styles/mobile/components/basic/message.less +77 -0
- package/src/styles/mobile/components/basic/modal.less +9 -0
- package/src/styles/mobile/components/basic/picture.less +48 -0
- package/src/styles/mobile/components/basic/progress-bar.less +75 -0
- package/src/styles/mobile/components/basic/progress-circle.less +28 -0
- package/src/styles/mobile/components/basic/search.less +110 -0
- package/src/styles/mobile/components/basic/skeleton.less +9 -0
- package/src/styles/mobile/components/basic/spinner.less +41 -0
- package/src/styles/mobile/components/basic/video.less +4 -0
- package/src/styles/mobile/components/chart/area-chart.less +81 -0
- package/src/styles/mobile/components/chart/bar-chart.less +39 -0
- package/src/styles/mobile/components/chart/bubble-chart.less +36 -0
- package/src/styles/mobile/components/chart/column-chart.less +36 -0
- package/src/styles/mobile/components/chart/donut-chart.less +33 -0
- package/src/styles/mobile/components/chart/line-chart.less +36 -0
- package/src/styles/mobile/components/chart/pie-chart.less +30 -0
- package/src/styles/mobile/components/container/accordion/accordionpane.less +9 -0
- package/src/styles/mobile/components/container/accordion.less +150 -0
- package/src/styles/mobile/components/container/layoutgrid/gridcolumn.less +8 -0
- package/src/styles/mobile/components/container/layoutgrid/gridrow.less +7 -0
- package/src/styles/mobile/components/container/layoutgrid.less +11 -0
- package/src/styles/mobile/components/container/linearlayout/linearlayoutitem.less +3 -0
- package/src/styles/mobile/components/container/linearlayout.less +3 -0
- package/src/styles/mobile/components/container/panel/panel-content.less +3 -0
- package/src/styles/mobile/components/container/panel/panel-footer.less +15 -0
- package/src/styles/mobile/components/container/panel.less +168 -0
- package/src/styles/mobile/components/container/tabs/tab-header.less +67 -0
- package/src/styles/mobile/components/container/tabs/tabpane.less +4 -0
- package/src/styles/mobile/components/container/tabs.less +12 -0
- package/src/styles/mobile/components/container/tile.less +47 -0
- package/src/styles/mobile/components/container/wizard/wizardstep.less +3 -0
- package/src/styles/mobile/components/container/wizard.less +89 -0
- package/src/styles/mobile/components/container.less +50 -0
- package/src/styles/mobile/components/data/card/card-content.less +6 -0
- package/src/styles/mobile/components/data/card/card-footer.less +5 -0
- package/src/styles/mobile/components/data/card.less +55 -0
- package/src/styles/mobile/components/data/form/form-body.less +3 -0
- package/src/styles/mobile/components/data/form/form-field.less +9 -0
- package/src/styles/mobile/components/data/form/form-footer.less +3 -0
- package/src/styles/mobile/components/data/form.less +394 -0
- package/src/styles/mobile/components/data/list/list-action-template.less +6 -0
- package/src/styles/mobile/components/data/list/list-template.less +6 -0
- package/src/styles/mobile/components/data/list.less +20 -0
- package/src/styles/mobile/components/device/barcodescanner.less +25 -0
- package/src/styles/mobile/components/device/camera.less +18 -0
- package/src/styles/mobile/components/dialogs/alertdialog.less +15 -0
- package/src/styles/mobile/components/dialogs/confirmdialog.less +30 -0
- package/src/styles/mobile/components/dialogs/dialog.less +132 -0
- package/src/styles/mobile/components/dialogs/dialogactions.less +3 -0
- package/src/styles/mobile/components/dialogs/dialogcontent.less +3 -0
- package/src/styles/mobile/components/input/basedataset.less +0 -0
- package/src/styles/mobile/components/input/baseinput.less +0 -0
- package/src/styles/mobile/components/input/basenumber.less +0 -0
- package/src/styles/mobile/components/input/calendar/views.less +3 -0
- package/src/styles/mobile/components/input/calendar.less +110 -0
- package/src/styles/mobile/components/input/checkbox.less +47 -0
- package/src/styles/mobile/components/input/checkboxset.less +62 -0
- package/src/styles/mobile/components/input/chips.less +98 -0
- package/src/styles/mobile/components/input/composite.less +4 -0
- package/src/styles/mobile/components/input/currency.less +71 -0
- package/src/styles/mobile/components/input/epoch/wheelpickermodal/datetime-picker-modal.less +62 -0
- package/src/styles/mobile/components/input/fileupload.less +26 -0
- package/src/styles/mobile/components/input/radioset.less +75 -0
- package/src/styles/mobile/components/input/rating.less +30 -0
- package/src/styles/mobile/components/input/select.less +41 -0
- package/src/styles/mobile/components/input/slider.less +39 -0
- package/src/styles/mobile/components/input/switch.less +44 -0
- package/src/styles/mobile/components/input/toggle.less +61 -0
- package/src/styles/mobile/components/navigation/appnavbar.less +106 -0
- package/src/styles/mobile/components/navigation/basenav.less +3 -0
- package/src/styles/mobile/components/navigation/menu.less +52 -0
- package/src/styles/mobile/components/navigation/navbar.less +9 -0
- package/src/styles/mobile/components/navigation/navitem.less +88 -0
- package/src/styles/mobile/components/navigation/popover.less +83 -0
- package/src/styles/mobile/components/page/content.less +3 -0
- package/src/styles/mobile/components/page/left-panel.less +7 -0
- package/src/styles/mobile/components/page/page-content.less +4 -0
- package/src/styles/mobile/components/page/partial-container.less +4 -0
- package/src/styles/mobile/components/page/partial.less +6 -0
- package/src/styles/mobile/components/page/tabbar.less +93 -0
- package/src/styles/mobile/components/page.less +3 -0
- package/src/styles/mobile/components/prefab.less +6 -0
- package/src/styles/mobile/components/tokens.dark.css +68 -0
- package/src/styles/mobile/components/tokens.light.css +1354 -0
- package/src/styles/mobile/components/variables/accordion.variant.less +18 -0
- package/src/styles/mobile/components/variables/button.variant.less +254 -0
- package/src/styles/mobile/components/variables/cards.variant.less +23 -0
- package/src/styles/mobile/components/variables/carousel.variant.less +18 -0
- package/src/styles/mobile/components/variables/checkbox.variant.less +16 -0
- package/src/styles/mobile/components/variables/checkboxset.variant.less +18 -0
- package/src/styles/mobile/components/variables/chips.variant.less +40 -0
- package/src/styles/mobile/components/variables/container.variant.less +26 -0
- package/src/styles/mobile/components/variables/form-controls.variant.less +105 -0
- package/src/styles/mobile/components/variables/icon.variant.less +48 -0
- package/src/styles/mobile/components/variables/label.variant.less +155 -0
- package/src/styles/mobile/components/variables/message.variant.less +29 -0
- package/src/styles/mobile/components/variables/navitem.variant.less +14 -0
- package/src/styles/mobile/components/variables/panel.variant.less +55 -0
- package/src/styles/mobile/components/variables/picture.variant.less +28 -0
- package/src/styles/mobile/components/variables/progress-bar.variant.less +24 -0
- package/src/styles/mobile/components/variables/progress-circle.variant.less +24 -0
- package/src/styles/mobile/components/variables/radioset.variant.less +12 -0
- package/src/styles/mobile/components/variables/rating.variant.less +8 -0
- package/src/styles/mobile/components/variables/switch.variant.less +14 -0
- package/src/styles/mobile/components/variables/tabbar.variant.less +16 -0
- package/src/styles/mobile/components/variables/tabs.variant.less +21 -0
- package/src/styles/mobile/components/variables/tile.variant.less +79 -0
- package/src/styles/mobile/components/variables/toggle.variant.less +17 -0
- package/src/styles/mobile/components/variables/wizard.variant.less +26 -0
- package/src/styles/mobile/studio/advanced/carousel.less +75 -0
- package/src/styles/mobile/studio/advanced/login.less +6 -0
- package/src/styles/mobile/studio/advanced/styles.less +3 -0
- package/src/styles/mobile/studio/advanced/webview.less +4 -0
- package/src/styles/mobile/studio/basic/anchor.less +16 -0
- package/src/styles/mobile/studio/basic/button-group.less +47 -0
- package/src/styles/mobile/studio/basic/button.less +22 -0
- package/src/styles/mobile/studio/basic/icon.less +21 -0
- package/src/styles/mobile/studio/basic/label.less +29 -0
- package/src/styles/mobile/studio/basic/message.less +75 -0
- package/src/styles/mobile/studio/basic/picture.less +10 -0
- package/src/styles/mobile/studio/basic/progress-bar.less +6 -0
- package/src/styles/mobile/studio/basic/progress-circle.less +9 -0
- package/src/styles/mobile/studio/basic/search.less +39 -0
- package/src/styles/mobile/studio/basic/spinner.less +6 -0
- package/src/styles/mobile/studio/basic/styles.less +11 -0
- package/src/styles/mobile/studio/container/accordion.less +23 -0
- package/src/styles/mobile/studio/container/container.less +19 -0
- package/src/styles/mobile/studio/container/grid.less +8 -0
- package/src/styles/mobile/studio/container/linearlayout.less +8 -0
- package/src/styles/mobile/studio/container/panel.less +42 -0
- package/src/styles/mobile/studio/container/styles.less +7 -0
- package/src/styles/mobile/studio/container/tabs.less +122 -0
- package/src/styles/mobile/studio/container/tile.less +7 -0
- package/src/styles/mobile/studio/container/wizard.less +48 -0
- package/src/styles/mobile/studio/data/card.less +25 -0
- package/src/styles/mobile/studio/data/form.less +22 -0
- package/src/styles/mobile/studio/data/list.less +25 -0
- package/src/styles/mobile/studio/data/listtemplate.less +11 -0
- package/src/styles/mobile/studio/data/styles.less +4 -0
- package/src/styles/mobile/studio/device/barcode.less +17 -0
- package/src/styles/mobile/studio/device/camera.less +4 -0
- package/src/styles/mobile/studio/device/styles.less +2 -0
- package/src/styles/mobile/studio/dialogs/alert-dialog.less +10 -0
- package/src/styles/mobile/studio/dialogs/base-dialog.less +180 -0
- package/src/styles/mobile/studio/dialogs/confirm-dialog.less +26 -0
- package/src/styles/mobile/studio/dialogs/styles.less +3 -0
- package/src/styles/mobile/studio/input/calendar.less +68 -0
- package/src/styles/mobile/studio/input/checkbox.less +78 -0
- package/src/styles/mobile/studio/input/checkboxset.less +82 -0
- package/src/styles/mobile/studio/input/chips.less +11 -0
- package/src/styles/mobile/studio/input/currency.less +24 -0
- package/src/styles/mobile/studio/input/date.less +7 -0
- package/src/styles/mobile/studio/input/epoch/datetime-picker-modal.less +49 -0
- package/src/styles/mobile/studio/input/form.less +204 -0
- package/src/styles/mobile/studio/input/number.less +6 -0
- package/src/styles/mobile/studio/input/radioset.less +110 -0
- package/src/styles/mobile/studio/input/rating.less +21 -0
- package/src/styles/mobile/studio/input/select.less +39 -0
- package/src/styles/mobile/studio/input/slider.less +132 -0
- package/src/styles/mobile/studio/input/styles.less +17 -0
- package/src/styles/mobile/studio/input/switch.less +13 -0
- package/src/styles/mobile/studio/input/text.less +6 -0
- package/src/styles/mobile/studio/input/textarea.less +5 -0
- package/src/styles/mobile/studio/input/toggle.less +99 -0
- package/src/styles/mobile/studio/layouts/appnavbar.less +78 -0
- package/src/styles/mobile/studio/layouts/content.less +5 -0
- package/src/styles/mobile/studio/layouts/page-content.less +11 -0
- package/src/styles/mobile/studio/layouts/page.less +5 -0
- package/src/styles/mobile/studio/layouts/styles.less +5 -0
- package/src/styles/mobile/studio/layouts/tabbar.less +50 -0
- package/src/styles/mobile/studio/navigation/menu.less +21 -0
- package/src/styles/mobile/studio/navigation/nav.less +4 -0
- package/src/styles/mobile/studio/navigation/popover.less +31 -0
- package/src/styles/mobile/studio/navigation/styles.less +3 -0
- package/src/styles/mobile/studio/styles.less +17 -0
- package/src/token-validation/component-token-schema.d.ts +171 -0
- package/src/token-validation/component-token-schema.js +148 -0
- package/src/token-validation/component-token-schema.js.map +1 -0
- package/src/token-validation/constants.d.ts +42 -0
- package/src/token-validation/constants.js +55 -0
- package/src/token-validation/constants.js.map +1 -0
- package/src/token-validation/global-token-schema.d.ts +38 -0
- package/src/token-validation/global-token-schema.js +42 -0
- package/src/token-validation/global-token-schema.js.map +1 -0
- package/src/token-validation/validate-token.d.ts +72 -0
- package/src/token-validation/validate-token.js +1070 -0
- package/src/token-validation/validate-token.js.map +1 -0
- package/src/token-validation/validate-value.d.ts +13 -0
- package/src/token-validation/validate-value.js +57 -0
- package/src/token-validation/validate-value.js.map +1 -0
- package/src/token-validation/validator-utils/common/constants.d.ts +185 -0
- package/src/token-validation/validator-utils/common/constants.js +281 -0
- package/src/token-validation/validator-utils/common/constants.js.map +1 -0
- package/src/token-validation/validator-utils/common/primitives.d.ts +14 -0
- package/src/token-validation/validator-utils/common/primitives.js +35 -0
- package/src/token-validation/validator-utils/common/primitives.js.map +1 -0
- package/src/token-validation/validator-utils/common/utils.d.ts +192 -0
- package/src/token-validation/validator-utils/common/utils.js +418 -0
- package/src/token-validation/validator-utils/common/utils.js.map +1 -0
- package/src/token-validation/validator-utils/native_mobile.d.ts +1 -0
- package/src/token-validation/validator-utils/native_mobile.js +11 -0
- package/src/token-validation/validator-utils/native_mobile.js.map +1 -0
- package/src/token-validation/validator-utils/web.d.ts +1 -0
- package/src/token-validation/validator-utils/web.js +12 -0
- package/src/token-validation/validator-utils/web.js.map +1 -0
- package/src/tokens/mobile/components/accordion/accordion.json +518 -0
- package/src/tokens/mobile/components/accordion-pane/accordion-pane.json +65 -0
- package/src/tokens/mobile/components/anchor/anchor.json +129 -0
- package/src/tokens/mobile/components/audio/audio.json +15 -0
- package/src/tokens/mobile/components/badge/badge.json +122 -0
- package/src/tokens/mobile/components/barcodescanner/barcodescanner.json +140 -0
- package/src/tokens/mobile/components/bottomsheet/bottomsheet.json +154 -0
- package/src/tokens/mobile/components/breadcrumb/breadcrumb.json +86 -0
- package/src/tokens/mobile/components/button/button.json +736 -0
- package/src/tokens/mobile/components/button-group/button-group.json +51 -0
- package/src/tokens/mobile/components/calendar/calendar.json +435 -0
- package/src/tokens/mobile/components/camera/camera.json +73 -0
- package/src/tokens/mobile/components/cards/cards.json +180 -0
- package/src/tokens/mobile/components/carousel/carousel.json +603 -0
- package/src/tokens/mobile/components/checkbox/checkbox.json +232 -0
- package/src/tokens/mobile/components/checkboxset/checkboxset.json +334 -0
- package/src/tokens/mobile/components/chips/chips.json +423 -0
- package/src/tokens/mobile/components/container/container.json +191 -0
- package/src/tokens/mobile/components/currency/currency.json +96 -0
- package/src/tokens/mobile/components/datetime/datetime.json +223 -0
- package/src/tokens/mobile/components/dropdown-menu/dropdown-menu.json +199 -0
- package/src/tokens/mobile/components/fileupload/fileupload.json +121 -0
- package/src/tokens/mobile/components/form-controls/form-controls.json +727 -0
- package/src/tokens/mobile/components/form-wrapper/form-wrapper.json +361 -0
- package/src/tokens/mobile/components/grid-layout/grid-layout.json +30 -0
- package/src/tokens/mobile/components/icon/icon.json +246 -0
- package/src/tokens/mobile/components/label/label.json +618 -0
- package/src/tokens/mobile/components/list/list.json +66 -0
- package/src/tokens/mobile/components/listtemplate/listtemplate.json +84 -0
- package/src/tokens/mobile/components/login/login.json +65 -0
- package/src/tokens/mobile/components/lottie/lottie.json +52 -0
- package/src/tokens/mobile/components/message/message.json +336 -0
- package/src/tokens/mobile/components/modal-dialog/modal-dialog.json +353 -0
- package/src/tokens/mobile/components/nav/nav.json +14 -0
- package/src/tokens/mobile/components/navbar/navbar.json +368 -0
- package/src/tokens/mobile/components/navitem/navitem.json +521 -0
- package/src/tokens/mobile/components/page-content/page-content.json +31 -0
- package/src/tokens/mobile/components/page-left-nav/page-left-nav.json +56 -0
- package/src/tokens/mobile/components/panel/panel.json +478 -0
- package/src/tokens/mobile/components/panel-footer/panel-footer.json +116 -0
- package/src/tokens/mobile/components/partial-container/partial-container.json +23 -0
- package/src/tokens/mobile/components/picture/picture.json +166 -0
- package/src/tokens/mobile/components/popover/popover.json +387 -0
- package/src/tokens/mobile/components/progress-bar/progress-bar.json +216 -0
- package/src/tokens/mobile/components/progress-circle/progress-circle.json +176 -0
- package/src/tokens/mobile/components/radioset/radioset.json +279 -0
- package/src/tokens/mobile/components/rating/rating.json +117 -0
- package/src/tokens/mobile/components/scrollbar/scrollbar.json +38 -0
- package/src/tokens/mobile/components/search/search.json +408 -0
- package/src/tokens/mobile/components/select/select.json +229 -0
- package/src/tokens/mobile/components/slider/slider.json +111 -0
- package/src/tokens/mobile/components/spinner/spinner.json +92 -0
- package/src/tokens/mobile/components/switch/switch.json +213 -0
- package/src/tokens/mobile/components/tabbar/tabbar.json +415 -0
- package/src/tokens/mobile/components/tabs/tabs.json +432 -0
- package/src/tokens/mobile/components/textarea/textarea.json +16 -0
- package/src/tokens/mobile/components/tile/tile.json +377 -0
- package/src/tokens/mobile/components/toast/toast.json +186 -0
- package/src/tokens/mobile/components/toggle/toggle.json +239 -0
- package/src/tokens/mobile/components/video/video.json +23 -0
- package/src/tokens/mobile/components/webview/webview.json +32 -0
- package/src/tokens/mobile/components/wizard/wizard.json +550 -0
- package/src/tokens/mobile/global/border/border.json +90 -0
- package/src/tokens/mobile/global/border-style/border-style.json +30 -0
- package/src/tokens/mobile/global/box-shadow/box-shadow.json +40 -0
- package/src/tokens/mobile/global/colors/color.dark.json +150 -0
- package/src/tokens/mobile/global/colors/color.json +338 -0
- package/src/tokens/mobile/global/colors/color.light.json +1 -0
- package/src/tokens/mobile/global/elevation/elevation.json +36 -0
- package/src/tokens/mobile/global/font/font.json +377 -0
- package/src/tokens/mobile/global/gap/gap.json +60 -0
- package/src/tokens/mobile/global/icon/icon.json +15 -0
- package/src/tokens/mobile/global/margin/margin.json +60 -0
- package/src/tokens/mobile/global/opacity/opacity.json +6 -0
- package/src/tokens/mobile/global/radius/radius.json +15 -0
- package/src/tokens/mobile/global/space/space.json +18 -0
- package/src/tokens/mobile/global/spacer/spacer.json +15 -0
- package/src/tokens/web/components/accordion/Readme.md +18 -0
- package/src/tokens/web/components/accordion/Token.Readme.md +30 -0
- package/src/tokens/web/components/accordion/accordion.json +321 -0
- package/src/tokens/web/components/anchor/Token.Readme.md +20 -0
- package/src/tokens/web/components/anchor/anchor.json +189 -0
- package/src/tokens/web/components/audio/Token.Readme.md +9 -0
- package/src/tokens/web/components/audio/audio.json +15 -0
- package/src/tokens/web/components/badge/Token.Readme.md +19 -0
- package/src/tokens/web/components/badge/badge.json +100 -0
- package/src/tokens/web/components/breadcrumb/Readme.md +23 -0
- package/src/tokens/web/components/breadcrumb/Token.Readme.md +21 -0
- package/src/tokens/web/components/breadcrumb/breadcrumb.json +392 -0
- package/src/tokens/web/components/button/Readme.md +54 -0
- package/src/tokens/web/components/button/Token.Readme.md +29 -0
- package/src/tokens/web/components/button/button.json +734 -0
- package/src/tokens/web/components/button-group/Token.Readme.md +9 -0
- package/src/tokens/web/components/button-group/button-group.json +22 -0
- package/src/tokens/web/components/calendar/Token.Readme.md +63 -0
- package/src/tokens/web/components/calendar/calendar.json +501 -0
- package/src/tokens/web/components/cards/Readme.md +23 -0
- package/src/tokens/web/components/cards/Token.Readme.md +22 -0
- package/src/tokens/web/components/cards/cards.json +371 -0
- package/src/tokens/web/components/carousel/Token.Readme.md +20 -0
- package/src/tokens/web/components/carousel/carousel.json +160 -0
- package/src/tokens/web/components/checkbox/Token.Readme.md +25 -0
- package/src/tokens/web/components/checkbox/checkbox.json +274 -0
- package/src/tokens/web/components/checkboxset/Token.Readme.md +9 -0
- package/src/tokens/web/components/checkboxset/checkboxset.json +18 -0
- package/src/tokens/web/components/chips/Readme.md +26 -0
- package/src/tokens/web/components/chips/Token.Readme.md +43 -0
- package/src/tokens/web/components/chips/chips.json +653 -0
- package/src/tokens/web/components/color-picker/Token.Readme.md +10 -0
- package/src/tokens/web/components/color-picker/color-picker.json +24 -0
- package/src/tokens/web/components/container/Readme.md +23 -0
- package/src/tokens/web/components/container/Token.Readme.md +13 -0
- package/src/tokens/web/components/container/container.json +207 -0
- package/src/tokens/web/components/currency/Token.Readme.md +14 -0
- package/src/tokens/web/components/currency/currency.json +59 -0
- package/src/tokens/web/components/data-table/Readme.md +29 -0
- package/src/tokens/web/components/data-table/Token.Readme.md +54 -0
- package/src/tokens/web/components/data-table/data-table.json +603 -0
- package/src/tokens/web/components/date/Token.Readme.md +33 -0
- package/src/tokens/web/components/date/date.json +328 -0
- package/src/tokens/web/components/dropdown-menu/Readme.md +16 -0
- package/src/tokens/web/components/dropdown-menu/Token.Readme.md +25 -0
- package/src/tokens/web/components/dropdown-menu/dropdown-menu.json +259 -0
- package/src/tokens/web/components/fileupload/Token.Readme.md +44 -0
- package/src/tokens/web/components/fileupload/fileupload.json +328 -0
- package/src/tokens/web/components/form-controls/Token.Readme.md +48 -0
- package/src/tokens/web/components/form-controls/form-controls.json +548 -0
- package/src/tokens/web/components/grid-layout/Token.Readme.md +11 -0
- package/src/tokens/web/components/grid-layout/grid-layout.json +34 -0
- package/src/tokens/web/components/icon/Readme.md +22 -0
- package/src/tokens/web/components/icon/Token.Readme.md +14 -0
- package/src/tokens/web/components/icon/icon.json +364 -0
- package/src/tokens/web/components/iconbutton-toggleable/Readme.md +17 -0
- package/src/tokens/web/components/iconbutton-toggleable/Token.Readme.md +19 -0
- package/src/tokens/web/components/iconbutton-toggleable/iconbutton-toggleable.json +557 -0
- package/src/tokens/web/components/iframe/Token.Readme.md +10 -0
- package/src/tokens/web/components/iframe/iframe.json +23 -0
- package/src/tokens/web/components/label/Readme.md +55 -0
- package/src/tokens/web/components/label/Token.Readme.md +17 -0
- package/src/tokens/web/components/label/label.json +723 -0
- package/src/tokens/web/components/list/Token.Readme.md +19 -0
- package/src/tokens/web/components/list/list.json +198 -0
- package/src/tokens/web/components/message/Readme.md +19 -0
- package/src/tokens/web/components/message/Token.Readme.md +22 -0
- package/src/tokens/web/components/message/message.json +312 -0
- package/src/tokens/web/components/modal-dialog/Readme.md +35 -0
- package/src/tokens/web/components/modal-dialog/Token.Readme.md +31 -0
- package/src/tokens/web/components/modal-dialog/modal-dialog.json +462 -0
- package/src/tokens/web/components/nav/Readme.md +41 -0
- package/src/tokens/web/components/nav/Token.Readme.md +25 -0
- package/src/tokens/web/components/nav/nav.json +236 -0
- package/src/tokens/web/components/page-content/Token.Readme.md +9 -0
- package/src/tokens/web/components/page-content/page-content.json +17 -0
- package/src/tokens/web/components/page-footer/Token.Readme.md +18 -0
- package/src/tokens/web/components/page-footer/page-footer.json +98 -0
- package/src/tokens/web/components/page-header/Token.Readme.md +18 -0
- package/src/tokens/web/components/page-header/page-header.json +90 -0
- package/src/tokens/web/components/page-left-nav/Readme.md +27 -0
- package/src/tokens/web/components/page-left-nav/Token.Readme.md +55 -0
- package/src/tokens/web/components/page-left-nav/page-left-nav.json +961 -0
- package/src/tokens/web/components/page-right-nav/Readme.md +27 -0
- package/src/tokens/web/components/page-right-nav/Token.Readme.md +53 -0
- package/src/tokens/web/components/page-right-nav/page-right-nav.json +950 -0
- package/src/tokens/web/components/page-top-nav/Token.Readme.md +16 -0
- package/src/tokens/web/components/page-top-nav/page-top-nav.json +83 -0
- package/src/tokens/web/components/pagination/Readme.md +23 -0
- package/src/tokens/web/components/pagination/Token.Readme.md +35 -0
- package/src/tokens/web/components/pagination/pagination.json +477 -0
- package/src/tokens/web/components/panel/Readme.md +18 -0
- package/src/tokens/web/components/panel/Token.Readme.md +39 -0
- package/src/tokens/web/components/panel/panel.json +397 -0
- package/src/tokens/web/components/picture/Readme.md +24 -0
- package/src/tokens/web/components/picture/Token.Readme.md +16 -0
- package/src/tokens/web/components/picture/picture.json +233 -0
- package/src/tokens/web/components/popover/Token.Readme.md +34 -0
- package/src/tokens/web/components/popover/popover.json +222 -0
- package/src/tokens/web/components/progress-bar/Readme.md +35 -0
- package/src/tokens/web/components/progress-bar/Token.Readme.md +15 -0
- package/src/tokens/web/components/progress-bar/progress-bar.json +439 -0
- package/src/tokens/web/components/progress-circle/Readme.md +19 -0
- package/src/tokens/web/components/progress-circle/Token.Readme.md +16 -0
- package/src/tokens/web/components/progress-circle/progress-circle.json +257 -0
- package/src/tokens/web/components/radioset/Token.Readme.md +24 -0
- package/src/tokens/web/components/radioset/radioset.json +259 -0
- package/src/tokens/web/components/rating/Token.Readme.md +14 -0
- package/src/tokens/web/components/rating/rating.json +116 -0
- package/src/tokens/web/components/richtext-editor/Token.Readme.md +106 -0
- package/src/tokens/web/components/richtext-editor/richtext-editor.json +1054 -0
- package/src/tokens/web/components/scrollbar/Token.Readme.md +15 -0
- package/src/tokens/web/components/scrollbar/scrollbar.json +66 -0
- package/src/tokens/web/components/search/Token.Readme.md +39 -0
- package/src/tokens/web/components/search/search.json +390 -0
- package/src/tokens/web/components/slider/Token.Readme.md +24 -0
- package/src/tokens/web/components/slider/slider.json +153 -0
- package/src/tokens/web/components/spinner/Token.Readme.md +15 -0
- package/src/tokens/web/components/spinner/spinner.json +77 -0
- package/src/tokens/web/components/switch/Token.Readme.md +20 -0
- package/src/tokens/web/components/switch/switch.json +241 -0
- package/src/tokens/web/components/tabs/Token.Readme.md +36 -0
- package/src/tokens/web/components/tabs/tabs.json +328 -0
- package/src/tokens/web/components/tile/Readme.md +39 -0
- package/src/tokens/web/components/tile/Token.Readme.md +13 -0
- package/src/tokens/web/components/tile/tile.json +442 -0
- package/src/tokens/web/components/time/Token.Readme.md +37 -0
- package/src/tokens/web/components/time/time.json +263 -0
- package/src/tokens/web/components/toast/Readme.md +19 -0
- package/src/tokens/web/components/toast/Token.Readme.md +35 -0
- package/src/tokens/web/components/toast/toast.json +464 -0
- package/src/tokens/web/components/toggle/Token.Readme.md +20 -0
- package/src/tokens/web/components/toggle/toggle.json +249 -0
- package/src/tokens/web/components/tree/Token.Readme.md +27 -0
- package/src/tokens/web/components/tree/tree.json +265 -0
- package/src/tokens/web/components/video/Token.Readme.md +10 -0
- package/src/tokens/web/components/video/video.json +23 -0
- package/src/tokens/web/components/wizard/Readme.md +41 -0
- package/src/tokens/web/components/wizard/Token.Readme.md +76 -0
- package/src/tokens/web/components/wizard/wizard.json +1449 -0
- package/src/tokens/web/global/border/border.json +116 -0
- package/src/tokens/web/global/border-style/border-style.json +72 -0
- package/src/tokens/web/global/box-shadow/box-shadow.json +24 -0
- package/src/tokens/web/global/colors/color.dark.json +398 -0
- package/src/tokens/web/global/colors/color.json +566 -0
- package/src/tokens/web/global/colors/color.light.json +1 -0
- package/src/tokens/web/global/elevation/elevation.json +48 -0
- package/src/tokens/web/global/font/font.json +599 -0
- package/src/tokens/web/global/gap/gap.json +57 -0
- package/src/tokens/web/global/icon/icon.json +84 -0
- package/src/tokens/web/global/margin/margin.json +57 -0
- package/src/tokens/web/global/opacity/opacity.json +7 -0
- package/src/tokens/web/global/radius/radius.json +77 -0
- package/src/tokens/web/global/space/space.json +125 -0
- package/src/tokens/web/global/spacer/spacer.json +45 -0
- package/src/utils/style-dictionary-utils.d.ts +25 -0
- package/src/utils/style-dictionary-utils.js +360 -0
- package/src/utils/style-dictionary-utils.js.map +1 -0
- package/src/utils/utils.d.ts +15 -0
- package/src/utils/utils.js +25 -0
- package/src/utils/utils.js.map +1 -0
- package/src/wm-namespace.d.ts +11 -0
- package/src/wm-namespace.js +12 -0
- package/src/wm-namespace.js.map +1 -0
- package/web.index.d.ts +20 -0
- package/web.index.js +300 -0
- package/web.index.js.map +1 -0
- package/webpack.config.cjs +43 -0
- package/webpack.config.cjs.map +1 -0
- package/webpack.config.d.cts +32 -0
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
// If `opacity` exists, we apply a `color-mix` formula to blend colors
|
|
2
|
+
// If `multiple` exists, we apply the `calc()` function to multiply the reference value
|
|
3
|
+
// Otherwise, we simply replace the reference with its corresponding variable
|
|
4
|
+
function processTokenValue(value, refs, multiple, opacity) {
|
|
5
|
+
// Remove `mapping` from token.name
|
|
6
|
+
const cleanName = refs.name.replace(/mapping-?/g, '');
|
|
7
|
+
if (opacity) {
|
|
8
|
+
return `color-mix(in srgb, var(--${cleanName}), transparent calc(100% - ${opacity}))`;
|
|
9
|
+
}
|
|
10
|
+
else if (multiple) {
|
|
11
|
+
return value.replace(refs.value, `calc(var(--${cleanName}) * ${multiple})`);
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
return value.replace(refs.value, `var(--${cleanName})`);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
// Helper function to resolve references for both `multiple` and `opacity` and return the updated value
|
|
18
|
+
function resolveTokenReferences(token, unfilteredTokens, usesReferences, getReferences) {
|
|
19
|
+
let multiple = token.original?.attributes?.multiple;
|
|
20
|
+
let opacity = token.original?.attributes?.opacity;
|
|
21
|
+
// Resolve references in `multiple` and `opacity`
|
|
22
|
+
multiple = resolveAndReplaceReferences(multiple, unfilteredTokens, usesReferences, getReferences);
|
|
23
|
+
opacity = resolveAndReplaceReferences(opacity, unfilteredTokens, usesReferences, getReferences);
|
|
24
|
+
return { multiple, opacity };
|
|
25
|
+
}
|
|
26
|
+
// Helper function to resolve references and return the token name
|
|
27
|
+
function resolveAndReplaceReferences(attribute, unfilteredTokens, usesReferences, getReferences) {
|
|
28
|
+
if (attribute && usesReferences(attribute, unfilteredTokens)) {
|
|
29
|
+
const refs = getReferences(attribute, unfilteredTokens);
|
|
30
|
+
refs.forEach(ref => {
|
|
31
|
+
// Replace the reference with the resolved token name
|
|
32
|
+
attribute = `var(--${ref.name})`;
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
return attribute;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* @param selector The raw CSS selector string
|
|
39
|
+
* @returns A cleaned string of class names
|
|
40
|
+
*/
|
|
41
|
+
const cleanSelector = (selector) => {
|
|
42
|
+
return selector?.replace(/^\.wm-app\s*/, '') // Remove .wm-app prefix if present
|
|
43
|
+
.replace(/^\./, '') // Remove leading dot
|
|
44
|
+
.replace(/\./g, ' ') || ''; // Replace remaining dots with spaces
|
|
45
|
+
};
|
|
46
|
+
const cssVarCalcMixFormatter = (usesReferences, getReferences, fs) => ({
|
|
47
|
+
name: 'wm-calc-colormix-format',
|
|
48
|
+
format: function ({ dictionary, options }) {
|
|
49
|
+
const { selector, tokenReadmePath } = options;
|
|
50
|
+
// Prepare Markdown table only if enabled
|
|
51
|
+
const tableRows = ['| Token | Description |', '|-------|------------|'];
|
|
52
|
+
// Generate CSS variable definitions
|
|
53
|
+
const variables = dictionary.allTokens
|
|
54
|
+
.map((token) => {
|
|
55
|
+
// Remove `mapping` from token.name
|
|
56
|
+
const cleanName = token.name.replace(/mapping-?/g, '');
|
|
57
|
+
let value = getProcessedTokenValue(token, dictionary, usesReferences, getReferences);
|
|
58
|
+
// Add to table if token has a description and table generation is enabled
|
|
59
|
+
if (tokenReadmePath && token?.attributes?.description) {
|
|
60
|
+
const pathName = token.path
|
|
61
|
+
.slice(1) // ignore first key (btn, data-table etc.,)
|
|
62
|
+
.filter(key => key !== 'mapping') // remove 'mapping'
|
|
63
|
+
.join('.');
|
|
64
|
+
// Keep full description but handle <br> tags properly for table
|
|
65
|
+
let safeDescription = token?.attributes?.description
|
|
66
|
+
.replace(/\|/g, '\\|') // escape pipe characters
|
|
67
|
+
.replace(/<br\s*\/?>/gi, '<br>') // keep <br> tags as HTML for proper rendering
|
|
68
|
+
.trim();
|
|
69
|
+
tableRows.push(`| ${pathName} | ${safeDescription} |`);
|
|
70
|
+
}
|
|
71
|
+
return `--${cleanName}: ${value};`;
|
|
72
|
+
})
|
|
73
|
+
.join(`\n`);
|
|
74
|
+
// Write the table if tokens has description
|
|
75
|
+
if (tokenReadmePath && tableRows.length > 2 && fs) {
|
|
76
|
+
tableRows.unshift(`<!-- AUTO-GENERATED FILE. Do not edit manually. -->`, ``, `# Token Reference Table`, ``, `This table lists all tokens for this component:`, ``);
|
|
77
|
+
fs.writeFileSync(tokenReadmePath, tableRows.join('\n'), 'utf8');
|
|
78
|
+
console.log(`Token description table generated: ${tokenReadmePath}`);
|
|
79
|
+
}
|
|
80
|
+
// Return correctly formatted output based on selector
|
|
81
|
+
return selector && selector.trim()
|
|
82
|
+
? `${selector} {\n${variables}\n}\n` // Wrap in selector
|
|
83
|
+
: `${variables}\n`; // No selector, no closing bracket
|
|
84
|
+
},
|
|
85
|
+
});
|
|
86
|
+
function getProcessedTokenValue(token, dictionary, usesReferences, getReferences) {
|
|
87
|
+
let value = String(token.value);
|
|
88
|
+
// Checking if the token has references
|
|
89
|
+
if (usesReferences(token.original.value, dictionary.unfilteredTokens)) {
|
|
90
|
+
const refs = getReferences(token.original.value, dictionary.unfilteredTokens);
|
|
91
|
+
refs.forEach((ref) => {
|
|
92
|
+
// Resolve references for `multiple` and `opacity`
|
|
93
|
+
const { multiple, opacity } = resolveTokenReferences(token, dictionary.unfilteredTokens, usesReferences, getReferences);
|
|
94
|
+
// Process the value based on resolved references
|
|
95
|
+
value = processTokenValue(value, ref, multiple, opacity);
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
value = token.original.value || token.value;
|
|
100
|
+
}
|
|
101
|
+
return value;
|
|
102
|
+
}
|
|
103
|
+
const componentVariantsFormatter = (usesReferences, getReferences, platform, options = {}) => ({
|
|
104
|
+
name: 'css/component-variants',
|
|
105
|
+
format: function ({ dictionary, file, ...rest }) {
|
|
106
|
+
const componentRootKey = Object.keys(dictionary.tokens)[0];
|
|
107
|
+
if (!componentRootKey) {
|
|
108
|
+
console.warn(`[Style Dictionary] Could not derive component name from source ${file.destination}`);
|
|
109
|
+
return '';
|
|
110
|
+
}
|
|
111
|
+
const groupedVariants = groupTokensByVariantType(dictionary, componentRootKey, platform);
|
|
112
|
+
const cssBlocks = Object.values(groupedVariants).map(group => generateCssBlockFromGroup(group, dictionary, usesReferences, getReferences, platform));
|
|
113
|
+
// --- README GENERATION ---
|
|
114
|
+
const generateReadmeFn = options.generateComponentReadme;
|
|
115
|
+
if (generateReadmeFn) {
|
|
116
|
+
generateReadmeFn(componentRootKey, groupedVariants, platform, dictionary, { ...rest.options });
|
|
117
|
+
}
|
|
118
|
+
// --- END README GENERATION ---
|
|
119
|
+
return cssBlocks.join('\n\n');
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
const groupTokensByVariantType = (dictionary, componentRootKey, platform) => {
|
|
123
|
+
const groups = {};
|
|
124
|
+
const isMobile = platform === 'mobile';
|
|
125
|
+
const mappingStore = {};
|
|
126
|
+
dictionary.allTokens.forEach((token) => {
|
|
127
|
+
const path = token.path;
|
|
128
|
+
const appearanceIndex = path.indexOf('appearances');
|
|
129
|
+
const variantGroupIndex = path.indexOf('variantGroups');
|
|
130
|
+
const stateIndex = path.indexOf('states');
|
|
131
|
+
const isState = stateIndex !== -1;
|
|
132
|
+
const state = isState ? path[stateIndex + 1] : null;
|
|
133
|
+
const appearance = appearanceIndex !== -1 ? path[appearanceIndex + 1] : null;
|
|
134
|
+
const groupType = variantGroupIndex !== -1 ? path[variantGroupIndex + 1] : null;
|
|
135
|
+
const variant = variantGroupIndex !== -1 ? path[variantGroupIndex + 2] : null;
|
|
136
|
+
const isVariantToken = appearance && groupType && variant;
|
|
137
|
+
const isTopLevelMapping = appearanceIndex === -1 && path[1] === 'mapping';
|
|
138
|
+
const isAppearanceMapping = appearanceIndex !== -1 && path[appearanceIndex + 2] === 'mapping';
|
|
139
|
+
let key, type, group;
|
|
140
|
+
if (isVariantToken) {
|
|
141
|
+
key = `${componentRootKey}-${appearance}-${groupType}-${variant}${isState ? `-${state}` : ''}`;
|
|
142
|
+
type = isState ? 'state-variant' : 'variant';
|
|
143
|
+
group = {
|
|
144
|
+
type,
|
|
145
|
+
component: componentRootKey,
|
|
146
|
+
appearance,
|
|
147
|
+
groupType,
|
|
148
|
+
variant,
|
|
149
|
+
state,
|
|
150
|
+
};
|
|
151
|
+
if (!groups[key]) {
|
|
152
|
+
groups[key] = { ...group, tokens: [] };
|
|
153
|
+
if (isMobile && mappingStore[appearance]) {
|
|
154
|
+
groups[key].tokens.push(...mappingStore[appearance]);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
else if (isTopLevelMapping) {
|
|
159
|
+
key = `${componentRootKey}-mapping${isState ? `-${state}` : ''}`;
|
|
160
|
+
type = isState ? 'state-mapping' : 'mapping';
|
|
161
|
+
group = {
|
|
162
|
+
type,
|
|
163
|
+
component: componentRootKey,
|
|
164
|
+
appearance: 'mapping',
|
|
165
|
+
state,
|
|
166
|
+
isRootMapping: true,
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
else if (isAppearanceMapping) {
|
|
170
|
+
const appearanceDef = dictionary.tokens?.[componentRootKey]?.appearances?.[appearance];
|
|
171
|
+
const hasVariants = appearanceDef?.variantGroups && Object.keys(appearanceDef.variantGroups).length > 0;
|
|
172
|
+
// If mobile + variants exist, skip creating this class — mapping will be merged
|
|
173
|
+
if (isMobile && hasVariants && !isState) {
|
|
174
|
+
mappingStore[appearance] ?? (mappingStore[appearance] = []);
|
|
175
|
+
mappingStore[appearance].push(token);
|
|
176
|
+
return; // skip adding mapping like .btn-outlined
|
|
177
|
+
}
|
|
178
|
+
// Else proceed to generate a separate class for mapping
|
|
179
|
+
key = `${componentRootKey}-${appearance}-mapping${isState ? `-${state}` : ''}`;
|
|
180
|
+
type = isState ? 'state-mapping' : 'mapping';
|
|
181
|
+
group = {
|
|
182
|
+
type,
|
|
183
|
+
component: componentRootKey,
|
|
184
|
+
appearance,
|
|
185
|
+
state,
|
|
186
|
+
};
|
|
187
|
+
if (isMobile && !isState) {
|
|
188
|
+
mappingStore[appearance] ?? (mappingStore[appearance] = []);
|
|
189
|
+
mappingStore[appearance].push(token);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
if (key) {
|
|
193
|
+
groups[key] ?? (groups[key] = { ...group, tokens: [] });
|
|
194
|
+
groups[key].tokens.push(token);
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
return groups;
|
|
198
|
+
};
|
|
199
|
+
// output: a selector string based on the group type and state
|
|
200
|
+
const getStateSelector = (dictionary, component, appearance, state, groupType, variant, type, platform, isRootMapping) => {
|
|
201
|
+
const meta = dictionary.unfilteredTokens?.[component]?.meta;
|
|
202
|
+
const appearanceMeta = meta?.appearances?.[appearance];
|
|
203
|
+
const selectors = [];
|
|
204
|
+
if (type === 'state-variant') {
|
|
205
|
+
selectors.push(appearanceMeta?.variantGroups?.[groupType]?.[variant]?.states?.[state]?.selector?.[platform]);
|
|
206
|
+
}
|
|
207
|
+
if (type === 'state-mapping' || type === 'state-variant') {
|
|
208
|
+
selectors.push(appearanceMeta?.mapping?.states?.[state]?.selector?.[platform], meta?.mapping?.states?.[state]?.selector?.[platform]);
|
|
209
|
+
}
|
|
210
|
+
const selector = (platform === "mobile" && (type === "state-variant" || (type == "state-mapping" && !isRootMapping))
|
|
211
|
+
? `${meta?.mapping?.selector?.[platform]}${selectors.find(Boolean)}`
|
|
212
|
+
: selectors.find(Boolean)) || `:${state}`;
|
|
213
|
+
// Return the first defined selector or fallback to pseudo-class
|
|
214
|
+
return selector;
|
|
215
|
+
};
|
|
216
|
+
const getSelectorFromGroup = (group, dictionary, platform) => {
|
|
217
|
+
const { component, appearance, type, groupType, variant, state, isRootMapping } = group;
|
|
218
|
+
const meta = dictionary.unfilteredTokens?.[component]?.meta;
|
|
219
|
+
const appearanceMeta = meta?.appearances?.[appearance];
|
|
220
|
+
const defaultBase = `.${component}-${appearance}`;
|
|
221
|
+
const rootMappingSelector = meta?.mapping?.selector?.[platform] || `.${component}`;
|
|
222
|
+
const appearanceMappingSelector = appearanceMeta?.mapping?.selector?.[platform] || defaultBase;
|
|
223
|
+
const getCombinedVariantSelector = () => {
|
|
224
|
+
const selector = appearanceMeta?.variantGroups?.[groupType]?.[variant]?.selector?.[platform];
|
|
225
|
+
if (platform === 'mobile') {
|
|
226
|
+
return selector || `${[
|
|
227
|
+
appearanceMappingSelector || [component, appearance].filter(Boolean).join('-'),
|
|
228
|
+
variant
|
|
229
|
+
].filter(Boolean).join('-')}`;
|
|
230
|
+
}
|
|
231
|
+
return selector
|
|
232
|
+
? expandSelectors(platform, appearanceMappingSelector, selector)
|
|
233
|
+
: expandSelectors(platform, appearanceMappingSelector, `.${component}-${variant}`);
|
|
234
|
+
};
|
|
235
|
+
const getStateSelectorWrapper = () => getStateSelector(dictionary, component, appearance, state, groupType, variant, type, platform, isRootMapping);
|
|
236
|
+
switch (type) {
|
|
237
|
+
case 'mapping':
|
|
238
|
+
return isRootMapping ? rootMappingSelector : appearanceMappingSelector;
|
|
239
|
+
case 'variant':
|
|
240
|
+
return getCombinedVariantSelector();
|
|
241
|
+
case 'state-mapping':
|
|
242
|
+
return isRootMapping
|
|
243
|
+
? expandSelectors(platform, rootMappingSelector, getStateSelectorWrapper())
|
|
244
|
+
: expandSelectors(platform, appearanceMappingSelector, getStateSelectorWrapper());
|
|
245
|
+
case 'state-variant':
|
|
246
|
+
return expandSelectors(platform, getCombinedVariantSelector(), getStateSelectorWrapper());
|
|
247
|
+
default:
|
|
248
|
+
return '';
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
const expandSelectors = (platform, baseSelectors, stateSelectors = ['']) => {
|
|
252
|
+
if (platform == "web") {
|
|
253
|
+
const bases = baseSelectors.split(',').filter(Boolean);
|
|
254
|
+
const states = stateSelectors.split(',').filter(Boolean);
|
|
255
|
+
const combos = [];
|
|
256
|
+
for (const base of bases) {
|
|
257
|
+
for (const state of states) {
|
|
258
|
+
combos.push(`${base}${state}`);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
return combos.join(',');
|
|
262
|
+
}
|
|
263
|
+
else {
|
|
264
|
+
return `${baseSelectors}${stateSelectors}`;
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
// takes a group object and a dictionary, and returns a CSS block
|
|
268
|
+
// Example output:
|
|
269
|
+
// .btn-filled-status-primary {
|
|
270
|
+
// --wm-btn-filled-status-primary-color: #fff;
|
|
271
|
+
//}
|
|
272
|
+
const generateCssBlockFromGroup = (group, dictionary, usesReferences, getReferences, platform) => {
|
|
273
|
+
const { tokens, component, appearance, groupType, variant } = group;
|
|
274
|
+
let selector = getSelectorFromGroup(group, dictionary, platform);
|
|
275
|
+
if (platform === 'web' && selector) {
|
|
276
|
+
selector = scopeSelectorForWeb(selector);
|
|
277
|
+
}
|
|
278
|
+
if (!selector)
|
|
279
|
+
return '';
|
|
280
|
+
const cssProps = tokens
|
|
281
|
+
.map((token) => {
|
|
282
|
+
const value = getProcessedTokenValue(token, dictionary, usesReferences, getReferences);
|
|
283
|
+
const baseProp = getBasePropertyName(token.path, component, appearance, groupType, variant);
|
|
284
|
+
const cssVarName = `--wm-${component}${baseProp ? `-${baseProp}` : ''}`.replace(/-+$/, '');
|
|
285
|
+
return ` ${cssVarName}: ${value};`;
|
|
286
|
+
})
|
|
287
|
+
.join('\n');
|
|
288
|
+
if (platform === 'web') {
|
|
289
|
+
return `${selector} {\n${cssProps}\n}`;
|
|
290
|
+
}
|
|
291
|
+
else {
|
|
292
|
+
const selectors = selector.split(',').map(s => s.trim()).filter(Boolean);
|
|
293
|
+
//if there are multiple selectors extract custom variant from the first selector and apply it to subsequent selectors
|
|
294
|
+
if (selectors.length > 1) {
|
|
295
|
+
const firstSelector = selectors[0];
|
|
296
|
+
const hasCustomAppearance = /^\.[\w-]+\./.test(firstSelector);
|
|
297
|
+
if (hasCustomAppearance) {
|
|
298
|
+
// Extract base selector (e.g., ".btn-success" from ".btn-success.app-button-disabled")
|
|
299
|
+
const baseMatch = firstSelector.match(/^(\.[\w-]+)\./);
|
|
300
|
+
const baseSelector = baseMatch ? baseMatch[1] : '';
|
|
301
|
+
// Apply base selector to all subsequent selectors
|
|
302
|
+
selectors.forEach((selector, i) => {
|
|
303
|
+
if (baseSelector && !selector.startsWith(baseSelector)) {
|
|
304
|
+
selectors[i] = `${baseSelector}${selector}`;
|
|
305
|
+
}
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
return `${selectors.join(',\n')} {\n${cssProps}\n}`;
|
|
310
|
+
}
|
|
311
|
+
};
|
|
312
|
+
/**
|
|
313
|
+
* Derives a clean CSS variable suffix from the token path.
|
|
314
|
+
* Removes known structural segments like component name, appearance, state, variant, etc.
|
|
315
|
+
*
|
|
316
|
+
* @param tokenPath - The full token path array
|
|
317
|
+
* @param componentRootKey - e.g., "btn"
|
|
318
|
+
* @param appearance - e.g., "filled"
|
|
319
|
+
* @param groupType - e.g., "status" or "size"
|
|
320
|
+
* @param variant - e.g., "primary", "lg"
|
|
321
|
+
* @returns A kebab-case string like "color-background" to append to --wm-btn
|
|
322
|
+
*/
|
|
323
|
+
const getBasePropertyName = (tokenPath, componentRootKey, appearance, groupType, variant) => {
|
|
324
|
+
const stateIndex = tokenPath.indexOf('states');
|
|
325
|
+
const stateName = stateIndex !== -1 ? tokenPath[stateIndex + 1] : null;
|
|
326
|
+
// All known structural segments to exclude from final name
|
|
327
|
+
const ignoreSegments = new Set([
|
|
328
|
+
componentRootKey,
|
|
329
|
+
'appearances',
|
|
330
|
+
appearance,
|
|
331
|
+
'mapping',
|
|
332
|
+
'states',
|
|
333
|
+
stateName,
|
|
334
|
+
'variantGroups',
|
|
335
|
+
groupType,
|
|
336
|
+
variant
|
|
337
|
+
]);
|
|
338
|
+
// Sanitize helper: removes illegal characters like @ and trims leading/trailing dashes
|
|
339
|
+
const sanitize = (segment) => segment.replace(/[^a-zA-Z0-9-_]/g, '-').replace(/^-+|-+$/g, '').trim();
|
|
340
|
+
// Build property name from remaining segments
|
|
341
|
+
const propertyName = tokenPath
|
|
342
|
+
.filter(segment => segment && !ignoreSegments.has(segment))
|
|
343
|
+
.map(sanitize)
|
|
344
|
+
.join('-');
|
|
345
|
+
return propertyName;
|
|
346
|
+
};
|
|
347
|
+
/**
|
|
348
|
+
* Prefixes `.wm-app` to each selector in a comma-separated string for web
|
|
349
|
+
*/
|
|
350
|
+
function scopeSelectorForWeb(selector) {
|
|
351
|
+
if (!selector)
|
|
352
|
+
return '';
|
|
353
|
+
return selector
|
|
354
|
+
.split(',')
|
|
355
|
+
.map(s => s.trim())
|
|
356
|
+
.map(s => (s.startsWith('.wm-app') ? s : `.wm-app ${s}`))
|
|
357
|
+
.join(', ');
|
|
358
|
+
}
|
|
359
|
+
export { cssVarCalcMixFormatter, componentVariantsFormatter, getSelectorFromGroup, scopeSelectorForWeb, cleanSelector };
|
|
360
|
+
//# sourceMappingURL=style-dictionary-utils.js.map
|
|
@@ -0,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EAAC,CAAC","sourcesContent":["\n// If `opacity` exists, we apply a `color-mix` formula to blend colors\n// If `multiple` exists, we apply the `calc()` function to multiply the reference value\n// Otherwise, we simply replace the reference with its corresponding variable\nfunction processTokenValue(value, refs, multiple, opacity) {\n // Remove `mapping` from token.name\n const cleanName = refs.name.replace(/mapping-?/g, '');\n if (opacity) {\n return `color-mix(in srgb, var(--${cleanName}), transparent calc(100% - ${opacity}))`;\n } else if (multiple) {\n return value.replace(refs.value, `calc(var(--${cleanName}) * ${multiple})`);\n } else {\n return value.replace(refs.value, `var(--${cleanName})`);\n }\n}\n\n// Helper function to resolve references for both `multiple` and `opacity` and return the updated value\nfunction resolveTokenReferences(token, unfilteredTokens, usesReferences, getReferences) {\n let multiple = token.original?.attributes?.multiple;\n let opacity = token.original?.attributes?.opacity;\n\n // Resolve references in `multiple` and `opacity`\n multiple = resolveAndReplaceReferences(multiple, unfilteredTokens, usesReferences, getReferences);\n opacity = resolveAndReplaceReferences(opacity, unfilteredTokens, usesReferences, getReferences);\n\n return { multiple, opacity };\n}\n\n// Helper function to resolve references and return the token name\nfunction resolveAndReplaceReferences(attribute, unfilteredTokens, usesReferences, getReferences) {\n if (attribute && usesReferences(attribute, unfilteredTokens)) {\n const refs = getReferences(attribute, unfilteredTokens);\n refs.forEach(ref => {\n // Replace the reference with the resolved token name\n attribute = `var(--${ref.name})`;\n });\n }\n return attribute;\n}\n\n/**\n * @param selector The raw CSS selector string\n * @returns A cleaned string of class names\n */\nconst cleanSelector = (selector) => {\n return selector?.replace(/^\\.wm-app\\s*/, '') // Remove .wm-app prefix if present\n .replace(/^\\./, '') // Remove leading dot\n .replace(/\\./g, ' ') || ''; // Replace remaining dots with spaces\n}\n\n\nconst cssVarCalcMixFormatter = (usesReferences, getReferences, fs) => ({\n name: 'wm-calc-colormix-format',\n format: function ({ dictionary, options }) {\n const { selector, tokenReadmePath } = options;\n // Prepare Markdown table only if enabled\n const tableRows = ['| Token | Description |', '|-------|------------|'];\n \n // Generate CSS variable definitions\n const variables = dictionary.allTokens\n .map((token) => {\n // Remove `mapping` from token.name\n const cleanName = token.name.replace(/mapping-?/g, '');\n let value = getProcessedTokenValue(token, dictionary, usesReferences, getReferences);\n\n // Add to table if token has a description and table generation is enabled\n if (tokenReadmePath && token?.attributes?.description) {\n const pathName = token.path\n .slice(1) // ignore first key (btn, data-table etc.,)\n .filter(key => key !== 'mapping') // remove 'mapping'\n .join('.');\n\n // Keep full description but handle <br> tags properly for table\n let safeDescription = token?.attributes?.description\n .replace(/\\|/g, '\\\\|') // escape pipe characters\n .replace(/<br\\s*\\/?>/gi, '<br>') // keep <br> tags as HTML for proper rendering\n .trim();\n\n tableRows.push(`| ${pathName} | ${safeDescription} |`);\n }\n\n return `--${cleanName}: ${value};`;\n })\n .join(`\\n`);\n\n // Write the table if tokens has description\n if (tokenReadmePath && tableRows.length > 2 && fs) {\n tableRows.unshift(\n `<!-- AUTO-GENERATED FILE. Do not edit manually. -->`,\n ``,\n `# Token Reference Table`,\n ``,\n `This table lists all tokens for this component:`,\n ``\n );\n fs.writeFileSync(tokenReadmePath, tableRows.join('\\n'), 'utf8');\n console.log(`Token description table generated: ${tokenReadmePath}`);\n }\n\n // Return correctly formatted output based on selector\n return selector && selector.trim()\n ? `${selector} {\\n${variables}\\n}\\n` // Wrap in selector\n : `${variables}\\n`; // No selector, no closing bracket\n },\n}\n);\n\n\nfunction getProcessedTokenValue(token, dictionary, usesReferences, getReferences) {\n let value = String(token.value);\n // Checking if the token has references\n if (usesReferences(token.original.value, dictionary.unfilteredTokens)) {\n const refs = getReferences(token.original.value, dictionary.unfilteredTokens);\n\n refs.forEach((ref) => {\n // Resolve references for `multiple` and `opacity`\n const { multiple, opacity } = resolveTokenReferences(token, dictionary.unfilteredTokens, usesReferences, getReferences);\n // Process the value based on resolved references\n value = processTokenValue(value, ref, multiple, opacity);\n });\n } else {\n value = token.original.value || token.value\n }\n return value;\n}\n\nconst componentVariantsFormatter = (usesReferences, getReferences, platform, options = {}) => ({\n name: 'css/component-variants',\n format: function ({ dictionary, file, ...rest }) {\n const componentRootKey = Object.keys(dictionary.tokens)[0];\n if (!componentRootKey) {\n console.warn(`[Style Dictionary] Could not derive component name from source ${file.destination}`);\n return '';\n }\n\n const groupedVariants = groupTokensByVariantType(dictionary, componentRootKey, platform);\n const cssBlocks = Object.values(groupedVariants).map(group =>\n generateCssBlockFromGroup(group, dictionary, usesReferences, getReferences, platform)\n );\n\n // --- README GENERATION ---\n const generateReadmeFn = options.generateComponentReadme;\n if (generateReadmeFn) {\n generateReadmeFn(\n componentRootKey,\n groupedVariants,\n platform,\n dictionary,\n {...rest.options}\n );\n }\n // --- END README GENERATION ---\n\n return cssBlocks.join('\\n\\n');\n }\n});\n\nconst groupTokensByVariantType = (dictionary, componentRootKey, platform) => {\n const groups = {};\n const isMobile = platform === 'mobile';\n const mappingStore = {};\n\n dictionary.allTokens.forEach((token) => {\n const path = token.path;\n const appearanceIndex = path.indexOf('appearances');\n const variantGroupIndex = path.indexOf('variantGroups');\n const stateIndex = path.indexOf('states');\n const isState = stateIndex !== -1;\n const state = isState ? path[stateIndex + 1] : null;\n\n const appearance = appearanceIndex !== -1 ? path[appearanceIndex + 1] : null;\n const groupType = variantGroupIndex !== -1 ? path[variantGroupIndex + 1] : null;\n const variant = variantGroupIndex !== -1 ? path[variantGroupIndex + 2] : null;\n\n const isVariantToken = appearance && groupType && variant;\n const isTopLevelMapping = appearanceIndex === -1 && path[1] === 'mapping';\n const isAppearanceMapping = appearanceIndex !== -1 && path[appearanceIndex + 2] === 'mapping';\n\n let key, type, group;\n\n if (isVariantToken) {\n key = `${componentRootKey}-${appearance}-${groupType}-${variant}${isState ? `-${state}` : ''}`;\n type = isState ? 'state-variant' : 'variant';\n group = {\n type,\n component: componentRootKey,\n appearance,\n groupType,\n variant,\n state,\n };\n if (!groups[key]) {\n groups[key] = { ...group, tokens: [] };\n \n if (isMobile && mappingStore[appearance]) {\n groups[key].tokens.push(...mappingStore[appearance]);\n }\n } \n } else if (isTopLevelMapping) {\n key = `${componentRootKey}-mapping${isState ? `-${state}` : ''}`;\n type = isState ? 'state-mapping' : 'mapping';\n group = {\n type,\n component: componentRootKey,\n appearance: 'mapping',\n state,\n isRootMapping: true,\n };\n } else if (isAppearanceMapping) {\n const appearanceDef = dictionary.tokens?.[componentRootKey]?.appearances?.[appearance];\n const hasVariants = appearanceDef?.variantGroups && Object.keys(appearanceDef.variantGroups).length > 0;\n // If mobile + variants exist, skip creating this class — mapping will be merged\n if (isMobile && hasVariants && !isState) {\n mappingStore[appearance] ??= [];\n mappingStore[appearance].push(token);\n return; // skip adding mapping like .btn-outlined\n }\n // Else proceed to generate a separate class for mapping\n key = `${componentRootKey}-${appearance}-mapping${isState ? `-${state}` : ''}`;\n type = isState ? 'state-mapping' : 'mapping';\n group = {\n type,\n component: componentRootKey,\n appearance,\n state,\n };\n\n if (isMobile && !isState) {\n mappingStore[appearance] ??= [];\n mappingStore[appearance].push(token);\n }\n }\n\n if (key) {\n groups[key] ??= { ...group, tokens: [] };\n groups[key].tokens.push(token);\n }\n });\n\n return groups;\n};\n\n// output: a selector string based on the group type and state\nconst getStateSelector = (dictionary, component, appearance, state, groupType, variant, type, platform, isRootMapping) => {\n const meta = dictionary.unfilteredTokens?.[component]?.meta;\n const appearanceMeta = meta?.appearances?.[appearance];\n const selectors = [];\n\n if (type === 'state-variant') {\n selectors.push(\n appearanceMeta?.variantGroups?.[groupType]?.[variant]?.states?.[state]?.selector?.[platform]\n );\n }\n\n if (type === 'state-mapping' || type === 'state-variant') {\n selectors.push(\n appearanceMeta?.mapping?.states?.[state]?.selector?.[platform],\n meta?.mapping?.states?.[state]?.selector?.[platform]\n );\n }\n const selector =\n (platform === \"mobile\" && (type === \"state-variant\" || (type == \"state-mapping\" && !isRootMapping))\n ? `${meta?.mapping?.selector?.[platform]}${selectors.find(Boolean)}`\n : selectors.find(Boolean)) || `:${state}`;\n\n // Return the first defined selector or fallback to pseudo-class\n return selector;\n};\n\nconst getSelectorFromGroup = (group, dictionary, platform) => {\n const { component, appearance, type, groupType, variant, state, isRootMapping } = group;\n\n const meta = dictionary.unfilteredTokens?.[component]?.meta;\n const appearanceMeta = meta?.appearances?.[appearance];\n\n const defaultBase = `.${component}-${appearance}`;\n const rootMappingSelector = meta?.mapping?.selector?.[platform] || `.${component}`;\n const appearanceMappingSelector = appearanceMeta?.mapping?.selector?.[platform] || defaultBase;\n\n const getCombinedVariantSelector = () => {\n const selector = appearanceMeta?.variantGroups?.[groupType]?.[variant]?.selector?.[platform];\n if (platform === 'mobile') {\n return selector || `${[\n appearanceMappingSelector || [component, appearance].filter(Boolean).join('-'),\n variant\n ].filter(Boolean).join('-')}`;\n }\n return selector\n ? expandSelectors(platform, appearanceMappingSelector, selector)\n : expandSelectors(platform, appearanceMappingSelector, `.${component}-${variant}`);\n };\n\n const getStateSelectorWrapper = () =>\n getStateSelector(dictionary, component, appearance, state, groupType, variant, type, platform, isRootMapping);\n\n switch (type) {\n case 'mapping':\n return isRootMapping ? rootMappingSelector : appearanceMappingSelector;\n\n case 'variant':\n return getCombinedVariantSelector();\n\n case 'state-mapping':\n return isRootMapping\n ? expandSelectors(platform, rootMappingSelector, getStateSelectorWrapper())\n : expandSelectors(platform, appearanceMappingSelector, getStateSelectorWrapper());\n\n case 'state-variant':\n return expandSelectors(platform, getCombinedVariantSelector(), getStateSelectorWrapper());\n\n default:\n return '';\n }\n};\n\nconst expandSelectors = (platform, baseSelectors, stateSelectors = ['']) => {\n if (platform == \"web\") {\n const bases = baseSelectors.split(',').filter(Boolean);\n const states = stateSelectors.split(',').filter(Boolean);\n\n const combos = [];\n for (const base of bases) {\n for (const state of states) {\n combos.push(`${base}${state}`);\n }\n }\n return combos.join(',');\n } else {\n return `${baseSelectors}${stateSelectors}`\n }\n};\n\n\n// takes a group object and a dictionary, and returns a CSS block\n// Example output:\n// .btn-filled-status-primary {\n// --wm-btn-filled-status-primary-color: #fff;\n//}\nconst generateCssBlockFromGroup = (group, dictionary, usesReferences, getReferences, platform) => {\n const { tokens, component, appearance, groupType, variant } = group;\n\n let selector = getSelectorFromGroup(group, dictionary, platform);\n if (platform === 'web' && selector) {\n selector = scopeSelectorForWeb(selector);\n }\n if (!selector) return '';\n\n const cssProps = tokens\n .map((token) => {\n const value = getProcessedTokenValue(token, dictionary, usesReferences, getReferences);\n const baseProp = getBasePropertyName(token.path, component, appearance, groupType, variant);\n const cssVarName = `--wm-${component}${baseProp ? `-${baseProp}` : ''}`.replace(/-+$/, '');\n return ` ${cssVarName}: ${value};`;\n })\n .join('\\n');\n\n\n if (platform === 'web') {\n\n return `${selector} {\\n${cssProps}\\n}`;\n\n } else {\n const selectors = selector.split(',').map(s => s.trim()).filter(Boolean);\n\n //if there are multiple selectors extract custom variant from the first selector and apply it to subsequent selectors\n if (selectors.length > 1) {\n const firstSelector = selectors[0];\n const hasCustomAppearance = /^\\.[\\w-]+\\./.test(firstSelector);\n if (hasCustomAppearance) {\n // Extract base selector (e.g., \".btn-success\" from \".btn-success.app-button-disabled\")\n const baseMatch = firstSelector.match(/^(\\.[\\w-]+)\\./);\n const baseSelector = baseMatch ? baseMatch[1] : '';\n\n // Apply base selector to all subsequent selectors\n selectors.forEach((selector, i) => {\n if (baseSelector && !selector.startsWith(baseSelector)) {\n selectors[i] = `${baseSelector}${selector}`;\n }\n });\n\n }\n\n }\n\n return `${selectors.join(',\\n')} {\\n${cssProps}\\n}`;\n }\n};\n\n\n/**\n * Derives a clean CSS variable suffix from the token path.\n * Removes known structural segments like component name, appearance, state, variant, etc.\n *\n * @param tokenPath - The full token path array\n * @param componentRootKey - e.g., \"btn\"\n * @param appearance - e.g., \"filled\"\n * @param groupType - e.g., \"status\" or \"size\"\n * @param variant - e.g., \"primary\", \"lg\"\n * @returns A kebab-case string like \"color-background\" to append to --wm-btn\n */\nconst getBasePropertyName = (tokenPath, componentRootKey, appearance, groupType, variant) => {\n const stateIndex = tokenPath.indexOf('states');\n const stateName = stateIndex !== -1 ? tokenPath[stateIndex + 1] : null;\n\n // All known structural segments to exclude from final name\n const ignoreSegments = new Set([\n componentRootKey,\n 'appearances',\n appearance,\n 'mapping',\n 'states',\n stateName,\n 'variantGroups',\n groupType,\n variant\n ]);\n\n // Sanitize helper: removes illegal characters like @ and trims leading/trailing dashes\n const sanitize = (segment) =>\n segment.replace(/[^a-zA-Z0-9-_]/g, '-').replace(/^-+|-+$/g, '').trim();\n\n // Build property name from remaining segments\n const propertyName = tokenPath\n .filter(segment => segment && !ignoreSegments.has(segment))\n .map(sanitize)\n .join('-');\n\n return propertyName;\n};\n\n/**\n * Prefixes `.wm-app` to each selector in a comma-separated string for web\n */\nfunction scopeSelectorForWeb(selector) {\n if (!selector) return '';\n return selector\n .split(',')\n .map(s => s.trim())\n .map(s => (s.startsWith('.wm-app') ? s : `.wm-app ${s}`))\n .join(', ');\n}\n\nexport { cssVarCalcMixFormatter, componentVariantsFormatter, getSelectorFromGroup , scopeSelectorForWeb, cleanSelector};\n\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extracts the base file name (excluding extension) from a token's file path.
|
|
3
|
+
*
|
|
4
|
+
* @param {string} filePath - The full path of the token file.
|
|
5
|
+
* @returns {string} - The base file name without its extension.
|
|
6
|
+
*/
|
|
7
|
+
export function getBaseFileName(filePath: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* Retrieves all component names from the tokens/components directory.
|
|
10
|
+
* This function reads the contents of the given directory and filters out only the directories,
|
|
11
|
+
* assuming each directory represents a component.
|
|
12
|
+
*
|
|
13
|
+
* @returns {string[]} - An array of component names (folder names).
|
|
14
|
+
*/
|
|
15
|
+
export function getComponentNames(directory: any): string[];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
import path from "path";
|
|
3
|
+
/**
|
|
4
|
+
* Retrieves all component names from the tokens/components directory.
|
|
5
|
+
* This function reads the contents of the given directory and filters out only the directories,
|
|
6
|
+
* assuming each directory represents a component.
|
|
7
|
+
*
|
|
8
|
+
* @returns {string[]} - An array of component names (folder names).
|
|
9
|
+
*/
|
|
10
|
+
const getComponentNames = (directory) => {
|
|
11
|
+
return fs
|
|
12
|
+
.readdirSync(directory)
|
|
13
|
+
.filter((file) => fs.statSync(path.join(directory, file)).isDirectory()); // Only include directories
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Extracts the base file name (excluding extension) from a token's file path.
|
|
17
|
+
*
|
|
18
|
+
* @param {string} filePath - The full path of the token file.
|
|
19
|
+
* @returns {string} - The base file name without its extension.
|
|
20
|
+
*/
|
|
21
|
+
const getBaseFileName = (filePath) => {
|
|
22
|
+
return path.basename(filePath, path.extname(filePath));
|
|
23
|
+
};
|
|
24
|
+
export { getBaseFileName, getComponentNames };
|
|
25
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"./","sources":["src/utils/utils.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB;;;;;;GAMG;AACH,MAAM,iBAAiB,GAAG,CAAC,SAAS,EAAE,EAAE;IACtC,OAAO,EAAE;SACN,WAAW,CAAC,SAAS,CAAC;SACtB,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,2BAA2B;AACzG,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,eAAe,GAAG,CAAC,QAAQ,EAAE,EAAE;IACnC,OAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;AACzD,CAAC,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,CAAC","sourcesContent":["import fs from \"fs\";\nimport path from \"path\";\n\n/**\n * Retrieves all component names from the tokens/components directory.\n * This function reads the contents of the given directory and filters out only the directories,\n * assuming each directory represents a component.\n *\n * @returns {string[]} - An array of component names (folder names).\n */\nconst getComponentNames = (directory) => {\n return fs\n .readdirSync(directory)\n .filter((file) => fs.statSync(path.join(directory, file)).isDirectory()); // Only include directories\n};\n\n/**\n * Extracts the base file name (excluding extension) from a token's file path.\n *\n * @param {string} filePath - The full path of the token file.\n * @returns {string} - The base file name without its extension.\n */\nconst getBaseFileName = (filePath) => {\n return path.basename(filePath, path.extname(filePath));\n};\n\nexport { getBaseFileName, getComponentNames };"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Central WaveMaker npm namespace configuration.
|
|
3
|
+
*
|
|
4
|
+
* All source files import WM_NPM_SCOPE from here instead of hardcoding
|
|
5
|
+
* '@wavemaker'. Override via the WM_NPM_SCOPE environment variable to
|
|
6
|
+
* switch namespaces at build or runtime.
|
|
7
|
+
*
|
|
8
|
+
* Default: '@wavemaker-ai'
|
|
9
|
+
* Override: WM_NPM_SCOPE=@wavemaker node scripts/build.js post-build
|
|
10
|
+
*/
|
|
11
|
+
export const WM_NPM_SCOPE: string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Central WaveMaker npm namespace configuration.
|
|
3
|
+
*
|
|
4
|
+
* All source files import WM_NPM_SCOPE from here instead of hardcoding
|
|
5
|
+
* '@wavemaker'. Override via the WM_NPM_SCOPE environment variable to
|
|
6
|
+
* switch namespaces at build or runtime.
|
|
7
|
+
*
|
|
8
|
+
* Default: '@wavemaker-ai'
|
|
9
|
+
* Override: WM_NPM_SCOPE=@wavemaker node scripts/build.js post-build
|
|
10
|
+
*/
|
|
11
|
+
export const WM_NPM_SCOPE = process.env.WM_NPM_SCOPE || '@wavemaker-ai';
|
|
12
|
+
//# sourceMappingURL=wm-namespace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wm-namespace.js","sourceRoot":"./","sources":["src/wm-namespace.js"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,eAAe,CAAC","sourcesContent":["/**\n * Central WaveMaker npm namespace configuration.\n *\n * All source files import WM_NPM_SCOPE from here instead of hardcoding\n * '@wavemaker'. Override via the WM_NPM_SCOPE environment variable to\n * switch namespaces at build or runtime.\n *\n * Default: '@wavemaker-ai'\n * Override: WM_NPM_SCOPE=@wavemaker node scripts/build.js post-build\n */\nexport const WM_NPM_SCOPE = process.env.WM_NPM_SCOPE || '@wavemaker-ai';\n"]}
|
package/web.index.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface TokenGroup {
|
|
2
|
+
default: Record<string, any>;
|
|
3
|
+
light?: Record<string, any>;
|
|
4
|
+
dark?: Record<string, any>;
|
|
5
|
+
[key: string]: Record<string, any> | undefined;
|
|
6
|
+
}
|
|
7
|
+
export interface Tokens {
|
|
8
|
+
color: TokenGroup;
|
|
9
|
+
font: TokenGroup;
|
|
10
|
+
space: TokenGroup;
|
|
11
|
+
radius: TokenGroup;
|
|
12
|
+
opacity: TokenGroup;
|
|
13
|
+
elevation: TokenGroup;
|
|
14
|
+
icon: TokenGroup;
|
|
15
|
+
border: TokenGroup;
|
|
16
|
+
borderStyle: TokenGroup;
|
|
17
|
+
[key: string]: TokenGroup | undefined;
|
|
18
|
+
}
|
|
19
|
+
export declare const tokens: Record<string, TokenGroup>;
|
|
20
|
+
export declare const componentsList: {};
|